Lisp HUG Maillist Archive

[repost] forcing buffer to appear in specific editor window

[Hmm, I'm reposting because this message appears not to have made it out - I 
was using a different return address.]

I'm still rtfm'ing (and, I guess, rtfc'ing), but maybe someone can help me 
save time and cut to the chase:

I've created a complex interface that contains an editor pane.

When I start the application, I want a specific file to appear in the 
application's editor pane (under program control).

I'm currently using (editor:wfind-file-command ...) but, this brings up the 
file in the wrong editor window (the editor in my debug environment, not in 
the editor pane of the application).  

I've also named the buffer, using this incantation:

(defclass my-editor (capi:editor-pane) ()
  (:default-initargs
   :echo-area t
   :buffer-name "psl"
   :min-height '(character 39)))

(which then gets used in the interface definition)

and yet this does not help solve the problem:

(editor:use-buffer (editor:buffer-from-name "psl")
          (editor:wfind-file-command nil (input-file self)))

thanx in advance for any hints
pt


Re: [repost] forcing buffer to appear in specific editor window


On Apr 27, 2006, at 12:26 PM, Paul Tarvydas wrote:

> (defclass my-editor (capi:editor-pane) ()
>   (:default-initargs
>    :echo-area t
>    :buffer-name "psl"
>    :min-height '(character 39)))
>
> (which then gets used in the interface definition)
>
> and yet this does not help solve the problem:
>
> (editor:use-buffer (editor:buffer-from-name "psl")
>           (editor:wfind-file-command nil (input-file self)))



Assuming your buffer exists before your interface is created, you  
should be able to use the :buffer initarg instead of :buffer-name.

(defclass my-editor (capi:editor-pane) ()
   (:default-initargs
    :echo-area t
    :buffer (editor:buffer-from-name "psl")
    :min-height '(character 39)))



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Updated at: 2020-12-10 08:48 UTC