MacOS problems

Just starting out? Need help? Post your questions and find answers here.
RSrole
User
User
Posts: 35
Joined: Fri Apr 29, 2022 8:27 pm

MacOS problems

Post by RSrole »

I have some programs I've written in PB 6.0 for windows. All work as expected. But when I try to recompile with MacOS (Monterey 12.5.1) I get gadgets that are not initialized even though they're created by the Form Designer and there's a gadget number and I get fonts not initialized and (yes) there's a font number. The gadget is a Canvas and the font is Arial. Anyone run into this?
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: MacOS problems

Post by fsw »

In regards to the font:
The operating system tries to find the font based on the font name.
As far as I know, if the font is not available, the default font is used.

You could use something like:

Code: Select all

  CompilerSelect #PB_Compiler_OS
    CompilerCase #PB_OS_Windows
      ; some Windows specific font code
    CompilerCase #PB_OS_MacOS
      ; some Mac OS X specific font code
  CompilerEndSelect
  
And with this load platform specific code with the correct font name.

I have the Arial font on my Mac, but I do not remember if it comes with macOS or if I installed it... :oops:

I am to provide the public with beneficial shocks.
Alfred Hitshock
RSrole
User
User
Posts: 35
Joined: Fri Apr 29, 2022 8:27 pm

Re: MacOS problems

Post by RSrole »

Ok, so the problem was I was defining integer variables as .l and with the windows compilers that worked for either 32 bit or 64 bit. But in the 64 bit Mac compiler (I think latest mac os doesn't support 32 bit, but I could be wrong), things go bad. Changing all of the .l to .i fixed the crashing.
Post Reply