https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • a

    ambitious-knife-25690

    12/05/2019, 5:00 PM
    RN desktop solutions aren't as seamless as the mobile environment
  • a

    ambitious-knife-25690

    12/05/2019, 5:00 PM
    HaxeUI works perfectly fine for mobile
  • a

    ambitious-knife-25690

    12/05/2019, 5:00 PM
    It's just I like being able to use libraries and or make externs (easily) to extend the functionality from the haxe side
  • u

    user

    12/05/2019, 7:13 PM
    @stale-house-89863 performance; Haxeui will be compiled to native code( if say you use haxeui-kha)
  • n

    nutritious-boots-87264

    12/06/2019, 12:14 PM
    @bright-gpu-74537 Use case is having keyboard shortcut handlers for things like ctrl-z or deleting selected item using delete key.
  • b

    bright-gpu-74537

    12/06/2019, 12:15 PM
    right, i get that, but wouldnt they be considered "global" shortcuts?
  • n

    nutritious-boots-87264

    12/06/2019, 12:16 PM
    For many situations global would be good enough, but I don't think there is currently way of doing it without accessing backend (html5 in my case) directly.
  • b

    bright-gpu-74537

    12/06/2019, 12:17 PM
    OK, cool... ill take a look and make sure there are functions exposed on something like "Screen" to handle global shortcuts
  • b

    bright-gpu-74537

    12/06/2019, 12:18 PM
    would probably be nice to be able to do things like "Screen.instance.registerShortcut('ctrl+z', function(e) ...)"
  • n

    nutritious-boots-87264

    12/06/2019, 12:21 PM
    But there are cases where limiting shortcut scope would be also useful. For example I have a Tabview and some shortcuts are specific to each tab. It would be nice to handle that as well without having global shortcuts behaviour change based on current tab.
  • n

    nutritious-boots-87264

    12/06/2019, 12:22 PM
    I haven't tested if it currently works or not but there is a third case. Having shortcuts that apply to currently selected item in list widget.
  • b

    bright-gpu-74537

    12/06/2019, 12:23 PM
    i dunno, i feel like its a cornder case, and not 100% sure its the responsibility of haxeui to handle that... would you just do something like:
  • b

    bright-gpu-74537

    12/06/2019, 12:24 PM
    Copy code
    haxe
    Screen.instance.registerShortcut("ctrl+z", function(e) {
        if (mainTabs.pageIndex == 0) {
            // do the thing!
        }
    });
  • b

    bright-gpu-74537

    12/06/2019, 12:24 PM
    im willing to be convinced though, im just not 100% sure if this is app specific
  • n

    nutritious-boots-87264

    12/06/2019, 12:27 PM
    As I said for tabview it's doable but ugly. But in other situations like the "third case" I mentioned tracking which widget has focus should be responsibility of UI framework. And if it can handle the third case the same system can handle second case as tabs that are in background definitely shouldn't be considered in focus.
  • b

    bright-gpu-74537

    12/06/2019, 12:28 PM
    you mean using the delete key to delete some "active" object in an editor?
  • n

    nutritious-boots-87264

    12/06/2019, 12:29 PM
    Something like that.
  • b

    bright-gpu-74537

    12/06/2019, 12:29 PM
    well, but it doesnt have focus does it? It has focus for your app, you have defined a state outside of anything "haxeui" that is "this is active in my editor"
  • b

    bright-gpu-74537

    12/06/2019, 12:30 PM
    ie:
  • b

    bright-gpu-74537

    12/06/2019, 12:30 PM
    Copy code
    haxe
    Screen.instance.registerShortcut("del", function(e) {
        if (_currentlySelectedObjectInMyEdtior != null) {
            // do the thing!
        }
    });
  • n

    nutritious-boots-87264

    12/06/2019, 12:30 PM
    The "Editor" isn't necessarily a fully custom widget.
  • n

    nutritious-boots-87264

    12/06/2019, 12:31 PM
    What if a have a view containing 3 listview widgets.
  • b

    bright-gpu-74537

    12/06/2019, 12:31 PM
    right
  • b

    bright-gpu-74537

    12/06/2019, 12:31 PM
    what would you want to happen in the this case?
  • n

    nutritious-boots-87264

    12/06/2019, 12:32 PM
    In which case?
  • b

    bright-gpu-74537

    12/06/2019, 12:32 PM
    3 listviews
  • n

    nutritious-boots-87264

    12/06/2019, 12:33 PM
    I would expect that clicking in a listview (always or optionally) marks it as having keyboard focus resulting in keyboard events delivered to it.
  • b

    bright-gpu-74537

    12/06/2019, 12:34 PM
    OK, thats a different thing though... thats just because keyboard events arent hooked up to ListView yet
  • b

    bright-gpu-74537

    12/06/2019, 12:34 PM
    though, i do see your point now
  • b

    bright-gpu-74537

    12/06/2019, 12:34 PM
    ListView is just a div (for html5)
1...153154155...1687Latest