laurent.orseau
2021-4-25 13:14:49

@robby I’m not sure I should require tool-lib because it automatically opens a new DrR frame. Shouldn’t original-error-display-handler actually be exported by drracket/tool instead? (I can’t manage to get rid of this linklet error)


laurent.orseau
2021-4-25 13:15:20

oops, sorry for the ping on a Sunday :confused:_


robby
2021-4-25 13:15:24

Right — you shouldn’t.


robby
2021-4-25 13:15:55

I was expecting you to get it via the unit.


sorawee
2021-4-25 13:17:25

What’s the purpose of tool-lib then? In my various DrRacket extensions, I need to use unit. tool-lib looks like a better thing to use, but it turns out to not be what I want.


robby
2021-4-25 13:17:27

Ping anytime! Don’t worry about. I try to take the position that I should control my devices, not them controlling me. :)


robby
2021-4-25 13:19:03

In all honesty, I’ve forgotten! The docs say it exports everything but looking at the code, it seems to export only the signatures. My memory suggests that drracket is sending things to plugins (tools) via a unit that it instantiates (and so the docs are wrong).


robby
2021-4-25 13:22:24

As for quickscript, I see that if I do this: $ git diff . diff --git a/tool.rkt b/tool.rkt index 3a2fb51..f806638 100644 --- a/tool.rkt +++ b/tool.rkt @@ -86,6 +86,8 @@ It should then be very fast to load. (import drracket:tool^) (export drracket:tool-exports^) + (printf "hi! ~s\n" drracket:init:original-error-display-handler) + (define script-menu-mixin (mixin (drracket:unit:frame<%>) () (super-new) in my local copy of quickscript, I see the expected printf.


laurent.orseau
2021-4-25 13:22:44

Aha, yes, I just figured


laurent.orseau
2021-4-25 13:23:04

My issue was that my uses of the original handler were outside the unit


laurent.orseau
2021-4-25 13:23:28

Thanks!


laurent.orseau
2021-4-25 14:12:35

Woohoo \o/ Finally Quickscript handles error properly to be much nicer on the user: • Errors during script compilation are reported all at once in a single message box, with a summary, followed by details that use drracket:init:original-error-display-handler • Errors during menu builds are only logged, not shown in a message box, to avoid displaying two error message boxes • Compilation is done during the splash screen • (only) When hitting Scripts\|Recompile a frame appears to tell the user to wait during compilation


laurent.orseau
2021-4-25 14:13:58

@robby next I can try to recompile scripts right before running them, if that’s still in your “that bugs me” list? (I’m just slightly worried about the additional time, but maybe that’s a false concern) (also, testing this is annoying :smile: )


robby
2021-4-25 14:14:47

I can’t recall anymore why I would have said that!


laurent.orseau
2021-4-25 14:15:03

My interpretation :smile:


robby
2021-4-25 14:15:09

Could it be that old zo files were being used as I edited the script or something?


laurent.orseau
2021-4-25 14:15:30

I think you had 2 different versions of DrRacket opened at the same time


spdegabrielle
2021-4-25 14:15:49

laurent.orseau
2021-4-25 14:16:09

Meh, it’s just bug fixing