Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: How to jump to a point in a Program?
|
Posted: Feb 25, 2002 8:41 PM
|
|
You can't go jumping around in a method like that. Anyway, that is horrible programming style even in the languages, such as Visual Basic, that do allow it.
What you really want to do is partition your tasks with the granularity that will allow you to accomplish whatever effect you are seeking.
Which brings us to the question: What exactly are you trying to accomplish with this sort of thing? Are you trying to have a cancel button that will cancel some activity and continue with another? This could be accomplished by having a little task queue and having your cancel button event listener call a cancel() method (which probably sets a "I've been cancelled" flag member variable) on the current running task (it would be be checking in its loops to see it had been cancelled, of course). If a task is cancelled (or completes), then the next task begins.
|
|