SOLVED Mojo UI questions
-
Hi there. I'm looking to use some mojo for a little tool that involves very quickly (ideally) choosing a glyph. These comments are a bit like splitting hairs, but I hope you can see why.
-
SelectGlyph()
doesn't quite behave the way I'd personally expect it to. Ideally it'd respond to the keyboard more accurately. And be case-sensitive. Video -
FindGlyph()
would benefit from having some of the ease of use of theJump To Glyph
feature. That is, the ability to just hit Enter on the fly.FindGlyph()
seems to rely on Tab. May seem minor, but thinking about incorporating this into a script that would be used very often. Video -
When I hit Cancel on an
AskString()
, it still commits my input. Video -
I'm not sure how to work with
dontShowAgainYesOrNo()
. Or maybe I hit "don't show again" once and now don't know how to get it back. Would very much appreciate seeing a short example script with this in use.
TIA,
Ryan
-
-
Thanks for the response, @frederik. Looking forward to playing with these things in the beta!
-
I guess your first option is missing
enableTypingSensitivity
when creating the vanilla list internally...import vanilla w = vanilla.Window((400, 400)) w.l = vanilla.List((0, 0, 0, 0), sorted(CurrentFont().keys()), enableTypingSensitivity=True) w.open()
FindGlyph
should indeed work directly when enter is pressed, added to the todo list.AksString
should returnNone
when cancel is hit.
There is global reset in the preferences for all
dontShowAgainYesOrNo
dialogs.result = dontShowAgainYesOrNo("A title", "Are you sure about this question?", dontShowAgainKey="com.myDomain.myTool.myQuestion")
hope this helps!
(a public beta will be published soon!)