[plt-scheme] Distinguishing between pressing Run or Debug button in a tool
On Wed, Jul 9, 2008 at 7:04 AM, Gregory Cooper <greg at cs.brown.edu> wrote:
> I'm not sure I understand. The debug button is itself part of a tool,
> not part of the standard DrScheme interface, so writing another tool
> that assumes it's there seems problematic. Am I missing something?
That's certainly true, but I think that Robert is willing to make that
assumption and is able to establish it, for his context.
> Robby, your change certainly simplifies things, but it looks to me
> like the execute-callback will still be invoked along the main path
> through debug-callback. Again, maybe I'm misunderstanding what the
> problem is.
I think that's okay for Robert, since he can override the
debug-callback to be able to tell that the execute-callback is being
run for debugging. I don't know all of the details he's dealing with,
but he's fairly agressively changing the behavior of DrScheme (in ways
I certainly didn't plan for) but they seem to be working out okay so
far.
> In general, my impression was "debugging = extra setup + execution",
> so I don't see how to avoid making the debug button do everything the
> execute button does (and then some).
That sounds right.
One thing I wondered: is the debug? flag still necessary?
Robby
> Greg
>
> On Wed, Jul 9, 2008 at 7:31 AM, Robby Findler <robby at cs.uchicago.edu> wrote:
>> Looking over the code debugger's code, I don't see why it is written
>> like that. I have changed it to something that doesn't make the docs
>> lie, but if one of the maintainers of the debugger were to check it
>> over, that would be a good thing. (This is revision 10695.)
>>
>> Thanks,
>> Robby
>>
>> On Wed, Jul 9, 2008 at 2:12 AM, Robert Matovinovic
>> <robert.matovinovic at web.de> wrote:
>>> Hi,
>>> In creating a language tool so far I found no way to distinguish if the
>>> debug or the run button was pressed. My tool overrides the execute-callback
>>> function of drscheme:unit:frame% and is called whenever Run or Debug is
>>> pressed. However the documentation says only it is called, when the Run
>>> button is pressed. This is just for information no complaint about the
>>> behaviour, because I want to do different things before debugging or run.
>>> Only that I can't do it the way I thought because I don't find a method like
>>> is-clicked? or on-click for a switchable-button which would give me the
>>> opportunity to know which one invoked the callback functions. Did I miss
>>> something?
>>> Thanks for your suggestions.
>>>
>>> Robert
>>>
>>> _________________________________________
>>> Robert Matovinovic
>>> Wintererstr. 61
>>> 79104 Freiburg
>>> Germany
>>>
>>> Tel: +49 (0)761 51 93 544
>>> Cell: +49 (0)171 56 32 330
>>> email: robert.matovinovic at web.de
>>>
>>> _________________________________________________
>>> 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
>>
>
>