|Title:||Native tk_messageBox on Macintosh|
|Version:||$Revision: 1.3 $|
|Author:||Mats Bengtsson <matben at privat dot utfors dot se>|
|Created:||Wednesday, 07 February 2001|
This is a replacement for the tk_messageBox on the Macintosh with a native implementation which is compliant with the Appearance Manager in Mac OS 8 and later.
The present (in 8.3.2p1 and earlier) tk_messageBox on the Macintosh is non-movable, and lacks many features that are required to be compliant with Mac OS 8 and later. Non-movable dialogs should be abandoned in a multitasking environment. This TIP presents a step to extend the native appearance on the Macintosh.
The proposed change is now implemented as a loadable extension (in C) on Macintosh, and can be downloaded at http://hem.fyristorg.com/matben/download/MovableAlerts.sit . This extension requires Tk 8.3.2p1 or later due to the changed stub loading mechanism. The core of the code should go in the tkMacDialog.c file. Some additional changes are necessary in order to load the new tk_messageBox and not the old, script based tk_messageBox. Also, need to check for the presence of the Appearance manager:
if (Appearance Manager) use native (new) messageBox else use present script based messageBox
All functionality from the documentation that are applicable are implemented, with some exceptions:
There is a -finemessage option to support the native text message set in a smaller font below the main message.
Both -message and -finemessage option are truncated at 255 characters.
Buttons appear from right to left instead of vice versa.
There is always a default button.
All these deviations are consistent with the look-and-feel of Mac OS 8.0 and on. Existing scripts using tk_messageBox are compatible with the new tk_messageBox.
Name of extra option -finemessage
Name of the two C functions in the implementation
How to make the core code call the new code instead of the original, script implemented
This document has been placed in the public domain
[Index] [History] [HTML Format] [Source Format] [LaTeX Format] [Text Format] [XML Format] [*roff Format (experimental)] [RTF Format (experimental)]TIP AutoGenerator - written by Donal K. Fellows