On 9/6/2012 10:26 AM, APL Learner wrote:
> Hello, sorry once again...
> I'm creating a form.
> I have taken the bar on the top ('SysMenu' 0)...
> However now I want to create a button which will CLOSE the form...
> I have tried .. 'F.quit'⎕WC'Button' 'Quit'(350 590)(25 80)('Event' 'Select' 'Close' 'F')('FCol' 6 102 186)('Font' 'Arial' 26)
> 'Close' is a function :
> F Close Msg
> ⎕EX F
> And it doesnt work , when I click the button Quit it just doesnt do anything.
> I dont know what to do now...
> Have you got any hints ?
> Also im running Dyalog 13.0 ...
> Thank you.
>
I'm not a Dyalog APL user. However, I used APL2000's APL+Win system for
many years, and what you posted seems to have a similarity to the way
their ⎕WI system function works. IF I understand correctly, and I'm
only guessing here, when the button Event is Select, you want to execute
the Close function with a left argument of 'Select' and a right argument
of 'F' ? Actually, given the syntax of your Close function, it looks to
me like the arguments are reversed ('Select' looks like the message you
want to display, 'F' looks like the name of the form you want to
delete). At any rate, I don't know Dyalog's syntax in this case, but in
APL+Win, the argument to be executed would look something like this:
'"Select" Close "F"'
There is ONE string to execute, bounded by the SINGLE quotes, whereas
the way you tried to do it was with three SEPARATE strings. Even though
I don't know Dyalog syntax, I would suspect that three separate strings
wouldn't be the way to code a handler. Info: There happen to be two
strings referenced within that string, which are bounded by DOUBLE
quotes. Using single and double quotes is simply an easy way to embed
strings within strings. In older APL systems which didn't support both
forms of quotes, one would have written:
'''Select'' Close ''F'''
So, try using a single string like that as your handler.
Another thing: Again, not actually knowing Dyalog syntax, I wouldn't
think that ⎕EX would be the way to close a form. I only know of ⎕EX
being able to erase functions and variables. But perhaps in Dyalog ⎕EX
supports that. In APL+Win, for example, one would close the form like this:
'F' ⎕WI 'Close'
/Rav