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

    cuddly-finland-31869

    02/09/2023, 1:32 PM
    Would the class of the child only be updated if the child had a fixed size set? I haven't set any size on it, but the parent has has width="100%" and height="100%". If that is what you mean by size?
  • b

    bright-gpu-74537

    02/09/2023, 1:34 PM
    well, i just mean that maybe the style is being applied by
    _child
    is 0x0, so you can see the changes. If you are writing a custom component (that creates a dom element that is not managed by haxeui - which you are), you will have to handle the size - gimme a few mins and knock up and example
  • b

    bright-gpu-74537

    02/09/2023, 1:52 PM
    http://haxeui.org/builder/?e5e13474
  • b

    bright-gpu-74537

    02/09/2023, 1:52 PM
    use "View -> Project" from the menu to view all files... i suspect the part you are missing is "validateComponentLayout" in your custom component
  • c

    cuddly-finland-31869

    02/09/2023, 2:01 PM
    Thanks for the example. I see that it works, also if I switch to
    _child.className = value
    . So it is my code somehow. Thank you for your time!
  • a

    ambitious-knife-25690

    02/09/2023, 2:50 PM
    lol
  • a

    ambitious-knife-25690

    02/09/2023, 2:50 PM
    ian so busy 😂
  • c

    cuddly-finland-31869

    02/09/2023, 3:37 PM
    just as a follow up, for some reason my component was getting cloned at some point before being displayed. I overrode postCloneComponent to copy over the className and other state, and now it works as expected.
  • b

    bright-gpu-74537

    02/09/2023, 4:39 PM
    ah, is your component in an item renderer?
  • c

    cuddly-finland-31869

    02/09/2023, 4:40 PM
    Yes, in a TreeView
  • b

    bright-gpu-74537

    02/09/2023, 4:40 PM
    gotcha, makes sense then, its cloned each time for each item
  • c

    cuddly-finland-31869

    02/09/2023, 4:42 PM
    Is postCloneComponent the right approach? Or is there more I need to consider?
  • b

    bright-gpu-74537

    02/09/2023, 4:43 PM
    postclone i think is alright, tbh, so is
    cloneComponent
    ... the macro will prepend stuff to the function if it already exists
  • r

    refined-greece-48002

    02/10/2023, 3:55 AM
    Hmm... I didn't consider it until I started using it, but I suppose treeview multiselecting is off the table?
  • r

    refined-greece-48002

    02/10/2023, 3:55 AM
    (I guess it's not supported by some native targets?)
  • f

    full-journalist-82607

    02/10/2023, 8:05 AM
    in wx widgets a range of selection seems to be supported
  • b

    bright-gpu-74537

    02/10/2023, 8:25 AM
    it could probably be implemented, but it currently isnt, no.
  • f

    full-journalist-82607

    02/10/2023, 9:05 AM
    I have a few problems with the {{TRANSLATIONS}} in hxwidgets. It doesn't work in dropdown items, nor in messageboxes, nor in menus from menubar (haven't tested context menus yet)
  • b

    bright-gpu-74537

    02/10/2023, 9:10 AM
    oh yeah, i think i remember you mentioning this
  • b

    bright-gpu-74537

    02/10/2023, 9:11 AM
    im considering revamping the locale stuff... as i think im gonna need it (decided to just write one of the applications im working on in english, rather than french), but rather than let QA come back and go "this is still english", i thought it would make sense to use the locale manager... ... i mean, its what its for! It also means i can have a definitive list of strings that are used
  • b

    bright-gpu-74537

    02/10/2023, 9:12 AM
    however, firstly, i want to give the whole sub system the "once over" and secondly, i want my strings to come from a db, so not sure if that can fit into to the current system
  • b

    bright-gpu-74537

    02/10/2023, 9:13 AM
    i first have to remember how it works 🙂 But im considering moving translations (well, string replacement) to the behaviour level... ... ... considering
  • f

    full-journalist-82607

    02/10/2023, 9:18 AM
    Yeah it could be cool to be able to hook any translation system you want , the default one, using a database, using your own system like some times you need a more complex system if you use combinations of words , with gender / plural other things
  • f

    full-journalist-82607

    02/10/2023, 9:19 AM
    You could have your first hook/plugin to HAT for the db one 🙂
  • b

    bright-gpu-74537

    02/10/2023, 9:19 AM
    > like some times you need a more complex system if you use combinations of words how would that work though, isnt the current system ok for that? I mean, its all just string replacement really... how would your app "know" to use plural or singular?
  • b

    bright-gpu-74537

    02/10/2023, 9:20 AM
    well, certainly will be using HAT for the db layer, im already using entities, and, man, it makes things so much easier
  • f

    full-journalist-82607

    02/10/2023, 9:25 AM
    I have an app that uses extensively my own system. How did I do it ? ... hmm. Try remembering it .... I did something like this : I have %0 {%p%apples %s%apple} . And I have a rule somewhere that checks if %0 makes it plural or not . Like if I remember well, the rules of plural are different for numbers like 0.5 ( or even 0) in English and French. So I have a different rule in English and French.
  • b

    bright-gpu-74537

    02/10/2023, 9:26 AM
    yikes, sounds complex :/
  • i

    icy-zebra-52882

    02/10/2023, 9:26 AM
    with a lot of existing i18n systems, you can pass in an integer to use as quantity to decide if/which plural rule gets used for that language
  • b

    bright-gpu-74537

    02/10/2023, 9:26 AM
    fem / masc even more so
1...148414851486...1687Latest