Re: Anon/nested IModel subclasses still harmful?

2006-12-06 Thread Johan Compagner
in the current versioning we don't store a pointer. We only keep a reference of that page when we encounter it and then set it back when we deserialize it (that immediately happens) So if that page is in the pagemap by itself or not doesn't really matter (it is in the pagemap through the other pa

Re: Anon/nested IModel subclasses still harmful?

2006-12-06 Thread Igor Vaynberg
if this does happen then we do need to store the page. who knows what that model is doing, it might be reading/writing properties on that page. dont think we have much choice. and storing a pointer like we do for versioning wont work because the page might be evicted from the pagemap. so i guess w

Re: Anon/nested IModel subclasses still harmful?

2006-12-06 Thread Johan Compagner
versioning can handle this. because it won't clone the page but you will keep the reference to the old page for every of course. and if that page2 gets saved to disk and reloaded back in it will also instantiate the page1 again ofcourse. So you will have always that baggage of that extra page. i

Re: Anon/nested IModel subclasses still harmful?

2006-12-06 Thread Nick Heudecker
I thought so as well. And I've never shared a model across multiple pages. On 12/6/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote: From the gotchas page on our wiki: The other thing to avoid is anonymous or nested instances of IModel. Usually you share an instance of a model between two page

Anon/nested IModel subclasses still harmful?

2006-12-06 Thread Martijn Dashorst
From the gotchas page on our wiki: The other thing to avoid is anonymous or nested instances of IModel. Usually you share an instance of a model between two page instances. If you create an anonymous or nested instance of IModel, then you automatically get a 'this' reference to the class that su