Discard changes

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

Discard changes

Zulq Alam-2
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.

Any ideas?

Thanks,
Zulq.


Reply | Threaded
Open this post in threaded view
|

Re: Discard changes

Damien Cassou-3
On Feb 1, 2008 10:38 AM, Zulq Alam <[hidden email]> 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