I present the following code sample:
’ Form rarg;Œwself;A
[1] :select rarg
[2] :case 'Create'
[3] 'fm' Œwi 'Create' 'Form' ('size' 10 20)
[4] 'fm.bn' Œwi 'Create' 'Button' ('onClick' "Form'Click'")('style' 1)
[5] 'fm' Œwi 'Show'
[6] :case 'Click'
[7] 'Œwself' Œwself
[8] 'form' (Œwi ':self')
[9] 'fm' Œwi 'Delete'
[10] © Œwi ':Delete'
[11] :end
’
Execute:
Form 'Create'
Now click on the Button fires the onClick handler calling: Form 'Click'
With []WSELF localized, you get the error:
ŒWI OBJECT ERROR: Object "fm" not found
>[???DELETED???;Click] Form'Click'
^
This is true for either of the following lines
[9] 'fm' Œwi 'Delete'
[10] © Œwi ':Delete'
When the onClick code is called, []WSELF is defined as shown in the session manager. The output looks like this:
Œwself fm.bn
form fm
ŒWI OBJECT ERROR: Object "fm" not found
>[???DELETED???;Click] Form'Click'
questions:
Why does []wself have a value when it is localized?
If []wself has a value, why does []wi ':Delete' fail?
More interestingly, why does 'fm' []wi 'Delete' fail if []wself is localized?