It is currently Sat May 25, 2013 3:26 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Carbon calls to Cocoa gadgets
PostPosted: Mon Aug 06, 2012 9:16 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Aug 04, 2008 10:56 pm
Posts: 849
Location: Seattle, USA
With the introduction of 4.7 with gadgets that are created using Cocoa I'm wondering what happens in my old programs that modify gadgets with carbon calls? I would assume that the carbon calls wouldn't have any effect but will they also create IMA errors (getting those) or other errors? I'm guessing that carbon calls that don't involve gadgets (like printing) will still work fine in the 'x86' version.

_________________
MacBook Pro/Retina, OSX 10.8.3 Mountain Lion, PB-5.11x64


Top
 Profile  
 
 Post subject: Re: Carbon calls to Cocoa gadgets
PostPosted: Tue Aug 07, 2012 5:17 am 
Offline
Addict
Addict

Joined: Sun Aug 08, 2004 5:21 am
Posts: 1088
Location: Netherlands
The Cocoa version of PureBasic is much different internally.
You still can use Carbon calls the OS supports but if they interact with PB objects, you will have problems.
GadgetID for example returns different kind of objects but also images are different ( Carbon uses CGImage, Cocoa uses NSImage ).
Most likely when you use Carbon API calls to modify PB gadgets and compile the same code with the Cocoa version of PB, it will crash.


Top
 Profile  
 
 Post subject: Re: Carbon calls to Cocoa gadgets
PostPosted: Tue Aug 07, 2012 5:38 am 
Offline
Addict
Addict
User avatar

Joined: Sun Apr 27, 2003 8:12 am
Posts: 1620
Location: USA
Yeah, none of my ImportC functions work with the Cocoa version. I think it's best to stick with Cocoa from here on out. The way Apple is going, I wouldn't be surprised if OS X 10.9 (when that day comes) doesn't even support Carbon.

_________________
AMD 64 4000+ / 1GB PC2700 / WIN XP Home SP3 / Nvidia GT220 x16 512MB / M-Audio Revolution 5.1
Macbook Air 11.6" - 2010 / OS X 10.8

http://www.posemotion.com
http://www.flashpulse.com


Top
 Profile  
 
 Post subject: Re: Carbon calls to Cocoa gadgets
PostPosted: Tue Aug 07, 2012 5:23 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Aug 04, 2008 10:56 pm
Posts: 849
Location: Seattle, USA
So does the carbon printing still work ok for printing strings and images/lines/boxes?

I guess I'm going to have to start looking into re-creating my printing include file ( viewtopic.php?f=19&t=46806#p356265 ) in Cocoa. :shock:

_________________
MacBook Pro/Retina, OSX 10.8.3 Mountain Lion, PB-5.11x64


Top
 Profile  
 
 Post subject: Re: Carbon calls to Cocoa gadgets
PostPosted: Tue Aug 07, 2012 5:27 pm 
Offline
Addict
Addict

Joined: Sun Aug 08, 2004 5:21 am
Posts: 1088
Location: Netherlands
One of the reasons for such code was the bad printing quality on OS X.
I have the impression the print quality has improved on the Cocoa version of PureBasic.


Top
 Profile  
 
 Post subject: Re: Carbon calls to Cocoa gadgets
PostPosted: Tue Aug 07, 2012 5:34 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Aug 04, 2008 10:56 pm
Posts: 849
Location: Seattle, USA
I take that as a 'yes' that carbon printing still works.. or are you saying that printing in pb with cocoa will be good enough without resorting to API?

If not, as for the cocoa printing, I'll need some help there...

_________________
MacBook Pro/Retina, OSX 10.8.3 Mountain Lion, PB-5.11x64


Top
 Profile  
 
 Post subject: Re: Carbon calls to Cocoa gadgets
PostPosted: Tue Aug 07, 2012 5:56 pm 
Offline
Addict
Addict

Joined: Sun Aug 08, 2004 5:21 am
Posts: 1088
Location: Netherlands
The code example from the PureBasic help file gives sharp text on my laser printer. :D
So what I was saying that it probably is good enough without any API calls.


Top
 Profile  
 
 Post subject: Re: Carbon calls to Cocoa gadgets
PostPosted: Tue Aug 07, 2012 5:59 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Aug 04, 2008 10:56 pm
Posts: 849
Location: Seattle, USA
Whew! Thanks wilbert for trying it. I'll see how it goes for me and maybe the API (for printing) will be a thing of the past.

_________________
MacBook Pro/Retina, OSX 10.8.3 Mountain Lion, PB-5.11x64


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 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