pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cynthia Schwartz <djangolog...@gmail.com>
Subject data binding
Date Sat, 04 May 2013 03:05:18 GMT
My question:

I wish to attach userData to my custom component.  I attach it to my object
by putting it into the UserData dictionary

Now  I wish to get it.  however I wish to have my constructor decode some
of it for display so that the skin comes up with the decoded version.

 I am not sure the best way to do this. Can someone suggest?

I have so far :

MyComponent myComponent = new MyComponent();
mycomponent.getUserData.put("file", file);

now in my constructor :

MyComponent() {
file = (File)this.getUserData().get("file");
decodeData();  ??????

File file;

but this bad form since the constructor is building the class as I would be
called a method of the class.
So If I remove decodeData from the constructor and make it a public method I
can call :


However I am unsure how to get my decoded data entries into the user
directory without explicitly putting them in. i would like access the same
way that the styles dictionary works, ie. the setThis(), setThat()
methodology where This and That are then styles in the Styles dictionary.
Does UserData dictionary have an equivalent.


View raw message