Page 1 of 2
Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 4:47 am
by sec
This option
Save Settings to: The end of the Source file should only save to
PureBasic Files (*.pb,*.pbi,*.pbp,*.pbf). Don't save to other extension (*.c, *.h,...,)
Thanks
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 8:46 am
by PB
> Don't save to other extension (*.c, *.h,...,)
So, you're editing .c or .h source files with the IDE?
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 9:30 am
by sec
PB wrote:> Don't save to other extension (*.c, *.h,...,)
So, you're editing .c or .h source files with the IDE?
That is example
As standart for opening file in PB are *.pb,*.pbi,*.pbp,*.pbf , so i think, it is logic for saving the setting to PureBasic Files only.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 10:11 am
by davido
Now we have Dialog library, perhaps these should be exempted from spurious code at the end of the xml files - always?
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 10:13 am
by sec
davido wrote:Now we have Dialog library, perhaps these should be exempted from spurious code at the end of the xml files - always?
+1
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 2:23 pm
by Tenaja
PB wrote:> Don't save to other extension (*.c, *.h,...,)
So, you're editing .c or .h source files with the IDE?
I know I have...and it is extremely annoying!
The IDE would be much more useful if it would only use its syntax highlighting lexer for a list of file types. Anything not on the list would just be displayed as plain text. Even better would be to use Scintillas lexers for the other file types.
Think of this...you are working with PB, and get a phone call that requires notes. You open a new file, and start typing notes about the phone call...and your text notes get "case corrected."
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 2:31 pm
by freak
Tenaja wrote:Think of this...you are working with PB, and get a phone call that requires notes. You open a new file, and start typing notes about the phone call...and your text notes get "case corrected."
Think of this...you are working with an image editing program (say Photoshop or Gimp), and get a phone call that requires notes. Would you try to open those notes in Photoshop?
The PB IDE is a tool for editing PB files, not a general purpose text editor. There are plenty of those available on the internet.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 2:40 pm
by Tenaja
freak wrote:Tenaja wrote:Think of this...you are working with PB, and get a phone call that requires notes. You open a new file, and start typing notes about the phone call...and your text notes get "case corrected."
Would you try to open those notes in Photoshop?
Because it is only one keystroke, yes, I have done that once or twice. It is better than saying "hold on a moment while I get something to write on."
I understand that the ide is not intended to be used as a general purpose editor, but it is clear that many of us on the forum would appreciate a text (non-lexed) mode.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 2:43 pm
by PB
> You open a new file, and start typing notes about the phone call...
> and your text notes get "case corrected."
Why open a new file? Just type a semi-colon first and comment your
phone call notes in your current source.
> many of us on the forum would appreciate a text (non-lexed) mode
There's a prefs setting to disable syntax highlighting and case-correction.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 2:46 pm
by Little John
Tenaja wrote:Because it is only one keystroke, yes, I have done that once or twice. It is better than saying "hold on a moment while I get something to write on."
You can configure your system so that it's only one keystroke or one mouse click to open e.g. a general purpose text editor. If you don't do so, it's not Fred's or Freak's problem. Your phone call has nothing got to do with PureBasic.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 2:50 pm
by PB
> it's only one keystroke or one mouse click to open a general purpose text editor
Yep, I have Notepad on my Taskbar for precisely these situations.
And even though I was half-joking about typing a comment in the
current source above, it *is* actually a workable solution.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 3:09 pm
by Tenaja
PB wrote:Yep, I have Notepad on my Taskbar for precisely these situations.
And even though I was half-joking about typing a comment in the
current source above, it *is* actually a workable solution.
I know my examples were silly, and I know there are easy workarounds.
However, there are (currently) no workarounds for editing a text file to be used within your PB project (either as an include or a file to process), if you want to edit the file with the PB editor.
In addition, there are C questions on this forum regularly; with a plain text lexer, making those conversions would be easier. (With C files, you cannot allow case correction, since that language is case sensitive, and doing so could potentially cause errors.
BTW, there is no way I'd disable the case correction feature on PB files.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 3:19 pm
by IdeasVacuum
Not sure that many PB Devs do want to edit text files/other language files in the PB IDE Tenaja.
I think most people have got other tools for the job, be it Notepad, Notepad ++ or other more specialised editors. I prefer it that way, PB IDE on one monitor and UltraEdit on the other.
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 3:48 pm
by PMV
sec wrote:[...] so i think, it is logic for saving the setting to PureBasic Files only.
It does that already. Everything that is gonna open into the IDE
is considered to have PB-Code in it. As your feature request,
if i want to use an unrecognized extension for my pb-files ...
i'm not able to do that anymore?

It would need a editable list of all extensions, that should be
recognized as pb-files, even a *.* should be allowed for that
list ... freak really has to be bored to death to implement that.
But maybe a stupid enough feature to implement while playing
GTA ... sorry can't hold back
MFG PMV
Re: Save Settings to: The end of the Source file
Posted: Wed Sep 18, 2013 4:22 pm
by skywalk
I agree. I save my pb tool code as *.pbt and that is not recognized by the IDE.
I haven't used the dialog option, but it makes sense to be able to edit xml now without trailing stuff?
Same when I edit an ini file to be used in my PB apps.
It is a shame to chase such efficiencies to yet another app for want of a simple switch in the IDE.

Maybe make the 'File Viewer' utility editable for text files?