Search the web
Sign In
New User? Sign Up
xbl-developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
XBL encapsulation issue: private member properties?   Message List  
Reply | Forward Message #29 of 38 |

A binding that I am developing has various properties. Some of the properties have side effects when setting them like the disabled property for html:form elements. Because of this, setting the property must be done through a setter, and the property must not be accessible to the outside by any other means. The properties are not associated with any anonymous content nor with any CSS properties. They are just properties of the JS object and do not appear in the DOM.

I coded an example to illustrate the issue I am having. I try to define a property called visible and then I create getters and setters for that property. The constructor and getter/setter reference this.visible, but this causes the error: too much recursion. To get around this, I created an alternate "hacked" binding that uses this._visible to store the state when the visible property is get or set. However, doing this results in _visible being publicly accessible without having to go through the getter/setter. (Remember, this is just an illustration. Storing the visibility state in the style.visibility property is not the answer as the binding I am developing does not have such properties.)

Any input you have would be appreciated. The bindings are located in testcase.xml.

Here's the example's URL: http://www.linguiste.org/projects/xbl-encapsulation/testcase.html

Thanks!
Weston


Thu May 25, 2006 7:17 pm

westonmr
Offline Offline
Send Email Send Email

Forward
Message #29 of 38 |
Expand Messages Author Sort by Date

A binding that I am developing has various properties. Some of the properties have side effects when setting them like the disabled property for html:form...
westonmr
Offline Send Email
May 25, 2006
8:14 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help