Error when trying to use a imported .net class.

For questions and postings not covered by the other forums
timmeh
Posts: 18
Joined: Fri Apr 13, 2012 3:12 pm

Error when trying to use a imported .net class.

Postby timmeh » Fri Apr 27, 2012 4:28 pm

I've used the import wizard in Jade to import the .net 'regex' class from System.dll
I'm using Jade 6.3.05 and I've written a small JadeScript to test the imported regex class

Code: Select all

vars regex : Regex; begin create regex transient; epilog delete regex; end;
Although once i execute this I get the following errors:

Code: Select all

Type: System Exception Error Code: 1008 Entry point not in library Source: delete regex;
and following prompt:

Code: Select all

jade.exe - Entry Point Not Found The procedure entry point ??0DllDesc@@QAE@QB_W_N@Z could not be located in the dynamic link library JOMOS.dll. OK
Anyone run into this before or know what I'm doing wrong? This is the first time I've imported anything from .net

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: Error when trying to use a imported .net class.

Postby Dr Danyo » Sat Jun 02, 2012 3:57 am

I just tried using it under JADE 6.3.08 and it worked a treat, here is my workspace to validate email addresses.

vars
regex : Regex_1; //renamed to Regex_1 due to a class name conflict (I called my schema Regex so the .net class clashed with the app name).
pattern : StringUtf8;
begin
pattern := @"^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
& @"((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?
[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
& @"([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?
[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
& @"([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$";

create regex transient;
regex.createDotNetObject_1(pattern);

write regex.isMatch_2(@"drdanyo@awesome.com");
write regex.isMatch_2(@"drdanyo");

delete regex;
end;

timmeh
Posts: 18
Joined: Fri Apr 13, 2012 3:12 pm

Re: Error when trying to use a imported .net class.

Postby timmeh » Thu Jun 14, 2012 2:47 pm

Awesome,

my Jade version was outdated, and also wasnt using .createDotNetObject_1 method correctly, thanks for clarifying. all working now!


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 15 guests

cron