Many attributes require more than strings, numbers, booleans or instance of other classes. So here they are.
Wraps NSColor. Creates an initialized color instance with the supplied RGBA values. Expected values are floats between 0.0 and 1.0, but if you feed it integers, it will assume a 0-255 range and will divide values by 255.
Parameters: |
|
---|
Wraps NSFont. Creates a font with the specified family, size and traits. family can be one of the constants or directly a font family name. Same thing for size. The traits is a list of constants (example: [FontTrait.Bold, FontTrait.Italic]).
The Action class doesn’t wrap any particular Cocoa class, but is a structure that is used as an argument of widgets’ action attribute.
The target argument is the same as Cocoa’s setTarget:. It can be the owner, NSApp, any other object reference. If you want to mimic XIB’s “First Responder”, set the target to None.
The selector argument is the selector name, which is a simple string. For example, "fooAction:" is the equivalent of @selector(fooAction:).