[Implemented] PB Editor: Mark files when modified

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] PB Editor: Mark files when modified

Post by BackupUser »

Restored from previous forum. Originally posted by horst.

Very often I forget to save an included file in the editor,
before I run the compiler.

It would be a great help if the files were marked
(by red font color on the file tabs, for example),
as soon as any changes are made.


Horst
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

Mhhhh.. if we talk here about editor and save sources stuff... i have there another small thing that would be maybe a nice feature for some people... What about an optional option, when saving a file (original project name) and the editor will create automatical a .bak file! So you can change your actual projcet, save/run and compile it.. and if you see that there is something wrong and you forgot to create a backup of the last (working) source version, you have always the bak file...

What i mean, when saving a project, dont save this as *.pb and *.bak!!! Nooo... IF you changed your source and save it, the new version will be saved as *pb and the old (before you overwrote it) will be saved as *.bak

What do you think? Just an idea

greetz
MrVainSCL! aka Thorsten

PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

That sounds fine. And what about "AutoSave every x minutes"?

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

Hi El_Choni,
yessss.. that could be added as optional option too :wink:



greetz
MrVainSCL! aka Thorsten

PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by GPI.

A "save all source bevor 'run/compile'" would be nice.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

It's already here :).

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by horst.
Originally posted by fred

It's already here :).

Fred - AlphaSND
What is already where?

I cannot convince my PB Editor 3.53 to save all source bevor run/compile.

Anyhow, I started this topic with a simple suggestion:
to mark files that have been modified (and not yet saved).
Is this such a bad suggetion?
I use several other editors, and they all do this, for a good reason.
Is really nobody interested??


Horst
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Ha, yes, my mistake. It save only the current one. Should be changed to save all the sources, yes (old editor was one source only).

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

> Is really nobody interested??

Horst, i note all this ideas and comments here
to add it. Just wait'n see... (be patient)

cya,
...Danilo
(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by freak.

> Ha, yes, my mistake. It save only the current one. Should be changed to save all the sources, > yes (old editor was one source only).

Can this be optional please? It is really anoying, if I only want to write a short Code example for the Forums (for example), I always have to save it. (The SaveFileRequester always pops up.)

Maybe it is possible that this feature is only turned on, after the Code was saved once, and not, if it still says at the Panel?

Would be great...

Timo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ricardo.
Can this be optional please? It is really anoying, if I only want to write a short Code example for the Forums (for example), I always have to save it. (The SaveFileRequester always pops up.)
Yes, its annoying.

IDEAS:

1.- Instead of make *.bak make a numbered version.
Then you could store old versions of your code.
If im coding myapp.pb and i made a change my new saved pb will be myapp_1.1.PB

Or something like that.

2.- The IDE let me store snippets in a small database (will be great!!!) and search into them.

Thanks





Best Regards

Ricardo

Dont cry for me Argentina...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Revolver.

I just edited my IDE a few days ago to support this very thing(save all source before run/compile). Here's what I did:

Purebasic IDE.pb
Replace lines 1033-1035:

Code: Select all

If AutoSave  SaveSourceCode(FileList()\FileName$, 0)
EndIf
with:

Code: Select all

If AutoSave
  ; Save all source code
  *OldElement = @FileList()
  OldRichEdit = *RichEditGadget
  ResetList(FileList())
  While NextElement(FileList())
    *RichEditGadget = FileList()\RichEdit
    SaveSourceCode(FileList()\FileName$, 0)
  Wend
  ChangeCurrentElement(FileList(),*OldElement)
  *RichEditGadget = OldRichEdit
EndIf
Misc.pb
Replace line 108:

Code: Select all

Data$ "Save source file before 'compile/run'"
with:

Code: Select all

Data$ "Save all source files before 'compile/run'"
Hope this helps!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by GPI.

look at
viewtopic.php?t=5062

I modified the editor.

PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
Post Reply