AW: [plt-scheme] Changing the behavior of the run and debug buttoninDrScheme

From: Robert Matovinovic (robert.matovinovic at web.de)
Date: Sat Feb 23 06:53:52 EST 2008

Hi Robby,
I read the paper you pointed me to, searched source code and mailing list.
>From what I understand now, your suggestion to extend the custodian
hierarchy seems very logical to me. But I don't now how to do it. Where is
it defined? What might be a good start? Will it work if it is implemented in
my langugage module?  So far I read only about using custodians but not how
to extend there functionality. Any suggestions appreciated.
Robert

-----Ursprüngliche Nachricht-----
Von: plt-scheme-bounces at list.cs.brown.edu
[mailto:plt-scheme-bounces at list.cs.brown.edu] Im Auftrag von Robby Findler
Gesendet: Montag, 18. Februar 2008 21:50
An: Gregory Cooper
Cc: Robert Matovinovic; plt-scheme at list.cs.brown.edu
Betreff: Re: [plt-scheme] Changing the behavior of the run and debug
buttoninDrScheme


Others would probably know better than me, but it might make sense to extend
the custodian hierarchy with DDE support (so that when a custodian is
shutdown, the connection is properly closed) and then you won't need to do
anything DrScheme specific at all.

This has been pointed out many times here so I hope it isn't old news to
you, but it would fit in with the way DrScheme is designed as well as other
tools, as described in a research paper here:

http://citeseer.ist.psu.edu/201755.html

Robby

On Feb 18, 2008 12:59 PM, Gregory Cooper <greg at cs.brown.edu> wrote:
> Hi Robert,
>
> Perhaps you could simply override the on-execute method in your module 
> language to make it initiate a connection.  I believe such a 
> connection would be terminated automatically when you closed the tab 
> or clicked Run or Debug again.  Would that work?
>
> For an example of something similar, look at 
> collects/frtime/frtime-tool.ss, where the on-execute method is 
> overridden to extract some values from the program before it starts 
> running.
>
> Cheers,
> Greg
>
>
> On Feb 18, 2008 6:41 AM, Robert Matovinovic 
> <robert.matovinovic at web.de> wrote:
> > Hi Greg,
> > thanks for your hints. They will definitely help me. I looked 
> > already at the tools manual before I wrote the first mail but it 
> > didn't help me where actually to find the code which is executed, 
> > when the run button is clicked and how to extend/override it. So do 
> > you or anybody know where to look at? Robert
> >
> > -----Ursprüngliche Nachricht-----
> > Von: plt-scheme-bounces at list.cs.brown.edu
> > [mailto:plt-scheme-bounces at list.cs.brown.edu] Im Auftrag von Gregory 
> > Cooper
> > Gesendet: Sonntag, 17. Februar 2008 21:37
> > An: Robert Matovinovic
> > Cc: plt-scheme at list.cs.brown.edu
> > Betreff: Re: [plt-scheme] Changing the behavior of the run and debug
button
> > inDrScheme
> >
> >
> >
> > Hi Robert,
> >
> > Yes.  You'll probably need to define a tool with mixins that extend 
> > various DrScheme classes.
> >
> > You can use drscheme:get/extend:extend-unit-frame to apply a mixin 
> > to the unit frame (the class for the top-level DrScheme window).  
> > The mixin can override the execute-callback method, which gets 
> > invoked when the user clicks Run or Debug.
> >
> > To run your startup code: the unit frame provides a current-tab 
> > method, to which you can send get-ints to get the associated 
> > interactions-text object. Once you have the interactions-text, you 
> > can send it run-in-evaluation-thread with a thunk containing the 
> > code you want to run.
> >
> > As far as running shutdown code, you can similarly use 
> > drscheme:get/extend:extend-tab to override enable-evaluation in the 
> > tab. (I'm pretty sure enable-evaluation gets invoked once all the 
> > definitions have been run, which should give you a suitable hook. 
> > Someone else can correct me if I'm wrong about this.)
> >
> > For examples of these mechanisms in use, you can look in 
> > collects/mztake/debug-tool.ss.  There may be simpler examples, but 
> > that's where my experience comes from.
> >
> > Cheers,
> > Greg
> >
> > On Feb 17, 2008 2:02 PM, Robert Matovinovic 
> > <robert.matovinovic at web.de>
> > wrote:
> > > Hi,
> > > is it possible to change the behavior of the run and debug buttons 
> > > in DrScheme via a tool? I implemented a module language to control 
> > > an external program via DDE (this ancient Windows dynamic data 
> > > exchange). I would like to implement an automated connection setup 
> > > to the external program before the program in the definitions 
> > > window in executed or debugged and an automated disconnection 
> > > afterwards, if that language is chosen. Can anybody point me to 
> > > the right files to look at and what might be a good way to go? 
> > > Thanks a lot. Robert _________________________________________
> > > Robert Matovinovic
> > > Wintererstr. 61
> > > 79104 Freiburg
> > > Germany
> > >
> > > Tel:    +49 (0)700 6286 0000
> > > Cell:   +49 (0)171 56 32 330
> > > email: robert.matovinovic at web.de
> > >
> > >
> > > ____________
> > > Virus checked by G DATA AntiVirusKit
> > > Version: AVK 18.2756 from 13.02.2008
> > > Virus news: www.antiviruslab.com
> > >
> > > _________________________________________________
> > >   For list-related administrative tasks:
> > >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> > >
> > _________________________________________________
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> >
> > ____________
> > Virus checked by G DATA AntiVirusKit
> > Version: AVK 18.2756 from 13.02.2008
> > Virus news: www.antiviruslab.com
> >
> >
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


____________
Virus checked by G DATA AntiVirusKit
Version: AVK 18.2831 from 20.02.2008
Virus news: www.antiviruslab.com



Posted on the users mailing list.