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

    ambitious-knife-25690

    09/23/2022, 9:51 PM
    those presumably wouldn't change, or is the issue that, that schema is useless because of how one would typically use haxeui?
  • b

    bright-gpu-74537

    09/23/2022, 9:51 PM
    but it doesnt make sense to build just "haxeui core" components, because thats not "all of them"
  • a

    ambitious-knife-25690

    09/23/2022, 9:51 PM
    ah I gotcha
  • b

    bright-gpu-74537

    09/23/2022, 9:52 PM
    for example
  • a

    ambitious-knife-25690

    09/23/2022, 9:52 PM
    you're coming from a 'it's a half-baked solution' perspective, you'd rather an actual good solution
  • b

    bright-gpu-74537

    09/23/2022, 9:54 PM
    its not a half baked solution, its just not how haxeui works... i could add a static "button" schema, sure... but what if you extend a button and created a "BetterButton", well, that could certainly be used in xml, and everywhere, but the schema wouldnt show it, in fact it would highlight it as in an issue.
  • b

    bright-gpu-74537

    09/23/2022, 9:56 PM
    (its worth noting that, that these arent issues, ive sorted them, i just dont know how to "present" them to the end user without interaction)
  • a

    ambitious-knife-25690

    09/23/2022, 9:56 PM
    ah yeah, I think I understand the issue now. Could you use macros to track components that extend core components are offer at least the 'base' completion?
  • e

    elegant-twilight-61392

    09/23/2022, 9:56 PM
    would it not be possible to make a way to generate a schema from the current project?
  • a

    ambitious-knife-25690

    09/23/2022, 9:57 PM
    so if BetterButton exists, you create a schema for 'Button' if you detect it extends Button
  • b

    bright-gpu-74537

    09/23/2022, 9:57 PM
    this is eactly what this does: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/macros/SchemaMacros.hx
  • a

    ambitious-knife-25690

    09/23/2022, 9:57 PM
    ah, I'm just on the train and browsing through the chat 😅
  • b

    bright-gpu-74537

    09/23/2022, 9:58 PM
    the problem with generating from the "current project" is that DCE works, so, i assume you'd want completion for things you havent used
  • e

    elegant-twilight-61392

    09/23/2022, 9:58 PM
    -dce=none
    ?
  • b

    bright-gpu-74537

    09/23/2022, 9:58 PM
    no
  • b

    bright-gpu-74537

    09/23/2022, 9:59 PM
    are you saying that, in order to generate a decent haxeui schema i have to include all classes? That doesnt make sense, it has to be a separate process
  • a

    ambitious-knife-25690

    09/23/2022, 10:00 PM
    oh that's really awkward, yeah
  • a

    ambitious-knife-25690

    09/23/2022, 10:00 PM
    can you not run macros prior to dce?
  • e

    elegant-twilight-61392

    09/23/2022, 10:00 PM
    or dce=std, the default?
  • e

    elegant-twilight-61392

    09/23/2022, 10:01 PM
    std only does dce on the standard library
  • b

    bright-gpu-74537

    09/23/2022, 10:01 PM
    its doable now and works fine... but its an additional "haxe generate-schemas.hxml" type thing
  • a

    ambitious-knife-25690

    09/23/2022, 10:01 PM
    this is a project level define, you can't really Bake this into usability
  • b

    bright-gpu-74537

    09/23/2022, 10:02 PM
    none of the above, the generation of haxeui xsd cannot be part of your normal compile, that much is for sure, not if you want completion of things you havent "used"
  • b

    bright-gpu-74537

    09/23/2022, 10:02 PM
    100%
  • b

    bright-gpu-74537

    09/23/2022, 10:03 PM
    Copy code
    --macro haxe.ui.macros.SchemaMacros.buildComponentsSchema('assets/haxeui.xsd')
    --macro include('haxe.ui.components')
    --macro include('haxe.ui.containers')
    --macro include('haxe.ui.containers.dialogs')
    --macro include('haxe.ui.containers.menus')
    --macro include('haxe.ui.containers.properties')
  • b

    bright-gpu-74537

    09/23/2022, 10:04 PM
    if you do this, you will have nice haxeui-core schemas... if you change something, you'll have to do it again
  • b

    bright-gpu-74537

    09/23/2022, 10:04 PM
    you'll also have to link the output schema to your xml file
  • b

    bright-gpu-74537

    09/23/2022, 10:05 PM
    if you have some custom components, you'll need to include them (currently)... i have an idea, about a verrrrry slow classpath scan
  • b

    bright-gpu-74537

    09/23/2022, 10:06 PM
    but again, this has to be outside your "normal" compile, as maybe you didnt use... dunno, "property-grid", but you want it in completion
  • b

    bright-gpu-74537

    09/23/2022, 10:13 PM
    i can only run macros on things that "exist" as far as the compiler is concerned, if something is dce'd something, it simply doesnt exist
1...127812791280...1687Latest