Anyway, the problem is that wxFrame.CreateFrame does not return a
MyFrame, even if you inherit from wxFrame. You need to create it like this:
' BEGIN
SuperStrict
Import wx.wx
Import wx.wxApp
Import wx.wxFrame
Type MyApp Extends wxApp
Field ParentFrame:MyFrame
Field ChildFrame:wxFrame
Method OnInit:Int()
ParentFrame = MyFrame(New MyFrame.Create(,,"Parent Frame", 100, 100))
ParentFrame.show()
ChildFrame = wxFrame.createframe(ParentFrame,,"Child Frame",150,150)
ChildFrame.show()
Return True
End Method
End Type
Type MyFrame Extends wxFrame
Function OnCloseWindow(_event:wxEvent)
Local Result:Int = Confirm("Are you sure you want to Close BOTH Windows?")
If Result = False Then Return
End Function
End Type
New MyApp.run()
' END
-noel
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "wxMax" group.
> To post to this group, send email to wx...@googlegroups.com
> To unsubscribe from this group, send email to wxmax-un...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/wxmax?hl=en
> -~----------~----~----~----~------~----~------~--~--