Jochen Riekhof wrote:
> I built something roughly like the Scribble tutorial, but now need to add an
> instance var to the model. This model is specified in View
> class>>defaultModel. After adding the instance var, I can now no longer open
> or edit my Shell and Presenter subclasses. What must i do? changing stbIO
> methods or is there a simpler way?
If it's just a problem with a single view resource there is a simpler way than
writing STB version conversion methods. Have the view open in the ViewComposer
when you add the instance variable to the model, then save the view in the
ViewComposer (which now holds a reference to the modified model instance).
I've never actually tried this myself, but remembered seeing it here, and found
the message by Blair McGlashan 30 Apr 2002:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=aamsfe%24bl7ud%241%40ID-50941.news.dfncis.deHere's the relevant part:
> It may not be directly applicable in this case, but a useful trick to know
> about during development is to have any view resources containing a view one
> is about to add instance variables to (or otherwise modify) open in View
> Composers. These "running" instances will be updated by the normal
> mechanisms that the ClassBuilder uses to update existing instances when the
> shape of a class changes. One can then save down the views with the new
> shape. Obviously one must open the view resources before modifying the class
> definition, or if one forgets to do that it is probably worth reversing out
> the change temporarily so that one can load up the view resources.
>
-------------------------------------------
Bill Dargel
[hidden email]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105 USA