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

Re: come changes to the deuce editor gadget



Hi Ron,

standalone-deuce captures it in the 'frame-top-level' method:

define method frame-top-level
    (frame :: <deuce-frame>) => (#rest values)
  dynamic-bind (*editor-frame* = frame)
    let buffer = make-initial-buffer();
    dynamic-bind (*buffer* = buffer)
      select-buffer(frame-window(frame), buffer);
      let top-sheet = top-level-sheet(frame);
      while (#t)
	let event = read-event(top-sheet);
	block ()
	  handle-event(event-client(event), event);
	exception (e :: <command-error>)
	  when (command-error-format-string(e))
	    apply(deuce/display-error-message,
		  command-error-window(e),
		  command-error-format-string(e), command-error-format-arguments(e))
	  end;
	  #f
	end
      end
    end
  end
end method frame-top-level;

Depending on how your application is structured you may be able to do
similar. At the very least the above shows how to get the error
message.

I posted about a bug in Deuce a while back that may interest you. See:

http://groups.google.com/groups?selm=wkbsjhtqv7.fsf%40double.co.nz&oe=UTF-8&output=gplain

The fix has been applied for the next release of fun-dev I believe.

Cheers,
Chris.