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

    user

    10/01/2019, 2:44 PM
    maybe the last item doesnt get populated ?(just a hypothesis will need to verify it)
  • u

    user

    10/01/2019, 2:49 PM
    The issue is on my end sorry for the inconveniance;
  • u

    user

    10/01/2019, 2:56 PM
    Trying to use Std.is() with typedef is useless 😛 that was my issue;
  • b

    bright-gpu-74537

    10/01/2019, 3:18 PM
    🙂
  • u

    user

    10/02/2019, 1:43 PM
    @bright-gpu-74537 Should resource paths be used for other situations; For example, I am making a module, in that module I have xml classes that I want to be built; I can put the absolute path but since the module can be placed anywhere wouldn't be better to use the resolve path that we use with resources prefixes ?
  • b

    bright-gpu-74537

    10/02/2019, 1:54 PM
    Does it not already do something like that? What do you mean absolute paths? Like "Z:\MyApp\xml_classes" or something like that?
  • b

    bright-gpu-74537

    10/02/2019, 1:55 PM
    doesnt "/xml_classes" just work?
  • u

    user

    10/02/2019, 1:56 PM
    yeah for absolutepaths; right now when I try to build macro built classes based on xml definitions example:
    Copy code
    <class folder="needs/to/be/absolute"  />
  • u

    user

    10/02/2019, 1:57 PM
    it only works with absolute paths;
  • b

    bright-gpu-74537

    10/02/2019, 1:57 PM
    does it?? Im sure i didnt use absolute paths...
  • b

    bright-gpu-74537

    10/02/2019, 1:57 PM
    can you paste all / some of your module.xml?
  • u

    user

    10/02/2019, 1:59 PM
    yes;
    Copy code
    <module id="kha-extended">
        <resources>
            <resource path="/haxe/ui/extended/_module/styles/dark" prefix="img" />
            <resource path="/haxe/ui/extended/custom" prefix="custom" />
            <resource path="/haxe/ui/extended/fields" prefix="fields" />
        </resources>
        <components>
            <class package="haxe.ui.extended" />
            <class folder="/haxe/ui/extended/fields" />
        </components>
    </module>
  • u

    user

    10/02/2019, 1:59 PM
    I looked at the code thats why I know it has to be absolute
  • b

    bright-gpu-74537

    10/02/2019, 1:59 PM
    <class folder="/haxe/ui/extended/fields" />
    thats not absolute... thats relative
  • u

    user

    10/02/2019, 2:00 PM
    yes but it doesnt work
  • b

    bright-gpu-74537

    10/02/2019, 2:00 PM
    oh
  • b

    bright-gpu-74537

    10/02/2019, 2:00 PM
    i wonder if there is a example of this on components-examples i can test
  • b

    bright-gpu-74537

    10/02/2019, 2:00 PM
    two secs
  • b

    bright-gpu-74537

    10/02/2019, 2:01 PM
    hmmm, there isnt, going to create one real quick
  • u

    user

    10/02/2019, 2:02 PM
    no but looking at the code in ModuleMacros it considers paths to be absolute:
    Copy code
    var modules:Array<Module> = loadModules();
            for (m in modules) {
                for (c in m.componentEntries) {
                    if (c.classFolder != null) {
                        createDynamicClasses(c.classFolder);
                    } else if (c.classFile != null) {
                        createDynamicClass(c.classFile, c.classAlias);
                    }
                }
            }
    private static function createDynamicClasses(dir) {
            var contents = FileSystem.readDirectory(dir);
            for (item in contents) {
                var fullPath = Path.normalize(dir + "/" + item);
                if (FileSystem.isDirectory(fullPath)) {
                    createDynamicClasses(fullPath);
                } else {
                    createDynamicClass(fullPath);
                }
            }
        }
  • u

    user

    10/02/2019, 2:02 PM
    the start of this code is line 266 in ModuleMacros.hx
  • u

    user

    10/02/2019, 2:05 PM
    Btw I have a fix( I just want to know if it would be logical to use resource paths as a fix :P)
  • b

    bright-gpu-74537

    10/02/2019, 2:05 PM
    ill check it out, but i certainly used this with relative paths... i wouldnt have used absolute paths... defo not
  • b

    bright-gpu-74537

    10/02/2019, 2:06 PM
    yeah? sounds good, resource paths sound like they make sense
  • b

    bright-gpu-74537

    10/02/2019, 2:06 PM
    lemme knock up an example real quick for component-examples... it'll be useful to have anyway
  • u

    user

    10/02/2019, 2:06 PM
    yup
  • b

    bright-gpu-74537

    10/02/2019, 2:10 PM
    Uncaught exception /assets/custom-components: No such file or directory
  • b

    bright-gpu-74537

    10/02/2019, 2:10 PM
    :/
  • b

    bright-gpu-74537

    10/02/2019, 2:10 PM
    defo there
  • b

    bright-gpu-74537

    10/02/2019, 2:12 PM
    ah
1...122123124...1687Latest