On Jan 18, 2007, at 3:01 PM, Peter K. Stys wrote:
I have a metal window and when I call:
myMetalWindow.showmodal
it appears but is not modal, wreaking havoc with my app if the user
closes windows behind its back.
But ShowModal doesn't make a window modal. I wish people would
understand that fact. ShowModal just stops the execution of the code
in the calling method.
To get a modal window you must select it's Frame type in the IDE.
To get a modal metal window you must use a declare to alter the
appearance of a regular Modal window.
The following Declare in the Open event of a MoveableModal window
will work. The other Modals don't seem to.
Const attrib = 256
Dim err As Integer
#If TargetCarbon
#If TargetMachO
Declare Function ChangeWindowAttributes Lib "Carbon" (window
as WindowPtr, setTheseAttributes as Integer, clearTheseAttributes as
Integer) as Integer
#else
Declare Function ChangeWindowAttributes Lib
"CarbonLib" (window as WindowPtr, setTheseAttributes as Integer,
clearTheseAttributes as Integer) as Integer
#endif
#endif
err = ChangeWindowAttributes(self, attrib, 0)
This is in complete contradiction of Apple's HIG which say that Modal
type windows should NOT be metal. I quote:
"Don’t use it for supporting windows, such as preferences and other
dialogs."
-Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>