Native JavaScript code in Objective-J

66 Views Asked by At

I just started developing with Cappuccino Framework and I wonder if it is possible to use native javascript code in Objective-J? I just tried to implement a simply alert(); in Objective-J code but it doesn't work at the browser...

var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
[label setStringValue:@"Hello World!"];
[label setFont:[CPFont boldSystemFontOfSize:24.0]];
alert("simple test");
1

There are 1 best solutions below

0
Martin Carlberg On BEST ANSWER

Objective-J is a superset of JavaScript. So native JavaScript is part of the Objective-J language.

Are you sure your code is being executed?