Ctrl-Shift-click on the "." entry in the property browser fires all the
listeners of the parent node.

Each property can have multiple listeners tied to it.  There are various
types of listeners (read, write) and various modes of operation.

When a listener's trigger conditions are met, it then executes the
associated nasal code.  (Is it possible to also trigger C code?  Probably,
but I don't know if that is done or not.)

So to activate this newly added behavior in the property browser, simply cd
to the property node parent, and ctrl-shift click on the "." entry in the
children list.  Then the parent's changevalue listener will be fired.

I point this out not to be critical (which might be assumed because my prior
message was somewhat critical) ... this is all *very* useful functionality.
But I want to point out that there are some very complex interactions
between the property systems, these things called "listeners" which fire
when a property is accessed in any number of ways, and the nasal code that
is triggered as a result.  And then this functionality is leveraged in a
variety of subtle ways by the 3d modeling system, multiplayer system,
instrument panels, systems modeling, etc.  We have a large complex network
of code snippets that are executed as a side effect of changing (or even
viewing) values in the property system.

Not every aspect of our property system is simple and self documenting ...
again, not to be critical, complex tasks often require complex solutions,
but I say this to balance out the occasional claim that the property system
is entirely self documenting ... yes at some levels, but not on many other
levels.

Curt.


---------- Forwarded message ----------
From: Melchior Franz
Date: Tue, Apr 7, 2009 at 10:06 AM
Subject: [Flightgear-cvslogs] CVS: source/src/GUI property_list.cxx, 1.22,
1.23
To: flightgear-cvsl...@lists.sourceforge.net


Update of /var/cvs/FlightGear-0.9/source/src/GUI
In directory baron.flightgear.org:/tmp/cvs-serv3280/src/GUI

Modified Files:
       property_list.cxx
Log Message:
Ctrl-Shift-click on the '.' entry fires listeners of the parent node.
This can be used to validate atomic branches after individual members
have been changed.

(This is useful no matter how the discussion on aggregate property types
ends, and not meant to enforce/accelerate a decision.)

Index: property_list.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/GUI/property_list.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- property_list.cxx   3 Dec 2008 20:18:15 -0000       1.22
+++ property_list.cxx   7 Apr 2009 15:05:57 -0000       1.23
@@ -195,7 +195,9 @@

        if (prop_list->_dot_files && (selected < 2)) {
            if (src[0] == '.' && (src[1] == '\0' || src[1] == ' ')) {
-                if (mod_ctrl)
+                if (mod_ctrl && mod_shift)
+                    prop_list->_curr->fireValueChanged();
+                else if (mod_ctrl)
                    prop_list->toggleVerbosity();
                else if (mod_shift)
                    dumpProperties(prop_list->_curr);


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Flightgear-cvslogs mailing list
flightgear-cvsl...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-cvslogs



-- 
Curtis Olson: http://baron.flightgear.org/~curt/
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to