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

    hallowed-ocean-84954

    12/11/2022, 10:00 PM
    like a precision value for the labels
  • h

    hallowed-ocean-84954

    12/11/2022, 10:00 PM
    and a scale value and so on
  • b

    bright-gpu-74537

    12/11/2022, 10:01 PM
    just add a var to the class, get / set or just var, doesnt matter
  • h

    hallowed-ocean-84954

    12/11/2022, 10:02 PM
    I was trying to do it from the xml - guess that's where I went wrong
  • b

    bright-gpu-74537

    12/11/2022, 10:02 PM
    interesting... ... ... should be possbile... but not something ive done
  • b

    bright-gpu-74537

    12/11/2022, 10:03 PM
    http://haxeui.org/builder/?0a752854
  • b

    bright-gpu-74537

    12/11/2022, 10:04 PM
    its not from xml, but this is how i do it... i think it should be possible to do it from xml, i feel like i added get / set support really recently... or maybe that was override / private
  • f

    full-journalist-82607

    12/11/2022, 10:06 PM
    Ah okay, I'll try to send it tomorrow, I think I'm going to sleep now 💤 . I had the problem in two different apps, so maybe I'll try to send the simpler app)
  • b

    bright-gpu-74537

    12/11/2022, 10:08 PM
    so yeah, you should be able to use getters / setters in xml, but the method is... well, brittle, so maybe your way is different to "the expected": https://github.com/haxeui/haxeui-core/commit/dec42fe33ef302e0a71a646c83cb8e4a7fee8e26
  • b

    bright-gpu-74537

    12/11/2022, 10:08 PM
    what does your xml look like?
  • h

    hallowed-ocean-84954

    12/11/2022, 10:09 PM
    cool - easy enough
  • b

    bright-gpu-74537

    12/11/2022, 10:10 PM
    id still be interested in your xml approach, it should be valid, which means something in that code linked isnt right
  • h

    hallowed-ocean-84954

    12/11/2022, 10:10 PM
    I was just adding attributes directly to my custom component element
  • h

    hallowed-ocean-84954

    12/11/2022, 10:11 PM
    hang on
  • h

    hallowed-ocean-84954

    12/11/2022, 10:11 PM
    I was trying to get away with
    Copy code
    <labelled-slider name="" min="0.0" max="1.0" pos="1.0" scale="1" precision="0" >
    ....
    </labelled-slider>
  • h

    hallowed-ocean-84954

    12/11/2022, 10:12 PM
    but just defining the names with default values just tells me that the class doesn't have fields of those names
  • h

    hallowed-ocean-84954

    12/11/2022, 10:12 PM
    I was hoping it might create them
  • b

    bright-gpu-74537

    12/11/2022, 10:12 PM
    oh, yeah, thats very different
  • b

    bright-gpu-74537

    12/11/2022, 10:12 PM
    im not sure haxeui will ever be that smart
  • h

    hallowed-ocean-84954

    12/11/2022, 10:12 PM
    ah ... ok.
  • h

    hallowed-ocean-84954

    12/11/2022, 10:13 PM
    I can use your method - I just needed to know how
  • b

    bright-gpu-74537

    12/11/2022, 10:13 PM
    you'll defo need to define things, maybe via xml in the future (though i dont see that being sensible)
  • h

    hallowed-ocean-84954

    12/11/2022, 10:13 PM
    no worries - this will get me what I need I think
  • b

    bright-gpu-74537

    12/11/2022, 10:15 PM
    cool - i mean, haxeui could go "ah, you are defining a scale prop, cool", it could go away and create getters / setters and fill in the blanks... but then what? I mean, scale would just be a "var scale(get, set):Float"... what would it do and how would express that in xml?
  • b

    bright-gpu-74537

    12/11/2022, 10:16 PM
    i think we are edging very close now to the opposite of "separation of logic and layout" 🙂
  • h

    hallowed-ocean-84954

    12/11/2022, 10:24 PM
    fair point - the typing is a problem
  • h

    hallowed-ocean-84954

    12/11/2022, 10:24 PM
    but getting there now : http://haxeui.org/builder/?d32b80ef
  • b

    bright-gpu-74537

    12/11/2022, 10:25 PM
    in what sense?
  • h

    hallowed-ocean-84954

    12/11/2022, 10:25 PM
    how to express the field type
  • b

    bright-gpu-74537

    12/11/2022, 10:25 PM
    you are certainly giving the binding system a good tire kick, eh? 🙂
1...133113321333...1687Latest