Development for Cocoa is underway!

Mac OSX specific forum
User avatar
TI-994A
Addict
Addict
Posts: 2791
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Development for Cocoa is underway!

Post by TI-994A »

void wrote:Seeing things like that is very horribly distressing, and pretty much exactly why I tend to avoid most programming languages.
void wrote:I agree with your first sentence in principle but in practice I suffer from severe cognitive barriers regarding syntax-heavy languages.
Well said. Regardless of how many different languages we know, we'll always have a well-versed favourite; and mine is PureBasic.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
spacebuddy
Enthusiast
Enthusiast
Posts: 364
Joined: Thu Jul 02, 2009 5:42 am

Re: Development for Cocoa is underway!

Post by spacebuddy »

Any news on the status of the Coco version of PB? :D
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: Development for Cocoa is underway!

Post by J. Baker »

spacebuddy wrote:Any news on the status of the Coco version of PB? :D
Talked to Fred recently about another topic but he did give an update on its status and said, "...which is growing nicely btw". So it sounds like all is going well. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Development for Cocoa is underway!

Post by Polo »

J. Baker wrote:
spacebuddy wrote:Any news on the status of the Coco version of PB? :D
Talked to Fred recently about another topic but he did give an update on its status and said, "...which is growing nicely btw". So it sounds like all is going well. ;)
That's good news! :)
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Development for Cocoa is underway!

Post by Polo »

Any news on the current state of the Cocoa update? :)
I must say I'm itching to test it! :)
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Development for Cocoa is underway!

Post by Fred »

Almost ready :). Here is a screenshot of the Cocoa'ified IDE:

http://www.purebasic.com/Cocoa.png
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Development for Cocoa is underway!

Post by srod »

Wow, how many Basic compilers 'out there' support OSX Cocoa?

This is fantastic. I cannot even begin to imagine how much work this has been for you and Timo Fred. Scares the life out of me even thinking about it!

btw, will we be able to call the Cocoa API's directly like we can the Win API or will we need to create appropriate c wrappers around objective C calls etc? Just wondering. :)
I may look like a mule, but I'm not a complete ass.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Development for Cocoa is underway!

Post by Polo »

Brilliant Fred, thanks!!

Did you think about adding a flag so we can use Lion's fullscreen windows? I love using it on Itunes, Chrome and such and I'd love my app to be able to do that as well! :)
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Development for Cocoa is underway!

Post by Fred »

That's really a lot of work, but it was fun to do (except some quirks here and here).

It's not possible to call directly objective C call as WinAPI, as it's not really calls, but messages. And the syntax doesn't fit regular API calls. The best for now is to do tiny C wrappers and use ImportC , that's how I did for the IDE and it works well. That said, wilbert wrote an objectiveC wrapper for PB to do some call: http://www.purebasic.fr/english/viewtop ... bjective+C

About the flag, it's not planned for now, but it should be doable via a C call
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Development for Cocoa is underway!

Post by Polo »

Fred wrote:About the flag, it's not planned for now, but it should be doable via a C call
Oh ok, I'll do that then when a beta is released :)
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Development for Cocoa is underway!

Post by Polo »

As you probably have Xcode opened right now ( :twisted: ) would it be possible to have OSX standard status bar (like iTunes for instance, ie darker than the current PB Carbon ones)?

(sorry about all these questions, I'm so excited about PB Cocoa :) )
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Development for Cocoa is underway!

Post by srod »

Fred wrote:It's not possible to call directly objective C call as WinAPI, as it's not really calls, but messages. And the syntax doesn't fit regular API calls. The best for now is to do tiny C wrappers and use ImportC , that's how I did for the IDE and it works well.
Right, best continue working through the ObjectiveC text books then. Must admit that I like ObjC, I like it a lot. A close 2nd to PB of course!
I may look like a mule, but I'm not a complete ass.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Development for Cocoa is underway!

Post by fsw »

srod wrote:Wow, how many Basic compilers 'out there' support OSX Cocoa?
As far as I know there is RealBasic (uses a VM) and Objective-Basic (creates Objective-C files).

IMHO PureBasic is the best.
Really looking forward to the PureBasic beta. 8)

I am to provide the public with beneficial shocks.
Alfred Hitshock
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Development for Cocoa is underway!

Post by Polo »

There's Blitzmax as well, though I'm not sure it's updated anymore.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Development for Cocoa is underway!

Post by wilbert »

Fred wrote:That said, wilbert wrote an objectiveC wrapper for PB to do some call
For simple message sending, things can also be done using imports.
I did this example http://www.purebasic.fr/english/viewtop ... 19&t=48917 using imports only.

For those interested in how things work, this explains some low level functions
https://developer.apple.com/library/mac ... rence.html

@Fred, maybe you could consider updating this list when the Cocoa version is released
http://www.purebasic.fr/blog/?p=336 ( API Programming: What’s behind the PB GUI objects )
It would be great to know what kind of objects are used and how to get a reference to the object.
For the WebGadget for example, it would be very helpful to be able to get the WebView object to send messages to.
Post Reply