Doubt with MVP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Doubt with MVP

German Arduino
Hi:

I'm trying to build an app based in Document Shell. It's a common
applicaton but the particularity is that I don't wants to save
(serialize?) the complete model, only a part of it.

I've several instvars at model level but don't wants to save all the
instvars (objects of my model) when I use "Save" or "Save As". At this
case only want to save certains instvars.

What is the better way to achieve this goal? I've been looking the
defaultModel method of DocumentShell trying to understand how to pass to
serializer a partial model and also looking at methods that save the
model, but  not convinced about what is the better way.

Any help will be appreciated.

Thanks.
Germán.


Reply | Threaded
Open this post in threaded view
|

Re: Doubt with MVP

Schwab,Wilhelm K
Germán,

> What is the better way to achieve this goal? I've been looking the
> defaultModel method of DocumentShell trying to understand how to pass to
> serializer a partial model and also looking at methods that save the
> model, but  not convinced about what is the better way.

Perhaps the easiest way is to override #stbSaveOn: using #override:with:
to replace the offending items with nil (note that you have very few
choices for overrides - the binary filer documentation has the details).
  Super send after the overrides, and all should be well.

Have a good one,

Bill


--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Doubt with MVP

German Arduino
Bill Schwab wrote:

> Germán,
>
>> What is the better way to achieve this goal? I've been looking the
>> defaultModel method of DocumentShell trying to understand how to pass
>> to serializer a partial model and also looking at methods that save
>> the model, but  not convinced about what is the better way.
>
>
> Perhaps the easiest way is to override #stbSaveOn: using #override:with:
> to replace the offending items with nil (note that you have very few
> choices for overrides - the binary filer documentation has the details).
>  Super send after the overrides, and all should be well.
>
> Have a good one,
>
> Bill
>
>

Thanks by the idea Bill. I will try.

Cheers,
Germán.