[Seaside] Disabling the back button

Carl Gundel carlg at libertybasic.com
Sat Sep 23 01:21:31 UTC 2006


>> > If I need to disable the back button in my Seaside app, how
>> can I do it?
>>
>> Thanks,
>>
>> -Carl Gundel, author of Liberty BASIC
>> http://www.libertybasic.com
>
>Short answer...
> self isolate: [some code]
>
>Longer answer, read the paper about half way down this page..
>
>http://seaside.st/Community/ExternalDocumentation/

Thanks.  I read the document.  Looks like a slight API change since the
isolate: method has moved from WASession to WAComponent.  That aside, I
decided to test this by adding the technique to the WACounter example class.
Here are the methods I changed:

increase
 self isolate: [ count := count + 1 ]

decrease
  self isolate: [ count = 0
    ifFalse: [count := count - 1]
    ifTrue:
        [(self confirm: 'Do you want to go negative?')
               ifTrue: [self inform: 'Ok, let''s go negative!'.
             count := -100]]].

The example seems to behave exactly as without the isolate: code.  I can use
the back button and then click on ++ or --.  They work as before.  Ideas?

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com




More information about the Seaside mailing list