Release Notes for MCL 5.1 MCL 5.1 requires OSX 10.3 or later to run native on OSX. To run on OS versions prior to OSX, MCL 5.1 requires OS9.1 or later. File system --------------- This version of MCL supports long and Unicode pathnames on OSX. There is one exception. The name of a saved application may neither be long nor unicode. The containing directory can contain long or Unicode components but the name of the application itself must be less than 32 characters and be MacRoman. In support of Unicode pathnames there is a new datatype, encoded string. An encoded string contains the string (probably an extended string) and an encoding which is usually #$kCFStringEncodingUnicode. There are set-window-title and set-menu-item-title methods that handle encoded strings. String-equal, string-lessp, string-greaterp, string-not-equal, string-not-greaterp, and string-not-lessp handle encoded strings. Added variable *alias-resolution-policy* (from Shannon Spires) :quiet for resolution that won't try to mount currently-offline volumes. :none to see aliases as aliases. nil or anything else to get complete (noisy) resolution like MCL used to always do. Directoryp behaves the same as MCL 5.0 except it doesn't assume the directory one level up if you name a file or leave off the last colon. Directory pays attention to *alias-resolution-policy* when :resolve-aliases = t, so it can be made not to throw up a dialog box when it hits an offline alias stop #'directory from returning mid path aliases in certain cases when :resolve-aliases = t delete-file uses mac-default-directory if no directory provided, can delete alias to a volume Added Open Recent menu item to the File menu. Fix a bug in make-pathname which caused the following to do the wrong thing. (make-pathname :name "a" :type "b" :directory '(:relative "c") :defaults "ccl:tinaa;") Result now is #4P"ccl:;c;a.b" Previously was #4P"ccl:tinaa;c;a.b" Fix for volume names case dependent on OSX. Fix so that e.g. (directory #P"Macintosh-hd:Volumes:*" :directory-pathnames t :directories t) returns directory-pathnames for mounted volumes on OSX. CLOS/MOP ------------------------ MCL 5.1 supports a large subset of the semi-standard CLOS MetaObject Protocol (MOP), as described in chapters 5 and 6 of "The Art of the Metaobjct Protocol", (Kiczales et 1l, MIT Press 1991). MCL represents method functions differently from the way that the MOP specifies; functions and macros described in section 5.5 ("Generic Function Invocation Protocol") are either not implemented or may deviate from the spec in arbitrary ways. All other constructs are supposed to be implemented in accordance with the spec, and deviations in those cases should be reported as bugs. The keyword :MCL-COMMON-MOP-SUBSET is on *FEATURES* to indicate the presence of this new functionality. All of the following MOP-related symbols are exported from the CCL package. accessor-method-slot-definition add-dependent add-direct-method add-direct-subclass add-method class-default-initargs class-direct-default-initargs class-direct-slots class-direct-subclasses class-direct-superclasses class-finalized-p class-precedence-list class-prototype class-slots compute-applicable-methods compute-applicable-methods-using-classes compute-class-precedence-list compute-default-initargs compute-discriminating-function compute-effective-method compute-effective-slot-definition compute-slots direct-slot-definition-class effective-slot-definition-class ensure-class ensure-class-using-class ensure-generic-function-using-class eql-specializer-object extract-lambda-list extract-specializer-names finalize-inheritance find-method-combination funcallable-standard-instance-access generic-function-argument-precedence-order generic-function-declarations generic-function-lambda-list generic-function-method-class generic-function-method-combination generic-function-methods generic-function-name intern-eql-specializer make-method-lambda map-dependents method-function method-generic-function method-lambda-list method-specializers method-qualifiers slot-definition-allocation slot-definition-initargs slot-definition-initform slot-definition-initfunction slot-definition-name slot-definition-type slot-definition-readers slot-definition-writers slot-definition-location reader-method-class remove-dependent remove-direct-method remove-direct-subclass remove-method set-funcallable-instance-function slot-boundp-using-class slot-makunbound-using-class slot-value-using-class specializer-direct-generic-functions specializer-direct-methods standard-instance-access update-dependent validate-superclass writer-method-class metaobject long-method-combination short-method-combination standard-accessor-method standard-reader-method standard-writer-method specializer funcallable-standard-class forward-referenced-class standard-direct-slot-definition standard-effective-slot-definition clear-specializer-direct-methods-caches *check-call-next-method-with-args* clear-gf-cache clear-all-gf-caches clear-clos-caches method-exists-p copy-instance Some code that worked in previous versions of MCL may need to be changed; perhaps most notably, it may be necessary to define appropriate VALIDATE-SUPERCLASS methods before a class can be defined as a subclass of a class whose metaclass differs. Added DOCUMENTATION method for slot-definition. Timer ---------- MCL 5.1 introduces a timer which permits scheduling when the mouse is down in a menu, when a menu is down, when the mouse is down in other situations, such as during window drag and grow, ... The timer is not installed by default. To cause it to be installed set the variable *timer-interval* to the desired frequency of calls to the scheduler. The interval is in seconds as a double float. A reasonable value is 0.2d0. The initial value is NIL. The timer is implemented using #_InstallEventLoopTimer with the interval being *timer-interval* and the timer procedure a function which calls the scheduler. The scheduler will not be called if interrupts are disabled (i.e. when within without-interrupts). The macro WITH-TIMER activates the timer (if it is installed) for the scope by setting the event loop fire time to ccl::*event-loop-initial-fire-time* on entry and to never (-1.0d0) on exit from the outermost with-timer. The initial value of ccl::*event-loop-initial-fire-time* is 0.1d0. MCL wraps with-timer around loops when the mouse is down such as in scroll bars, fred-windows, the collapse button. Also around calls to #_TrackControl, #_DragWindow, #_GrowWindow, #_TrackBox. The timer also runs during the choose-xxx-dialogs. It is activated during user-pick-color but doesn't always work. (probably won't be fixed unless by a future OS version) The timer is only activated (via with-timer) when required to continue scheduling in MCL as shipped. There is a new function WAIT-MOUSE-UP-OR-MOVED that can be used instead of MOUSE-DOWN-P in loops which run while the mouse is down. It uses less CPU time when the mouse doesn't move or go up. If the timer is activated it will run while the mouse is down and motionless. If the timer is not activated the behavior of WAIT-MOUSE-UP-OR-MOVED is similar to MOUSE-DOWN-P but does enable scheduling which MOUSE-DOWN-P does not do. WAIT-MOUSE-UP-OR-MOVED returns NIL if the mouse is up now or goes up It returns T if the mouse moves or key modifiers change. Note that on OS9 the timer does not run during #_dragwindow, #_growwindow and several other situations. Multiple processes and with-focused-view -------------------------- Added class allow-view-draw-contents-mixin and method allow-view-draw-contents. While the timer (if enabled by setting *timer-interval* to a double float) allows process scheduling to proceed when mouse is down, menu is down etc, some users also need the ability to allow several processes to draw to one window when within view-click-event-handler of an item in that window. (if e.g. the view-click-event-handler draws something and then may invoke a modal dialog) For that need one can add allow-view-draw-contents-mixin to the class of the window and call allow-view-draw-contents of (view-window item). Normally only one process at a time is allowed to draw to a window when within the scope of with-focused view. If another process does with-focused view, the effect is a process-wait until the prior with-focused-view exits. The method allow-view-draw-contents for a window of type allow-view-draw-contents-mixin allows multiple processes to draw to the window. For other window types it does nothing. Some view-click-event-handler methods for built in MCL dialog-items do call allow-view-draw-contents on the cantaining window because those dialog items will work correctly when clicked in such a window. Currently view-click-event-handler methods for 3d-buttons and pop-up-menus do call allow-view-draw-contents. Methods for other dialog-items such as radio-buttons and check-boxes do not. The function that handles live resize of windows calls allow-view-draw-contents. Fred ------------- Fix split-pane if osx-p Add new variable ccl::*metallic-fred-windows* - if true fred-windows are "metallic", i.e. have borders and can drag by border. The initial value is nil. Add new variable ccl::*live-resize-fred-windows*. If true, resizing of fred windows with the grow box is "live". Initial value is T. Poof-button draws gray if window is inactive. Pane-splitter draws gray if window is inactive. Reverting a Fred file does the right thing with unix files. Fix for one case of a selection being more than 32767 pixels wide. Very old bug. Wood ---------------- Fix dc-shared-initialize for slots being list not vector Add p-make-instance from Terje N. with fixes so will compile in 5.1. Fix some Wood files so they will compile in 5.1. Long standing bug re reading and writing bignums in Wood database is fixed. Additions to examples --------------------------- Added anticipat-symbol-complete.lisp to the examples folder. Attempts symbol completion while user is typing. From Alex Repenning. Added twist-down.lisp to the examples folder, from Terje Norderhaug. Added two new files in "ccl:examples;appearance-manager-folder;" - placard-dialog-item.lisp and disclosure-control.lisp from Terje Norderhaug Modified Drag-and-drop.lisp to use with-timer where appropriate. Miscellaneous additions and fixes -------------------------------- Window-grow-event-handler method for window does live resize if the #$kWindowLiveResizeAttribute bit is set in the window-other-attributes slot of the window or if ccl::*live-resize-all-windows* is true (the initial value is T). Live resize heeds the value of ccl::view-minimum-size for the window. The default method for view-minimum-size of window returns #@(40 40) Some things flash a lot on OS9. Compiler modifications to fix disappointing performance of integer arithmetic on G5 processor. Meta-. works for package names and nicknames. From Gary King LOAD-PATCHES doesn't bind *record-source-file* to NIL Add the following slot to class window (window-theme-background :initform nil :initarg :theme-background :accessor window-theme-background) Added class theme-background-view, a subclass of view, which allows a view to have theme-background when the window does not. Used by inspector command-panes. Added class scrolling-fred-view-with-frame, a subclass of scrolling-fred-view, which will draw a focus rectangle when the view contains the current key handler. Basic-editable-text-dialog-item draws a focus rectangle when it is the current key handler. INSTALL-VIEW-IN-WINDOW :before ((dialog-item control-dialog-item) - don't create handle if already has one. Simplifies implementation of new subclasses. Track-thumb-p initform for scroll bars is T. Initial value of *fred-track-thumb-p* is T. These changes made because non live scroll bar tracking doesn't always work correctly at limits on OSX. Add macro NEW-WITH-POINTERS. Suggest using it or with-dereferenced-handles rather than with-pointers becouse determining whether something is a pointer or a handle is not reliable on OSX. Fix windows sometimes appearing in wrong place after wake from sleep. Fix macro WITH-TEXT-COLORS. Fixes scrolling-fred-views with :body color (background) other than white. Make static-text-dialog-items erase themselves when you set their text. Fix clicking in pop-up menus whose height is greater than the default. Hierarchical pop-up menus inherit font from parent menu. WINDOW-SAVE-FILE will write the file unix-wise if the file was unix-unmangled (i.e opened with the File command Load Unix file) but retains readabilty in buffer. EDIT-CALLERS (ctrl-c) works for "system calls", e.g #_TrackControl. Don't use pascal-true and deal with pointers to booleans right %load passes external-format to recursive calls. Window-draw-grow-icon does nothing, remove all calls but leave definition for backward compatibility. Initialize-instance for window passes view-font to window-make-parts and initialize-window. Preferences... menu item moved from Tools menu to the "standard" place in Application menu if OSX. Has a cammand key (#\K) on OSX. To change that set CCL::*PREFERENCES-COMMAND-KEY* to whatever you prefer. NIL is acceptable. Added function disable-or-delete-preferences-menu-item (&optional (what :disable)). The function is misnamed. :enable is also an option as well as :delete. Don't heed cmd-q or the preferences command key if the application menu is disabled - from Takehiko Abe. OSX bug we think. Add option to make menu be dismissed after some time elapses (just like it does on OS9) - see *lose-menu-ticks* in l1-events.lisp. Only works if *timer-interval* has been set to a double float value. *trace-print-level* and *trace-print-length* can be :follow-print meaning use *print-level* or *print-length*. Idea from Gary King. :follow-print is the initial value for both. Trace dialog and preferences dialog use scrolling-fred-view-with-frame. Defformat #\linefeed so that tilde-linefeed works the same as tilde-return (fix suggested by Gary Byers) View-activate/deactivate-event-handler for pop-up-menu and scroll-bars do #_activatecontrol/#_deactivatecontrol. View-activate/deactivate-event-handler methods for control-dialog-item also do #_activatecontrol/#_deactivatecontrol. Enable Undo More menu item in the Edit menu in a case when it should have been enabled but was not. Add command-key (:shift #\Z) for Undo More menu item. The functionality of the file "ccl:examples;appearance-manager-folder;appearance-editable-text.lisp" has been incorporated in MCL 5.1. The file is obsolete and will say so if you load it. Default buttons now work when contained in a subview of a window. Bug fixes re: drawing theme focus rectangle for editable-text-dialog-item, table-dialog-item, and scrolling-fred-view-with-frame. The function ccl::frame-table-item has been replaced by the method frame-key-handler which is defined for table-dialog-item, basic-editable-text-dialog-item and simple-view. The method for simple-view does nothing. Frame-table-item still exists. It calls frame-key-handler. Button-dialog-item has a new initarg, :cancel-button. The default is NIL. If true that is the button that will be "pressed" if #\esc is typed. Whether the button actually cancels is up to it's dialog-item-action-function. New methods: set-cancel-button ((dialog window) new-button) cancel-button ((dialog window)) In the absence of a cancel-button in the window, we look for a button whose dialog-item-text is "Cancel". If neither exists, #\esc is passed to the current-key-handler if any. :Cancel-button is used in y-or-n-dialog, get-string-from-user ... The non-feature in view-key-event-handler for arrow-dialog-item wherein #\esc would "press" some random button that was not the defoult button, if one were found in the containing window, has been removed. It's up to the window/dialog and the contained buttons to specify what button, if any, should function as the cancel button when #\esc is typed. *use-pop-up-control* is T on OS9 as well as OSX. Fixed bug that caused view-draw-contents to be called when not needed. Thanks to Takehiko Abe. The bug has been there since MCL 4.3.5. Search-file-dialog improvements from Shannon Spires. Added Subfolders check box. Choose button now tries to start at current pathname. Make "Search Comments" checkbox also work right for Unix files. Use #'directory as an iterator (generator) such that search begins immediately regardless of number of files to be searched, and we won't have to cons a potentially huge list of files in memory. Added macro with-fore-and-back-color which is somewhat more efficient than nested (with-fore-color fore (with-back-color back ...)) when in a window with theme-background. Radio-buttons and check-boxes with part-color of :text or :body look better. Thanks to Terje Norderhaug. Add possible :upp-creator arg to defpascal, thus: (defpascal collapse-begin-proc (:upp-creator #_neweventhandlerupp ....) Has the same effect as: (add-pascal-upp-alist 'collapse-begin-proc #'(lambda (procptr)(#_neweventhandlerupp procptr))) (defpascal collapse-begin-proc (... )) Font menu displays font names using the font of the menu-item. The font "Euphemia UCAS Italic" is ignored because we don't know how to handle it. #| From Deborah Goldsmith, Apple Unicode guru: The Euphemia UCAS family (with regular, bold, and italic faces) was new in Mac OS X 10.3 (Panther). It won't appear if you have an earlier OS release. Also, it's an optional install: you need to select "Fonts for Additional Languages" in the installer, or you won't get it. It's a font for Canadian native languages such as Inuktitut and Cree (UCAS stands for "Unified Canadian Aboriginal Syllabics", the part of Unicode used to write such languages). |# Added :window-type keyword argument to get-string-from-user and message-dialog. Added :dont-confirm-replacement keyword argument to choose-new-file-dialog and choose-new-directory-dialog. If true then the alert saying "An item named xxx already exists ..." will not be shown if one enters the name of an existing file or folder. Fixed some OSX misbehavior with choose-xxx-dialog. When the choose-xxx-dialog completes make sure the menubar shows up correctly sooner rather than later and the selection, if any, in the front window is redrawn correctly. BTW Norton Anti Virus is a disease in itself. We recommend not installing it. (Or try turning off the automatic checking, whatever that is.) It may prevent deleting a temporary file. MCL will issue a warning when unable to delete a temporary file. New variable ccl::*event-processor-priority* for those who run several processes some of which may be more important than the process that handles events and some less important. The initial value is 1. We assume, but do not check, that if one sets *event-processor-priority* it is a fixnum greater than 0. To change the priority of the currently running event-processor to e.g. 5 do: (in-package :ccl) (setq *event-processor-priority* 5) (setf (process.priority *event-processor*) *event-processor-priority*) Thereafter the current event processor and any new event processing processes (created due to an error in the initial event processor) will have the specified priority. (N.B. the above does not apply when using ccl:library;new-scheduler.lisp) 3d-button initform for frame-p is T vs. NIL. Search Files dialog fix so default pathname always has a name or type. Fix (setf wild-inferiors-p) to not error if pathname has no directory. Inspecter for a class warns "confused" rather than causing an error when line n out of range, probably due to a redefined class. Fix Inspector window positioning when monitor resolution or number of monitors changes. Thanks to Gary King. Fix bug in view-save-position re: save-file-info-p when no name. Add macros %get-local-mouse-position and %get-global-mouse-position. Fix :window--type for :single-edge-box and :no-border-box. Fix for changing screen resolution and monitors on OSX. Handle quit from the Quit menu-item with carbon event so detection of command key is reliable on OSX (set-dead-keys nil) works. Menus and pop-up-menus have a menu-font initarg and slot. Heirarchical menus inherit the font from the menu-owner in the absence of a specified menu-font. Pop-up-menus whose size is bigger than the default size respond reasonably to mouse clicks. Theme-background for windows works on OS9 as well as OSX. Class window has another slot for attributes such as #$kWindowMetalAttribute - the default is 0 The initial value for *disable-bubbles-on-inactive-windows* is NIL. Command-key modifier when selecting the Windows menu says do alphabetic sort of items - from Toomas Altosaar Fonts with negative font-code now work thanks to Takehiko Abe. get-cfstr - don't error if macroman length not what one might expect it to be Known bugs ----------- (#_debugger), (#_debugstr), (dbg) do not work on OS9.