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

    best-agent-85158

    08/09/2022, 11:30 AM
    just wondering - is there anyone who finds adding arrayish methods to DataSource useful?
  • b

    best-agent-85158

    08/09/2022, 11:31 AM
    i really need methods like
    pop()
    ,
    shift()
    ,
    slice()
    and
    splice()
  • b

    bright-gpu-74537

    08/09/2022, 11:38 AM
    the problem with those is they are very specific to Arrays, and haxeui data sources dont have to be array based
  • b

    best-agent-85158

    08/09/2022, 12:57 PM
    but they still behave kinda™️ like arrays
  • b

    best-agent-85158

    08/09/2022, 12:57 PM
    in the sense that
    pop()
    can be used to remove the last item of a list/dropdown/etc
  • b

    bright-gpu-74537

    08/09/2022, 12:58 PM
    right, but im saying, what if you have a "MySqlDataSource"... how is pop going to work for that?
  • b

    bright-gpu-74537

    08/09/2022, 12:59 PM
    for an array data source specifically, you could access the underlying array, modify it and then dispatch changed on the ds
  • b

    bright-gpu-74537

    08/09/2022, 1:14 PM
    or maybe even better a
    DataSourceTools.pop(source:DataSource)
    , and then a
    using DataSourceTools
    - that feels like a nice compromise
  • l

    loud-salesclerk-7438

    08/09/2022, 7:29 PM
    thanks to Josh I was able to solve my event handling / dispatching problem (at least for OpenFl/Lime), so now I can dispatch keyboard and mouse events through current lime window. and I don't have to send component specific events to make it happen (e.g. one component reacts to mouse click the other one only to mouse down, etc.).
  • l

    loud-salesclerk-7438

    08/09/2022, 7:29 PM
    and while playing around with my sample "apps" I have found a couple of issues:
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    1.
    findComponentUnderPoint
    goes through rootComponents in reverse but adds all components in from-parent-to-child order. in my login sample I have a button that shows a login dialog after click. if I now use
    findComponentUnderPoint
    for that button's center point, I get an array with ["modal-background", "main-view", "hbox", "button"]. "modal-background" is a child of rootComponent(1) whereas all others are from rootComponent(0). "modal-background" is also just a Component, not InteractiveComponent, but it blocks clicks to my button.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    determining which component would receive a click now involves a few tricks, one is to recognize "modal-background" as a makeshift interactive component, the second is to stop looking for components once you have an eligible one and the rootComponent changes. the third one is to ignore InteractiveComponents that have
    allowFocus == false
    .
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    there is a reason why I am trying to determine what component would receive a mouse event, which is I want to give feedback to testcases so they know when a click meant for a component wasn't received / executed.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    and going back to my login example: clicking the button once opens my login dialog, but you should not be able to click it a second time and my testcase should be able to check for that.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    2. now that I'm sending mouse events through lime I'm seeing the same issue I saw when manually testing TabViews: in C++ builds TabBarButtons are not always clickable. Html5 builds don't show the same issue (both OpenFl/Lime based, so
    lime build linux/html5
    ). icons are always clickable, so is the border surrounding a TabBarButton. if you move your mouse into a non selected TabBarButton (e.g. it's Label part), then there is a chance it will show a hover effect and be clickable, but sometimes there is no hover and the button will only respond if you move your mouse over the icon/image.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    with my previous way of sending mouse events directly to a component it would always work and tests couldn't reproduce what I found through manual testing. now that has changed and tests fail on C++ (
    TabViewTest.testClickTab2
    in button sample).
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    3. tests with mouse events have a high chance of running into a
    The syncValidation returned too many times during validation. This may be an infinite loop. Try to avoid doing anything that calls invalidate() during validation (haxe.ui.containers.HBox#null).
    exception. it only occurs on C++ builds and is somewhat unpredictable. not really sure how to prevent it.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:30 PM
    websocket lib starts a thread, so all events and calls initiate from that thread, I don't know if that plays into the issue.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:31 PM
    4. there is also a small chance of getting a `./lib/harfbuzz/src/hb-shape-plan.cc:334: hb_bool_t hb_shape_plan_execute(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, const hb_feature_t*, unsigned int): Assertion
    buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE' failed.
    crash. not sure if it's connected to syncValidation stuff.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:34 PM
    those are all for now, I might find more the more I dig around...
  • l

    loud-salesclerk-7438

    08/09/2022, 7:35 PM
    let me know if I should open issues for them.
  • l

    loud-salesclerk-7438

    08/09/2022, 7:36 PM
    and sorry for wall of text 🙂
  • b

    bright-gpu-74537

    08/09/2022, 7:43 PM
    1. im not sure i follow - if any component is over the top of another it stops any mouse events getting to it, doesnt it? I think thats the case, no? http://haxeui.org/builder/?quhkpu
  • l

    loud-salesclerk-7438

    08/09/2022, 7:45 PM
    yes, it stops events, but I can't tell whether that event was received / handled by the component specified in the testcase, so I can't return a failure message indicating a miss-click
  • b

    bright-gpu-74537

    08/09/2022, 7:46 PM
    2. do you have a minimal repro? im probably not understanding, but this seems to function fine: http://haxeui.org/builder/?zqelcl
  • b

    bright-gpu-74537

    08/09/2022, 7:46 PM
    3. its going to be hard without a test case... i mean, it could be threading... but really hard to tell.
  • b

    bright-gpu-74537

    08/09/2022, 7:47 PM
    4. no idea at all im afraid, could also be relating to threading?
  • b

    bright-gpu-74537

    08/09/2022, 7:48 PM
    but if it doesnt receive the events, how are you proposing to tell it didnt receive the event? Again, im probably just not understanding fully
  • l

    loud-salesclerk-7438

    08/09/2022, 7:48 PM
    2., 3. and 4. occur when running button and login samples of haxeium project... I have a feeling that 4. is more an openfl/lime issue
  • b

    bright-gpu-74537

    08/09/2022, 7:56 PM
    Copy code
    C:\SDK\haxe\lib\haxeium/git/src/haxeium/AppDriver.hx:353: characters 1-9 : Unexpected function
1...120312041205...1687Latest