[Seaside] Disabling the back button
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?
>> -Carl Gundel, author of Liberty BASIC
> self isolate: [some code]
>Longer answer, read the paper about half way down this page..
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:
self isolate: [ count := count + 1 ]
self isolate: [ count = 0
ifFalse: [count := count - 1]
[(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
More information about the Seaside