Is there a standard GUI Library on Board with NIM ?
Hello again programmers , as a beginner i want to ask about the standard GUI Library UI that i have seen online. Is there a standard GUI Library on Board with the NIM language ? Is it enough for a beginner to write little GUIs without using a external library ? WBR Menno hexo
Need information about Tcl TK Gui Library - Toolkit FOR NIM !
Hi fellows , how about TCL TK GUI for nim ? Are there any packages available ? Any informations about installation and configuration in Debian Linux ? For NIM !
How to get and install LIBUI for NIM ?
Hi there , how to get the Libui GUI Library for NIM ? Are there installation points to aware of ?
Re: GUI programming
One simple question , i have downloaded the Libui UI on Github as .zip package. Is there any point that i have to aware of with installing this library. Or do i only have to call this library from the unzipped folder in NIM code ? Libui is unzipped in /home/user/Libui/ WBR Menno hexo
Re: GTK 3.20 Nim wrapper
> But problem is still present: Yes, and the error message is very clear: expected are cint parameters for width and high, but you pass int. You should really try to get Dom's book, you may be the target audience. You may ask in the forum, maybe someone has a copy which he do not need any more. I myself have still to read the last chapter more carefully, so I can not give away my copy yet. > Got confused with all amount of that text files and references =) Yes, GTK with other languages than C can be very hard to manage at some points. I have used GTK with Ruby for a few years, and while most stuff was easy, at some points it was very hard. And because there is no Ruby-GTK community any more I spent many hours for some simple proc calls, finding the right parameters. But for current Nim-GTK3 it is much easier, compiler gives you messages, and the wrapper follows original C code very closely. Your int/cint problem and the invalid nil for var parameter is very easy to resolve when you have some basic Nim knowledge. (GTK with Python may be easy too, because there may exist up to date tutorials/documentation and a small community. For Ruby unfortunately that is not the case any more.)
Re: GTK 3.20 Nim wrapper
Thank you. My intentions are to learn Nim and Gtk by rewriting chess from Python + Gtk into Nim + Gtk =) Now I try to build indie game with my friend and than want to pass it into Steam's Greenlight: [https://vk.com/open_oasis](https://vk.com/open_oasis) (it's it's blog in Russian, you can read it through Google translate if you want) As for the strange approach with images - it's more fast and clear way to tell somebody some information. I looked into your chess and Ned, but I had not found the solution. I thought that it must be GdkPixbufError enum, not dummy variable of GError type. But I had not found such enum neither in your project's code, nor in Gtk wrapper's sources. Really, the dummy variable, seems, may help: [https://pp.vk.me/c638428/v638428447/14075/sVqom7GQb2M.jpg](https://pp.vk.me/c638428/v638428447/14075/sVqom7GQb2M.jpg) I didn't think about it, don't know why. Got confused with all amount of that text files and references =) But problem is still present: [https://pp.vk.me/c638428/v638428447/1408b/-nrBS6er9l0.jpg](https://pp.vk.me/c638428/v638428447/1408b/-nrBS6er9l0.jpg) I think that I must remove it manually - I'll remember better the solution and will not bother other with it. In Python this worked more simply: [https://pp.vk.me/c638428/v638428447/1409d/RcS_L9V4ewc.jpg](https://pp.vk.me/c638428/v638428447/1409d/RcS_L9V4ewc.jpg) but that's official binding + Nim is my first compiled language, so it's not so easy as Python for me =) As for GC for GTK, I think that if all works well and looking to amount of interested people, it's not the most needed thing for now. As it works well - let it work well. But if you're not against, I'll ask sometimes you questions about Gtk wrapper =)
Re: unescape \n \r etc in string
Looking at the implementation of strutils.unescape, it seems to only interpret the xHH syntax that escape outputs. Of course, the compiler proper is often changing those raw/quoted string forms into special characters. So, maybe there is some other approach/trick that could work..sort of like an "eval" in interpreted languages.
Re: GTK 3.20 Nim wrapper
Sorry, can not remember what your true goal or intentions is or was. Seems your last post was one months ago... Generally I do regard communication by JPG screenshots a bit strange. But OK, for your first JPG the problem seems to be very obvious: You call a Nim proc which expect as last parameter a var of type GError. But you pass nil. That does not work. Generally you should pass a var of type GError, which is filled with error description when something went wrong. You can pass a dummy gerror variable, when you are not interested in error message, or when you are sure that proc call never fails. Unfortunately, when an error occurs, one should free the error var manually. I know that this is not the optimal solution. We may create for all the procs which expect a gerror var a variant without it. (Or we could pass an address as in C, that would accept nil, but is ugly) But there is much more what we may improve for the GTK3 bindings. Maybe we could create bindings which use gobject introspection and support full GC memory management. But I can not estimate the effort, considering the Python and Ruby GTK bindings I guess effort may be more than 1000 hours, and more importantly, that would need very much testing. So when we have a few hundred Nim-GTK users, then we should have enough testers, and someone may consider all that. :) When you need an example for gerror handling, you can looks into NEd editor code. (There I use dummy gerror variables most of the time, but I think at least in one proc I use it proper and free it when an error occurred.) [https://github.com/ngtk3/NEd](https://github.com/ngtk3/NEd)