Hello,
I have looked at a VO application that a customer would like to migrate to X#.
This application makes massive use of the SysObject() call, in code pieces like this:
Wolfgang,
I think we can add this function in the next build. It will :
- save the object in global state when you pass it an object
- return the object from global state when you call it without arguments
Nothing fancy really.
Of course this will require the /lb (allow late binding) compiler flag to compile because the return type of SysObject() will be "object".
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Wolfgang,
I had a quick look at this.
SysObject in VO does 2 things:
1) It acts as a global object store
2) it registers an object that will be used by send when no object is specified but another data type.
I can implement 1) without problems.
2) is impossible in .Net because everything inherits from Object.
The example code you uploaded seems to only use feature 1).
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Hi Robert,
thank you very much!
Yes, I have looked in the application to see what use is being made, and it seems it is used only as global object store.
I have never used that myself (in VO, I store global variables in the App object, and in X# I use a special singleton class for this), and specially the second functionality seems powerful, but very risky.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it