The mysteries of Nasal

Everything in connection with developing aircraft for FlightGear
User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

The mysteries of Nasal

Postby jwocky » Wed May 18, 2016 11:21 pm

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?
Free speech can never be achieved by dictatorial measures!

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: The mysteries of Nasal

Postby jwocky » Thu May 19, 2016 12:58 am

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?
Free speech can never be achieved by dictatorial measures!

User avatar
IAHM-COL
Posts: 6452
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: The mysteries of Nasal

Postby IAHM-COL » Thu May 19, 2016 1:11 am

oh my!
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: The mysteries of Nasal

Postby jwocky » Thu May 19, 2016 1:43 am

No worries, now, after I spelled it correctly, it works!
"toggled" not "toggle"

My in honor of Homer Simpson moment ... duh!
Free speech can never be achieved by dictatorial measures!

Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: The mysteries of Nasal

Postby Octal450 » Thu May 19, 2016 7:40 am

:D

User avatar
FL2070
Posts: 246
Joined: Tue Sep 22, 2015 4:48 pm
Location: Earth

Re: The mysteries of Nasal

Postby FL2070 » Wed May 25, 2016 10:52 pm

You need to sneeze on it -

Gets nasal working every time ;)
Soundpack requests are currently: PERMANENTLY CLOSED
Current WIP: None
See and download all my work: HERE

Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: The mysteries of Nasal

Postby Octal450 » Mon Aug 15, 2016 2:50 am

I have to do this.

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

...

XD

Josh


Return to “Aircraft Development”

Who is online

Users browsing this forum: No registered users and 32 guests