Page 1 of 1
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 8:04 am
by wriedmann
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):
Code: Select all
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
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 11:47 am
by ic2
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
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 11:51 am
by wriedmann
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
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 12:37 pm
by ic2
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
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 1:06 pm
by Karl-Heinz
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
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 1:16 pm
by wriedmann
Hi Dick,
yes, it is the compiler that crashes the IDE.
Wolfgang
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 1:18 pm
by wriedmann
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
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 1:38 pm
by wriedmann
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
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 2:44 pm
by robert
Wolfgang,
I can reproduce this here.
If you change the the type of the event to ControlNotifyEvent then it compiles.
Robert
ListViewColumnClickEvent:NameSym IDE crash
Posted: Wed Jul 17, 2019 6:57 pm
by wriedmann
Hi Robert,
thank you very much for confirming it.
Wolfgang