In both of these posts a declare for detaching is posted, but I cannot figure out how to apply it, because of the situation.
I need to disable the menuitem FileClose because it closes the parent window first. So, I have a Pushbutton added for close.
This CloseButton closes the controls on the window but not the window.
The code for detaching is:
soft declare sub removeChildWindow lib "Cocoa" selector "removeChildWindow:" (parentWindow As Ptr, childWindow As Ptr) removeChildWindow(Ptr(Self.Handle), Ptr(Window2.Handle))
Where do I put the code, because it doesn't belong in the ChildWindow and how do I coordinate the pointers?
Here's a link to the project Close window