NO

Author Topic: Closing source files  (Read 3749 times)

GordC

  • Guest
Closing source files
« on: June 22, 2010, 03:46:10 AM »
Absolute beginner's question here!. It is desirable NOT to save a source file after a poor editing session but this is an option which I haven't found. Can I close a file without saving?
GordC

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: Closing source files
« Reply #1 on: June 22, 2010, 08:24:26 AM »
Absolute beginner's question here!. It is desirable NOT to save a source file after a poor editing session but this is an option which I haven't found. Can I close a file without saving?
GordC
Close the file and when you will be asked to save the changes click no.
best regards
 Alex ;)

GordC

  • Guest
Re: Closing source files
« Reply #2 on: June 22, 2010, 03:15:30 PM »
Thanks
GordC

GordC

  • Guest
Re: Closing source files
« Reply #3 on: July 05, 2010, 09:09:26 PM »
I'd like to expand on the behaviour of the compiler and the editor with regard to which source gets compiled.   
When making changes via the IDE editor, the source that gets compiled is always the one that has been saved on disc. If you have the option (Save on Editor exit) off then you get a message asking you to save the latest version. You cannot decline 'save' and expect to compile the latest source.

The consequence of all this is that all changes that are compiled affect the previous file on disc. Why doesn't the Pelles C program work with the source in memory? Version control is almost impossible under this scheme. I believe that a Python IDE works this way but Borland's C works with the source in memory.
Gord C

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: Closing source files
« Reply #4 on: July 06, 2010, 10:52:06 AM »
At Tools -> Options -> General there is in the sixth line an option "Save files without prompting before build". If you check this POIDE save files before build, so the actual file in memory is compiled.

POCC, the compiler, is an external program so can not work with the POIDEs memory. If you really want to compile the memory without saving the source file, you have to write an AddIn, which saves the source files to temp files, compile them, rename them and link them. Perhaps you can take the AddIn for REL/DBG/PRF as template.
best regards
 Alex ;)

GordC

  • Guest
Re: Closing source files
« Reply #5 on: July 07, 2010, 04:56:36 PM »
Thanks for the explanation which makes the behaviour understandable. It is a bit beyond me to design an Addin so I'll cope with the status quo for now.
Gord C