Re: GTK 3.20 Nim wrapper

2016-12-27 Thread vlad1777d
again I missed a book )

Stefan_Salewski, it's good news =) I had some work several days, so I'll try to 
test it as soon as possible =) Thank you all =)


Re: GTK 3.20 Nim wrapper

2016-12-22 Thread vlad1777d
@dom96, ok, I'll look there from time to time.

@Stefan_Salewski, seems that RsvgHandle has not svg data it's nil instead... I 
have troubles with RSVG: 
[https://pp.vk.me/c638428/v638428447/163f4/kS8kbEjzctU.jpg](https://pp.vk.me/c638428/v638428447/163f4/kS8kbEjzctU.jpg)
 If I'll comment line 59 - I'll have the same error in line 63. File exists, I 
checked. Handle created, I checked... Why when trying to readclose it it writes 
that it's trying to read from nil ?

Asked in gtk+ and Nim channel - have not resolved.

Thanks.


Re: GTK 3.20 Nim wrapper

2016-12-21 Thread vlad1777d
@dom96, ok, this is not very problem for me. I heard that learning second 
language (I know Python) is much easier than first one. So if there will be 
possibilitywish to receive the book - I'll do that, if no - no. I'm sure in 
myself =)

@Stefan_Salewski, I started to make RSVG wrapper in the image and likeness of 
youth wrappers =) But manually, because I don't know Ruby and principles of 
it's building: 
[https://pp.vk.me/c638428/v638428447/16141/JwP6810n33E.jpg](https://pp.vk.me/c638428/v638428447/16141/JwP6810n33E.jpg)
 (I wondered, it had compiled =) I'll try to make cells with it now) I'll only 
add there needed one information. But if you'll have time - you could make full 
version, RSVG is bound to GTK, so it would be good addition to your wrappers 
collection.


Re: GTK 3.20 Nim wrapper

2016-12-21 Thread vlad1777d
Oh, I had missed a discussion about a book.

@dom96, but maybe there is a way for me to pay you directly and receive a 
digital version of book ? Or this is illegal because of your contract with 
Manning ? 


Re: GTK 3.20 Nim wrapper

2016-12-21 Thread vlad1777d
I'll ask about book than =)

First success: 
[https://pp.vk.me/c638428/v638428447/15f63/8Bgg0dH70NQ.jpg](https://pp.vk.me/c638428/v638428447/15f63/8Bgg0dH70NQ.jpg)
 Thanks for your wrapper and explainings =)


Re: GTK 3.20 Nim wrapper

2016-12-19 Thread vlad1777d
I thought that you're talking about  book =)

Than I don't understand how I can buy  book from someone in this 
forum. I understand that I'll somehow send him money, than he'll send me 
 book and remove it from his PC? I don't know about copyright in this 
sphere, when I buy book, I must sign/agree some license agreement?


Re: GTK 3.20 Nim wrapper

2016-12-18 Thread vlad1777d
Thank you. Do you mean the  book, not the  one? Because if you 
mean paper, I'm afraid that it'll be hardexpensive to send it into Ukraine.

About cint, I thought, that int is automatically converted to cint for C-type 
procs, as it's for strings, in manual andor tutorials I have not found 
information about cint. I'll look more today.


Re: GTK 3.20 Nim wrapper

2016-12-16 Thread vlad1777d
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: GTK 3.20 Nim wrapper

2016-12-15 Thread vlad1777d
Thanks, all went normally, but I stacked with creating pixbuf from image.

I decided to use this: 
[https://pp.vk.me/c638428/v638428447/13ff8/5by3ijiErV4.jpg](https://pp.vk.me/c638428/v638428447/13ff8/5by3ijiErV4.jpg)
 function, but I got an error: 
[https://pp.vk.me/c638428/v638428447/13fef/309fNgF4xlc.jpg](https://pp.vk.me/c638428/v638428447/13fef/309fNgF4xlc.jpg)
 .

I searched in manuals how to fix it, tried many ways: 
[https://pp.vk.me/c638428/v638428447/13fe6/bom-MQo64JQ.jpg](https://pp.vk.me/c638428/v638428447/13fe6/bom-MQo64JQ.jpg)
 
[https://pp.vk.me/c638428/v638428447/1400a/iYzeqZ_XEzI.jpg](https://pp.vk.me/c638428/v638428447/1400a/iYzeqZ_XEzI.jpg)
 , but I have not found that enumeration (from last screenshot) in .nim wrapper 
files.

I tried to use it directly, but I got error anyway: 
[https://pp.vk.me/c638428/v638428447/14001/vbiPiJPxcxA.jpg](https://pp.vk.me/c638428/v638428447/14001/vbiPiJPxcxA.jpg)

So I give up. Maybe you could make me some help?)


Re: unescape \n \r etc in string

2016-12-15 Thread vlad1777d
@Krux02, maybe this is a bug, you could post an issue on GitHub.


Re: GTK 3.20 Nim wrapper

2016-11-12 Thread vlad1777d
But do you know what to do with this error? 
[https://pp.vk.me/c638518/v638518447/8b77/4XL_Mn8aakE.jpg](https://pp.vk.me/c638518/v638518447/8b77/4XL_Mn8aakE.jpg)


Re: GTK 3.20 Nim wrapper

2016-11-03 Thread vlad1777d
Thank you, I'll try to buy the book some time. 20 dollars is really not much. 
If it would be in my language - I would even ask a digital version of it. But 
in English it's not really good to read it. I use translator through every 2-3 
sentences.

I had already read tutorials and manual, I understood not all, but when I don't 
understand something - I re-read tutorialmanualmodule reference. If I did not 
understood after this - I ask in IRC or forum.

I had some experience with gtk - I started making Omega Chess in Python and 
GTK. It was not finished (there was only board with switchable colors of cells, 
when you resize window - board resezed too), I learned Python and GTK through 
it, but I decided to learn Nim by re-writing this application to Nim and GTK. I 
spent many time reading API and asking questions in GTK+ IRC =)

One thing I lack - RSVG Nim wrapper - in GTK IRC suggested me that if I want to 
keep images in RAM than to create from them GDK_Pixbuf -es, than I need to use 
RSVG. Without it images every window re-size are read from hard disk.

I have only a little experience with compiled languages.

Thank you for help.


Re: GTK 3.20 Nim wrapper

2016-10-31 Thread vlad1777d
Not nice solution, but better than having crashes when you work on code =)


Import from parent directory

2016-10-31 Thread vlad1777d
Hello dear friends.

I can import from subdirectories so: import subdir/some_module , or so: import 
subdir.some_module

I can import from parent directory so: import ../some_module

I can import from parent directory and it's subdirectory so: import 
../subdir_of_parent/some_module

But I can't use points there: import ..subdir_of_parent.some_module >> error

Is it really one way to do this (while to import from subdir we can with two 
ways)? (if yes, why not to add ways with points only andor with slashes only?)

Thank you.


Re: GTK 3.20 Nim wrapper

2016-10-31 Thread vlad1777d
I took information from here: 
[http://nim-lang.org/docs/nimc.html](http://forum.nim-lang.org///nim-lang.org/docs/nimc.html)
 about path option and .cfg files, here: 
[http://nim-lang.org/docs/manual.html#modules-import-statement](http://forum.nim-lang.org///nim-lang.org/docs/manual.html#modules-import-statement)
 about import system, and added nim.cfg with:\--path: "gui"|   
---|---  
  
, added folder "gui", where were simulinks to all .nim wrappers - all worked.

I'll try to work with it more. (system: Debian x64 unstable)


Re: GTK 3.20 Nim wrapper

2016-10-31 Thread vlad1777d
I added gdk3.nim to the folder, where gtk3.nim was, it imported, now same error 
is while importing glib: 
"""/home/vlad/Programs/programming/libraries/Nim/ngtk3/nim-gtk3/src/gdk3.nim(14,
 6) Error: cannot open 'glib' """

Do I need to place them in one directory, or I can make some configure for this?


Re: GTK 3.20 Nim wrapper

2016-10-31 Thread vlad1777d
Thank you, I understood my error. I need links to all those libraries (i placed 
test file with gtk3.nim in one folder).

But I have now such issue: 
"""home/vlad/Programs/programming/libraries/Nim/ngtk3/nim-gtk3/src/gtk3.nim(14, 
6) Error: cannot open 'gdk3'""" with your test file from one of those libraries.

Screenshot: 
[https://pp.vk.me/c638518/v638518447/8369/cWvQeHqwpRA.jpg](https://pp.vk.me/c638518/v638518447/8369/cWvQeHqwpRA.jpg)


Re: GTK 3.20 Nim wrapper

2016-10-30 Thread vlad1777d
How to make it work? (I'm a newbie in this)

test.nim(1, 8) Error: cannot open 'gtk3'

I downloaded from github archive and tried to compile: nim c 
'/home/vlad/Programs/programming/libraries/Nim/nim-gtk3-master/test/test.nim'


Re: Tabulation symbols not allowed

2016-09-05 Thread vlad1777d
> With proportional fonts unfortunately 2 spaces generate a tiny indent step. 
> So I have to use 3 or 4 spaces, or finally a tab! I think I will do the later 
> with the replace command mentioned above. The only disadvantage is that 
> github puts 8 spaces for each tab, so I have to convert files before 
> uploading to github.

I use fixed width fonts only for convenience of reading (and then, because they 
were installed by default) (I use default fonts because this is not important 
for me). You can use any, which you want.

But forbidding tabs I don't like. It's bad idea, as I think. It's not difficult 
to allow them in the source code of Nim's compiler. Compilerlanguage is 
instrument for every humangroup of people, so, as I think, everybody can choose 
one, which is most convenient for himthem.