Hi,
Am 04.01.2006 04:08, Chris Ricks schrieb:
[...]
Qooxdoo properties perform these checks when using the "instance" and
"classname" parameters respectively.
To do this in my own code (where using Qooxdoo properties isn't
appropriate), is it simply a matter of checking the object's "classname"
or "instance" members?
I can't give you a definitive answer on this, but the QxWidget class
uses the "classname" to make sure it's not instantiated directly, which
is similar to the use-case you described.
So going from there, I'd say it's probably best to use the classname.
This being said: It really depends on your use-case. Using the classname
won't work with extending classes. So you wouldn't be able to provide
extended classes as a value for a property, if you check via the
classname. For this you would have to use instanceof
Cheers
Benjamin
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel