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

    bright-gpu-74537

    12/05/2022, 12:21 PM
    im thinking a
    Screen.instance.cursor = ...
  • h

    hallowed-ocean-84954

    12/05/2022, 2:14 PM
    Many thanx - will update later today
  • h

    hallowed-ocean-84954

    12/05/2022, 3:03 PM
    I getting this error :
    Copy code
    Uncaught exception: The validation queue returned too many times during validation. This may be an infinite loop. Try to avoid doing anything that calls invalidate() during validation.
    I fairly sure it must be due to some sort of loop in my disable/hiding of various elements based on settings of others. Any tips on debugging this sort of issue ? This predates the fix for the popup fix but I've refreshed to that code and it still happens. I am trying to narrow down exactly when it happens. Any tips greatly appreciated.
  • a

    ambitious-knife-25690

    12/05/2022, 3:06 PM
    this might be useful
  • h

    hallowed-ocean-84954

    12/05/2022, 3:28 PM
    thanx - I'll take a look
  • b

    bright-gpu-74537

    12/05/2022, 4:52 PM
    its hard to say tbh, best way is usually just good old fashioned trial and error, usually its because, as the error suggests, you are invalidating something while its invalidating, are you overriding any of haxeui internals and doing anything "different" in them?
  • h

    hallowed-ocean-84954

    12/05/2022, 4:56 PM
    hmmm.... ok - this is currently happening in the case where I turn off the hud with a color picker dropdown visible - it doesn't happen all the time so I'm doing iterations over it to try to see what cbks might be firing. I am playing with disabled and with hidden - I am trying to simplify this because it's a bit tangled. I suspect that will help but I haven't gotten it all sorted out yet. But I expect there could be an interaction between what I'm doing and what HaxeUI is doing in that case.
  • b

    bright-gpu-74537

    12/05/2022, 8:21 PM
    so @ambitious-knife-25690 - ive had a play with the app... and i actually think it all make sense
  • b

    bright-gpu-74537

    12/05/2022, 8:22 PM
    there are a few things:
  • b

    bright-gpu-74537

    12/05/2022, 8:22 PM
    1. you need to out "clip:true" for both of the boxes - clipping isnt on by default (for any backend) since its pretty expensive
  • b

    bright-gpu-74537

    12/05/2022, 8:23 PM
    2. the reason the "white box" doesnt appear is because you have halign set to center, so its "offscreen"
  • b

    bright-gpu-74537

    12/05/2022, 8:23 PM
    thats it i think, lemme know if ive completely misunderstood the issues
  • a

    ambitious-knife-25690

    12/06/2022, 12:58 AM
    well well, that was silly of me 😂🤦
  • a

    ambitious-knife-25690

    12/06/2022, 12:59 AM
    thanks for checking it out!
  • h

    hallowed-ocean-84954

    12/06/2022, 3:51 AM
    ok so this is interesting. It only happens when I have a color picker up and I have not clicked anywhere on it. If I click on it then toggling the hud off is fine. But then if I toggle the hud on again and open another color picker (one I haven't so far touched) and then toggle the hud off without selecting any color in it then it crashes. It feels like it's related to some initialization of state because once I've opened and closed a picker or I've opened and selected a color in a picker I can open and close the hud with that particular picker open without problems. It's just the first time with each picker that I have issues. And I get this stack :
  • h

    hallowed-ocean-84954

    12/06/2022, 3:51 AM
    Copy code
    Uncaught exception: The validation queue returned too many times during validation. This may be an infinite loop. Try to avoid doing anything that calls invalidate() during validation.
    Called from haxe.ui.core.ComponentValidation.invalidateComponent(haxe/ui/core/ComponentValidation.hx:93)
    Called from haxe.ui.behaviours.DataBehaviour.invalidateData(haxe/ui/behaviours/DataBehaviour.hx:28)
    Called from haxe.ui.behaviours.DataBehaviour.set(haxe/ui/behaviours/DataBehaviour.hx:16)
    Called from haxe.ui.behaviours.Behaviours.set(haxe/ui/behaviours/Behaviours.hx:237)
    Called from haxe.ui.components.Range.set_end(haxe/ui/macros/Macros.hx:630)
    Called from haxe.ui.components._Range.RangeEnd.validateData(haxe/ui/components/Range.hx:146)
    Called from haxe.ui.behaviours.DataBehaviour.validate(haxe/ui/behaviours/DataBehaviour.hx:22)
    Called from haxe.ui.behaviours.Behaviours.validateData(haxe/ui/behaviours/Behaviours.hx:89)
    Called from haxe.ui.core.Component.validateComponentData(haxe/ui/core/Component.hx:1846)
    Called from haxe.ui.core.ComponentValidation.validateComponentInternal(haxe/ui/core/ComponentValidation.hx:261)
    Called from haxe.ui.core.ComponentValidation.validateComponent(haxe/ui/core/ComponentValidation.hx:182)
    Called from haxe.ui.validation.ValidationManager.process(haxe/ui/validation/ValidationManager.hx:140)
    Called from haxe.ui.util.$Timer.~delay.1(haxe/ui/util/Timer.hx:10)
    Called from haxe.ui.backend.$TimerImpl.update(haxe/ui/backend/TimerImpl.hx:17)
    Called from openfl.text.TextField.~this_onMouseDown.0(lime/app/Module.hx:0)
    Called from openfl.events.EventDispatcher.__dispatchEvent(openfl/events/EventDispatcher.hx:402)
    ...
  • h

    hallowed-ocean-84954

    12/06/2022, 3:53 AM
    why an update to a TextField ? I have labels sure but they are not dependent upon color picker values
  • h

    hallowed-ocean-84954

    12/06/2022, 3:54 AM
    I cannot repro this in the playground yet alas but it does repro in both HL and HTML5 targets
  • h

    hallowed-ocean-84954

    12/06/2022, 5:18 AM
    I traced the invalidation queue routine a little (dumping component ids) and what appears to be getting queued a lot is something with id="range" which is part of the id="sliderHue" thing - I assume it's the Hue slider of the HSV control. I see these IDs repeated before it throw's the exception. The ids listed when I select a color in the picker and then close the hud are very different. Now, I do set a value for the picker color in one function but that isn't being called here. And it was fine when it was called before this point.
  • h

    hallowed-ocean-84954

    12/06/2022, 5:20 AM
    This is the kind of debug I am getting when I close the hud with the picker open without selecting any color:
    Copy code
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=null, parent id=picker
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=null, parent id=picker
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=null, parent id=picker
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=null, parent id=picker
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=null, parent id=picker
    haxe/ui/core/ComponentValidation.hx:63: adding component to invalidation queue id=range, parent id=sliderHue
  • w

    worried-boots-85466

    12/06/2022, 5:47 AM
    Hi all I'm working on my first HaxeUI app, and have 2 questions. 1) I'm going through the docs, and I'm unsure what the
    Toolkit
    is referring to. I'm looking at: http://haxeui.org/getting-started/haxeui-html5/ (about half way down the page) I am able to get the "Hello, world" example running, with the 3 buttons where you click on them and the text changes. But, I'm unsure what I'm missing regarding Toolkit/what it is/etc. 2) Akin to Electron, is there a way to go from an html5 backend to a desktop application? If so, I don't see any links/examples, and could someone point me in the right direction? No worries if not. I am presuming that
    hxWidgets
    is the way to go for a native app. Thank you
  • f

    famous-alarm-22563

    12/06/2022, 5:48 AM
    Can I stick css inside my haxeui code?
  • f

    famous-alarm-22563

    12/06/2022, 5:48 AM
    I want to transition to using xml for the ui but I'm too lazy to do it all at once
  • w

    worried-boots-85466

    12/06/2022, 5:52 AM
    seems so. in the Hello, World example, there's a
    <style>
    tag with some styling for a button. additionally, i believe you can leverage ids as well. I... don't know if you have to inline it or can ref a
    .css
    file though.
  • f

    famous-alarm-22563

    12/06/2022, 6:05 AM
    Yeah, I didn't ask my question clearly I mean: Can I use css if my haxeui component is defined through haxe and not through xml?
  • h

    hallowed-ocean-84954

    12/06/2022, 6:18 AM
    My guess would be via the customStyle property of haxe.ui.core.Component. it's so much easier in xml that I haven't tried much from the api except finding comps and adding/ removing classes. But that's where is start looking. There
  • f

    fierce-soccer-8550

    12/06/2022, 6:23 AM
    Yes, you can use within the code. Give me a sec and i'll point you to an example of two ways to handle css within the code.
  • f

    fierce-soccer-8550

    12/06/2022, 6:29 AM
    Here is an example of using style settings without using the style tags.... https://github.com/ShaunHolt/Haxe-Examples/blob/main/GlowingText/Main.hx
  • f

    fierce-soccer-8550

    12/06/2022, 6:31 AM
    I think I may have been thinking of using the tags within the xml rather than css for the tags example.
  • f

    fierce-soccer-8550

    12/06/2022, 6:35 AM
    But you can use xml within the hx file as well.... here is an example of that.... but, mixing things together in the hx file can become a pain and cause things to get confusing so to speak after a while. But for small things it can be convenient.... https://github.com/ShaunHolt/ShaunHolt.github.io/blob/main/src/windows/CodeEditorWindow.hx
1...132013211322...1687Latest