Wim Posted January 8, 2010 Report Share Posted January 8, 2010 Hi Lava, I've a problem with my xcontrol and hope you can help me. My X-control is an array combined with a few buttons. I want to use the mouse scroll wheel to scroll through the array. I've made a 'Thread' that runs parallel and generates a user event when the user is scrolling. (Thread: while loop that polls the 'acquire data from device (=mouse)) I even detect if the mouse is on the xcontrol or not (mouse enter, mouse leave events in facade.vi) When i open the FP of my Thread it does what it should be doing. Boolean is true when mouse is on array ... false when it leaves and I get the scroll value from the mouse. But .... I was hoping that LV will run the facade.vi when a user event is generated but it doesn't ... it builds a buffer and when another event is called in the facade, my array starts dancing (buffer of user events) What I do: - create user event in init.vi - register for events: first call of display state change in facade.vi - generate user events in parallel thread (detect scrolling) Sorry but i cannot attach the LV-code because of company policy. I hope my problem is clear and that someone can give me some tips. Thanks in advance. Wim Quote Link to comment
Wim Posted January 8, 2010 Author Report Share Posted January 8, 2010 All, i have a work arround. ( Thx to my boss ) Now I take a reference to a 'scroll control' in my thread and I write through a prop node val(sgnl) to get a value change event in the facade. However ... info on using user events is appreciated Quote Link to comment
candidus Posted January 21, 2010 Report Share Posted January 21, 2010 I had exactly the same problem... I wanted to send an event to a group of XControls. I also had the idea tried to send a Value(sgnl) to my XControls to wake them up, but these events were also forwarded to my toplevel event handler: It was flooded with events and caused the frontpanel to freeze... So I ended up in not using custom events for this task. There are many things you can do with a control when you have its control refnum without the need of sending events. For my XControl I had just to store the refnum to the main control on the Facade FP and use it later for setting properties. Perhaps you can try a similar trick. 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.