[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: save-application

At  6:28 PM 8/23/94 -0400, Abdulrahman Al-Tassan wrote:
 >How can I make my standalone mcl application open a listener window that has:
 > 1. To cover the whole screen,
 > 2. To have a given title (e.g. "my application"),
 > 3. To print a given greeting (e.g. "welcome to my application v.001")
 >and to have any saved files (or used by "my applictaion") a unique suffix
 >(e.g. .mine).
 >Thank you.

Try loading this before you do "save-application". 

There's an :after method on initialize-window on the class listener
that bashes the window's title. It has to do with adding the
numbers ("Listener 1", "Listener 2", etc.) when you have multiple
listeners. But if you do save-application and just create one
listener for your app, this should work ok.

(in-package ccl)

(defclass my-listener (listener)
  (:default-initargs :window-title "welcome to my application v.001"))

(defmethod view-default-position ((w my-listener))
  #@(10 40))

(defmethod view-default-size ((w my-listener))
  (subtract-points (make-point *screen-width* *screen-height*)
                   #@(20 40)))

(setf *default-listener-class* 'my-listener)