[racket] Extending DrRacket with non-text tabs

From: Dmitry Pavlov (dpavlov at ipa.nw.ru)
Date: Fri Nov 14 06:36:13 EST 2014

Robby,

> Sorry for the long delay in replying.

Never mind---I have been distracted by other things recently, and
now I am back to work on this, so your reply is in fact just in time,
thanks :)

> You should be able to use handler:insert-format-handler to open your
> frame when a file with your extension is opened via the open dialog.

Good, insert-format-handler will suffice my needs I think.
Dumb question follows: what is the best place to call
insert-format-handler from?

To be more specific about my goals:
I have a Racket installation, and I would like to have this
format handler registered by the moment a user starts DrRacket
and opens some file in it.

I tried and hijacked
/opt/racket/share/pkgs/drracket/drracket/private/main.rkt
to insert my (handler:insert-format-handler) to it, but
this surely does not seem to be a good solution.

My spreadsheet-editing module is currently in a collection
that is "raco link"-ed to the Racket installation. Is there
a way to call (handler:insert-format-handler) from a collection
module before the collection is (require)-d? Or can I form
a package from my collection and use some package mechanism
for that?

Also, a related question: what would you recommend for
adding a certain file type to the DrRacket's file->open
dialog, where currently are "Racket Sources" and "Any"?


Best regards,

Dmitry

Posted on the users mailing list.