Hi Chris,

yeah, we have all read Crockfords excellent articles. But this solution also don't allow us to define typical private variables. Sure, they are hidden. But "private" from C-style dialects is just something more advanced. This closure based idea don't allows to define class methods in the typical qooxdoo style with proto.getterXXX and proto.setterXXX. Sure you can keep both of them into a own local function and so they can share stuff, but this makes could more ugly. I really like our "private" variables through a simple underscore. This is much more readable IMHO.

Sebastian



Chris Ricks schrieb:
Hi all,

I've just tried adding the comment below to the Qooxdoo site (specifically, to http://qooxdoo.oss.schlund.de/2005/10/26/properties), but am getting a funky PHP error. Specifically:

*Fatal error*: Call to undefined function: blocklite() in */homepages/21/d74480075/htdocs/qooxdoo/textpattern/lib/txplib_misc.php* on line *1194

*That said, here's the text of the comment:

-----

The last section of this (really excellent article) is slightly off.

It is possible to have private members and methods in JavaScript.

Effectively, by exploiting JavaScript's closure-based scope specification, one can define private members and methods within the constructor for a given class.

More information can be found at the rather excellent site of Douglas Crockford:

http://www.crockford.com/javascript/private.html

Chris Ricks
IT Operations




-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to