Page 1 of 1

The mysteries of Nasal

Posted: Wed May 18, 2016 11:21 pm
by jwocky
Hi,

I am at the moment mentally a little bit boarded up. I am in a button listener in canvas and try to call a function from another module but in the same namespace. The called function is not part of any class.
Now, if I say

voodoomaster.autopilot_change(1)

I get no error, but the function is also not called. What am I missing here?

Re: The mysteries of Nasal

Posted: Thu May 19, 2016 12:58 am
by jwocky
Great, I found in the meantime, the listen function isn't called at all.

Code: Select all

         var btnCmpA = canvas.gui.widgets.Button.new(me.root, canvas.style, {})
            .setText("CmpA")
            .setCheckable(1) # this indicates that is should be a toggle button
            .setChecked(0) # depressed by default
            .setFixedSize(45, 25);
         btnCmpA.listen("toggle", func(e) {
print("CmpA toggled");
test();
            voodoomaster.autopilot_change(1);
            if (e.detail.checked) {


the print doesn't come. Other buttons with "clicked" work. So, more glitches in Canvas?

Re: The mysteries of Nasal

Posted: Thu May 19, 2016 1:11 am
by IAHM-COL
oh my!

Re: The mysteries of Nasal

Posted: Thu May 19, 2016 1:43 am
by jwocky
No worries, now, after I spelled it correctly, it works!
"toggled" not "toggle"

My in honor of Homer Simpson moment ... duh!

Re: The mysteries of Nasal

Posted: Thu May 19, 2016 7:40 am
by Octal450
:D

Re: The mysteries of Nasal

Posted: Wed May 25, 2016 10:52 pm
by FL2070
You need to sneeze on it -

Gets nasal working every time ;)

Re: The mysteries of Nasal

Posted: Mon Aug 15, 2016 2:50 am
by Octal450
I have to do this.

I'm sure you can sniff out all the Nasal errors..... :mrgreen:

...

XD

Josh