05-12-2007 12:50 PM
05-12-2007 01:05 PM
what kind of event is handled in the event you want to trigger: a value change, mouse move?...
What you can do is trigger this event from the previous event case. For instance, using the property node "change value (signaling)" if the event is set to "value change".
05-12-2007 01:09 PM
look at this thread. http://forums.ni.com/ni/board/message?board.id=170&message.id=81266
It is exactly what you are looking for!
05-12-2007 04:23 PM
thanks titi.
it doesnt work for me, i must have then an other problem. will update on devellopements.
05-12-2007 04:52 PM
05-13-2007 04:31 AM
Mike,
i am not sure about the hole in the time-space continuum or the phase-space density, did not checked that yet
i think my problem is i can go to another event only if i change (signaling) a value. but this makes my code very ugly with lots of local variables. my event structure handles more than 20 events, each one triggered by several possibilities. that is why i am looking for more elegant ways around.
i think i am getting lost in my own code...i need to write the whole thing on paper. it is all Altenbach fault (just kidding), because he proved me my codes could be much more efficient by finding alternatives to sequences. so that is what i try to do
05-13-2007 03:10 PM
05-13-2007 07:54 PM
@Gabi1 wrote:
i think my problem is i can go to another event only if i change (signaling) a value. but this makes my code very ugly with lots of local variables. my event structure handles more than 20 events, each one triggered by several possibilities. that is why i am looking for more elegant ways around.i think i am getting lost in my own code...i need to write the whole thing on paper. it is all Altenbach fault (just kidding), because he proved me my codes could be much more efficient by finding alternatives to sequences. so that is what i try to do
Yeah, blame the messenger! 🙂
I somehow think that you're still doing this way too complicated. Why would you need lots of local variables? All data that needs to be accessed in multiple cases belongs in shift registers (For some ideas, have a look at the tic tac toe program I posted in your other thread).
Properly designed, an event structure with 20 event cases, each linked to multiple events should not need many val(sgl) property writes (still each instance replaces one local variable). If all event cases fire other event cases, you soon run into an event avalance. 🙂
You could use two loops, one for UI handling using events and one for the processing using a state machine, then link the two via a queue.
You might even be able to do everything with one loop (+ event structure) by placing the state machine case structure in the timeout case and manipulate the correct case from within other events via a shift register. If no events happen, the state machine proceeds through its regular states.
06-06-2007 03:57 PM - edited 06-06-2007 03:57 PM
Altenbach and Mike,
i am sorry only now i read the email notifiying me of your answers.
Thanks a lot for the tips. i never used before the ctrlref in the event structure. it makes my processing of UI much easier to figure out. i still have some trouble with transforming arrays into clusters tough ( only way to get reference to all the controls inside...). i really wish there would be such a beast as extendable cluster of clusters (effectively an array of clusters, but that would give me the ref to all clusters ( and controls) inside). i will try make myself such a creature, that will (hopefully) recieve the cluster type externally.
Altenbach, as you predicted i ended up with event avalanche, mainly because as i have more and more events, i forget to check the follow up of firing events from within events. i am now changing it to state machine solution, and we'll see where it goes.
the reason i have lots of local variables, is that if one wants to signal the value, the type of booleans cannot be anymore latch and release, and one has to release manually, using a local. the way i do it is in the event handling the boolean, i have a small event structure with 200ms timout, where the local is reset.
Thanks guys!
Message Edited by Gabi1 on 06-06-2007 04:00 PM