RE: Lettering got off in the last post!

[email protected] (Dallas Johnston)
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
Sorry, lettering got off there a bit =/... Too little sleep!

Should be:

> *a)* model initialisation in the proxy:
>>>> proxy.install/remove<Property>Model(<SomeModel>(...))
>- This was chosen so that model instillation removal can be logically 
>  separated for the benefit of the uninitiated.
>
> *b)* model.value assigment:
>>>> proxy.<ModelAsProperty> = SomeValue
>- This avoids the modify() goo.
>
> *c)* model assignment:
>>>> foo = proxy.<ModelAsProperty>
>- foo at this point holds a reference to the Model.
>
> *d)* user manupulation of the model via the GUI:
># user inputs some data
># model is updated accordingly via the call to Proxy.push by the wrapper 
>
> *e)* model evaluation:
>>>> print foo + proxy.<ModelAsProperty>[1:]
>- At this point, the relative method will be called on the Model from the python runtime
>
>Now, what is happening under the covers? This will be discussed next.
>
>When a Model is installed (a), the Model is inserted into a dictionary of installed models with the property name as its key. Model.install(proxy, propertyName) is also called on the model so as to allow it to call proxy.push when the model has been modified in-place, i.e. through slice assignment per above.
>
>When a Model has been assigned a value (b), Proxy determines if the property assignment involves an installed model and thus calls Model.setValue(..) with the value obtained during the call to rawSet in Attribs, which replaced the Model in self.state. Proxy then assignes the model back into state[prop] before the call onto Wrapper.push(state) occurs. Model also makes a call onto send(self, ...) for all its observers to be notified of the change.
>
>In the case that the user has changed some property of a widget via GUI interaction *(d)*, a call to Proxy.push can be called to update the model. It is also possible for the Wrapper to just assign values, this updating the model the conventional way (b). At the end of the day (or procedure, as it were =P), the latter results in a call to Proxy.push aswell.
>
>When a Model is evaluated *(e)*, Proxy returns a reference to the Model and the appropriate call is made onto the Model method that corresponds directly to the context of invocation. This str(Proxy.<ModelAsProperty>) will result in a direct call to Model.__str__().

Again, sorry for the confusion.

--Dallas

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.