Difference between revisions of "Talk:FPC PasCocoa"

From Free Pascal wiki
Jump to navigationJump to search
(Obj C & Cocoa intro and ObjC MM submission idea)
 
Line 1: Line 1:
 +
There is interest in expanding support in FPC for coding applications for the Macintosh platform which can incorporate the Cocoa framework.  Some work has already been accomplished in this area and some other discussions have begun weighing potential compiler support.  This wiki page is an attempt to summarize the discussions and issues surrounding the support and implementation concerns.  The intent is to maintain this page as an up to date reference for open and resolved issues so avoid repetitive questions and having to wade through previous mailing list posts.
 +
 +
If you are able to absolutely clarify or add to anything written on this page, please go ahead and make any corrections or additions directly on this page.  If you are unsure of anything, please post your thoughts or questions to the MacPascal mailing list or add them to the "Discussion" page for this article.  If you think something is missing in this page, go ahead and add it as an underlined/red question and notify the mailing list of it and hopefully someone or yourself will enter the appropriate text (deleting the question from the page in the process.)  If this seems to be too many guidelines they are only meant to facilitate things and keeping some semblance of order and not meant to get in the way of getting things done :)  If anyone can improve the process, feel free to voice their constructive opinion :)
 +
 +
Everyone is welcome to participate.  Thank you for your interest and support of this project.
 +
 +
to subscribe to the MacPascal mailing list :  http://lists.sonic.net/mailman/listinfo/mac-pascal
 +
 +
to post a message to the mailing list : Mac-Pascal@listman.sonic.net
 +
 +
 +
'''Goals'''
 +
 +
[[Can someone summarize the goals of what are (and are not) being discussed currently?]] 
 +
 +
* Compiler support to make it easier and more transparent for  declaring and implementing an FPC Class to map to an Objective C Class. (2.0 Bindings)
 +
 +
* A new RTL interface unit containing a number of basic/useful Objective C Classes (which would expand as effort permits) [[***]]
 +
 +
* Interface Builder Support - NOT
 +
 +
* Objective C 1.0 bindings - NOT
 +
 +
*[[*** Are we talking about just implementing single calls or are we shooting for semi full framework support so one can use Cocoa event and window handling?]]
 +
 +
[[ Any more goals?]]
 +
 +
 +
 +
How does anything here affect the existing PasCocoa with Objective C 1.0 binding work?
 +
 +
 +
 +
 
How about adding a section like this?  
 
How about adding a section like this?  
  

Revision as of 05:14, 8 March 2009

There is interest in expanding support in FPC for coding applications for the Macintosh platform which can incorporate the Cocoa framework. Some work has already been accomplished in this area and some other discussions have begun weighing potential compiler support. This wiki page is an attempt to summarize the discussions and issues surrounding the support and implementation concerns. The intent is to maintain this page as an up to date reference for open and resolved issues so avoid repetitive questions and having to wade through previous mailing list posts.

If you are able to absolutely clarify or add to anything written on this page, please go ahead and make any corrections or additions directly on this page. If you are unsure of anything, please post your thoughts or questions to the MacPascal mailing list or add them to the "Discussion" page for this article. If you think something is missing in this page, go ahead and add it as an underlined/red question and notify the mailing list of it and hopefully someone or yourself will enter the appropriate text (deleting the question from the page in the process.) If this seems to be too many guidelines they are only meant to facilitate things and keeping some semblance of order and not meant to get in the way of getting things done :) If anyone can improve the process, feel free to voice their constructive opinion :)

Everyone is welcome to participate. Thank you for your interest and support of this project.

to subscribe to the MacPascal mailing list : http://lists.sonic.net/mailman/listinfo/mac-pascal

to post a message to the mailing list : Mac-Pascal@listman.sonic.net


Goals

Can someone summarize the goals of what are (and are not) being discussed currently?

  • Compiler support to make it easier and more transparent for declaring and implementing an FPC Class to map to an Objective C Class. (2.0 Bindings)
  • A new RTL interface unit containing a number of basic/useful Objective C Classes (which would expand as effort permits) ***
  • Interface Builder Support - NOT
  • Objective C 1.0 bindings - NOT

Any more goals?


How does anything here affect the existing PasCocoa with Objective C 1.0 binding work?



How about adding a section like this?

Objective C & Cocoa Information

---maybe a paragraph or two on how Objective C declares classes,objects and methods. Then maybe a paragraph on the Cocoa framework and an example of a typical Cocoa class in Obj C. ?

Then some links to more detailed ObjC/Cocoa information --snipped from the mailing list


http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html

Everyone going into Cocoa pogramming would be well served reading this guide. The Cocoa class reference is in great majority of cases silent about what you are expected to do with regards to object ownership with instances that you obtain from the system, since authors expected us to read and understand above document. Only exceptions are documented. Sorry about sounding obnoxious, but on cocoa-dev mailing list there are at least 2 threads every month about crashes or leaks, because people didn't read, or have just skimped this guide. nice reading, - Gorazd


For all that are working with Cocoa it is mandatory to review:

http://www.stepwise.com/Articles/Technical/2001-03-11.01.html

http://www.stepwise.com/Articles/Technical/HoldMe.html

Despite it is written in 2001, it is still a relevant document describing memory management rules and owneship of objects that are valid unless you use Objective-C garbage collection. -Gorazd


And general ObjC and Cocoa Documentation? -- suggestions welcome :)

http://developer.apple.com/documentation/Cocoa/ObjectiveCLanguage-date.html

http://developer.apple.com/referencelibrary/API_Fundamentals/Cocoa-fund-date.html

http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/chapter_2_section_1.html#//apple_ref/doc/uid/TP40002974-CH3