Added optional runtime path for buildController macro. #140
base: master
Are you sure you want to change the base?
Conversation
Im not really sure why you would do this... Why wouldnt you just use the path that is correct? |
Cause openfl renames the path, i have:
If i use the renamed path, the macro won't find the file, if i use the original path, the runtime will crash when doing : super("assets/xml/ui") inside constructor. Meanwhile i started extending Popup class instead so i no longer use this method, this is used by a very particular case: Using BuildComponent macro where openfl renames the assets path. |
Hmmm... right, i see... there must be a better way of doing this... I dont like having to alias it... You maybe right and its the only way, but ill investigate if there is another way to resolve the .xml file at build time... I mean im guessing all the Cheers, |
Cool, I'm fine with that since i don't need it atm, its a very specific case but may happen again with someone in the future, there may be alternatives but i don't see an easy one:
|
Added a new commit, feel free to discard any additions, this last one to Popup its pretty useful to quickly customize / have more control over popup buttons. |
Add a Bitdeli Badge to README
Also updated FD template with build options and explanations
Because in openfl its usual to rename the assets paths, my app was freezing when using @:buildMacro("assets/xml/ui/MyPopup.xml")
now it works if i add the runtime (renamed) path as second argument:
@:buildMacro("assets/xml/MyPopup.xml", "ui/Popup.xml")