c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
82 stars 43 forks source link

cannot add listener to tied property #1312

Closed wkitty42 closed 3 years ago

wkitty42 commented 4 years ago

FG 2019.2.0 i'm seeing the following when i roll over these items and the tool tip pops up... i'm not trying to activate them... only rolling the mouse over them...

 3112.22 [POPU]:nasal      ERROR: Cannot add listener to tied property /controls[0]/lighting[0]/beacon[0]
 3112.45 [POPU]:nasal      ERROR: Cannot add listener to tied property /controls[0]/lighting[0]/strobe[0]
 3113.24 [POPU]:nasal      ERROR: Cannot add listener to tied property /controls[0]/lighting[0]/beacon[0]
 3113.47 [POPU]:nasal      ERROR: Cannot add listener to tied property /controls[0]/lighting[0]/nav-lights[0]
 3113.70 [POPU]:nasal      ERROR: Cannot add listener to tied property /controls[0]/anti-ice[0]/pitot-heat[0]

maybe these are related to #1281? i dunno... if there's a way to combine the two reports, i don't have a problem with that... these are the only ones i'm seeing and only when i roll over them... i'm in mid-flight when i saw them pop up on my console...

my build data is:

********** 2020-02-02 14:10:56 -0500 **********
********** Total elapsed update and compile time is 0 days 0 hours 2 minutes 52 seconds **********

PLib:    a542b8a03f8de1fe844af6ab4734b64d11e272e9
OSG 3.6: a827840baf0786d72e11ac16d5338a4ee25779db
Simgear: 11e243a2165b343633ba2d19208a972477bbf1bf
FGFS:    e4c393ba9c2963f2d64c3834b733952be1be3ed6
FGData:  9c927677ee8ff8ce3a01f565f763776b7e9a1936
FGAddon: r4497 | r-harrison | 2020-02-02 11:57:38 -0500 (Sun, 02 Feb 2020)

and my c172p is

commit 4cc48b6c7ae2ac47369ebd22ebbd0722cf47d9f2

wlbragg commented 4 years ago

They are harmless, it it the same issue. But I find it interesting you may have identified what causes them so keep this issue for sure because it points to a cause. It is related to tooltip maybe, those properties look like generic code base, like something a tooltip may invoke. Would be good to report that to dev list and see if we can get some answers,

wkitty42 commented 4 years ago

perhaps @Zaretto knows something about it? i think that's the right person... tagging them here to see before posting to the dev list...

hbeni commented 3 years ago

I see that too at the c182s, but otherwise all seems well. The props above are triggering from the tooltip hover-on. I don't know why, however.

Zaretto commented 3 years ago

There are cases when the error message is given incorrectly because normally you cannot listen to a tied property; except for a few cases where you can.

The idea is that we will add exceptions to the code to mark properties that are tied but can be listened to (such as view-number) to the core to remove the false warnings.

It helps if the model developer can investigate whether the listener works (add a print statement and see if the listener is called) and report any false positives to the devlist and exceptions can be added to the core.

legoboyvdlp commented 3 years ago

Yeah, you can safely ignore these issues.

These setlisteners are set on line 108 of tooltip.nas: var l = setlistener(p, func { me._updateText(); }); I'm going to close this, the only action to take here is to see if these properties can be marked as an exception; otherwise these are harmless warnings not caused by C172 code.