-
-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
The DataWindow has the following code in the constructor:
IF IsObject(oOwner)
oObject := oOwner
SWITCH oObject
CASE App
SUPER(NIL, FALSE)
lTopApp := TRUE
// lQuitOnClose := true
CASE DialogWindow
SUPER(oOwner, TRUE)
CASE DataWindow
// Create sub form if we're a regular DataWindow
Default(@nResourceID, 0)
lSubForm := (dwDialogStyle = 0)
oDwOwner := oOwner
SUPER(oOwner, FALSE, FALSE)
CASE ChildAppWindow
CASE TopAppWindow
SUPER(oOwner)
CASE Window
// <XXX> invalid Owner - throw error
WCError{#Init,#DataWindow,__WCSTypeError,oOwner,1}:Throw()
OTHERWISE
SUPER(oOwner)
END SWITCH
ELSE
SUPER(oOwner)
ENDIF
If you use as owner a class that is derived from ShellWindow, the WCError is thrown because the ShellWindow is inherited from AppWindow, and that directly from Window, so an error of "invalid owner" is thrown.