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

    bright-gpu-74537

    02/12/2020, 9:51 PM
    there isnt in built, but i dont think it would be too much effort to subclass TableView and add editing abilities to it
  • b

    bright-gpu-74537

    02/12/2020, 9:51 PM
    ... ... but nothing out the box as of yet
  • n

    nutritious-boots-87264

    02/12/2020, 10:18 PM
    Ok, thanks.
  • n

    nutritious-boots-87264

    02/13/2020, 6:26 PM
    Turns out it somewhat works already. Item renderer registers UIEvent .CHANGE handler and calls setProperty, Checkboxes act a bit weird but textfield are fine.
  • b

    bright-gpu-74537

    02/13/2020, 6:59 PM
    oh yeah, actually, that makes sense... kinda forgot about that... any component that registers CHANGE will update the property that created it
  • b

    bright-gpu-74537

    02/13/2020, 6:59 PM
    can you open an issue about the checkboxes? Dont really have time to look right now, but minimal test case would be useful if something is off
  • n

    nutritious-boots-87264

    02/13/2020, 7:49 PM
    Created an issue for checkboxes, it can be observed in haxeui.org listview component example and the table example you linked above.
  • n

    nutritious-boots-87264

    02/14/2020, 7:27 PM
    Any advice for modifying Item renderer? Is it supposed to work, should I use ItemRendererFunction or ItemRendererClass instead?
  • b

    bright-gpu-74537

    02/14/2020, 9:43 PM
    do you have an example?
  • u

    user

    02/15/2020, 4:35 AM
    I define my itemrenderers in xml and add them through code:https://github.com/mundusnine/haxeui-kha-extended/blob/master/haxe/ui/extended/FileBrowser.hx#L26
  • n

    nutritious-boots-87264

    02/15/2020, 7:01 AM
    Adding Item renderer through code first time isn't a problem. I have a table and as a result of user interaction new columns can be added or removed. I was able to header react correctly but content gets stuck with old columns.
  • n

    nutritious-boots-87264

    02/15/2020, 7:29 AM
    Finally found the code responsible with instantiating item renderers, with that knowledge I should be able to get it working.
  • n

    nutritious-boots-87264

    02/15/2020, 8:59 AM
    It seems to be related how item renderer instances are reused, they aren't invalidated when changing item renderer, will create an issue with more detailed description.
  • t

    thousands-house-41767

    02/16/2020, 2:49 PM
    @User Coming back on ScrollView on HTML5. I see two components in childComponents that are a Box and a VerticalScrollView. I did not add them. Is it normal?
  • b

    bright-gpu-74537

    02/16/2020, 2:52 PM
    hmmm, listview will create a content container... not sure scrollview should though... do you have an example you are using? Ill check it out... wont be for a few days though as im refactoring something and have totally knackered haxeui-core in the process 🙂
  • t

    thousands-house-41767

    02/16/2020, 3:20 PM
    Yeah I can probably extract something out
  • b

    bright-gpu-74537

    02/16/2020, 3:58 PM
    thanks
  • n

    nutritious-boots-87264

    02/16/2020, 7:00 PM
    What is the recommended way of distinguishing CHANGE event caused by user interaction and event caused by changing component state using code? I don't want my event handler to trigger when I initialize the values. * Is there way to distinguish between the two cases or subscribe to desired one? * If not, is there a way to temporary disable event triggering? * In the worst case I track software update on my side. It seems that CHANGE event for checkbox doesn't get triggered immediately, but instead gets triggered later when I switch to the page containing it and it gets displayed. This makes use of approaches 2 and 3 problematic.
  • b

    bright-gpu-74537

    02/16/2020, 10:54 PM
    you could use "click" and "change", i guess that would work... though i think setting state shouldnt have any effect in your app (personal opinion maybe) but setting the state of the, say, checkboxes and that firing events to change said state should make sense, no?. That said, "It seems that CHANGE event for checkbox doesn't get triggered immediately, but instead gets triggered later when I switch to the page" seems like an issue, what do you mean by "page"? Any chance you could open, another, issue? Ill be going on a bug hunt in the next few days
  • n

    nutritious-boots-87264

    02/17/2020, 6:40 AM
    By page I meant tab view.
  • b

    bright-gpu-74537

    02/17/2020, 9:12 AM
    cool - ill have a play, nice one
  • u

    user

    02/17/2020, 11:07 PM
    @User Is there a way to know when a child component was added to a parentComponent. I.e. I want the child to get a reference to a parents component when it gets added.
  • u

    user

    02/17/2020, 11:08 PM
    onChange probably works but would be called everytime which is not desired. I was searching for something like onParented or sometime like that.
  • b

    bright-yak-48460

    02/18/2020, 1:59 AM
    @User Which backend?
  • u

    user

    02/18/2020, 1:59 AM
    kha; But this would be bakcend agnostic
  • b

    bright-yak-48460

    02/18/2020, 2:06 AM
    Yeah, I hear ya.... was just thinking about backend specific things you could do for the moment.
  • b

    bright-yak-48460

    02/18/2020, 2:13 AM
    Or, if onChange Does fire when adding a child, you could check numComponents prop to determine if it was an add that triggered it.
  • u

    user

    02/18/2020, 2:48 AM
    onChange doesnt fire. I did something else in the meantime.
  • b

    bright-gpu-74537

    02/18/2020, 3:27 AM
    just about to head to bed, and missed this
  • b

    bright-gpu-74537

    02/18/2020, 3:27 AM
    what about
    UIEvent.READY
    ?
1...178179180...1687Latest