1
0
Fork 1
mirror of https://github.com/wezm/wezm.net.git synced 2024-12-23 12:39:53 +00:00
wezm.net/drafts/adding-caffeine-porting-cocoa-to-cappuccino.html
Wesley Moore 902521db9b Move drafts out of content
To stop them showing up in the articles list.
2016-09-29 21:46:50 +10:00

14 lines
559 B
HTML

Translate foundation from NS to CP
No pointers so lose the *
Local variables are not typed, so just declare then with var
No properties so convert dot notation to method calls
No synthesize but can add @accessors to ivars to create basic accessor methods
#pragma's don't work and cause syntax errors
No header files, just put it all in the j file
#import becomes @import
CGPointZero, CGRectZero -> CGMakePointZero(), CGMakeRectZero()
TextMate regexes to convert properties to method calls:
Find: (\s*)([^.]+)\.([^ ]+) = ([^;]+);
Replace: $1[$2 set\u$3:$4];