Antoine Chalons Posted June 21, 2011 Report Share Posted June 21, 2011 Hi all, I've started using XControl and for my first attempt I thought I'd build string control that behaves like a password string on smartphones. Here's what I've come up with so far (in LV2010). As it is my first XControl I don't really know how to do all I would like to do. Right now, when a new character is typed the previously typed character are replaced with * ; anyone could suggest a way automatically replace the last character with a star after 5 seconds if no new character has been added? password.zip Quote Link to comment
Wim Posted June 21, 2011 Report Share Posted June 21, 2011 Hi Antoine, looks nice I think you need some parallel thread/vi that will trigger an event in the facade.vi after those 5 seconds. A sort of timer vi ... This timer vi can then trigger an event with a property node or invoke node from the xcontrol. Regards, Wim Quote Link to comment
Antoine Chalons Posted June 21, 2011 Author Report Share Posted June 21, 2011 I think you need some parallel thread/vi that will trigger an event in the facade.vi after those 5 seconds. A sort of timer vi ... This timer vi can then trigger an event with a property node or invoke node from the xcontrol. Yep, so there is 2 conditions for a character to be replaced with * : - 5 seconds without activity (the parallel timer vi deals with that) - a new character is entered (the facade vi would then stop the timer vi via dyn event or occurrence or notifier or whatever) Cheers Quote Link to comment
Norm Kirchner Posted July 5, 2011 Report Share Posted July 5, 2011 Yep, so there is 2 conditions for a character to be replaced with * : - 5 seconds without activity (the parallel timer vi deals with that) - a new character is entered (the facade vi would then stop the timer vi via dyn event or occurrence or notifier or whatever) Cheers Gentlemen, don't be fooled into thinking that process will be easy. Unfortunately there is no easy way to kick an XControl alive to receive an event without interacting w/ it's front panel interactively somehow. Technically the XCtl code goes practically idle until one of the 'Official' XCtl events gets fired. You can register user events into the panel till you're blue in the face, but the facade won't wake up untill there is some other kind of interaction w/ the panel. And even then the panel won't be registered for the events that were already fired because the Event Registration Refnum will have gone invalid. fwiw, I hope you prove me wrong, but that's just one of those rough edges to the XCtl ~,~ Quote Link to comment
Antoine Chalons Posted July 8, 2011 Author Report Share Posted July 8, 2011 Gentlemen, don't be fooled into thinking that process will be easy. Unfortunately there is no easy way to kick an XControl alive to receive an event without interacting w/ it's front panel interactively somehow. Technically the XCtl code goes practically idle until one of the 'Official' XCtl events gets fired. You can register user events into the panel till you're blue in the face, but the facade won't wake up untill there is some other kind of interaction w/ the panel. And even then the panel won't be registered for the events that were already fired because the Event Registration Refnum will have gone invalid. fwiw, I hope you prove me wrong, but that's just one of those rough edges to the XCtl ~,~ Thanks for the warning, I haven't had time to come back to that piece of code yet but when I do, I'll come back to this post. Cheers Quote Link to comment
Aristos Queue Posted July 9, 2011 Report Share Posted July 9, 2011 Use the example I provided a few years back for the Scrolling LED XControl. That gives you a pattern for forcing an update of an XControl based on timing. https://decibel.ni.com/content/docs/DOC-1180 1 Quote Link to comment
Antoine Chalons Posted July 9, 2011 Author Report Share Posted July 9, 2011 Use the example I provided a few years back for the Scrolling LED XControl. That gives you a pattern for forcing an update of an XControl based on timing. https://decibel.ni.c...t/docs/DOC-1180 Great example, cheers! Quote Link to comment
Antoine Chalons Posted July 3, 2012 Author Report Share Posted July 3, 2012 Better late than never... Here's the link to a github rep that I called XControls, it contains : - the password XControl with some new features (auto-replace a new character with a * after a delay, delay is a property of the XControl) - a tree XControl that I found somewhere on the web and never had the time to edit - AQ's LED XControl example mentioned above (I used it to learn some tricks) - a magic ring XControl, it's a work in progress - other example XControls that I found on the web https://github.com/AntoineChalons/XControls.git Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.