Re: [flexcoders] Re: Databinding of a read only property
On Thursday 08 Mar 2007, durnelln wrote: ...then my class can only modify testVar through the protected _testVar property - which isn't bindable and therefore does not cause data bindings to update! Have your update code dispatchEvent() and do it that way ? -- Tom Chiverton Helping to elementarily harness enterprise-class users On: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Databinding of a read only property
On Thursday 08 Mar 2007, durnelln wrote: simple combination of [Bindable]/getter/setter methods to get Flex Builder to do all this automatically but ho hum...! FB is very GUI orientated, one reason I don't miss it that much on Linux. Now I see the next rev. will have things like refactoring support, so it might become a bit more of a pain not to have it... -- Tom Chiverton Helping to proactively cluster robust eyeballs On: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Databinding of a read only property
simple combination of [Bindable]/getter/setter methods to get Flex Builder to do all this automatically but ho hum...! FB is very GUI orientated, one reason I don't miss it that much on Linux. Now I see the next rev. will have things like refactoring support, so it might become a bit more of a pain not to have it... It's got nothing to do with Flex Builder and everything to do with the Flex compiler (mxmlc). Bindings can be setup without Flex Builder... Nick, the pattern I would recommend is this: private var __myvar:Number; [Bindable(myvarChanged)] public function get myvar():Number { return _myvar; } protected function get _myvar():Number { return __myvar; } protected function set _myvar(value:Number):void { __myvar = value; dispatchEvent(new Event('myvarChanged)); } This will get you a public read-only property (myvar) and a protected (or could be made private) read/write property (_myvar) which is all backed by the private (and you probably never to directly touch it) __myvar (note the double-underscore). The upside of this pattern is that all of your implementation code looks like the standard underscore indicates a protected/private member while not having to scatter dispatchEvent calls all over your code. It also has the advantage of probably not requiring you to modify any existing code that uses _myvar with a single underscore. Just a suggestion... Troy.
Re: [flexcoders] Re: Databinding of a read only property
On Thursday 08 Mar 2007, Troy Gilbert wrote: It's got nothing to do with Flex Builder FB lacks handy code orientated wizards, such as one to create various types of get/set accessors, choosing instead to focus on GUI building wizards. Just to be clear- this is a perfectly fine thing for Adobe to do :-) -- Tom Chiverton Helping to evangelistically customize open-source networks On: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/