Size: 519
Comment:
|
Size: 1013
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 19: | Line 19: |
== Callbacks == {{{#!highlight objectivej @implementation TestObject : CPObject { } -(void)helloWorld{ CPLogConsole("Called hello world"); } //-------------------- var selectorHelloWorld = @selector(helloWorld) ; var signature = [self methodSignatureForSelector: aSelector]; var invocation = [CPInvocation invocationWithMethodSignature:signature]; [invocation setSelector: selectorHelloWorld]; [invocation invokeWithTarget: self]; //self -> instance of TestObject }}} |
Cappuccino
Cappuccino is a framework which makes it easy to create advanced web apps. http://www.cappuccino-project.org/
Objective-J is a powerful object-oriented language which compiles to run in the browser.
Init String, CPString
Mutable Array
Callbacks
1 @implementation TestObject : CPObject
2 {
3 }
4
5 -(void)helloWorld{
6 CPLogConsole("Called hello world");
7 }
8
9 //--------------------
10 var selectorHelloWorld = @selector(helloWorld) ;
11 var signature = [self methodSignatureForSelector: aSelector];
12 var invocation = [CPInvocation invocationWithMethodSignature:signature];
13 [invocation setSelector: selectorHelloWorld];
14 [invocation invokeWithTarget: self]; //self -> instance of TestObject
15