Page 1 of 3

Development for Cocoa is underway!

Posted: Fri May 25, 2012 2:15 pm
by TI-994A
Great news from the PureBasic blog: they have started work on extending the PureBasic OSX compiler to support the Cocoa framework, and so far, they "are on track and making great progress."

Good luck guys!

Re: Development for Cocoa is underway!

Posted: Fri May 25, 2012 2:33 pm
by jesperbrannmark
Wonderful story on the progress. Like a lot of things in life, when it seems like a simple task it can get pretty comprehensive.

The winner of all systems is Purebasic, here is the proof:
ScrollAreaGadget
Carbon: 487 lines
Cocoa: 163 lines
Purebasic: 1 line :wink:
etc etc...

Re: Development for Cocoa is underway!

Posted: Fri May 25, 2012 3:56 pm
by Foz
Hmmm, I would imagine that 4.70 for Windows & Linux will just be mostly bug fixes, as a whole new architecture (osx64!) will be added.

Then 4.71 would be *more* bug fixes (though focusing on the new Mac bugs)

By the time we get to 4.80 we'll be bug free :mrgreen:

Re: Development for Cocoa is underway!

Posted: Fri May 25, 2012 4:40 pm
by Polo
Brilliant! May I suggest, if Fred's reading, to add support for the iOS-like scrollbars for ScrollbarGadget?
That's now a standard on Lion and an app without it looks weird.

Can't wait to see the result of Freak and Fred's work! :)

Re: Development for Cocoa is underway!

Posted: Fri May 25, 2012 4:59 pm
by TI-994A
Foz wrote:By the time we get to 4.80 we'll be bug free
Unless you prefer Microsoft's way:
Bill Gates wrote:There are no significant bugs in our released software that any significant number of users want fixed... The reason we come up with new versions is not to fix bugs. It's absolutely not. It's the stupidest reason to buy a new version I ever heard... And so, in no sense, is stability a reason to move to a new version. It's never a reason. (FOCUS Magazine Interview)
For a free-upgrade product, with a tested twelve-year record of bug-fixes and feature-updates, Fantaisie is doing great work and offering a great service to all of us.

That's commitment!

Re: Development for Cocoa is underway!

Posted: Fri May 25, 2012 5:36 pm
by USCode
Fred wrote:We don’t have that many user on OS X, as it still have nowaday a small user base compared to Windows ...
With Cocoa and 64bit support coming, this could change -- Perhaps what held PB back from growing a larger OS X user base was the lack of 64bit support, bugs, dated appearance of apps, etc.
This makes it tough to create competitive apps and thus discouraged OS X developers from using PB.

But now with the new PB OS X changes that are coming, this could all change in a hurry! :mrgreen:

Re: Development for Cocoa is underway!

Posted: Fri May 25, 2012 6:31 pm
by Polo
Especially now that many people are switching to OSX due to the nonsense decisions microsoft has made (including the useless metro thing...)

Re: Development for Cocoa is underway!

Posted: Fri May 25, 2012 10:21 pm
by spacebuddy
This is awesome news. Thanks to the PB team.

Re: Development for Cocoa is underway!

Posted: Sat May 26, 2012 9:48 am
by Fred
Polo wrote:Brilliant! May I suggest, if Fred's reading, to add support for the iOS-like scrollbars for ScrollbarGadget?
That's now a standard on Lion and an app without it looks weird.

Can't wait to see the result of Freak and Fred's work! :)
What do you mean by "iOS-like scrollbars" ?

Re: Development for Cocoa is underway!

Posted: Sat May 26, 2012 10:43 am
by Polo
Rubber band scrollbars (only on lion or higher), the ones that are always hidden unless you perform a mouse scroll (provided the option is activated). There is documentation on the apple dev website I think.

Re: Development for Cocoa is underway!

Posted: Wed May 30, 2012 10:14 pm
by fsw
USCode wrote:
Fred wrote:We don’t have that many user on OS X, as it still have nowadays a small user base compared to Windows ...
With Cocoa and 64bit support coming, this could change...
I suppose if Apple doesn't do stupid stuff the OSX user base will grow and PureBasic will benefit from it either way (with 32 or 64 bit PB).

The reason for that is Windows 8 :shock:

Windows users will stay with WinXP/Win7 as long as they can and when the PC hardware dies they will buy a Mac.

That's what I did :mrgreen:

Re: Development for Cocoa is underway!

Posted: Thu May 31, 2012 12:30 pm
by void
This seems like as good a place as any to comment on this bit I saw in the blog post:

Code: Select all

    [[[NSTabView alloc] initWithFrame:NSMakeRect(x, y, Width, Height)] autorelease]
Seeing things like that is very horribly distressing, and pretty much exactly why I tend to avoid most programming languages.


That comment aside, I am very much looking forward to the Cocoa build of PureBasic. I have many Mac users, and being able to support them properly will be very welcome.

Re: Development for Cocoa is underway!

Posted: Thu May 31, 2012 12:49 pm
by gekkonier
This line is pretty much selfexplanatory. And with intellisense you write this line in about 3 secs ;)

In Objective C square brackets encloses messages send to objects or classes.
Par example:

Code: Select all

[myCar wash]
means the Instance named myCar of needs to be washed. myCar, look how it's done and do it!

Code: Select all

[myCar wash:withSoapNr(2)]
named parameters to messages...

So you have here:

Code: Select all

[[[NSTabView alloc] initWithFrame:NSMakeRect(x, y, Width, Height)] autorelease]
just read ist. The names of parameters, messages and keywords are chosen in a matter that everyone should get it.
You will get as a result an object of NSTabView (memory will be allocated), wich uses a designated initialization (initWithFrame stuff), wich will handlet by gc. Its just a longer and detailed form of "[NSTabView new]", but with more detailed features.

But you can also choose dot syntax like
myCar.wash if you want. But i prefer to use brackets, because you could easily misinterpret dot syntax as structures.

It's always good to learn more than one language. I started seriously with Ruby and Purebasic. Later on, with D, Scala, Python, C and Objective-C you will come back to purebasic and do coding a lot different than before. Because you know more patterns. My next thing to learn will be functional programming, but not sure wich language to choose.

Re: Development for Cocoa is underway!

Posted: Thu May 31, 2012 2:20 pm
by void
gekkonier wrote:It's always good to learn more than one language. I started seriously with Ruby and Purebasic. Later on, with D, Scala, Python, C and Objective-C you will come back to purebasic and do coding a lot different than before. Because you know more patterns.
I agree with your first sentence in principle but in practice I suffer from severe cognitive barriers regarding syntax-heavy languages. I cannot work well in them, and I cannot work in object oriented languages. Syntax-heavy object oriented languages are simply impossible for me.

That said, I have worked extensively with quite a number of languages: C, Pascal (Turbo era), Logo, several variants of Forth, Erlang, some 8-bit Assembly languages, and obviously PureBasic (previously Applesoft BASIC and other variants). I have trouble with even some of these. Not I do not understand them, but I have trouble shaping my thoughts when it comes to using them for anything significant. Again, cognitive barriers.
gekkonier wrote:My next thing to learn will be functional programming, but not sure wich language to choose.
For functional programming I would strongly recommend erlang if you have any expectation of non-trivial cross-platform work. Haskell has a lot of interesting features at the language level but their windows port (for instance) has a lot of problems that can render it unusable for many tasks.

Re: Development for Cocoa is underway!

Posted: Thu May 31, 2012 2:49 pm
by wilbert
I had to learn Objective C when I wanted to code for iOS.
At first it looked very complicated with those square brackets but it only took a little while to get used to it.
Once I got used to it it made a lot of sense. :)