Actually I realized that in this case I probably don't need models at all - I probably just need to reinitialize the layout constraints when each submorph is initialized from persistent state. I've only been using initialize (and not initializePersistenState) and that's the problem. I'll study examples and the code some more - duh. Phil
On Tue, Mar 3, 2009 at 2:16 PM, Philip Weaver <philma...@gmail.com> wrote: > I'm done some more digging. It appears that I just need to use models. I > found what I think are good examples > in CheapListMorph.initialize/getSelection/setSelection) and I found > ViewTrait in Core.js. I don't think I really need or want to use the Widget > class atm but I see that many of the examples which use it. I'm just trying > to store layout constraint info with a morph when it gets serialized. I'll > post a code example if I don't get models working. > Thank Robert. > > On Tue, Mar 3, 2009 at 11:56 AM, Robert Krahn < > robert.kr...@student.hpi.uni-potsdam.de> wrote: > >> Hi Phil, >> >> can you give an example? >> >> Deserialization should work for common values (but not for all objects). >> In >> http://livelykernel.sunlabs.com/repository/lively-wiki/testworld3.xhtml I >> assigned values to the red rectangle (testValue, testValue2). >> >> Robert >> >> >> >> On Mar 3, 2009, at 12:26 AM, Philip Weaver wrote: >> >> I assigned a value to a custom property on a Morph. After I save the >>> world to the wiki and load again, that property does not exist. The case >>> here is that I wrote a new layout manager, have been attaching constraints >>> to morphs, when I reload the constraints are gone, and subsequently child >>> morphs do not resize when I resize the morph. >>> >>> How do I persist the custom properties of a Morph? >>> >>> Much appreciated, >>> Phil >>> _______________________________________________ >>> General mailing list >>> General@livelykernel.sunlabs.com >>> http://livelykernel.sunlabs.com/mailman/listinfo/general >>> >> >> >
_______________________________________________ General mailing list General@livelykernel.sunlabs.com http://livelykernel.sunlabs.com/mailman/listinfo/general