setUsesThreadedAnimation
setUsesThreadedAnimation
- Subject: setUsesThreadedAnimation
- From: Richard Kendall Wolf <email@hidden>
- Date: Fri, 31 May 2002 17:43:20 -0500
Okay, dumb question ... but I looked it up in the archives and in the
documentation and I'm still confused because there isn't a whole lot of
info out there yet.
My question is, what, exactly, does:
[ myProgressIndicator setUsesThreadedAnimation: YES ];
do? Does it tell Cocoa that I'll be setting:
[ myProgressIndicator incrememtBy: someAmount ];
within a detached NSThread? -- which is what I'm actually doing. Or
does it tell Cocoa to open a new thread -- just for animating the
progress indicator -- in addition to my own, detached, NSThread? For
example, does:
- ( IBAction ) someAction: ( id ) sender
{
... stuff ...
[ myProgressIndicator setUsesThreadedAnimation: YES ];
[ NSThread detachNewThreadSelector: @selector( myTask: )
toTarget: self withObject: nil ];
... stuff ...
}
- ( void ) myTask: ( id ) arg
{
... stuff ...
[ myProgressIndicator incrememtBy: someAmount ];
... stuff ...
[ NSThread exit ];
}
represent -three- threads? -- the main application thread from which the
myAction message/action is sent, the myTask thread which I spwan myself,
and a "progress bar animation" thread which Cocoa spawns? Is that what
the meaning of setUsesThreadedAnimation is? Or is there some other
meaning?
I should say, my little tester, threaded application works just fine
with progress indicators and spawned threads ... but it doesn't seem to
matter whether I send the setUsesThreadedAnimation message or not. And
honestly, I don't find this (from Apple) entirely clear:
Sets whether the receiver implements animation of the
progress indicator in a separate thread. If the application
becomes multithreaded as a result of an invocation of this
method, the application's performance could become noticeably
slower.
... but I "think" the meaning is something like I just laid out.
Thanks in advance for any insight!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.