extending a .NET class in Dyalog APL
1 post
• Page 1 of 1
extending a .NET class in Dyalog APL
I am new to Dyalog APL and exploring things. I am trying to extend a .NET class in Dyalog APL. I am making some progress, but I am encountering a problem I can't seem to locate the answer to.
I am able create an instance of my extended class and am able to set the properties in my created instance. I am having a problem, however, when running the new extended method accessing these properties. I have tried referencing them both by property name and using the get_ methods to manage this both with and without a []BASE. prefix. All of these result in VALUE ERROR.
The particular method I am adding works with two instances as in:
Instance1.NewMethod Instance2
When execution halts with the VALUE ERROR )SI shows #.ExtendedClass.NewMethod[3]* as the top line. I can access the properties in Instance2 via Argument.Property as expected. My problem is accessing the properties for Instance1 from the above reference. I can similarly access the properties of Instance1 if I access it via #.Instance1.Property, but how do I know that Instance1 is the instance I need to reference? )SINL shows only my argument to the method and its result on the top line. If I execute )PROPS at the point of the VALUE ERROR I get Unknown as the response. If I execute )OBS at that point I get System as the response.
What am I missing to accomplish this?
Dave
PS: Error found! NewMethod had been specified as Shared as opposed to Instance. Now working as designed.
I am able create an instance of my extended class and am able to set the properties in my created instance. I am having a problem, however, when running the new extended method accessing these properties. I have tried referencing them both by property name and using the get_ methods to manage this both with and without a []BASE. prefix. All of these result in VALUE ERROR.
The particular method I am adding works with two instances as in:
Instance1.NewMethod Instance2
When execution halts with the VALUE ERROR )SI shows #.ExtendedClass.NewMethod[3]* as the top line. I can access the properties in Instance2 via Argument.Property as expected. My problem is accessing the properties for Instance1 from the above reference. I can similarly access the properties of Instance1 if I access it via #.Instance1.Property, but how do I know that Instance1 is the instance I need to reference? )SINL shows only my argument to the method and its result on the top line. If I execute )PROPS at the point of the VALUE ERROR I get Unknown as the response. If I execute )OBS at that point I get System as the response.
What am I missing to accomplish this?
Dave
PS: Error found! NewMethod had been specified as Shared as opposed to Instance. Now working as designed.
- dhdurgee
- Posts: 14
- Joined: Mon Feb 07, 2011 5:21 pm
1 post
• 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