Module: emulator-environment Synopsis: Emulator Environment Author: Andy Armstrong Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND /*---*** No longer used /// A simple Dylan notifier define frame () slot notifier-condition = #f, init-keyword: condition:; slot notifier-restarts = #[], init-keyword: restarts:; slot notifier-abort-restart = #f, init-keyword: abort-restart:; slot notifier-continue-restart = #f, init-keyword: continue-restart:; pane notifier-error-message-pane (notifier) make-multi-line-label (notifier, format-to-string("Condition: %s", princ-to-string(notifier-condition(notifier)))); pane notifier-restarts-pane (notifier) make(, items: notifier-restarts(notifier), value: notifier-continue-restart(notifier), activate-callback: method (sheet) let restart = gadget-value(sheet); invoke-restart-interactively(restart) end, label-key: curry(notifier-print-restart, notifier)); layout (frame) vertically (spacing: 8) frame.notifier-error-message-pane; frame.notifier-restarts-pane end; end frame ; define method make-multi-line-label (frame :: , string :: , #key max-width = 80, max-lines = 10) => (sheet :: ) let panes = make(); with-frame-manager (frame-manager(frame)) let string-size = size(string); let position = 0; block (return) for (count from 1, until position >= string-size) if (max-lines & count > max-lines) add!(panes, make(