//Obj-C, which is working in my test app
[myButton setAction:@selector(buttonPressed)];
-(void)buttonPressed {
NSLog(@"Button pressed!");
}
//JSTalk, which is not working in my Sketch plugin
myButton.action = 'buttonPressed'
function buttonPressed() {
log("Button pressed!");
}
I'm working on a Sketch plugin, where I'm trying to convert the following code from Obj-C to JSTalk. I have an NSButton, and am trying to run the buttonPressed method when the button is pressed. I feel like I'm missing something super simple? Thanks in advance for any help!
--
You received this message because you are subscribed to the Google Groups "JSTalk Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jstalk-dev+...@googlegroups.com.
To post to this group, send email to jstal...@googlegroups.com.
Visit this group at http://groups.google.com/group/jstalk-dev.
For more options, visit https://groups.google.com/d/optout.
With Dux I added a class to CocoaScript/JSTalk called "COTarget" that allows this kind of stuff.