fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: ListViewColumnClickEvent:NameSym IDE crash

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9889

  wriedmann's Avatar Topic Author wriedmann Away Posts: 1912
Hi,
this code crashes my IDE (also in a new application based on the StandardMDI sample, and also in another project - so repo corruption can be excluded):
class LVWindow inherit SplitWindow

method ListViewColumnClick( oEv ) class LVWindow
	local oEvent as ListViewColumnClickEvent

	oEvent := oEv
	if oEvent:NameSym == #Hallo   // this code line crashes the IDE
 	endif

	return super:ListViewColumnClick( oEvent )

Wolfgang
P.S. VO SP4b, build 2838
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9891

  ic2's Avatar ic2 Offline Posts: 576
Hello Wolfgang,

What happens if you change line 5 to:

if oEv:NameSym == #Hallo

That's the only difference I can see with ListViewColumnClick where I also use NameSym; I do not assign the parameter to a local variable.

Otherwise feel free to send that testproject to me so I can check what happens here,

Dick

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9893

  wriedmann's Avatar Topic Author wriedmann Away Posts: 1912
Hi Dick,
the compiler crashes only if I access the :NameSym on the strongly typed variable.
If I don't use a local variable it works (and it always worked...).
I'm using similar code to strongly type the passed events in many places of my application, but only with this event the compiler crashes.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Last edit: by wriedmann.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9894

  ic2's Avatar ic2 Offline Posts: 576
Hello Wolfgang,

wriedmann wrote: Hi Dick,
the compiler crashes only if I access the :NameSym on the strongly typed variable.


Does the compiler crash? Or your program when you run that line?

What you are doing is actually exact what is recommended in the help (never realized that until now):

Most of the accesses/assigns of the event classes have been strongly typed in Visual Objects 2.8 for performance reasons. We strongly advise you to take advantage of this by assigning unsigned Event handler parameters to typed local parameters.

Probably Robert can say something about it when he's back from holiday.

Dick

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9895

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 420
Hi Wolfgang,

Same error is thrown with SP3. It would be interesting to see what happens if the X # Compiler + X # VO GUI is used. If it works - as i expect - the method would be a #IFDEF __XSHARP__ candidate.

regards
Karl-Heinz

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9896

  wriedmann's Avatar Topic Author wriedmann Away Posts: 1912
Hi Dick,

yes, it is the compiler that crashes the IDE.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9897

  wriedmann's Avatar Topic Author wriedmann Away Posts: 1912
Hi Karl-Heinz,

if this is occurring also in SP3, an error in the repo generation can be excluded....

And I cannot immagine that this compiler crash is also occuring in X#.

In plain X# most of the times a cast would be enough, but in VO casts to an object are not possible - another strong point in favor of X#.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9898

  wriedmann's Avatar Topic Author wriedmann Away Posts: 1912
Hi Karl-Heinz,

as suspected: this code does not crashes the X# compiler in a ported VO application that uses the VO compatible GUI classes delivered with X# Bandol RC2.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9899

  robert's Avatar robert Offline Posts: 1373
Wolfgang,

I can reproduce this here.
If you change the the type of the event to ControlNotifyEvent then it compiles.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

ListViewColumnClickEvent:NameSym IDE crash 4 months 3 weeks ago #9904

  wriedmann's Avatar Topic Author wriedmann Away Posts: 1912
Hi Robert,

thank you very much for confirming it.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

  • Page:
  • 1