hedron-crystal / hedron

An extendable UI library in Crystal, with markup capabilities.
MIT License
85 stars 5 forks source link

Example controlgallery compiles and runs without error, but no window is shown #13

Closed apahl closed 5 years ago

apahl commented 5 years ago

Hi,

thanks a lot for these nice bindings.

I am new to Crystal and wanted to check out some options for UI libraries.

I have successfully compiled the controlgallery example, but when I run it from the command line, no UI window is opened. Strangely, there no errors either, and the programs just hangs:

$ crystal -v
Crystal 0.27.2 [60760a546] (2019-02-05)

LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu

~/dev/github/hedron 
$ crystal build examples/control_gallery.cr

~/dev/github/hedron 
$ ls -alh
total 1.2M
drwxr-xr-x [...]  164 Feb 12 09:53 .
drwxr-xr-x [...]  854 Feb 12 09:41 ..
-rwxr-xr-x [...] 1.2M Feb 12 09:53 control_gallery
drwxr-xr-x [...]  112 Feb 11 17:16 examples
drwxr-xr-x [...]  138 Feb 11 17:16 .git
-rw-r--r-- [...]   19 Feb 11 17:16 .gitignore
drwxr-xr-x [...]   42 Feb 11 17:31 lib
-rw-r--r-- [...] 1.1K Feb 11 17:16 LICENSE
-rw-r--r-- [...] 1.1K Feb 11 17:16 README.md
-rw-r--r-- [...]  155 Feb 11 17:16 shard.lock
-rw-r--r-- [...]  270 Feb 11 17:16 shard.yml
drwxr-xr-x [...]   56 Feb 11 17:16 spec
drwxr-xr-x [...]   30 Feb 11 17:16 src

~/dev/github/hedron 
$ ./control_gallery 
^C  # program hangs with no window shown

The example controlgallery from Fusion/libui.cr works.

This is on Kubuntu 18.10 with Crystal 0.27.2

Do you have any ideas what might be going on?

Kind regards,
Axel

hanyuone commented 5 years ago

Hi @apahl, I am currently working on the rebuild branch of Hedron, which is a complete rewrite in order to improve both the base binding and HDML. I'll try and have a look at the issue, but I'm abandoning the base branch, so please look at the rebuild branch for any updates. Thanks!

Iainmon commented 5 years ago

@apahl The base branch examples have not been updated to support pull request #11

gallery = ControlGallery.new
gallery.draw
gallery.start
gallery.close
apahl commented 5 years ago

@Qwerp-Derp Thanks, I will look into that branch. @Iainmon Thanks. With the patch it now works. Great!

Thanks to both of you for the quick answers!

Kind regards, Axel