Comments (4)
Here is how I worked around the problem. I have three working solutions, but I am not sure which (if any) are "permissible". I would go with option 3 because it is the shortest:
# Solution 1
str = "dummy"*"\0"^(27)
buf = Cstring(Base.unsafe_convert(Ptr{Cchar}, str))
CImGui.InputText("Label 1",buf, length(str))
@show str
# Solution 2
str2 = "dummy"*"\0"^(27)
buf2 = Cstring(pointer(Base.cconvert(Ptr{Cchar}, str2)))
CImGui.InputText("Label 2",buf2, length(str2))
@show str2
# Solution 3
str3 = "dummy"*"\0"^(27)
buf3 = Cstring(pointer(str3))
CImGui.InputText("Label 3",buf3, length(str3))
@show str3
from cimgui.jl.
Here is how I worked around the problem. I have three working solutions, but I am not sure which (if any) are "permissible". I would go with option 3 because it is the shortest:
# Solution 1 str = "dummy"*"\0"^(27) buf = Cstring(Base.unsafe_convert(Ptr{Cchar}, str)) CImGui.InputText("Label 1",buf, length(str)) @show str # Solution 2 str2 = "dummy"*"\0"^(27) buf2 = Cstring(pointer(Base.cconvert(Ptr{Cchar}, str2))) CImGui.InputText("Label 2",buf2, length(str2)) @show str2 # Solution 3 str3 = "dummy"*"\0"^(27) buf3 = Cstring(pointer(str3)) CImGui.InputText("Label 3",buf3, length(str3)) @show str3
Weird. I get the opposite. The examples get an error and I don't know how to fix it. I am on a linux box with julia 1.1.0. I will try one of zygmuntszpak solutions.
Update: I upgraded to 1.69.1 and the issue is fixed. ;-)
from cimgui.jl.
Sorry, that's an upgrading flaw due to this commit.
from cimgui.jl.
Thanks for the feedback! I'm going to tag a new version.
from cimgui.jl.
Related Issues (20)
- Broken after update HOT 8
- Incomplete overlap HOT 4
- Difficulties with current Renderer.jl HOT 2
- No GUI shown with compiled julia app using CImGui HOT 14
- CImGui fails precompilation at `idGET_FLT_MAX()` HOT 1
- Columns - Horizontal Scroll demo not working in v1.79.0 HOT 3
- TagBot trigger issue HOT 6
- the CImGui.Text(text) function segfaults on aarm (v1.82) HOT 15
- Example code doesn't actually run HOT 6
- Input widgets with different IDs conflict with each other? HOT 5
- How can I get ImGuiWindowClass?
- The getproperty and setproperty! method of ImNodesStyle was not provided
- On some Windows machine, got glfwCreateWindow error HOT 2
- Regenerate new wrapper libraries for fresh ImGui and ImPlot versions? HOT 1
- An error occurs when I use ImGuiTextFilter in a package
- SDL Backend Support? HOT 6
- I can not run the demo HOT 5
- ImGuiKey_KeyPadEnter not defined, when running demo HOT 2
- Upgrading Guide: 1.79 to 1.82
- Expand tests HOT 1
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 cimgui.jl.