Jump to content

special control structure


Psyfusion

Recommended Posts

Hi!

I want to design an application with a number of inputs an two buttons. The task would be to set the inputs then press a button, then enter new settings, this has to continue until the other button is pressed. The values of the inputs are to be put into an array and the index is increased if the button is pressed. So basically I have to fill a table with values based on the given inputs and the new values are entered after the button is pressed, and the other other button stops the process!

Please help me! Its urgent!

Thanx!

Link to post

Hi!

My bigger problem is solved i think but now i'm stuck with the following:

I have a while loop nested into a true/false case structure. If i change the true/false input, the change only comes if the inner while loop is finished...this is normal, but i would need a way to do the 2 processes parallel. So if i change to input to false, the while loop would be ignored and the process would stop immediately!

Please help me solve this!

Thanx!

Link to post

QUOTE (Psyfusion @ Dec 14 2008, 01:08 PM)

Hi!

My bigger problem is solved i think but now i'm stuck with the following:

I have a while loop nested into a true/false case structure. If i change the true/false input, the change only comes if the inner while loop is finished...this is normal, but i would need a way to do the 2 processes parallel. So if i change to input to false, the while loop would be ignored and the process would stop immediately!

Please help me solve this!

Thanx!

Please post your code - it is much easier to comment on code than on a vague description. That said, look into the "producer consumer with events" design pattern. I think it will handle your problem nicely.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.