Generic FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1

save-text-file

Arguments: window

This function is used by the File | Save menu-item of the default menu-bar that may be interactively attached to a form. In the IDE, it demonstrates a typical "Save" command for saving a text file but this function is not available in a runtime image. A custom application that implements a "Save" command will need to supply its own code for such a command instead, but it may be useful to model after the default menu-bar's example. So here is the code for the save-text-file example:

(in-package :cg)

(defmethod save-text-file ((window basic-pane))
   (let* ((selected-window (selected-window window)))
      (save-text-file-2 window
        (and selected-window (file selected-window)))))

(defun save-text-file-2 (window &optional pathname)
  (let* ((selected-window (selected-window window))
	 (pane nil))
    (cond ((typep selected-window 'text-edit-window)
	   (setq pane (frame-child selected-window))
	   (save-file pane pathname))
	  (t
	   #-runtime-system
	   (lisp-warning 
           "There is no selected text editor window to save."
    )))))

Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page was not revised from the 6.1 page.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1