PDA

View Full Version : "Hide when false" setting not being saved with Lua



emmee
April 2nd, 2006, 07:37 PM
I've spent all evening trying to get a button to hide using a Lua rule with no luck.

Wha't I've discovered is that the "Hide when false" pick is not being saved and consequently not making it into the CCF.

Working in NRD, I can select the "Hide when false" with a Lua rule and the check mark appears. Saving the CCF seems to update NR, but the hiding function does not work.

After closing and re-starting NRD I look at the "Hide when false" setting and it's cleared. Rebooting and trying again does not help. I've tried this on a couple of other buttons on other panels with the same results.

The "Hide when false" setting works just fine using a simple NR variable rule.

I'm using NRD 1.0.0.22 and NR 1.1.0.44

Ben S
April 2nd, 2006, 07:49 PM
Sorry, but this is a limitation of the file format being used. You cannot have a hide when false on a button with Lua. The workaround is to use a frame with the button inside. Since frames use hide when false by default (since they can't have other visual states), this will work.

emmee
April 3rd, 2006, 05:36 AM
Ben,

Thanks for the prompt reply.

If this is a known limitation then why does the help file contain the following:


Scripting Visual States

Lua code can also be used to determine which state of a Frame or Button is active. On the Properties dialog, Display tab, select a State other than Default (right-click the States box to create a new State if necessary) and then select Lua as the Rule. Then press the Edit Lua Code button.


If Hide When False is not ticked, the Lua chunk should return true to select this state.
If Hide When False is ticked, the chunk should return false to hide the element or true to show it in the Default state.


What other funtions listed in the documentation are actually not available?

Is there an errata sheet or bug list available?

It's time consuming enough trying to climb the NR / NRD learning curve without taking these long detours that could be avoided with proper documentation.

Ben S
April 5th, 2006, 03:40 PM
Sorry for the confusion. I'll talk to John about the inaccuracy of that part, though we hope to have this particular situation resolved for NR 2 itself.