On Jul 1, 10:56=A0am, Gregory Weston <u...@[EMAIL PROTECTED]
> wrote:
> In article
> <8b480d16-aafe-4baa-8b32-af0eac0fd...@[EMAIL PROTECTED]
>,
>
> =A0JoeG <joe.gar...@[EMAIL PROTECTED]
> wrote:
> > I am writing a program that calculates the various scores needed to
> > construct a DnD character. While doing the calculations, I ask the
> > user what skills they want trained by popping up a dialog panel. I
> > need to pause the rest of the calculations until the user pressed the
> > button in the dialog giving his choice. Everything I have tried so far
> > results in an infinite loop. Do I need to implement threading here, or
> > is there another option? Any suggestions would be greatly appreciated.
> > Thanks
>
> This isn't the problem threading was invented to solve; it's really
> almost the opposite. Essentially what you need to do is put the
> calculations on hold while collecting the new input. Just cache whatever
> you've got, display the dialog and let the normal event loop go. Then
> use the dismissal of the dialog as the signal to retrieve your cached
> information and resume the calc.
>
> The specific technique for doing that depends on information about your
> project which you haven't told us. The big question is: are you using
> Carbon or Cocoa?
>
> --
> "Harry?" Ron's voice was a mere whisper. "Do you smell something ...
burn=
ing?"
> =A0 =A0- Harry Potter and the Odor of the Phoenix
I am using Cocoa and Xcode 3.0 to do this. This is also the first time
I've used Cocoa and Objective C to do this kind of project.


|