PureBasic 4.00 - Beta 7

Developed or developing a new product in PureBasic? Tell the world about it.
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

PureBasic 4.00 - Beta 7

Post by Fred »

Hi there,

Another beta is available on your personal account, and brings the usual bug fixes and few new things:

- The compiler and IDE now support UTF-8 files using the 'BOM' header, which allows to mix ascii and UTF-8 files in the same projects. It's now possible to use UTF-8 files to compile non unicode executable as well, so all is simplified and you shouldn't have to worry again about the file format. A new combobox is available in the 'Compiler option' window to set the file type. When switching between utf-8 and ascii, the text in the IDE is no more corrupted.

- ReadStringFormat() and WriteStringFormat() has been added, to support BOM in the string library (check the doc for more infos)

- StringByteLength() to calculate the needed length of a string in the different encoding supported by PureBasic.

Have fun,

The Fantaisie Software Team.
Last edited by Fred on Wed Mar 29, 2006 1:38 am, edited 1 time in total.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

download link is broken! [fixed now thanks]
Last edited by netmaestro on Thu Mar 16, 2006 1:33 am, edited 1 time in total.
BERESHEIT
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

One note:
The IDE now uses the UTF-8 BOM header to detect when a file is UTF-8 or not.
Since all old sources do not have that, they will be initially considered Ascii
files and loaded as such.

If you have many sources edited with the old UTF-8 switch in the IDE, you should
probably add the header (bytes EF BB BF at the start of the file) manually
so they are directly detected as UTF-8.
(this can be done easily with a small program using the new WriteStringFormat() command if there are many sources to do ;))

Another change is that OpenWindow() now only uses #PB_Window_SystemMenu if
no flags were specified (there was some discussion about it in the german forum and it seemed more logical)
Also you can use #PB_Ignore for x/y parameters, which will let windows choose
the position for your window.
quidquid Latine dictum sit altum videtur
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> download link is broken!

Doesn't work for me either.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> OpenWindow() now only uses #PB_Window_SystemMenu if no flags were specified

Good idea, but #PB_Window_SystemMenu|#PB_Window_ScreenCentered
would be nicer, because it would make testing an app quicker because you
know where the window will open every time, instead of being random. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

PB wrote:> OpenWindow() now only uses #PB_Window_SystemMenu if no flags were specified

Good idea, but #PB_Window_SystemMenu|#PB_Window_ScreenCentered
would be nicer, because it would make testing an app quicker because you
know where the window will open every time, instead of being random. :)
Well, the same thought was why we originally had it this way. But think about it
for a while... isn't it odd to have an x/y parameter that gets ignored by default ? (why isn't the x/y the optional thing then?)
It just makes more sense this way.

And btw, opening the window at fixed x/y of 100x100, you will also know where the window is every time ;)
quidquid Latine dictum sit altum videtur
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Should work now, sorry :oops:
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Cool! Thanks.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Ok, how would I go about opening a window with no systemmenu, just a plain top border, that is not screencentered? Would I need two lines, one to open and a resizewindow() to relocate?
BERESHEIT
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Thanks for the download, first beta 7 bug reported in the bugs forum :)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> isn't it odd to have an x/y parameter that gets ignored by default ?

Yeah, but I was thinking for when X/Y is ignored. I hate how Windows opens
windows at random positions (eg. Calculator, Properties of files, etc). I ended
up writing an app to open them where I want every time and my productivity
has increased as a result, because I can go directly to them (and the gadgets
on them) without thinking -- especially when working with macro apps.

> btw, opening the window at fixed x/y of 100x100, you will also know
> where the window is every time ;)

I know -- check out most of my tips here and you'll see me doing that. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Sebe
Enthusiast
Enthusiast
Posts: 160
Joined: Sun Dec 19, 2004 10:55 pm
Location: Munich
Contact:

Post by Sebe »

PureBasic is just the best programming language I know. I'd chose it over C, C++, Delphi and VB anytime! Beta7 is another step in the right direction. Good work @the PureBasic team & Fred :D
vanleth
User
User
Posts: 79
Joined: Sat Jun 28, 2003 4:39 am
Location: Denmark - Valby

Post by vanleth »

Beta 7 allready, the last month or so, have been a Pure enjoyment.

Thanks PB team!
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

Pure Genious :D
Paid up PB User !
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Thanx!
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Post Reply