How well does MacOS development work with PureBasic

Mac OSX specific forum
User avatar
X0r
Enthusiast
Enthusiast
Posts: 138
Joined: Tue May 01, 2007 3:49 am
Location: Germany

How well does MacOS development work with PureBasic

Post by X0r »

Hey guys,

currently, I am thinking about getting a MacBook with the M1 chip for various reasons. While thinking about that, I asked myself as to why I should not start developing desktop client-applications for MacOS as well. Thus, I would like to know how your experiences are in using PureBasic for creating MacOS apps. Especially, I am interested in getting to know how PureBasic's GUI library performs. Do you have any good experiences with that?
In the past, I have built some successful commercial applications in PB for Windows and I might ask myself whether I could do the same for MacOS, too. Or would you consider PB just as "a toy" for MacOS development? And more importantly, how is the support for the new ARM-based M1 chip with the latest PB 6 alpha?

Regards,
X0r
Rinzwind
Enthusiast
Enthusiast
Posts: 638
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: How well does MacOS development work with PureBasic

Post by Rinzwind »

Same basic GUI controls as for Windows. Depends on the kind of application you want to make. If everything you need is supplied by PB commands, then yes it works. If not, you will frequently fight with CocoaMessage. macOS has a much nicer and consistent (<> backwards compatible) API (incl GUI) than Windows, but you can't access it easily from PB, since it's all about objects, properties, messages, hence the need for CocoaMessage and no code completion there ;)
jamirokwai
Enthusiast
Enthusiast
Posts: 772
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: How well does MacOS development work with PureBasic

Post by jamirokwai »

Hi there,

I use PB for a few years now, main platform is Mac OS. I can say, it works very well - besides the changes by Apple regarding the audio system. All other parts integrated into PB work great, and I even deploy Windows-EXEs from the same code as on the Mac. And there is a lot of help in the forum for Mac-Users. Don't know the changes for the M1, but you should have a look at all examples to get the right feeling.
Regards,
JamiroKwai
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: How well does MacOS development work with PureBasic

Post by deseven »

Works fine for simple straightforward apps, but expect huge problems otherwise. I compiled the list of problematic things for 5.73 LTS. Things may have changed in the latest beta, I haven't tried it yet.
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: How well does MacOS development work with PureBasic

Post by fsw »

I have a intel based MacBook and a Apple Silicon MacBook.
On both machines PB works okay.

With M1 based computers you can run intel compiled apps through Rosetta (macOS starts it automatically) and the performance hit is negligible.

The only thing that bothers me a lot is that on the M1 the app kill switch in the IDE doesn’t work and it will take the IDE down as well.
But the built-in ‘force quit’ method of macOS works flawlessly.

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
Tenaja
Addict
Addict
Posts: 1949
Joined: Tue Nov 09, 2010 10:15 pm

Re: How well does MacOS development work with PureBasic

Post by Tenaja »

...CocoaMessage and no code completion there
If you want the code completion, you can make a plug-in. All you need to do is send the ide the message containing the new word... You could probably just make a text file (for editing simplicity) and send each word.
https://www.scintilla.org/ScintillaDoc. ... completion

It's been a while since I've done this, but I'm sure there are plenty of examples on the forum here.
User avatar
mk-soft
Always Here
Always Here
Posts: 5404
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: How well does MacOS development work with PureBasic

Post by mk-soft »

I've been using PB for macOS for a long time and it works very well. The PB IDE version for M1 is still a bit of a sticky wicket.
I could compile my programmes from Windows or Linux on macOS without any problem.

With macOS, an application is a folder. This means that the files supplied, such as images, libraries, etc., belong in the app folder MyApp.app/Contents/Resources. I have written a simple tool for this, which copies the files into the app folder after compiling, so that access to the files works immediately.
Link: PB IDE Tool MyAppData

To have the path to the files correctly, there is a small include (for all OS).
Link: PathHelper v1.04.2

To use CocoaMessage there are many examples here in the forum, or you can look at the Objective-C examples.
Here it is sometimes difficult to find the right method name or parameter. For this purpose, I have written an include with which you can display the methods, the super methods and parameters.
Link: Dump Objects Methods

That should be enough for now. Otherwise just ask here in the forum ;)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply