Save Settings to: The end of the Source file

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Save Settings to: The end of the Source file

Post by sec »

Image

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
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Save Settings to: The end of the Source file

Post by PB »

> Don't save to other extension (*.c, *.h,...,)

So, you're editing .c or .h source files with the IDE?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: Save Settings to: The end of the Source file

Post 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 :mrgreen:

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.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Save Settings to: The end of the Source file

Post by davido »

Now we have Dialog library, perhaps these should be exempted from spurious code at the end of the xml files - always?
DE AA EB
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: Save Settings to: The end of the Source file

Post 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
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Save Settings to: The end of the Source file

Post 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."
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Save Settings to: The end of the Source file

Post 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.
quidquid Latine dictum sit altum videtur
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Save Settings to: The end of the Source file

Post 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.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Save Settings to: The end of the Source file

Post 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. ;) :lol:

> 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Save Settings to: The end of the Source file

Post 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.
Last edited by Little John on Wed Sep 18, 2013 2:50 pm, edited 1 time in total.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Save Settings to: The end of the Source file

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Save Settings to: The end of the Source file

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Save Settings to: The end of the Source file

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: Save Settings to: The end of the Source file

Post 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? :lol:
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.
:mrgreen:

But maybe a stupid enough feature to implement while playing
GTA ... sorry can't hold back :oops:

MFG PMV
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Save Settings to: The end of the Source file

Post 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. :cry:
Maybe make the 'File Viewer' utility editable for text files?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply