Comments (14)
I think that maybe your heaps is out of date, ive been told to always use the git version. But not sure if that is the error to be honest. Can you try out git heaps and see?
I think maybe haxeui-heaps is out of date (instead of heaps)
After I install git version of haxeui-heaps , it works now
Toolkit.init({root: s2d,manualUpdate: false});
Screen.instance.addComponent(new Button()).text = "Test";
Thanks for your help, really appreciated !
from haxeui-heaps.
As fair as i know development has stalled on haxeui-heaps, and honestly, im not 100% what state its in as ive never used it. Eventually it would be nice to breathe some life into the project, but at this stage i honestly just dont know. @aW4KeNiNG - do you have a moment? Is haxeui-heaps in a usable state? I forget how it left off. :)
from haxeui-heaps.
Chiming in here as I'm stumbling into Heaps dev and would also really like to use HaxeUI. Any samples or examples of how to setup the project to use this would be really helpful!
from haxeui-heaps.
Funnily enough im actually writing docs at the moment, not on heaps specifically, but on all the backends - so that includes heaps.
For now though is there something you are having issues with? You should just be able to do:
Toolkit.init();
var b = new Button();
b.text = "Test";
Screen.instance.addComponent(b);
That should be all you need, if that doesnt work then let me know as there might be some additional steps (i cant remember them off hand though)
Cheers,
Ian
from haxeui-heaps.
Thanks for the help!
I'm a bit new to Haxe development, in general, so I'm also not sure what the best practice is for incorporating this repo's contents into my project structure. Should that be handled through haxelib?
from haxeui-heaps.
Yeah, haxelib is the usual method, though there are other ways... you can install the official versions with:
haxelib install haxeui-core
haxelib install haxeui-heaps
or the development versions with:
haxelib git haxeui-core https://github.com/haxeui/haxeui-core
haxelib git haxeui-heaps https://github.com/haxeui/haxeui-heaps
The development versions will likely have more fixes, but may also create regresssions, but you can flip between the two with ease.
Then in your .hxml file (im assuming you are building using .hxml?) you can add these lines:
-lib haxeui-core
-lib haxeui-heaps
And that should be it... if you run into any troubles, let me know.
Cheers,
Ian
from haxeui-heaps.
This is really helpful, thank you!!
from haxeui-heaps.
Hi @ianharrigan
I get error after import haxe.ui.Toolkit;
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/Res.hx:4: characters 1-8 : Warning : Resource directory not found in classpath 'res' (use -D resourcesPath=DIR)
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/Res.hx:4: characters 1-8 : Uncaught exception __invalid: No such file or directory
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/res/FileTree.hx:96: characters 13-46 : Called from here
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/res/FileTree.hx:64: characters 4-20 : Called from here
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/res/FileTree.hx:264: characters 18-24 : Called from here
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/res/FileTree.hx:375: characters 10-41 : Called from here
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/Res.hx:4: characters 1-8 : Called from here
The terminal process "haxe '--connect', '6000', 'compile.hxml'" terminated with exit code: 1.
P.S. if don't import , no above error
After I add -D resourcesPath=DIR compile.hxml
error:
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/Res.hx:4: characters 1-8 : Uncaught exception Failure("get_full_path")
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/res/FileTree.hx:47: characters 15-43 : Called from here
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/res/FileTree.hx:30: characters 16-33 : Called from here
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/res/FileTree.hx:375: characters 10-27 : Called from here
/usr/local/lib/haxe/lib/heaps/1,9,1/hxd/Res.hx:4: characters 1-8 : Called from here
The terminal process "haxe '--connect', '6000', 'compile.hxml'" terminated with exit code: 1.
from haxeui-heaps.
So, i think you need to create a "res" folder in your project root... something like that, and when you say -D resourcesPath=DIR
the DIR
should point to an actual directory (ie, not actually "DIR" - unless you create a "DIR" directory ofc)
from haxeui-heaps.
So, i think you need to create a "res" folder in your project root... something like that, and when you say
-D resourcesPath=DIR
theDIR
should point to an actual directory (ie, not actually "DIR" - unless you create a "DIR" directory ofc)
@ianharrigan
Thanks ,I added -D resourcesPath=mySrc
, and created a new folder mySrc in the root of the project
Now the second error in prev post is gone
But it comes with new error :
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:22: lines 22-26 : { width : Dynamic, height : Dynamic, data : hxd.BitmapData } should be hxd.res.ImageInfo
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:15: characters 31-47 : Field getImageInternal overrides parent class with different or incomplete type
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/backend/AssetsBase.hx:16: characters 22-38 : Base field is defined here
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:10: lines 10-79 : Defined in this class
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:15: characters 31-47 : error: hxd.res.ImageInfo -> Void should be haxe.ui.assets.ImageInfo -> Void
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:15: characters 31-47 : have: (..., ... -> ...) -> ...
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:15: characters 31-47 : want: (..., ... -> ...) -> ...
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:57: lines 57-61 : { width : Dynamic, height : Dynamic, data : hxd.BitmapData } should be hxd.res.ImageInfo
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:47: characters 30-44 : Field imageFromBytes overrides parent class with different or incomplete type
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/backend/AssetsBase.hx:24: characters 21-35 : Base field is defined here
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:10: lines 10-79 : Defined in this class
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:47: characters 30-44 : error: hxd.res.ImageInfo -> Void should be haxe.ui.assets.ImageInfo -> Void
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:47: characters 30-44 : have: (..., ... -> ...) -> ...
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:47: characters 30-44 : want: (..., ... -> ...) -> ...
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:40: characters 31-55 : Field getImageFromHaxeResource overrides parent class with different or incomplete type
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/backend/AssetsBase.hx:20: characters 22-46 : Base field is defined here
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:10: lines 10-79 : Defined in this class
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:40: characters 31-55 : error: (String, hxd.res.ImageInfo) -> Void should be (String, haxe.ui.assets.ImageInfo) -> Void
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:40: characters 31-55 : have: (..., (..., ...) -> ...) -> ...
/usr/local/lib/haxe/lib/haxeui-heaps/1,3,1/haxe/ui/backend/AssetsImpl.hx:40: characters 31-55 : want: (..., (..., ...) -> ...) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:92: characters 69-83 : error: hxd.res.ImageInfo has no field data
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:92: characters 69-83 : have: (..., haxe.ui.assets.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:92: characters 69-83 : want: (..., hxd.res.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:92: characters 69-83 : For function argument 'callback'
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:94: characters 62-76 : error: hxd.res.ImageInfo has no field data
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:94: characters 62-76 : have: (..., haxe.ui.assets.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:94: characters 62-76 : want: (..., hxd.res.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:94: characters 62-76 : For function argument 'callback'
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:86: lines 86-99 : error: hxd.res.ImageInfo has no field data
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:86: lines 86-99 : have: (haxe.ui.assets.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:86: lines 86-99 : want: (hxd.res.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/ToolkitAssets.hx:86: lines 86-99 : For function argument 'callback'
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:104: characters 65-73 : error: hxd.res.ImageInfo has no field data
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:104: characters 65-73 : have: (haxe.ui.assets.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:104: characters 65-73 : want: (hxd.res.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:104: characters 65-73 : For function argument 'callback'
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:123: characters 75-83 : error: hxd.res.ImageInfo has no field data
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:123: characters 75-83 : have: (haxe.ui.assets.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:123: characters 75-83 : want: (hxd.res.ImageInfo) -> ...
/usr/local/lib/haxe/lib/haxeui-core/1,2,3/haxe/ui/util/ImageLoader.hx:123: characters 75-83 : For function argument 'callback'
The terminal process "haxe '--connect', '6000', 'compile.hxml'" terminated with exit code: 1.
Again if don't import haxe.ui.Toolkit; no above error
P.S. Haxe 4.1.4 , hashlink 1.12.0 (github master) , heaps 1.9.1 ,haxeui-core 1.2.3 ,haxeui-heaps 1.3.1
Here is the compile.hxml :
-cp src
-lib haxeui-core
-lib haxeui-heaps
-lib heaps
-lib hlsdl
-D resourcesPath=mySrc
-hl main.hl
-main Main
-debug
from haxeui-heaps.
I think that maybe your heaps is out of date, ive been told to always use the git version. But not sure if that is the error to be honest. Can you try out git heaps and see?
from haxeui-heaps.
ah, right... cool... other way round then :)
Weird though, i thought i made a haxelib release with all the latest changes, ill have to double check. Thanks!
from haxeui-heaps.
A data point:
Haxe 4.2.1 (Linux / nix)
haxeui-core: [1.4.0]
haxeui-heaps: [1.4.0]
heaps: [git]
This makes the -js
target work. And with some patching for nix, -hl out/main.hl
+ hl out/main.hl
also works (see NixOS/nixpkgs#168289 for nixy details)
from haxeui-heaps.
You almost certainly want to be using git version of haxeui-core and haxeui-heaps - the haxelib versions have yet again managed to get woefully out of date - i going to rerelease soon (tm) and also see if i can work out a way to release more often (ie, start actually using minor versions again, 1.4.6
, etc)
from haxeui-heaps.
Related Issues (20)
- All tiles must be of the same texture
- customStyle.width has no effect
- margin not respected HOT 4
- Wrong mouse events
- Index color png causes crash in Dark theme HOT 2
- textfield doesnt allow you to enter text HOT 4
- Dropdown type calendar doesn't display HOT 1
- Script doesn't work HOT 4
- Touch and resize issues on mobile android chome HOT 9
- TextIput: cannot type text
- Mouse coordinates are calculated incorrectly if content is scaled
- Null error in heaps target HOT 3
- TableView - Can't cast haxe.ui.components.Label to haxe.ui.core.ItemRenderer HOT 1
- Sidebar modal Layering is off HOT 1
- property-grid doesn't work in Heaps HOT 1
- Textarea doesnt except entry HOT 2
- Should support SDF and bitmap fonts
- lineBreak no longer a part of the Heaps h2d API HOT 4
- background-image-repeat is not implemented
- Commit in core broke haxeui-html, haxeui-heaps HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haxeui-heaps.