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

Re: balloon help for search-window-dialog



At  1:44 PM 2/24/94 -0500, Dale J. Skrien wrote:
>        I am trying to create a stand-alone application that makes a call
>to (ccl::search-window-dialog).  This works fine and brings up the search
>window.
>        My problem is that, when balloon help is on, I get an error message
>when the cursor is over the search window saying that "The Help File could
>not be found.  Would you like to locate the file?"  Apparently this occurs
>because the balloon help messages for the search window are in the MCL Help
>file.  These messages are only accessible to my application if the MCL Help
>file is in the same folder as my application.  I tried using ResEdit and
>copying the appropriate help strings from MCL Help into my application, but
>that didn't seem to work.
>        Is there some way to allow balloon help to work with the search
>window  in my stand-alone application without keeping around the MCL Help
>file?  If not, is there some way to permanently disable balloon help for
>the search window so that I can avoid the error message?  Or shouldn't I be
>using the search window via (ccl::search-window-dialog) in a stand-alone
>application?

Your best bet is to put the help resources in your application.
Had I realized that we were only talking about 24K of strings when
I wrote the code, I probably would have made them part of the MCL
application in the first place. Use ResEdit to copy the "STR " and
"STR#" resources from the "MCL Help" file to your application (or
write some code to do it at save-application time). Then include the
following code in your application. The help-resource-file-refnum
method tells MCL's help manager code which resource file to use
when looking for help strings. You'll probably want to use some
name other than "my-application".

(defclass my-application (application) ())

(setq *application* (make-instance 'my-application))

(defvar *application-resource-file-refnum*)

(def-load-pointers *application-resource-file-refnum* ()
  (setq *application-resource-file-refnum* (current-resource-file)))

(defmethod ccl::help-resource-file-refnum ((self my-application))
  *application-resource-file-refnum*)