Problem running Domkit and samples


#1

Hi,

I started learning Haxe and Heaps and am a little confused about how every pieces fits together.

I have two problems that are probably linked, but I am not sure.

First of all, I run Debian 9, Haxe 4.0.0-rc.3, Haxelib (3.3.0), Heaps (1.6.1) and Visual Studio Code (1.37.1).

As advised by Gama11 in another post, I installed Heaps using "haxelib git heaps https://github.com/HeapsIO/heaps" because I compiled Haxe from source and it was not working otherwise.

Now for the problems:

The first one is that I don’t understand how to use the Domkit. All other examples on this page https://heaps.io/documentation/home.html contained the instructions and code needed for the example to work, but the instructions for the Domkit only give an example without complete instructions.

What I want to understand is what other files and configuration would I need for that example to work.

As it is, I only understand the use of the Main file based on the previous examples, but it doesn’t seem to be the appropriate place to put the example code in.

My second problem is that I don’t understand how to use the samples, and I believe it is probably a problem similar to the previous one. I am able to compile the applications using the instructions on the Heaps Github page and start the HTML version of it.

However, I want to work on them in Visual Code Studio, and I am not able to start them using it.

I only glossed over the Haxe manual but as said on the website, it is not a tutorial. I figured I could learn more of the structure and functioning using the samples, however, I am not able to run those yet.

I looked around on the forum, but the questions are generally about steps more advanced than what I am able to do as it is.

I am certain there are resources I haven’t found yet that could help me with that, so please accept my excuses if I am loosing your time.

If you have advice or learning resources to help me start, that would be great.

The only tutorial I saw for Haxe were either very basic introduction to programming, or outdated information. The most useful resources I found is Nicolas Cannasse video at the Haxe conference, but I still can’t figure how things work together.

Thank you in advance, and have a good day.


#2

Hi everyone,
The solution was really simple, though it took me more time than to figure out than I am comfortable admitting.

For those who would still struggle with that, here are the instructions.

To use the samples, which Domkit is a part of, simply download the ‘samples’ folder from Heaps.io Github page (https://github.com/HeapsIO/heaps) and copy its content in your project folder.

Then follow the instruction given in the Hello World example on Heaps website, except you need to modify your compile.hxml file.

First, add the library you want to use after the heaps library, for example:
-lib heaps
-lib domkit

Finally, you need to change your ‘-main’ link to point to the example file you want to use:
-main Domkit

You can now compile and start your application with F5 or Shift+Ctrl+b.
Your application should open and show the example.

From there, I suppose you can learn quite a lot about how Heaps works.

I hope that will help someone one day.

Take care of yourselves and have a good one.