pthom / imgui_bundle

Dear ImGui Bundle: an extensive set of Ready-to-use widgets and libraries, based on ImGui. Start your first app in 5 lines of code, or less. Whether you prefer Python or C++, this pack has your back!
https://pthom.github.io/imgui_bundle/
MIT License
590 stars 62 forks source link

Issues running Docking example, Front page Document mismatching latest pip version #229

Closed whensonZWS closed 1 week ago

whensonZWS commented 1 week ago

I was trying to run the layout with docking sample on https://pthom.github.io/imgui_bundle/quickstart.html#_complex_layouts_with_docking_windows,

I couldn't get it running either via C++ or Python by following the instruction provided by the link.

In the Python attempt, the editor (VS Code) was prompting that hello_imgui could not be resolved from source, together with icons_fontawesome_6. Upon a bit of digging, imgui_bundle exports icons_fontawesome instead and fixing it is just a matter of find and replace.

However hello_imgui's issue go a bit deeper as it seems some of its content were not available. This is the error message.

Traceback (most recent call last):
  File "C:\Users\Whenson\src\project\dock-sample.py", line 28, in <module>
    class MyAppSettings:
  File "C:\Users\Whenson\src\project\dock-sample.py", line 29, in MyAppSettings
    motto: hello_imgui.InputTextData
AttributeError: module 'imgui_bundle._imgui_bundle.hello_imgui' has no attribute 'InputTextData'

The sample code seems to rely on quite a few occurrence of content within hello_imgui, so I couldn't just delete or replace it. I was not able to get it running due to all the seemingly missing content. It does however run fine in the test engine example, so hello_imgui does have some working content.

As for the C++ attempt, in line 21 #include "demo_utils/api_demos.h" is completely missing and I couldn't build it. I follow build instruction in the previous hello world example section so I might be following the wrong instruction. If that's the case, please point me to the correct instruction.

I am using Windows 10, Python 3.10, the imgui_bundle version is 1.3.0 installed via pip. I am suspecting that hello_imgui submodule was not generated correctly during the pip install process.

pthom commented 1 week ago

Hello, many thanks for letting me know!

Actually this is my fault. The documentation is in sync with the latest commit, not with the pip version.

In order to solve your issue, you can either:

Sorry for that. I need to somehow set up different versions of the documentation.

whensonZWS commented 1 week ago

Great! I was about to close the issue as I dig out a working example and was studying the sample now. Digging through your extensive documents have me realized that the document the first link doesn't match what I was trying to run. Though VS code is still throwing quite a bit of complaint regarding hello_imgui and some other modules such as imgui_md. Thanks for illuminating my frustration and giving me a new link for me to start working with. I can't state how much I appreciate your meticulous documentation and effort to maintain this bundle, couldn't asked for more.