|
Hello list, I am new, so I am sorry if my question is old or badly formulated! I am trying to understand the inner working of bindings in Flex. I understand the principal but not the "magic" and the tutorials of documentations I read show more the "how to do" than "how does it really work". Now, the ideal would be some sort of comparison with what (for me) is the "reference" in bindings implementation: Cocoa bindings (Objective-C MacOSX). In Objective-C, bindings are implemented using: - key-value coding to give the names of the attributes you bind to (you can bind to "selectedObject.firstName" if the object of the model is in a list. - key-value observing to be able to listen to the notifications sent by the model when something changes What I don't understand in Flex (or is it in ActionScript3?) is how the model will notify a change of a attribute of a list which can be listened to. I see in the code you can describe an attribute as "bindable", but what effect does that really have when, say, I do a "setFirstName(newValue)" when "firstName" is bindable. In Cocoa, it generates a local notification with a key path and old and new values which can be listened to by key-value observing objects (among which, bindings). I would be happy with a low level documentation or (better) a comparison with Cocoa bindings to get started. Where I want to get to: I would like to write an app with a "real" data model (patients, visits, etc...). This model can be updated by asynchronous calls from a server. A change in the model obviously has to be reflected in the user interface. The other way round, I would like to update the user interface and this will update the model. I would like to get notified of the modification of the model to update the server. An example would also do it, but not an example where the code is embeded in MXML. Model classes in separate ActionScript files. An MXML just for describing the user interface, and a controller class to setup the bindings and the communication. This would really help! Thanks,
__._,_.___
-- Alexander Lamb Service d'Informatique Médicale Hôpitaux Universitaires de Genève +41 22 372 88 62 +41 79 420 79 73 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- [flexcoders] General question about bindings and similariti... Alexander Lamb
- RE: [flexcoders] General question about bindings and s... Stephen Gilson
- Re: [flexcoders] General question about bindings a... Alexander Lamb
- Re: [flexcoders] General question about bindin... Owen van Dijk

