How to SetUp a Simple Event in WPF ?
7 posts
• Page 1 of 1
How to SetUp a Simple Event in WPF ?
Why the following is not working ? (Using Version: 13.1.14265.0 32 Unicode and .Net 4.0)
there is nothing written in the session when you click on the button.
Thanks in advance
⎕USING←'System.Windows,WPF/PresentationFramework.dll'
win←⎕NEW Window
btn←⎕NEW Controls.Button
btn.onClick←⎕OR ⎕FX 'bnOnClick' '⎕←''the button was clicked'''
win.Content←btn
win.Show
there is nothing written in the session when you click on the button.
Thanks in advance
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: How to SetUp a Simple Event in WPF ?
Hi Pierre
WPF / .Net is very strict about spotting functions/methods with the correct signature
Even if you dont use it - your function must have a right argument or the signature is wrong and WPF ignores it
so if you change it to
btn.onClick←⎕OR ⎕FX 'bnOnClick ra' '⎕←''the button was
it should work - not tried it though
WPF / .Net is very strict about spotting functions/methods with the correct signature
Even if you dont use it - your function must have a right argument or the signature is wrong and WPF ignores it
so if you change it to
btn.onClick←⎕OR ⎕FX 'bnOnClick ra' '⎕←''the button was
it should work - not tried it though
-
MikeHughes - Posts: 86
- Joined: Thu Nov 26, 2009 9:03 am
- Location: Market Harborough, Leicestershire, UK
Re: How to SetUp a Simple Event in WPF ?
Hello Mike, your suggestion does not work for me. The problem is that I have many functions that were using a simple event like I described in the post and now none of them are working anymore. I don't know what is broken, if it is .Net that has changed something or it is a new version of Dyalog. That is my real question.
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: How to SetUp a Simple Event in WPF ?
I have no problem doing this.
It also works if I don't use []OR as in
btn.onClick← ⎕FX 'bnOnClick' '⎕←''the button was'''
I am using v4.0.30319
It also works if I don't use []OR as in
btn.onClick← ⎕FX 'bnOnClick' '⎕←''the button was'''
I am using v4.0.30319
- DanB|Dyalog
Re: How to SetUp a Simple Event in WPF ?
Thanks Dan for trying it. Looks like that I had .Net 4.5 installed on my computer. So I did the following:
1. Repair .Net 4.5 (still not working)
2. Remove .Net 4.5 (it is removing 4.0 at the same time and I fall to .Net 3.5)
3. Re-Install .Net 4.0
... and the good news is that the simple callback are working again.
If someone with .Net 4.5 could try the code and report here if it is working.
Thanks.
1. Repair .Net 4.5 (still not working)
2. Remove .Net 4.5 (it is removing 4.0 at the same time and I fall to .Net 3.5)
3. Re-Install .Net 4.0
... and the good news is that the simple callback are working again.
If someone with .Net 4.5 could try the code and report here if it is working.
Thanks.
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: How to SetUp a Simple Event in WPF ?
Ah I remember now
There are some new .Net dlls on the DSS page - it was reported under a DSS update email that the .Net dlls didnt work with .Net 4.5 so some new ones were created by Dyalog.
There are several changes to the .Net dlls and it would be worth updating these through DSS if you have a subscription or speak to support@dyalog.com
There are some new .Net dlls on the DSS page - it was reported under a DSS update email that the .Net dlls didnt work with .Net 4.5 so some new ones were created by Dyalog.
There are several changes to the .Net dlls and it would be worth updating these through DSS if you have a subscription or speak to support@dyalog.com
-
MikeHughes - Posts: 86
- Joined: Thu Nov 26, 2009 9:03 am
- Location: Market Harborough, Leicestershire, UK
Re: How to SetUp a Simple Event in WPF ?
Thanks Mike for the support, will do.
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group