Can not hide a "WhileTrue" node after the second time

EDIT: could please anyone explain to me how to show my code here? Thanks! In the meantime, here is the code I mean: http://pastebin.com/pk24cdLy


I want to show a panel with the click of a button and hide it with the click on another button (contained in said panel). This works for the first time, but the second time the button does not react to input. I have checked this in the local preview.

Here’s the code from my MainView.ux:

Or is it something with the concept of “WhileTrue” nodes that I do not understand?

A different topic which will be important for me in the future: is there a way to show the panel above the button?

Thanks!

Marc-André

Hi!

Not sure why it doesn’t show up the second time, but to get the panel above the button, simply place it “above” in the UX file. Make sure to wrap it in a panel to retain order:

<DockPanel>
    <Panel>
        <WhileTrue>...</WhileTrue>
    </Panel>

    <Button />

</DockPanel>

And you show code by indenting it (4 spaces or 1 tab) :slight_smile:

Thank you Anders, keeping it in a panel worked for the ordering. Also thanks for the tip on intending the code part – is that a common practice? (Never saw it before, tried bbcode instead).

As for the problem with the button, it seems that it does not respond to input at all because there is also a “WhilePressed” on it which also is not triggered the second time the panel is shown.

Hello, I still have this problem and can not solve this. Could you please look into this? Am I doing anything wrong conceptually?

Thanks!

Marc-André

Hi!

Have you updated to the latest version? I am testing your code now and it all looks working to me, both the <Clicked /> and <WhilePressed />

Feel free to paste your code again if it has changed a lot since you first posted it

Hi, I am running version 0.8.4, build 4765. Unfortunately, the issue persists. Is there a newer version?

The latest version is 0.9.2 :slight_smile: You can get it from here: https://www.fusetools.com/downloads (And from that point on you should also be receiving update notifications).

Thank you for the hint, just installed 0.9.2. I did not know about it because when running “Check for updates” in the “tray” on OSX I did not receive any updates. So I just tried my example in 0.9.2, and yes, this works now!

Glad to hear you got it working! We had some problems with checking for updates earlier.

The update notifications might be one of the worst places to have a bug, as there is no way of letting the user know it has been fixed… Sorry for the inconvenience!