Why does my .NET object now display as (NULL) ?
Forum rules
The FAQ is a read-only forum which is in general updated only by employees of Dyalog Ltd. It replaces the FAQ page which existed under http://www.dyalog.com. Rather than rejecting other posts to this forum, such posts will be put in a moderation queue, and moved to a more appropriate forum.
The FAQ is a read-only forum which is in general updated only by employees of Dyalog Ltd. It replaces the FAQ page which existed under http://www.dyalog.com. Rather than rejecting other posts to this forum, such posts will be put in a moderation queue, and moved to a more appropriate forum.
1 post
• Page 1 of 1
Why does my .NET object now display as (NULL) ?
Supposing you create a .NET DateTime object:
and then
You will now see the following:
Similarly
During a )SAVE entities in the workspace are serialised and the serialised data is then written to file. On )LOAD each entity is recreated from the serialised data. .NET offers serialise/deserialise methods for many (but not all) .NET objects. However, Dyalog does not make use of these methods.
The mechanisms for cloning namespaces (or for writing entities to and reading them back from component files) involve very similar techniques and thus suffer from the same limitation.
In these situations, Dyalog preserves the name or reference that was associated with the .NET object, but since the original object is no longer available, displays it as (NULL).
This behaviour may be changed in future releases of Dyalog.
[I have posted this in Microsoft.NET, but I intend to move this into the FAQ section in due course]
⎕using←'System'
z←DateTime.Now
z
20/08/2014 12:56:57
z.GetType
System.DateTime
and then
)save myws
)load myws
You will now see the following:
z
(NULL)
z.GetType
VALUE ERROR
z.GetType
∧
Similarly
'andys'⎕ns''
andys.⎕using←'System'
andys.(sdt←DateTime.Now)
'parentns'⎕ns'andys'
parentns.andys.sdt
(NULL)
parentns.andys.sdt.GetType
VALUE ERROR
parentns.andys.sdt.GetType
∧
During a )SAVE entities in the workspace are serialised and the serialised data is then written to file. On )LOAD each entity is recreated from the serialised data. .NET offers serialise/deserialise methods for many (but not all) .NET objects. However, Dyalog does not make use of these methods.
The mechanisms for cloning namespaces (or for writing entities to and reading them back from component files) involve very similar techniques and thus suffer from the same limitation.
In these situations, Dyalog preserves the name or reference that was associated with the .NET object, but since the original object is no longer available, displays it as (NULL).
This behaviour may be changed in future releases of Dyalog.
[I have posted this in Microsoft.NET, but I intend to move this into the FAQ section in due course]
-
AndyS|Dyalog - Posts: 263
- Joined: Tue May 12, 2009 6:06 pm
1 post
• Page 1 of 1
Return to Frequently Asked Questions (FAQ)
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group