xsharp.eu • Transform PTR type
Page 1 of 1

Transform PTR type

Posted: Sat Feb 03, 2024 8:35 pm
by baramuse
Hi all,

we had a nasty crash in one of our datawindow.
It seems to come from the fact that we have one of the column data as PTR.

I've followed the code and it seems to crash in the Transform function
https://github.com/X-Sharp/XSharpPublic ... m.prg#L826

From what I understand of the code here, as PTR is not one of the switch, it will try to call the #Transform function on the PTR object, if that function exists, which is not.
Hence the throw on line 851.

Should I presume we can't pass a PTR in a datawindow column ? (It actually is a BBrowser).
Sorry if it's a weird question, I really don't have any experience with the BBrowser/Transform/picture

Best regards.

Re: Transform PTR type

Posted: Sun Feb 04, 2024 8:23 am
by Chris
Hi Basile,

It's indeed a bug in the function, will fix it and will send you an updated dll, so you won't need to change anything in your code. I'm afraid I can't do it today (will be out of the office for the rest of the day), but will send it early tomorrow morning.

From a quick look, I see that in VO Transform() with a PTR argument always returns an empty string, no matter the picture you use, is that what you expect?

Re: Transform PTR type

Posted: Mon Feb 05, 2024 7:46 am
by Chris
Hi Basile,

Can you please try the updated dll I posted here:

https://github.com/X-Sharp/XSharpPublic/issues/1428

You need to install it in the GAC, in C:\Windows\Microsoft.NET\assembly\GAC_MSIL\XSharp.RT\v4.0_2.6.0.0__ed555a0467764586

Re: Transform PTR type

Posted: Tue Feb 06, 2024 6:34 am
by baramuse
Hi Chris,

it does indeed prevent the crash.

Cheers !