TIP #25: Native tk_messageBox on Macintosh


TIP:25
Title:Native tk_messageBox on Macintosh
Version:$Revision: 1.3 $
Author:Mats Bengtsson <matben at privat dot utfors dot se>
State:Withdrawn
Type:Project
Tcl-Version:8.5
Vote:Pending
Created:Wednesday, 07 February 2001
Obsoleted-By:TIP #152

Abstract

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.

Rationale

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.

This is the present tk_messageBox.

This is the native tk_messageBox.

Reference Implementation

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:

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.

Open questions:

Copyright

This document has been placed in the public domain


Powered by Tcl[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