Phab defaults for parent

I have a “base” window which creates a “child” window which in turn creates
a “childofchild” window. The children are created via the window option in
the realize callback. Standard Phab stuff.

The “child” has “base” as its parent as I hoped. “childofchild” however also
has “base” as its parent not “child” as I had hoped even though it was
created by a window callback of “child”. I have verified this using the
debugger and can see it from the application because “child” can move in
front of “childofchild”.

Is this correct ?, if so does that mean any window created by a Phab window
callback (as opposed to in line code) will be a direct child of the original
base window ? or have I missed something.

Steve

Stephen F Terrell <stephen@trsystem.demon.co.uk> wrote:

I have a “base” window which creates a “child” window which in turn creates
a “childofchild” window. The children are created via the window option in
the realize callback. Standard Phab stuff.

The “child” has “base” as its parent as I hoped. “childofchild” however also
has “base” as its parent not “child” as I had hoped even though it was
created by a window callback of “child”. I have verified this using the
debugger and can see it from the application because “child” can move in
front of “childofchild”.

Is this correct ?, if so does that mean any window created by a Phab window
callback (as opposed to in line code) will be a direct child of the original
base window ? or have I missed something.

Did the docs give you the impression that the window that a callback
opens becomes a child of (the window containing) the widget that the
callback was attached to?

If that’s the case, the docs need to be corrected. Any PhAB
window/dialog opened directly by a callback becomes a child of the base
window.

The only way to open a window module with a different parent is by using
ApModuleParent() and ApCreateModule().


\

Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.

Did the docs give you the impression that the window that a callback
opens becomes a child of (the window containing) the widget that the
callback was attached to?

If that’s the case, the docs need to be corrected. Any PhAB
window/dialog opened directly by a callback becomes a child of the base
window.

The only way to open a window module with a different parent is by using
ApModuleParent() and ApCreateModule().


\

Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.

Thanks, that is what is happening.

The docs do not state otherwise but somehow did not stop me assuming the
incorrect situation so perhaps a sentence in bold somewhere to protect the
innocent would help.
Steve