06-12-2009 10:07 AM
In a built application, if a UI takes a second or two to load, it sometimes displays the previous loaded data. The previous loaded data was from when it was being tested in development mode. Is there something that automatically trips set to default value for the coltrols in development mode? We do not manually set this option.
Is there a way to prevent it without having to write empty data to the control first when loading then querying the database for the real values, etc...
06-12-2009 10:13 AM
Hi nate!
Nice question I have this problem too. It happens if you use e.g. Listboxes and Waveform Charts. The data will be stored in such controls and indicators.
I don't know how to solve it.
If you goto the Top Menue->Edit->Reinit To Default it will only erase data from controls andd indicators, which don't store data in itself.
Regards, Eugen
06-12-2009 10:45 AM
The best method I have found (although you might not like this) is I have a template for most of mu GUIs that have a state machine architecture. The initialize queues up the init values (this is where I explicitly reset all controls to a known state), then I show the front panel. You can use reinit to default but from my experience I like to set these values explicitly, this way I have a state in my archidecture to easily change their values. I find the reinit to default causes me problems since durring debugging you sometimes change these valuse by mistake. This is just what works best for me and i am used to this protocol.
06-15-2009 08:43 AM
Thanks for the tip, I was really hoping that it would not come to that, or that I was just doing something wrong. Perhaps NI will choose to address this issue in the 2010 release since it's probably too late to implement in the 2009 release.
06-15-2009 09:41 AM
May I ask what your opposition is to initializing the data using a 0 constant or array of 0?
It does exactly what you are describing.
06-22-2009 07:55 AM
It seems kinda silly to have to initialize the control twice. Once with no data and once with the data you want it to display. I think it is just more of an annoyance that different controls' behaviors are not consistent. Obviously this data is being stored somewhere in the program which then gets built into the application. I just don't think it should.