[Glass] Problem assigning to temp vars from Seaside callbacks?

Mariano Martinez Peck marianopeck at gmail.com
Mon Jan 27 13:10:02 PST 2014

Hi guys,

I am starting to see strange problems that happen only in GemStone but work
correctly in Pharo.

I have a menu action that looks like this:

(aWebAppBrowser actionType new
context: #contextMenu;
(aWebAppBrowser class)};
label: 'SIXX Import and Replace DB';
block: [ :cls :collection :app |
| list |
(app activeModelReport isKindOf: MAReport)
ifTrue: [ | filenameForm *filename* |
list := app objectsForActions. "filtered and sorted"
filenameForm := MyRenderedBlockFormDialog new.
{(#import -> [ filenameForm answer: true ]).
(#cancel -> [ filenameForm answer: false ])};
renderingBlock: [ :html |
html text: 'Import filename prefix'.
html textInput
size: 100;
*callback: [ :value | self halt. filename := value trimBoth ];*
value: 'filename_here' ];
*(app call: filenameForm)*
ifTrue: [
*self halt.*

That action has the closure which is compiled once at the beginning of the
app and then valued whenever clicked. Now...that closure creates an
instance of MyRenderedBlockFormDialog which has a simple input for a
filename. When I click on "import" the callback of the text input is
invoked correctly. Soo....'filename' temp receives the value correctly.
However, after the call to such a component (*app call: filenameForm)*,
(the *"self halt"* inside the ifTrue)... the temp var 'filename' has a
nil!!!!   Any ideas why I get a nil here instead of the real value?
Same code and same test in Pharo does work correctly.

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140127/34b5f7a5/attachment.html>

More information about the Glass mailing list