[plt-scheme] on-execute method in drscheme:language:language<%>

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Fri Jun 16 11:03:54 EDT 2006

On 6/16/06, Dale Vaillancourt <dalev at ccs.neu.edu> wrote:
> I am working on a language-level for DrScheme, and I need to do some
> computation when 'Run' is clicked (before allowing the user to
> interact with functions appearing in the definitions window).
> I thought that the right method to override would be on-execute in
> drscheme:language:language<%>, but that method gets invoked more
> often that I want.  In addition to being invoked upon clicking 'Run',
> it also is invoked upon opening a file in DrScheme (when my language
> has already been selected).
> Is there another method that only gets invoked upon clicking 'Run'?
> Alternatively, is there a way to determine, within the body of on-
> execute, whether the invocation was triggered by the 'Run' button?
> (BTW, I am using version 349.100-svn15jun2006.)

I think you want the execute-callback method of drscheme:unit:frame%.
See also drscheme:get/extend:extend-unit-frame.

Carl Eastlund
"Cynical, but technically correct."

Posted on the users mailing list.