jgcode Posted May 26, 2008 Report Share Posted May 26, 2008 I had the recently posed the question of accessing the Color Palette: How to do this? using a SRTM and coded a sub-optimum solution (which I was tryign to avoid) by using a popup Dialog VI with Color Box control so the user can access the palette this way (the listbox property nodes code allows me to know which cell was right clicked). However, in my simple subVI ColorPalettePopup.vi (which contains the Color Box control) I use an Event: "Color Box": Value Change. Every second time the subVI is called it automatically fires the Value Change event without the user initiating it. Every other time it functions correctly. Am I going crazy? Am I doing something wrong? Does this happen on other people's LV? Code is in LV8.0 Cheers JG Quote Link to comment
Ton Plomp Posted May 26, 2008 Report Share Posted May 26, 2008 I can't open your code, but have you set maybe the 're-initialize all to default on call' in the VI options active? Ton Quote Link to comment
jgcode Posted May 26, 2008 Author Report Share Posted May 26, 2008 QUOTE (tcplomp @ May 25 2008, 01:49 PM) I can't open your code, but have you set maybe the 're-initialize all to default on call' in the VI options active?Ton Thanks for taking a look Ton. I have reattached another version in case I made a mistake. Code written in 8.5 saved for previous version 8.0. When I load the attached in 8.5 then close it, it asks to save changes - so it should be in LV8.0. If it doesn't work - may be a property node difference between versions? Defineately works in 8.5 if you have it. Is the above suggestion found in VI properties? Quote Link to comment
Yair Posted May 26, 2008 Report Share Posted May 26, 2008 It looks like the Value Change event for a color box is fired twice even in the current beta. I'll report it. Here's a much more simplified example (8.0). Quote Link to comment
MikaelH Posted May 26, 2008 Report Share Posted May 26, 2008 So you have to do this in your code then... Maybe it's because LabVIEW supports foreground and background colors for colors in development environment, and the Color Boxes gets 2 event one for the foreground and then one for the background color. //Mikael Quote Link to comment
jgcode Posted May 27, 2008 Author Report Share Posted May 27, 2008 QUOTE (Yen @ May 26 2008, 03:40 AM) It looks like the Value Change event for a color box is fired twice even in the current beta. I'll report it. Here's a much more simplified example (8.0). QUOTE (MikaelH @ May 26 2008, 06:22 AM) Maybe it's because LabVIEW supports foreground and background colors for colors in development environment, and the Color Boxes gets 2 event one for the foreground and then one for the background color. //Mikael Thanks guys, a simple edit will make it work. Given your two different posts, I am interested to know if it is desired behaviour or a bug! Download File:post-10325-1211765704.vi Code is in LV8.0 Quote Link to comment
Tomi Maila Posted May 27, 2008 Report Share Posted May 27, 2008 QUOTE (Yen @ May 25 2008, 10:40 PM) It looks like the Value Change event for a color box is fired twice even in the current beta. I'll report it. Here's a much more simplified example (8.0). Can you add to the report that if you in the color dialog window press the more colors button, and press Cancel button in the more advanced color dialog window, the event gets still fired. Quote Link to comment
jgcode Posted May 27, 2008 Author Report Share Posted May 27, 2008 QUOTE (Tomi Maila @ May 26 2008, 01:58 PM) Can you add to the report that if you in the color dialog window press the more colors button, and press Cancel button in the more advanced color dialog window, the event gets still fired. OK I am leaning towards bug Quote Link to comment
jaegen Posted May 27, 2008 Report Share Posted May 27, 2008 This is actually a known bug. Quite annoying, but once you know it exists you can work around it. Jaegen 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.