Re: Memory control
Re: Memory control
- Subject: Re: Memory control
- From: John Larson <email@hidden>
- Date: Tue, 30 Nov 2010 12:42:09 -0600
On Nov 30, 2010, at 12:28 PM, Chuck Hill <email@hidden> wrote:
>
>
> As an alternative to this:
>
>> - eliminate or reduce the ec undo stack size.
>
> You can call undoManager().removeAllActions() after a successful save. To make this even easier, I use an EC subclass with this code:
>
> /**
> * Overridden to clear undo stack after a successful save.
> */
> public void saveChanges()
> {
> super.saveChanges();
> if (undoManager() != null)
> {
> undoManager().removeAllActions();
> }
> }
>
>
> Chuck
Since I'm scared to death of subclassing the factory in ERXEC, I attach a listener in my BIG framework principal that listens for ec did save and do this same code there. I have a property that enables this function so I can disable it if an app needs it.
>
>
> --
> Chuck Hill Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden