Rammer Posted December 30, 2008 Report Share Posted December 30, 2008 Hello all. I am trying to come up with a way to have a message table for the users of an application. I would like to show different levels of messages (Error, Warning, and Informational) and would like each to have a distinct font color in the table/array (red for error, yellow for warning, blue for informational). I have found a way to do this with a table via the property nodes. My problem is I don't want the table to grow infinitley so I limit it to the last X messages where X is usually 100. Once I hit the 100 message limit I must loop through the whole 100 cells of the table to set the new font color. This is terribly inefficient. Does anyone have any other ideas or have they done something similar? Thanks. Quote Link to comment
LAVA 1.0 Content Posted December 30, 2008 Report Share Posted December 30, 2008 QUOTE (Rammer @ Dec 29 2008, 02:46 PM) Hello all. I am trying to come up with a way to have a message table for the users of an application. I would like to show different levels of messages (Error, Warning, and Informational) and would like each to have a distinct font color in the table/array (red for error, yellow for warning, blue for informational). I have found a way to do this with a table via the property nodes. My problem is I don't want the table to grow infinitley so I limit it to the last X messages where X is usually 100. Once I hit the 100 message limit I must loop through the whole 100 cells of the table to set the new font color. This is terribly inefficient. Does anyone have any other ideas or have they done something similar?Thanks. Ideas off top of my head... 1) Use an active cell of -2,-2 to write the default color and only explicitly write the cells that are different 2) set Defer.FP.Updat = F prior to setting the properties and then un-defer the Front Panel update when you are done. 3) Addition to #2 above. Set the table to not visable after the defer, but before the changes.... Ben Quote Link to comment
LAVA 1.0 Content Posted December 30, 2008 Report Share Posted December 30, 2008 Scroll the table, then delete the strings of the 'old' cells. Delete all data after 10.000 messages or so. Emptying the strings will limit your memory use. Ton 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.