I opened the IDE today (5.72 32-bit), and I have it set to a black background, and before I typed anything I clicked the "Save" icon to save the source as a blank file before I intended to start typing. However, this made the background color of the IDE turn the default yellow color after the save occurred!
Further, opening that blank saved file opens it with that yellow background, but opening an existing source opens it as black (as per my Prefs settings).
[Edit] Just worked out why: the filename saved from the IDE has no file type, so it doesn't have a ".pb" extension. Needs a bug fix.
Background color of IDE
Re: Background color of IDE
No, this is not a bug, BarryG.
The IDE distinguishes between a code file (.pb, .pbi) and a "text file" (all other file extensions).
So the IDE can also be used as a text editor. For both modes an own background color can be set.
Have a look at the settings under Editor / Colors, this should be the 4th entry or something like that.
Greeteings, Kurzer
The IDE distinguishes between a code file (.pb, .pbi) and a "text file" (all other file extensions).
So the IDE can also be used as a text editor. For both modes an own background color can be set.
Have a look at the settings under Editor / Colors, this should be the 4th entry or something like that.
Greeteings, Kurzer
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: Background color of IDE
If I start PureBasic and enter some source code, then click "Save", type a name and hit Enter, the file is saved without the ".pb" extension. It saves with no extension at all, yet I'm trying to save a PureBasic program. Am I supposed to seriously add ".pb" manually every time I save a new source?
The IDE's "Save" dialog box defaults to "All files (*.*)" type, but it should default to "PureBasic Sourcecodes (*.pb)" so the user doesn't have to manually select that. If people want to use the IDE as a general text editor, then they should need to specify their desired extension manually instead; not the other way around.
I liken this to Notepad not saving text with ".txt" extensions, even though that's the default goal. Notepad can be used to create ".bat" files and ".vbs" files, but it still defaults to ".txt" as it should. The PureBasic IDE should default to ".pb" likewise.
The IDE's "Save" dialog box defaults to "All files (*.*)" type, but it should default to "PureBasic Sourcecodes (*.pb)" so the user doesn't have to manually select that. If people want to use the IDE as a general text editor, then they should need to specify their desired extension manually instead; not the other way around.
I liken this to Notepad not saving text with ".txt" extensions, even though that's the default goal. Notepad can be used to create ".bat" files and ".vbs" files, but it still defaults to ".txt" as it should. The PureBasic IDE should default to ".pb" likewise.
Re: Background color of IDE
Just click "Save As" and set 'Save as type' to "PureBasic Files (*.pb, *pbi, *pbp, *,pbf)" ... the first option in the drop list, then save your file.BarryG wrote:If I start PureBasic and enter some source code, then click "Save", type a name and hit Enter, the file is saved without the ".pb" extension. It saves with no extension at all, yet I'm trying to save a PureBasic program. Am I supposed to seriously add ".pb" manually every time I save a new source?
The IDE will remember this setting. Close the IDE and then reopen and click "Save As" and you will see the file type is now always "PureBasic Files (*.pb, *pbi, *pbp, *,pbf)"
Re: Background color of IDE
Thanks Paul; that fixed it. Now clicking "Save" (not "Save as") will also default to ".pb" type. Perfect.
But that still leaves a question: why doesn't the IDE default to ".pb" in the first place? I still say it's a (minor) bug, for the same reason I gave for Notepad above.
But that still leaves a question: why doesn't the IDE default to ".pb" in the first place? I still say it's a (minor) bug, for the same reason I gave for Notepad above.
Re: Background color of IDE
The IDE definitely does default to ".pb" I just tested it by resetting to "factory default" (renamed my PureBasic.prefs to a backup name, and reopened the IDE, with all default settings).BarryG wrote:But that still leaves a question: why doesn't the IDE default to ".pb" in the first place? I still say it's a (minor) bug, for the same reason I gave for Notepad above.
As Paul said, the IDE remembers your last selection. Surely you changed the dropdown, maybe by accident, or saved a file with a non-pb extension.