I need to make a small change to a function in a macruby project. In particular I need to print 2 copies of a document, instead of one.
I'm a complete macruby (and objective C/cocoa) noob and have no idea how to do this.
I have a print_settings
variable via print_settings = NSPrintInfo.alloc.init
, and I need to set the NSPrintCopies
key to have a value of 2. How do I do this?!
In objective C, I think the relevant code is:
print_settings_dict = (NSMutableDictionary*)[print_settings dictionary];
[print_settings_dict setObject:[NSNumber numberWithInt:1] forKey:NSPrintCopies];
How do I do this in macruby?
Thanks
Figured it out: