AW: [plt-scheme] word completion for module based languages
Thank you very much for your offer. I will send you some small files that
should do it, but not before tomorrow, it's 22:45 here.
Robert
-----Ursprüngliche Nachricht-----
Von: robby.findler at gmail.com [mailto:robby.findler at gmail.com] Im Auftrag von
Robby Findler
Gesendet: Dienstag, 1. Juli 2008 18:18
An: Robert Matovinovic
Cc: plt-scheme at list.cs.brown.edu
Betreff: Re: [plt-scheme] word completion for module based languages
Hm. I think you're right, which means that its hard for me to tell what is
going wrong without some more details. If you have the time, would you mind
sending me a cut down version of your tool that illustrates the problem, but
hopefully is just a couple of small files?
(Probably there is a bug...)
Thanks,
Robby
On Tue, Jul 1, 2008 at 11:15 AM, Robert Matovinovic
<robert.matovinovic at web.de> wrote:
> as I already mentioned in the last mail, which unfortunately wasn't
> sent to the list, my language is not augmenting the capability-value
> method. I read docs, looked in the source, tried different things, the
> whole day but didn't come to a solution. Concerning the
> capability-value example below I must make a stupid mistake, because
> whereever I put it in my code I get
>
> expand: unbound variable in module in:
> drscheme:language-configuration/internal:get-all-manual-keywords
>
> Well, I looked up in private/drsig.ss that get-all-manual-keywords is
> a method of drscheme:language-configuration/internal since I thought
> this might be the mistake because
> drscheme:language-configuration:get-all-manual-keywords brought up the
> respective mistake. So what I'm doing wrong?
>
> On the other hand I found that 'drscheme:autocomplete-words is #t.
> Also it seems to me get-all-manual-keywords is the default for
> 'drscheme:autocomplete-words is #t. So it should just work without
> augmenting capability-value. Is that true? In my language "no
> completions available .." is the only thing I see.
>
> 'gui-debugger:debug-button is also #t. I defined the method
> debugger:supported? in the
> drscheme:language:module-based-language->language-mixin of my
> language. The button is there and clickable not depending on my
> debugger:supported? method. But after clicking the debugger panels
> don't show up although in the background something happens. If I want
> to debug (+ 1 2) after some time the interaction window opens and
> displays the result. The debugger:supported? method seems also to be
> set to #t by default. But something suppresses the debugging.
>
> Any help 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: Dienstag, 1. Juli 2008 05:02
> An: Robert Matovinovic
> Cc: plt-scheme at list.cs.brown.edu
> Betreff: Re: [plt-scheme] word completion for module based languages
>
>
> [ Matthew? Greg? A debugger question below. ]
>
> Is your language augmenting the capability-value method? Perhaps you
> need something like this:
>
> (define/augment (capability-value key)
> (cond
> [(eq? key 'drscheme:autocomplete-words)
> (drscheme:language-configuration:get-all-manual-keywords)]
> [else (drscheme:language:get-capability-default key)]))
>
> You might want to check over the docs for
>
> drscheme:language:register-capability
>
> to see if there are other capabilities you want to enable.
>
> For the debugger, it looks like you want to both respond with #t to
> the 'gui-debugger:debug-button capability (add to the above method),
> and define the debugger:supported? method, which should also return
> #t. I'm just inferring that from the source, tho, so Matthew or Greg
> may know better.
>
> Robby
>
> On Sat, Jun 28, 2008 at 2:20 AM, Robert Matovinovic
> <robert.matovinovic at web.de> wrote:
>> Yes, the language is in the language dialog and defined as module
>> with "(module ..." and uses
>> drscheme:language-configuration:add-language
>> and drscheme:get/extend:extend-unit-frame. I will look at "#lang ...".
>> So far I only know that one can use it as an abbreviation for module.
>>
>> Robert
>>
>> -----Ursprüngliche Nachricht-----
>> Von: robby.findler at gmail.com [mailto:robby.findler at gmail.com] Im
>> Auftrag von Robby Findler
>> Gesendet: Freitag, 27. Juni 2008 22:16
>> An: Robert Matovinovic
>> Cc: plt-scheme at list.cs.brown.edu
>> Betreff: Re: [plt-scheme] word completion for module based languages
>>
>>
>> On Fri, Jun 27, 2008 at 2:47 PM, Robert Matovinovic
>> <robert.matovinovic at web.de> wrote:
>>> Finally I could test what you have checked in, Robby. Word
>>> completion now shows also all commands of my module language in
>>> version 4.0.1 [3m](Yippieh), thank you very much. But unfortunately
>>> it works only if one of the built-in languages are chosen but not
>>> when I switch to my module language. So something is still missing
>>> which is important to me. Maybe there is something I have to add to
>>> my module. I don't ask for language specific filtering of the word
>>> completion, the whole list would be alright, just that it works also
>>> with a module language.
>>
>> Can you tell me a little more about how you've added the language to
>> DrScheme? Is it in the language dialog?
>>
>> If so, perhaps you might consider defining your language in a way
>> that "#lang ..." works and then using DrScheme's module language.
>> We're trying to migrate that way so that all of the information
>> needed to run the program is in the program's text itself (as opposed
>> to being in the environment).
>>
>>> I also like to use the debugger with my module language, but it
>>> doesn't. Is there an easy fix?
>>
>> I suspect the answer here may be the same as the above, but I'm not
>> sure.
>>
>> Robby
>>
>>
>>
>
>
>