Discard changes

Damien Cassou damien.cassou at gmail.com
Fri Feb 1 16:06:49 UTC 2008


On Feb 1, 2008 10:38 AM, Zulq Alam <me at zulq.net> wrote:
> Me and the discard changes dialogue don't get along. I very rarely wish
> to cancel and only occasionally want to discard.
>
> I want to change the behaviour so that instead of prompting me, a new
> browser is opened. I'd like this behaviour to be the same no matter what
> type of browser I'm in.
>
> My first thought was to hack OBDefinitionPanel>>#aboutToChange: but I
> can't see how to find out what the new selection is and if I could can't
> see a uniform way of producing a new browser on this selection.

For this kind of question, you'd better ask the ob-dev mailing list directly.

Maybe not what you want exactly, but you can start playing with:

aboutToChange: ann
	self canDiscardEdits ifTrue: [^ true].
	browser currentNode browse. "opens a new browser on the current node"
	self changed: #clearUserEdits "ignores the modifications and change
the current displayed node"

-- 
Damien Cassou



More information about the Squeak-dev mailing list