In my endless quest for crystal-clear gui code, I've defined a
conjunction 'shift'...

shift=: 2 : 0
if. 1=".sysmodifiers do. v y else. u y end.
)

for use like this:
   mygui_myctl_button=: foo shift baa
which works just fine. The button "myctl" does foo unless Shift is
held down, whereupon it does baa.

But...

If I inspect  'mygui_myctl_button' with my code-browser (which uses
5!:6), what I don't see is 'foo shift baa'.
Instead what I see is:

  5!:6 <'mygui_myctl_button'
foo (2 : 0) baa
if. 1=".sysmodifiers do. v y else. u y end.
)

The word 'shift' has got lost. Replaced by its definition. None of the
other (5!:) foreigns see it either.

Is there a way of retrieving the original definition? --
   mygui_myctl_button=: foo shift baa

...I mean: without giving up on tacit code? I suppose I can always write:
   mygui_myctl_button=: 3 : '(foo shift baa)y'
which works, but (tacitly) throws in the towel.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to