Explorer Sample runtime error

This forum is meant for examples of X# code.

User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Explorer Sample runtime error

Post by rjpajaron »

runtime error explorer sample.jpg
runtime error explorer sample.jpg (118.85 KiB) Viewed 742 times
Hi X# Team,

See attachment.

Following Robert's instruction, I able to build Explorer Sample in VS 2015.
However, I got runtime error.

"Vulcan.NET Runtime Error". Probably, I am the most hard-assed out there who resist Vulcan invasion. Vulcan Runtime 205 here!!!

--

Rene
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Explorer Sample runtime error

Post by robert »

Rene,

The error message that you get is probably a little different from the error message that later Vulcan versions get, but the example describes this error.
Did you copy the CATO*.DLL files as indicated on https://www.xsharp.eu/help/example-1-the-vo-explorer-examp.html

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Explorer Sample runtime error

Post by rjpajaron »

Hi Robert,

Just the dll described here: https://www.xsharp.eu/help/example-1-th ... examp.html

--

Rene

I will try again tonight.... I will update you.
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Explorer Sample runtime error

Post by rjpajaron »

Robert van der Hulst wrote:Rene,

I copied all DLL in VO redist, but the problem remains...

I will now proceed to some major conversion....


The error message that you get is probably a little different from the error message that later Vulcan versions get, but the example describes this error.
Did you copy the CATO*.DLL files as indicated on https://www.xsharp.eu/help/example-1-the-vo-explorer-examp.html

Robert
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Explorer Sample runtime error

Post by Chris »

Hi Rene,

Hmm, let's see what's causing this, this should had worked fine. I checked the callstack you sent, the error happens in this line

SUPER(oOwner, FALSE, #CustomerTreeView, #CustomerListView)

because it fails to create the classes CustomerTreeView and/or CustomerListView. In my version of the ported sample, those classes exist correctly in the code and the sample runs fine. Maybe for some reason those does not exist in your sample? Could it be you have modified those classes after exporting them?

If there's nothing obvious like that, can you please zip and send the exported folder to have a look?

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Explorer Sample runtime error

Post by rjpajaron »

Chris Pyrgas wrote:Hi Rene,

Hmm, let's see what's causing this, this should had worked fine. I checked the callstack you sent, the error happens in this line

SUPER(oOwner, FALSE, #CustomerTreeView, #CustomerListView)

because it fails to create the classes CustomerTreeView and/or CustomerListView. In my version of the ported sample, those classes exist correctly in the code and the sample runs fine. Maybe for some reason those does not exist in your sample? Could it be you have modified those classes after exporting them?

If there's nothing obvious like that, can you please zip and send the exported folder to have a look?

Chris
I apologize last time, I wrote at the middle of "quote" and my post look so ugly. I have yet to get used to web-based forum that looks like this.

Anyway, I have screenshot of the VS 2015 debug view.

Hope this help also...
I hold my test conversion for now...

--

Rene
07-11-17 5-40-59 PM.jpg
07-11-17 5-40-59 PM.jpg (72.1 KiB) Viewed 742 times
07-11-17 5-40-45 PM.jpg
07-11-17 5-40-45 PM.jpg (79.05 KiB) Viewed 742 times
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Explorer Sample runtime error

Post by rjpajaron »

Hi Chris,

I have the full converted folder that contains the VS solutions and VIDE project.
Explorer Sample.zip
(3.83 MiB) Downloaded 84 times
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Explorer Sample runtime error

Post by FFF »

Rene,
those dratted icons are missing...
@Chris,
copied the icons from my vo-folder to the new location, changed the path X#,
first it complained, so i added "" around the path to avoid any issue with the space, but now i get a strange result, see attachment.
Xide_Strangeness.PNG
Xide_Strangeness.PNG (12.73 KiB) Viewed 742 times
For good measure, restarted Xide, but the error is still there... :huh:

Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Explorer Sample runtime error

Post by rjpajaron »

Karl Faller wrote:Rene,
those dratted icons are missing...
@Chris,
copied the icons from my vo-folder to the new location, changed the path X#,
first it complained, so i added "" around the path to avoid any issue with the space, but now i get a strange result, see attachment.
Xide_Strangeness.PNG
For good measure, restarted Xide, but the error is still there... :huh:

Karl
That is strange.

I will experiment again tonight.

--

Rene
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Explorer Sample runtime error

Post by Chris »

Hi Rene,

Thanks for posting the code, that helped a lot! In short, the problem is that the option in the project settings <Language Tab>"Prefix classes with default Namepsace" is set to True. Set this to False and now the sample will run fine.

The reason why this was causing this problem, is because when this option is enabled, then all the classes in your project get automatically prefixed with the namespace that is provided in the General tab of the Project Options. So in your sample's case, for example the class "CustomerTreeView" was actually getting emitted by the compiler as "Explorer.Sample.CustomerTreeView". But then, in line 109 there is this code:

SUPER(oOwner, false, #CustomerTreeView, #CustomerListView)

which then internally calls CreateInstance() for the above classes. But now the class names are different, so CreateInstance() cannot find them. So another solution could have been to specify the "new" names here:

SUPER(oOwner, false, "Explorer.Sample.CustomerTreeView", "Explorer.Sample.CustomerListView")

(conversion from STRING to SYMBOL happens automatically)

either doing that, or disabling the "Prefix classes with default Namepsace" options (but do not do both!) will allow the code to run as expected.

Also, if you want to compile and run the XIDE version, then you will only need to disable the option <Compiler>/nostddefs: Ignore XSharpDefs.vh, because this file contains the definition for CRLF and you do not want to ignore that.

Chris

ps. Con's worry at all about the formatting of your posts, that's no problem at all. Personally I am still trying to get used to posting in a web forum, even after having posted lot's of messages already!

ps2. Karl, I am pretty sure the error message is correct, probably some part of the path you specified is not correct . Can you check again pelase?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply