yglukhov / nimx

GUI library
MIT License
1.1k stars 75 forks source link

Proper Nim Import Statements For Nimx? #386

Closed topcheese closed 4 years ago

topcheese commented 4 years ago

Hi, nice project you've put together. It doesn't compile on a Mac using this format for import

import nimx / [ view, segmented_control, color_picker, button, image, image_view,
                text_field, slider, popup_button, progress_indicator ]

The fields that cause it to fail are "popup_button, text_field, color_picker." It will compile if I use import nimx/text_field format. What's the difference and perhaps the more complex imports needs to be refactored? ~Thanks! Edit: oops I'm sure you want to know the error. It complained about missing some x86_64 symbols with using this format.

topcheese commented 4 years ago

The problem is in the order of the import. The examples fail if you don't load nimx/window first. Edit: I thought the examples were standalone,but it looks like they were meant to be imported into the main example. I think that was my mistake.

yglukhov commented 4 years ago

Indeed the samples are supposed to be run through main.nim. But your problem "missing some x86_64 symbols" is something different, maybe nimcache got messed up somehow.