I’m wondering if there’s a way I can get my program to read the file size of the page loaded in a web view in my window, like the Activity Monitor in Safari?
I just want a total of the file size so I can approximate.
Also, I used to use Interface Builder bindings to have a spinner whirl around when my page is loading, but apple took that binding out. Is there a non obj-c way to do this again?
If you progress indicator is set as type indeterminate in interface builder then do the following:
on awake from nib theObject
if name of theobject is “myProgressIndicator” then
set uses threaded animation of theobject to true
end
end
then in your code…
start progress indicator “myProgressIndicator” of window 1
– your code here
stop progress indicator “myProgressIndicator” of window 1
Thanks for your help, but the problem with that is that the spinner doesn’t keep going all the while the page is loading before stopping, it just flashes on and then off again.
Well don’t stop the spinner until your page is loaded. Obviously the stop spinner command gets called immediately, thus it stops. You have to put the stop command somewhere in your code so that it doesn’t stop until the page is finished loading. The spinner won’t stop until you tell it to stop. How do you know when the page is fully loaded in your code? Put the stop command after that. And if your code doesn’t detect when the page is fully loaded then put some code in that will detect it. I’ve seen code for that in the applescript forums.