Page 1 of 2

Re: Programming on the Mac platform

Posted: Tue Mar 08, 2011 11:24 pm
by freak
Andre wrote:@Shardik: thanks for your effort and the offer with the table :o)

But before I change the help, there is needed an official statement by the developers Fred / Timo. E.g. if they want such extensions in the help, if they will add (by workarounds...) mure functionality about the colors, etc.
I don't think there will be many changes in this area anymore (at least not until the day we switch to Cocoa as the underlying framework). So feel free to update the help accordingly.

> Hint to Andre: it would be nice if you could integrate this table into the help files. Please send me a PM if you are interested...

Don't add that table. Add a note in the topic for each function instead.

Re: Programming on the Mac platform

Posted: Wed Mar 09, 2011 10:00 pm
by Shardik
freak wrote:I don't think there will be many changes in this area anymore (at least not until the day we switch to Cocoa as the underlying framework).
Timo,

I fully understand that there won't be many changes implemented in the
current Mac version of PB with its Carbon framework base. But do you
already have any plans in which PB version the porting from Carbon to
Cocoa will happen? I know that this task will take a lot of work because
all Gadgets will have to be reprogrammed and adapted to utilize the object
oriented Cocoa framework. In principle I would guess that this is almost as
much work as to develop a new Mac version of PureBasic from scratch...

Do you already know whether Carbon support will be ended completely or
will there exist a possibility to chose Carbon as an alternate subsystem? :)
freak wrote:Don't add that table. Add a note in the topic for each function instead.
That would be indeed the most user friendly solution... :wink:

Re: Programming on the Mac platform

Posted: Sun Feb 12, 2012 10:27 pm
by Andre
Informations about (restricted) coloring possibilities on MacOS were added to the manual, for PB4.61... :)

Re: Programming on the Mac platform

Posted: Thu Feb 21, 2013 8:28 am
by Lebostein
This thread is pinned and seems to be important.

All these facts are correct also in the current version 5.10? Both listings (limitations and gadget colors) are from the year 2011 (PB version 4.6)...
Thanks!

Re: Programming on the Mac platform

Posted: Thu Feb 21, 2013 11:57 am
by Fred
No, it's no more accurate as we switched to Cocoa inbetween.

Re: Programming on the Mac platform

Posted: Thu Feb 21, 2013 4:53 pm
by Shardik
Lebostein wrote:All these facts are correct also in the current version 5.10?
The limitations in the coloring of gadgets only apply if selecting subsystem Carbon. So SetGadgetColor() should work fine for all gadgets listed in the help for that command when using the Cocoa framework (default since PB 5.00).

Re: Programming on the Mac platform

Posted: Sat Aug 29, 2015 2:41 pm
by collectordave
Just stating out.

i have written a small program to display a splash screen using a .png image in an image gadget.

Works fine on windows 7. Moved whole thing to MAC and program runs but no image is displayed in the image gadget. If I add image at design time as i add the image gadget it works. Code as follows

;Imports/Using statements
UsePNGImageDecoder()
UseSQLiteDatabase()

;Add binaries to exe section
DataSection
splash: :IncludeBinary "Images\WorldC.png"
EndDataSection

;Display Splash Screen
window_Splash = OpenWindow(#PB_Any,0,0,500,200,"",#PB_Window_BorderLess|#PB_Window_ScreenCentered)
image_Splash = CatchImage(#PB_Any, ?splash)
gadget_Image = ImageGadget(#PB_Any,0,0,500,200,ImageID(image_Splash))

Delay(3000)

;Close Splash Screen
CloseWindow(window_Splash)

Looked at forum, not extensively but any help appreciated

Re: Programming on the Mac platform

Posted: Sat Aug 29, 2015 2:53 pm
by collectordave
Quick update on the above.

When i create the executable .app the splash screen shows Ok! Just not when running in compile and run.

Re: Programming on the Mac platform

Posted: Sat Aug 29, 2015 3:36 pm
by TI-994A
collectordave wrote:...program runs but no image is displayed in the image gadget...
It seems that the Delay() function is the culprit. Remove it and the image displays.

Instead, try implementing a timer for the splash screen. :wink:

Re: Programming on the Mac platform

Posted: Sat Aug 29, 2015 4:28 pm
by collectordave
It Works!

Thanks possibly saved me hours.

Re: Programming on the Mac platform

Posted: Mon Sep 14, 2015 7:16 am
by collectordave
Using PB 5.4 Beta.

Programmed a small Print and preview routine that takes lines, text and images etc on a windows machine then moved to MAC to test. Drawing stopped each time. Problem was that the drawing functions stopped after displaying a requester either font or file.

Not a restriction more my problem in my thinking. Not many programmes ask you to choose the font for text to be printed at the time you are printing. So moved requester code to front before drawing routines.

Just a slight difference between Windows and OSX to be aware of.

Re: Programming on the Mac platform

Posted: Mon Nov 21, 2016 1:56 pm
by jack
MachOView is a visual Mach-O file browser. It provides a complete solution for exploring and in-place editing Intel and ARM binaries.

Re: Programming on the Mac platform

Posted: Tue Dec 06, 2016 8:36 pm
by collectordave
Thanks all

Just another question.

Moved one of my programmes to the Mac and found that sizes of gadgets seem to be different. e.g. a spin gadget on windows displays three figures i.e. hundreds etc but the same prog on the mac shows only two. I also have scrunched up text and string gadgets.

Is there a rule of thumb for sizing gadgets so they display the same on both platforms?

regards

cd