May 10, 200620 yr XML Gods...Guys I want to use this sort of loop to install a "reversion" - if a button is pressed but after two seconds there has been no entry made, the system reverts to its previous state.Is there a key trap I can use? Maybe something like an 'if no event then' type loop?Cheers.
May 10, 200620 yr Hi,If what you want is to detect if a key is pressed like when entering data on the GPS, or a specific is executed,it would be simple. Now, if the reversion must be canceled upon ANY event or keypress is done, it would be a tough work :-)Tom
May 11, 200620 yr Hi Tom,I feared as much. Situation is this: In my PFD page on my MFD, five of the buttons allow input (CRS, ADF, bearing 1 and 2, heading bug, etc). If one of these buttons is pressed a submenu appears. If, however, after two seconds, nothing is entered, the submenu disappears and the original page is restored.I know this would be tough work - the company I'm building this for may just have to settle for my work around of click once to change, click again to cancel.Cheers.
May 11, 200620 yr If you are checking for character typing, this could be an approach (pseudocode)In Mouse section :Button1 --> CRSClick= 1(>LSbMenuActive) (PAbsoluteTime) (>LTime)Button2 --> ADFClick= 1(>LSbMenuActive) (PAbsoluteTime) (>LTime)etcIn Update section: (LTime) 0 != if{ (LTime) 2 + (PAbsoluteTime) < if{ 0 (>LSbMenuActive) 0 (>LTime) } }In Element section (SubMenu):Visible = (LSbMenuActive)In Keys section:On Key (alphanumeric, etc)Process the key (PAbsoluteTime) (>LTime)Tom
May 12, 200620 yr Yeah, I guess that could work. Because I have a few buttons that do it I could turn the initial couple of lines into a Macro and call it on each click.... hmm, plan forming in head...Thanks Tom, I'll let you know.Daz.
Create an account or sign in to comment