[racket] Extending DrRacket with non-text tabs

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Nov 28 10:27:52 EST 2014

That's great! I'm glad to hear you got it working.

Robby

On Fri, Nov 28, 2014 at 9:08 AM, Dmitry Pavlov <dpavlov at ipa.nw.ru> wrote:
> Robby,
>
> Thank you very much, I am happy now with editor running within DrRacket.
>
> By the way, I have made a package, not with the full editor
> itself (it is specific to my project), but with the base GUI class
> (customizable).
>
> I have registered the package on pkgs.racket-lang.org under the name
> spreadsheet-editor. It fails to build, and here is what I am seeing:
>
> http://pkg-build.racket-lang.org/server/built/fail/spreadsheet-editor.txt
>
> require: PLaneT could not download the package "williams/table-panel:1":
> tcp-connect: connection failed
>   detail: host not found
>   address: planet.racket-lang.org
>   port number: 80
>   step: 1
>   system error: Name or service not known; errno=-2
>   in: (planet williams/table-panel:1:2/table-panel)
>
> At the same time, it all works fine on my system. Do you have an idea
> how can it be fixed?
>
>
> Best regards,
>
> Dmitry
>
>
>
>
>
> On 11/14/2014 05:44 PM, Robby Findler wrote:
>>
>> On Fri, Nov 14, 2014 at 5:36 AM, Dmitry Pavlov <dpavlov at ipa.nw.ru> wrote:
>>>
>>> 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?
>>
>>
>> Yes. See: http://docs.racket-lang.org/tools/implementing-tools.html
>>
>> You probably want to call it just from the top-level of your unit (not
>> from phase1 or phase2).
>>
>>> 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"?
>>
>>
>> I think you should call finder:default-filters (using the old value to
>> construct a new value).
>>
>> Robby
>> ____________________
>>    Racket Users list:
>>    http://lists.racket-lang.org/users
>>
>

Posted on the users mailing list.