It is currently Sun May 31, 2020 12:47 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Background color of IDE
PostPosted: Sun Apr 19, 2020 2:47 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 752
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Background color of IDE
PostPosted: Sun Apr 19, 2020 5:02 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 558
Location: Near Hamburg | Massive deflectable. Does anyone have any experience with microdosing of psylocybine?
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

_________________
PB 5.71 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 52y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: Background color of IDE
PostPosted: Sun Apr 19, 2020 5:25 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 752
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Background color of IDE
PostPosted: Sun Apr 19, 2020 5:53 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 958
Location: Canada
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?


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.
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)"

:)

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Background color of IDE
PostPosted: Sun Apr 19, 2020 6:00 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 752
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Background color of IDE
PostPosted: Tue May 19, 2020 3:43 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1805
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.


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).

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.

_________________
On GitHub: PB Includes - IDE Tools - Color Themes - IDE Branches


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye