PureBasic 4.40 Beta 3 released

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
graves
Enthusiast
Enthusiast
Posts: 160
Joined: Wed Oct 03, 2007 2:38 pm
Location: To the deal with a pepper

Re: PureBasic 4.40 Beta 3 released

Post by graves »

On CallFunctionFast command:

From Help on PB 4.31
Note: this function is not very flexible and can't handle double/quad parameters
From Help on PB 4.40
Note: this function is not very flexible and can't handle string/float/double/quad parameters
Why can not I use strings now?

EDIT:
On Prototype command, PB 4.40 help not show string type (Can it be a mistake?):
Unlike CallFunction(), it can deal with double, float and quad variables without any problem
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: PureBasic 4.40 Beta 3 released

Post by blueznl »

Because passing strings no longer works, you have to pass the adress of the string, using @string.s
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Re: PureBasic 4.40 Beta 3 released

Post by Kale »

freak wrote:Maybe because it is not as simple as you think ?
Maybe not, but pretty important don't you think?
--Kale

Image
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Re: PureBasic 4.40 Beta 3 released

Post by jack »

perhaps somebody with a lot more expertise than me could write an Xcode plug-in for PB
somic
User
User
Posts: 66
Joined: Sun Jun 29, 2008 9:11 am
Location: Italy
Contact:

Re: PureBasic 4.40 Beta 3 released

Post by somic »

Thanks for the update.

I will replace immediately the 4.40B2 and let you know if any problems is found.

Regards,
Somic

Congratulations:
- 16463 lines of anmXNpp plugin code compiled without problems
- Project manager improved in stability and useability

one only strange behaviour I've to investigate further:
when I compile the 16000+ lines of code
* with the instruction: ret = sendmessage_() the compiler claims (and don't crash)
* with the instruction: ret = WaitForInputIdle_() the compiler doesn't claim but crashes

This was also in with PB 4.40 (x86) B2 but not with PB 4.31 that used to claim (and don't crash)

Here you can find the Error Signature:
http://www.semelinanno/downloads/pb/Error_Sign.zip (Form, File dmp & txt)
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
klaver
Enthusiast
Enthusiast
Posts: 147
Joined: Wed Jun 28, 2006 6:55 pm
Location: Schröttersburg

Re: PureBasic 4.40 Beta 3 released

Post by klaver »

Are there plans of adding to the docs some fuctions before 2012 (end of the world lol)?

Code: Select all

ServerID()
EventwParam()
EventlParam()
Image
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: PureBasic 4.40 Beta 3 released

Post by netmaestro »

EventwParam() and EventlParam() have been around for a long time but have always been unsupported. I doubt they'll ever find their way into the official docs.
BERESHEIT
User avatar
aaaaaaaargh
User
User
Posts: 55
Joined: Thu Jul 27, 2006 1:24 pm

Re: PureBasic 4.40 Beta 3 released

Post by aaaaaaaargh »

Hello,
there seems to be a difference in the way PB4.4beta3 (win/x86) behaves compared to 4.3
The following code (to get font metrics):

Code: Select all

  CreateImage(1,64,64)
  ok = LoadFont(1,"Arial",24)
  dc = StartDrawing(ImageOutput(1))
  DrawingFont(ok)
  GetTextMetrics_(dc, @TxtMetrics.TEXTMETRIC)
  Debug "Font Metrics average="+Str(TxtMetrics\tmAveCharWidth)+" max="+Str(TxtMetrics\tmMaxCharWidth)
  StopDrawing()
Will return the correct values on pb4.3:
Font Metrics average=14 max=85
but in pb4.4beta3 it returns:
Font Metrics average=7 max=14
regardless of the font used. Hmmmm
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: PureBasic 4.40 Beta 3 released

Post by netmaestro »

Pretty much the new reality with 4.40 as the device context is configured the way the PB 2DDrawing library needs it. If you run across something like this you'll have to just go a bit further with API:

Code: Select all

CreateImage(1,64,64)
ok = LoadFont(1,"Arial",24)
dc = CreateCompatibleDC_(#Null)
oldimg = SelectObject_(dc, ImageID(1))
oldfont = SelectObject_(dc,ok)          
GetTextMetrics_(dc, @TxtMetrics.TEXTMETRIC)
Debug "Font Metrics average="+Str(TxtMetrics\tmAveCharWidth)+" max="+Str(TxtMetrics\tmMaxCharWidth)
SelectObject_(dc, oldimg)
SelectObject_(dc, oldfont) 
DeleteDC_(dc)
It isn't considered a bug and it's unlikely to be changed: http://www.purebasic.fr/english/viewtop ... =4&t=39246
BERESHEIT
User avatar
aaaaaaaargh
User
User
Posts: 55
Joined: Thu Jul 27, 2006 1:24 pm

Re: PureBasic 4.40 Beta 3 released

Post by aaaaaaaargh »

netmaestro wrote:Pretty much the new reality with 4.40 as the device context is configured the way the PB 2DDrawing library needs it. If you run across something like this you'll have to just go a bit further with API:

Code: Select all

CreateImage(1,64,64)
ok = LoadFont(1,"Arial",24)
dc = CreateCompatibleDC_(#Null)
oldimg = SelectObject_(dc, ImageID(1))
oldfont = SelectObject_(dc,ok)          
GetTextMetrics_(dc, @TxtMetrics.TEXTMETRIC)
Debug "Font Metrics average="+Str(TxtMetrics\tmAveCharWidth)+" max="+Str(TxtMetrics\tmMaxCharWidth)
SelectObject_(dc, oldimg)
SelectObject_(dc, oldfont) 
DeleteDC_(dc)
It isn't considered a bug and it's unlikely to be changed: http://www.purebasic.fr/english/viewtop ... =4&t=39246
I understand that...........now
thanks!
Post Reply