fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Bug in XIDE (event insert with delegate inside class)

Bug in XIDE (event insert with delegate inside class) 1 year 3 months ago #4287

  SHirsch's Avatar Topic Author SHirsch Offline Posts: 110
Hi Chris,
....
METHOD OKButtonClick(sender AS OBJECT , e AS System.EventArgs) AS VOID
	SELF:Close()
RETURN

DELEGATE PropertyChangedDelegate(o AS OBJECT, e AS System.ComponentModel.PropertyChangedEventArgs) AS VOID

METHOD btnTestClick(sender AS System.Object , e AS System.EventArgs) AS VOID
RETURN

END CLASS

When you now change something in the painter and save you get this code:
METHOD OKButtonClick(sender AS OBJECT , e AS System.EventArgs) AS VOID
	SELF:Close()
RETURN

METHOD btnTestClick(sender AS System.Object , e AS System.EventArgs) AS VOID
RETURN

END CLASS
DELEGATE PropertyChangedDelegate(o AS OBJECT, e AS System.ComponentModel.PropertyChangedEventArgs) AS VOID

METHOD btnTestClick(sender AS System.Object , e AS System.EventArgs) AS VOID
RETURN

END CLASS

As you can see the event handler implemented after
DELEGATE
is ignored and a new one is inserted. Also
END CLASS
is inserted.
When I put the
DELEGATE
outside the
CLASS
everything is ok.

Attached a simple sample.

Regards,
Stefan
Attachments:

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

Bug in XIDE (event insert with delegate inside class) 1 year 3 months ago #4290

  Chris's Avatar Chris Offline Posts: 1179
Hi Stefan,

Thanks, I see the problem. It's because the DELEGATE is considered a class and nested classes are not properly supported by the code generator yet (that was implemented in XIDE (VIDE back then) before nested classes were implemented in the vulcan compiler). I'll look into it, I think I should be able to add a small hack in there :)

Chris
XSharp Development Team
chris(at)xsharp.eu

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

  • Page:
  • 1