FROM : Don Arnel
DATE : Thu Apr 10 20:14:25 2008
I thought maybe there was a simple message I could send to NSApp, but
it looks like putting the loop in a new thread is the way to go.
Thanks!
On Apr 10, 2008, at 2:06 PM, Jamie Phelps wrote:
> Maybe look into NSThread and see if it meets your needs. You'd run
> your loop in the thread and keep processing events like normal in
> the main thread.
>
> (I'm still rather new to Cocoa myself, so I hope I'm not misleading
> you. The other list readers will correct me if I'm wrong.)
>
> HTH,
> Jamie
>
> On Apr 10, 2008, at 1:00 PM, Don Arnel wrote:
>
>> Hey all...
>>
>> This is my first time posting to this list. I've been a Windows
>> developer for many many years and have just recently started to
>> play around with Macs. I feel like a beginner all over again!
>> Anyway....
>>
>> I've got a Cocoa application which runs a simulation loop 1000s of
>> times. Of course, this prevents any user interaction with the rest
>> of the program while the simulation is running. When I was
>> programming for Windows there was a call in Visual Basic
>> (app.DoEvents()) which would process any pending events. You could
>> put DoEvents() inside long loops to prevent blocking user input.
>> Is there a similar way to handle this in Cocoa?
>>
>> Thanks for any help!
>> - Don
>> _______________________________________________
>>
>> Cocoa-dev mailing list (<email_removed>)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>
>
DATE : Thu Apr 10 20:14:25 2008
I thought maybe there was a simple message I could send to NSApp, but
it looks like putting the loop in a new thread is the way to go.
Thanks!
On Apr 10, 2008, at 2:06 PM, Jamie Phelps wrote:
> Maybe look into NSThread and see if it meets your needs. You'd run
> your loop in the thread and keep processing events like normal in
> the main thread.
>
> (I'm still rather new to Cocoa myself, so I hope I'm not misleading
> you. The other list readers will correct me if I'm wrong.)
>
> HTH,
> Jamie
>
> On Apr 10, 2008, at 1:00 PM, Don Arnel wrote:
>
>> Hey all...
>>
>> This is my first time posting to this list. I've been a Windows
>> developer for many many years and have just recently started to
>> play around with Macs. I feel like a beginner all over again!
>> Anyway....
>>
>> I've got a Cocoa application which runs a simulation loop 1000s of
>> times. Of course, this prevents any user interaction with the rest
>> of the program while the simulation is running. When I was
>> programming for Windows there was a call in Visual Basic
>> (app.DoEvents()) which would process any pending events. You could
>> put DoEvents() inside long loops to prevent blocking user input.
>> Is there a similar way to handle this in Cocoa?
>>
>> Thanks for any help!
>> - Don
>> _______________________________________________
>>
>> Cocoa-dev mailing list (<email_removed>)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>
>
| Related mails | Author | Date |
|---|---|---|
| Don Arnel | Apr 10, 20:00 | |
| Stéphane | Apr 10, 20:06 | |
| Jamie Phelps | Apr 10, 20:06 | |
| Don Arnel | Apr 10, 20:14 | |
| Shawn Erickson | Apr 10, 20:23 | |
| Michael Vannorsdel | Apr 10, 20:25 | |
| Brian Stern | Apr 10, 21:49 | |
| Wade Tregaskis | Apr 10, 23:13 | |
| Mike R. Manzano | Apr 11, 00:16 | |
| Ken Thomases | Apr 11, 00:20 | |
| Don Arnel | Apr 11, 13:35 | |
| Bill Garrison | Apr 11, 14:08 | |
| Don Arnel | Apr 12, 14:54 |






Cocoa mail archive

