January 19, 200521 yr My XML Question of the Day: Is it possible to have XML code that gets executed just once, at gauge (or panel) load time? That is, without setting my own flag and testing it every frame...
January 19, 200521 yr Author No, not possible.But the trick to protect it with a flag works perfect.Don't be worried about performance... The schedule overhead of a gauge that should run only once (but now is scheduled everytime) is not noticeable.But if you are still worried about (if you have an extremely complex panel, with lots of gauges containing such code): Make one gauge that does this initialisation (using L:vars), and let this run with UpdateFrequency 1 (1 schedule per second).But again, it's not worth the effort IMO.Cheers, Rob Barendregt
January 20, 200521 yr If I understand you correctly, yes it is possible. I have a number of gauges where default values are set on panel load, and do this just once. If you say(G:Var1) if equals zero then set, say, your variable (click or L type)and in the same statement set (G:Var1) to 1, and the variable setting will not be repeated.Nick.
January 21, 200521 yr Author >Thanks Nick. I believe this is the solution Rob recommended>as well.Yes.Which was (I assume) you already suggested yourself in your original post :-)Cheers, Rob
Create an account or sign in to comment