Code::Blocks Forums

User forums => Help => Topic started by: TheStranger on September 13, 2015, 10:50:59 am

Title: Editing file with program in Code::Blocks on Ubuntu
Post by: TheStranger on September 13, 2015, 10:50:59 am
Hi, Recently I have moved from  windows (8.0) to Ubuntu (14.04.3) and installed CB to write some C++ Programs. CB works perfectly but there is one frustrating thing. When I run C++ program internally form CB, which edits some output.txt file and that output.txt is also opened in CB, CB don't asks me change or not output.txt with new version. To make this happen I have to switch on some other program and switching window to CB again, then it asks me what to do to output.txt. Maybe this problem is not major, but it is really frustrating when you run program many times. Thanks in advance.
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: oBFusCATed on September 13, 2015, 11:33:00 am
When you run your program from CB do you see a console window?
If you don't see console then this is expected behaviour. CB checks for file modification when it is re-activated.
Unfortunately we're not using a file monitoring, because I'm not sure there is on in wxWidgets.
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: TheStranger on September 13, 2015, 11:45:47 am
(http://i.imgur.com/zRsKvPh.png)
Here is window after run. Then I press "enter" and this console window is closing. After that I have to switch to some other program and then reswitch. This is very bad I haven't had this problem on windows...  :-\
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: oBFusCATed on September 13, 2015, 12:04:49 pm
Just tried it with rev 10499 and it works as expected, I'm running enlightenment 0.19.
Probably ubuntu's unity doesn't send app activation event for this case.
Can you try to reproduce this with any other window manager (gnome, kde, fluxbox, cinnamon, etc)?
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: TheStranger on September 13, 2015, 12:19:39 pm
Well, I am new to Linux and it will probably take a while for me to change GUI, but I will learn and try to post as fast as I can  :P
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: oBFusCATed on September 13, 2015, 01:19:54 pm
I've just tried this in ubuntu 14.04 lts in a virtual machine and it works the same as on my main machine.
I'm using 100% default settings in the ubuntu.

Edit: It seems that it worked the first time I start my program...
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: TheStranger on September 13, 2015, 02:23:14 pm
I don't get. After does it work on your host/guest Ubuntus as I described or not?
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: oBFusCATed on September 13, 2015, 05:08:26 pm
It works in enlightenment as expected.
It doesn't work in ubuntu's unity (it works only the first time).
Title: Re: Editing file with program in Code::Blocks on Ubuntu
Post by: TheStranger on September 13, 2015, 06:50:35 pm
OK, thanks I got it...   :)