What does that mean and how do you use them?- The MacOS X API functions are supported as if they were BASIC keywords
MacOS X API functions
MacOS X API functions
On the PB site, in Introduction, in PureBasic MacOS X, it says:
MacBook Pro-M1 (2021), Tahoe 26.1, PB 6.30b2
ok, I admit it, I don't understand what API means. It appears to me that the Windows community has a 'library(?)' that extends the abilities of PB by using pre-defined commands simply inserted in the code just like PB commands. Why can't a library like that be made for the Mac? Is the Windows library a 3rd party item or is it provided by PB?
..or do I have the whole thing mixed up?
..or do I have the whole thing mixed up?
MacBook Pro-M1 (2021), Tahoe 26.1, PB 6.30b2
What I'm getting at, by example, is that in Windows there is a command to put the cursor at a location in a stringgadget. That command appears to be a windows API command. What I read in your provided link didn't appear to be leading to be able to do that (even if I could figure out how to use it).
It is also interesting that Carbon is 'depreciated' and is no longer encouraged to be used.. so Cocoa (?) is the API to use.
Well, I don't know what any of this means and will never figure out how to use any of it. I just feel that PB needs to have a little more functionality (like being able to place a cursor in a stringgadget location, etal.) to be attractive to Mac users. I was hoping the API thing might lead to that.
It is also interesting that Carbon is 'depreciated' and is no longer encouraged to be used.. so Cocoa (?) is the API to use.
Well, I don't know what any of this means and will never figure out how to use any of it. I just feel that PB needs to have a little more functionality (like being able to place a cursor in a stringgadget location, etal.) to be attractive to Mac users. I was hoping the API thing might lead to that.
MacBook Pro-M1 (2021), Tahoe 26.1, PB 6.30b2
-
lexvictory
- Addict

- Posts: 1027
- Joined: Sun May 15, 2005 5:15 am
- Location: Australia
- Contact:
for some OS X API calls, you need to manually make pb aware of them using a .pbl file and pbsoimporter
eg. http://purebasic.fr/english/viewtopic.p ... 533#244533
I have a hard time believing that Carbon is deprecated; Seeing as it's the C API. Not sure how you would use Cocoa in PB (as its OO)
eg. http://purebasic.fr/english/viewtopic.p ... 533#244533
I have a hard time believing that Carbon is deprecated; Seeing as it's the C API. Not sure how you would use Cocoa in PB (as its OO)
Demonio Ardente
Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
I thought I made it clear that I didn't know about these things. The argument isn't with me, I don't know anything about APIs.. and I'm not interesting in learning about them. If the programming gods (like Fred/Freak/maybe you) give us more in PB, I am grateful.
Carbon is a procedural C interface for Mac OS X. Whether you are writing a new application or porting one from another platform, Carbon is an excellent framework for developing on Mac OS X. If you're developing new applications and prefer an object-oriented interface, be sure to consider Cocoa.
If you are familiar with C programming but not with Carbon or Mac OS X, you want to learn how to design and implement a basic user interface and then learn how to build a Carbon application using Mac OS X development tools. After that, you’ll want to explore the various Carbon "managers" and "services" for APIs specific to your needs.
Please excuse my ignorance...The Cocoa frameworks are primarily written in Objective-C, and support both 32-bit and 64-bit applications as well as Objective-C 2.0's garbage collection, although there are a few components written in other languages such as C for performance or compatibility reasons, such as Core Foundation. The Cocoa frameworks are completely accessible to Objective-C programs, and can even be accessed using native syntax from AppleScript, Python, and Ruby. Example frameworks included within Cocoa are Foundation, which defines the "nuts and bolts" classes for Objective-C programming, and Application Kit which includes higher-level controls such as windows, buttons, menus, and text fields. Whatever you need to develop, Cocoa contains the frameworks to make development productive and enjoyable.
MacBook Pro-M1 (2021), Tahoe 26.1, PB 6.30b2
> I have a hard time believing that Carbon is deprecated; Seeing as it's the C API. Not sure how you would use Cocoa in PB (as its OO)
It is. New functionality is rarely added to Carbon, its all done for Cocoa. Carbon will probably be around for a long time for compatibility, but its not the framework of choice anymore. I've also read that Carbon will not be available in 64bit which kind of sucks. One day we will have to port the entire PB library set to Cocoa to keep up. My blood runs cold when i think about the work that'll be, especially since i am not the biggest fan of ObjectiveC
The Carbon API is currently not available directly in PB because it is a lot of work to convert the headers for that. Even if most of it is done through automated tools, these usually make a lot of mistakes which have to be solved by hand.
WilliamL:
If there is some functionality you are missing, just post it in the feature request section. I am sure most windows users will prefer a native PB function over the OS API as well.
It is. New functionality is rarely added to Carbon, its all done for Cocoa. Carbon will probably be around for a long time for compatibility, but its not the framework of choice anymore. I've also read that Carbon will not be available in 64bit which kind of sucks. One day we will have to port the entire PB library set to Cocoa to keep up. My blood runs cold when i think about the work that'll be, especially since i am not the biggest fan of ObjectiveC
The Carbon API is currently not available directly in PB because it is a lot of work to convert the headers for that. Even if most of it is done through automated tools, these usually make a lot of mistakes which have to be solved by hand.
WilliamL:
If there is some functionality you are missing, just post it in the feature request section. I am sure most windows users will prefer a native PB function over the OS API as well.
quidquid Latine dictum sit altum videtur

