How do I...Set a left arg to my Click event on a Button
1 post
• Page 1 of 1
How do I...Set a left arg to my Click event on a Button
In APL:
In XAML:
where function foo has the form:
In the XAML case, only the text 'Other Data' is passed as the left argument while in the APL version Other and Data are APL arrays.
⎕USING←'' 'System.Windows,WPF/PresentationFramework.DLL'
⎕USING,←⊂'System.Windows.Controls'
btn←⎕NEW Button
btn #.WPF.Event.Add 'Click' 'foo' (Other Data)
foo ⍝ Add lists all handlers as its result
In XAML:
- Code: Select all
xmlns:apl="clr-namespace:MJHSoftware;assembly=MJHSoftware.APLExtension"
<Button Click="{apl:Event foo,Left=Other Data}" />
where function foo has the form:
∇ {la} foo(Sender e)
[1] e.Handled←1 ⍝ Marks the event as "handled"
∇
In the XAML case, only the text 'Other Data' is passed as the left argument while in the APL version Other and Data are APL arrays.
-
Fiona|Dyalog - Posts: 74
- Joined: Mon Apr 22, 2013 12:59 pm
1 post
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group