Author Topic: Editing file with program in Code::Blocks on Ubuntu  (Read 2766 times)

Offline TheStranger

  • Single posting newcomer
  • *
  • Posts: 5
Editing file with program in Code::Blocks on Ubuntu
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline TheStranger

  • Single posting newcomer
  • *
  • Posts: 5
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #2 on: September 13, 2015, 11:45:47 am »

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...  :-\

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #3 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)?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline TheStranger

  • Single posting newcomer
  • *
  • Posts: 5
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #4 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #5 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...
« Last Edit: September 13, 2015, 01:22:01 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline TheStranger

  • Single posting newcomer
  • *
  • Posts: 5
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #6 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?
« Last Edit: September 13, 2015, 02:41:13 pm by TheStranger »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #7 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).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline TheStranger

  • Single posting newcomer
  • *
  • Posts: 5
Re: Editing file with program in Code::Blocks on Ubuntu
« Reply #8 on: September 13, 2015, 06:50:35 pm »
OK, thanks I got it...   :)