Yss
Yss

Reputation: 111

Native JavaScript code in Objective-J

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");

Upvotes: 0

Views: 65

Answers (1)

Martin Carlberg
Martin Carlberg

Reputation: 66

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?

Upvotes: 1

Related Questions