[plt-scheme] obtaining list of opened files in DrScheme
I believe you want:
(require (lib "tool-lib.ss" "drscheme"))
in your keybindings file.
Robby
At Wed, 4 Oct 2006 19:12:33 -0500, "pedro pinto" wrote:
> Thanks for the pointers. Apologies in advance if this is a silly question,
> but how do I obtain the bindings to the drscheme:unit:frame<%> interface?
> Looking around the code, it seems that type is often imported into a tool
> unit, but I could not find any definition.
>
> -pp
>
>
> On 10/4/06, Robby Findler <robby at cs.uchicago.edu> wrote:
> >
> > I guess you'd want to iterate over all of the frames, via
> > get-top-level-windows. Find those that implement the
> > drscheme:unit:frame<%> interface, and then use the get-tabs method to
> > get the tabs in those frames. From those tabs, use get-defs to get the
> > definitions text and from that use get-filename to get the filename. To
> > actually bring a different file to be editing, use handler:edit-file.
> > (It also works to open new files and open empty windows/tabs if you
> > pass #f).
> >
> > .... but ...
> >
> > the get-tabs method doesn't exist in the 352 or anywhere else for that
> > matter, until just a minute ago when I added it to the svn version of
> > DrScheme.
> >
> > It's an easy patch, if you'd rather patch your version of drscheme than
> > get the svn version. Just look for get-tabs in the svn sources and copy
> > that one line into your version:
> >
> > http://svn.plt-scheme.org/plt/trunk/collects/drscheme/private/unit.ss
> >
> > hth,
> > Robby
> >
> > At Wed, 4 Oct 2006 17:32:57 -0500, "pedro pinto" wrote:
> > > Sorry, that was a rather cryptic post, here is some context:
> > >
> > > http://list.cs.brown.edu/pipermail/plt-scheme/2006-July/014115.html
> > > -pp
> > >
> > >
> > > On 10/4/06, Robby Findler <robby at cs.uchicago.edu> wrote:
> > > >
> > > > At Wed, 4 Oct 2006 17:20:01 -0500, "pedro pinto" wrote:
> > > > > Hi there,
> > > > >
> > > > > I posted about this issue some months ago. I want to extend DrScheme
> > > > > with a change buffer dialog. Guillaume Marceau was kind enough to
> > > > > point me to some example code [1], which seems to indicate that I
> > have
> > > > > to transverse some objects, beginning at the editor<%> argument that
> > > > > is passed to my event handler, until I find someone that has the
> > list
> > > > > of open files. Unfortunately, I don't know my way around the
> > framework
> > > > > very well. Can anyone point me in the right direction?
> > > >
> > > > > [1]
> > http://list.cs.brown.edu/pipermail/plt-scheme/2006-May/013171.html
> > > >
> > > > I must have missed this message: what is a "change buffer" dialog? I
> > > > guess you don't mean the "Show Recently Opened Files in Separate
> > > > Window" window? I guess you're trying to make a new keybinding too?
> > > >
> > > > The url you refer to seems to be a post by Danny Yoo, and I don't see
> > > > anything in the material you quoted in your original message. Sorry
> > I'm
> > > > not being more helpful ...
> > > >
> > > > Robby
> > > >
> > > >
> >