[Seaside] SU Lightbox and GLORP

Richard K Eng richard.eng at rogers.com
Tue Sep 25 16:58:06 UTC 2007


Good point. I'll use #confirm:.

However, I think I've discovered the reason I can't get it to work...

This works (not using lightbox):

confirm: aString
    ^ self call: (WAYesOrNoDialog new addMessage: aString)

remove: item
    (self confirm: 'Are you SURE?') ifTrue: [Transcript cr; show: 'RKE: 
done!']


Now if I change the #call: to #lightbox:, I now get the dialog in a 
lightbox. Great.

However, I now get *two* returns from #lightbox:. The first when the dialog 
is
displayed. The second after I've clicked on Yes or No.

The first return is the self object. The second return is from whatever is 
returned
from the Yes or No buttons. I am absolutely certain you guys can replicate 
this.
Try it.

(Inserting #yourself in '(WAYesOrNoDialog new addMessage: aString)'
makes no difference.)

Now this makes it damn difficult for me to workaround. Why are there two
returns???

Richard

----- Original Message ----- 
> Yes, you *are* missing something.  :-)
>
> I was trying to apply the exceptionally cool lightbox effect for my 
> "confirm:" dialog. Maybe I'm being a little anal about it, because 
> certainly the #confirm: statement will do what I need to do in a 
> utilitarian fashion, but I wanted to do something a little spiffier for my 
> application.
>
> Hey, why not?
>
> Richard

I think he was wondering why you're checking #inform: for a return value, it
has none, while #confirm: returns a boolean.  He might not have noticed your
earlier custom implementation of #inform:, though you probably should have
overridden #confirm: instead if you expect the user to choose yes or no.

Ramon Leon



More information about the seaside mailing list