Page 1 of 2

PureBasic 4.00 - Beta 7

Posted: Thu Mar 16, 2006 12:59 am
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.

Posted: Thu Mar 16, 2006 1:07 am
by netmaestro
download link is broken! [fixed now thanks]

Posted: Thu Mar 16, 2006 1:07 am
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.

Posted: Thu Mar 16, 2006 1:09 am
by PB
> download link is broken!

Doesn't work for me either.

Posted: Thu Mar 16, 2006 1:11 am
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. :)

Posted: Thu Mar 16, 2006 1:14 am
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 ;)

Posted: Thu Mar 16, 2006 1:32 am
by Fred
Should work now, sorry :oops:

Posted: Thu Mar 16, 2006 1:41 am
by Inf0Byt3
Cool! Thanks.

Posted: Thu Mar 16, 2006 1:50 am
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?

Posted: Thu Mar 16, 2006 1:54 am
by Shannara
Thanks for the download, first beta 7 bug reported in the bugs forum :)

Posted: Thu Mar 16, 2006 3:17 am
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. :)

Posted: Thu Mar 16, 2006 3:19 am
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

Posted: Thu Mar 16, 2006 3:27 am
by vanleth
Beta 7 allready, the last month or so, have been a Pure enjoyment.

Thanks PB team!

Posted: Thu Mar 16, 2006 8:32 am
by dontmailme
Pure Genious :D

Posted: Thu Mar 16, 2006 8:59 am
by Psychophanta
Thanx!