https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • That "finally" sounds like the hardest part
    f

    few-pizza-8232

    04/02/2023, 9:38 PM
    That "finally" sounds like the hardest part
  • not really, i mean, if the shortcut manager existed all i would have to do is turn that shortcutText into something the shortcut manager would understand: ```haxe ShortcutManager.instance.register(shortcutTextToArray(sortcutText), () -> dispatchEvent(MenuEvent.MENU_SELECTED)); ```
    b

    bright-gpu-74537

    04/02/2023, 9:41 PM
    not really, i mean, if the shortcut manager existed all i would have to do is turn that shortcutText into something the shortcut manager would understand:
    Copy code
    haxe
    ShortcutManager.instance.register(shortcutTextToArray(sortcutText), () -> dispatchEvent(MenuEvent.MENU_SELECTED));
  • something like that anyway
    b

    bright-gpu-74537

    04/02/2023, 9:41 PM
    something like that anyway
  • Oh, so you'd be able to use shortcuts to trigger selection events, specifically - I was imagining the shortcut would go to the same bound callback directly, somehow
    f

    few-pizza-8232

    04/02/2023, 9:44 PM
    Oh, so you'd be able to use shortcuts to trigger selection events, specifically - I was imagining the shortcut would go to the same bound callback directly, somehow
  • naw, i think i would just dispatch a menu selected event as if you clicked on the menu item
    b

    bright-gpu-74537

    04/02/2023, 9:44 PM
    naw, i think i would just dispatch a menu selected event as if you clicked on the menu item
  • Makes a lot more sense. I was coming at the problem from a different angle, where I would maybe pass a menu a data source of named callbacks and some of those callbacks would be separately linked to shortcuts, or the "callback" itself could be a more complicated thing able to register with a shortcut object, or or or etc The nice thing about a framework-level approach is that each part of the framework is designed for equally agnostic and flexible use as every other part; even if that approach isn't the mess I'd pick first šŸ˜µā€šŸ’«
    f

    few-pizza-8232

    04/02/2023, 9:50 PM
    Makes a lot more sense. I was coming at the problem from a different angle, where I would maybe pass a menu a data source of named callbacks and some of those callbacks would be separately linked to shortcuts, or the "callback" itself could be a more complicated thing able to register with a shortcut object, or or or etc The nice thing about a framework-level approach is that each part of the framework is designed for equally agnostic and flexible use as every other part; even if that approach isn't the mess I'd pick first šŸ˜µā€šŸ’«
  • Yeah, on further refection this is nice too: ```haxe ShortcutManager.instance.register([CTRL, "s"], doSave) ``` and when you press put ctrl+s in the shortcutText for a menu item it also dispatches to the short cut manager, something like: ```haxe onMenuClick -> { ShortcutManager.instance.dispatch(shortcutTextToArray(sortcutText)); dispatchEvent(MenuEvent.MENU_SELECTED) } ```
    b

    bright-gpu-74537

    04/02/2023, 9:53 PM
    Yeah, on further refection this is nice too:
    Copy code
    haxe
    ShortcutManager.instance.register([CTRL, "s"], doSave)
    and when you press put ctrl+s in the shortcutText for a menu item it also dispatches to the short cut manager, something like:
    Copy code
    haxe
    onMenuClick -> {
         ShortcutManager.instance.dispatch(shortcutTextToArray(sortcutText));
         dispatchEvent(MenuEvent.MENU_SELECTED)
    }
  • that way you keep all your shortcuts nice and in the same place (if you wanted), i dont think they are mutally exclusive, they would both work together
    b

    bright-gpu-74537

    04/02/2023, 9:54 PM
    that way you keep all your shortcuts nice and in the same place (if you wanted), i dont think they are mutally exclusive, they would both work together
  • so pressing ctrl+s would a) let the shortcut manager that had been pressed b) send a MENU_SELECTED event
    b

    bright-gpu-74537

    04/02/2023, 9:55 PM
    so pressing ctrl+s would a) let the shortcut manager that had been pressed b) send a MENU_SELECTED event
  • anyways, none of this exists currently šŸ˜„
    b

    bright-gpu-74537

    04/02/2023, 9:55 PM
    anyways, none of this exists currently šŸ˜„
  • Fun to speculate about though
    f

    few-pizza-8232

    04/02/2023, 9:57 PM
    Fun to speculate about though
  • true enough, ill end up thinking about this now and will write it mid week šŸ˜„
    b

    bright-gpu-74537

    04/02/2023, 9:57 PM
    true enough, ill end up thinking about this now and will write it mid week šŸ˜„
  • got tons of files of notes for things I'm probably months away from actually building (months of "in my free time" dev, at least). It's helpful to get the loose idea out of your head even if it's not what you're doing in the immediate future
    f

    few-pizza-8232

    04/02/2023, 10:00 PM
    got tons of files of notes for things I'm probably months away from actually building (months of "in my free time" dev, at least). It's helpful to get the loose idea out of your head even if it's not what you're doing in the immediate future
  • Apologies if I've cursed you to some sort of Shortcut-related obsession
    f

    few-pizza-8232

    04/02/2023, 10:00 PM
    Apologies if I've cursed you to some sort of Shortcut-related obsession
  • ... ... ... its also great for procrastination ;;)
    b

    bright-gpu-74537

    04/02/2023, 10:01 PM
    ... ... ... its also great for procrastination ;;)
  • It doesn't count as procrastination if you use it eventually
    f

    few-pizza-8232

    04/02/2023, 10:01 PM
    It doesn't count as procrastination if you use it eventually
  • i think ill get that on my tombstone šŸ˜…
    b

    bright-gpu-74537

    04/02/2023, 10:01 PM
    i think ill get that on my tombstone šŸ˜…
  • adding a line to `epitaph_concepts.txt`
    f

    few-pizza-8232

    04/02/2023, 10:03 PM
    adding a line to
    epitaph_concepts.txt
  • > Stop Traveler! here lies Ian Harrigan, if you ask what kind of a many he was, he replies "well, i did use it!" šŸ˜„
    b

    bright-gpu-74537

    04/02/2023, 10:04 PM
    > Stop Traveler! here lies Ian Harrigan, if you ask what kind of a many he was, he replies "well, i did use it!" šŸ˜„
  • if you only call `refreshAll()` or `refreshFor()` once, the program keeps working as expected
    i

    icy-zebra-52882

    04/03/2023, 8:08 AM
    if you only call
    refreshAll()
    or
    refreshFor()
    once, the program keeps working as expected
  • hmm, actually it seems to stop UI updating even calling it once
    i

    icy-zebra-52882

    04/03/2023, 8:16 AM
    hmm, actually it seems to stop UI updating even calling it once
  • if it starts in `en` locale, switching to `de-DE` updates all the strings fine, but stops component values being updated further if it starts in `de-DE` locale, switching to `en` only changes one string (the "Copy page" button" in the centre) and also stops values being updated
    i

    icy-zebra-52882

    04/03/2023, 8:18 AM
    if it starts in
    en
    locale, switching to
    de-DE
    updates all the strings fine, but stops component values being updated further if it starts in
    de-DE
    locale, switching to
    en
    only changes one string (the "Copy page" button" in the centre) and also stops values being updated
  • what do you mean "stops component values being updated further"? Ive gone through your steps and it seems normal (i think)... but maybe im missing something?
    b

    bright-gpu-74537

    04/03/2023, 8:24 AM
    what do you mean "stops component values being updated further"? Ive gone through your steps and it seems normal (i think)... but maybe im missing something?
  • b

    bright-gpu-74537

    04/03/2023, 8:25 AM

    https://cdn.discordapp.com/attachments/565569107701923852/1092364344689442896/locale-issue.gifā–¾

  • ... it doesn't do that for me <:thonk:533013422204256276> I'll record it a sec
    i

    icy-zebra-52882

    04/03/2023, 8:27 AM
    ... it doesn't do that for me I'll record it a sec
  • I've tried clean build, added `-D no-macro-cache` to the HXML in case of macro sorcery
    i

    icy-zebra-52882

    04/03/2023, 8:28 AM
    I've tried clean build, added
    -D no-macro-cache
    to the HXML in case of macro sorcery
  • https://plzlookat.mystupid.pictures/CeRrHEOxhc.webm
    i

    icy-zebra-52882

    04/03/2023, 8:28 AM
    https://plzlookat.mystupid.pictures/CeRrHEOxhc.webm
  • hmmm, thats verrry different to what im seeing
    b

    bright-gpu-74537

    04/03/2023, 8:29 AM
    hmmm, thats verrry different to what im seeing
  • is it the same if you run / build it outside of vscode?
    b

    bright-gpu-74537

    04/03/2023, 8:29 AM
    is it the same if you run / build it outside of vscode?
  • being built outside of VSC in case of mystery cache shenanigans too
    i

    icy-zebra-52882

    04/03/2023, 8:29 AM
    being built outside of VSC in case of mystery cache shenanigans too
1...161716181619...1687Latest