Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSColorListMBS class.

NSColorListMBS.colorWithKey(key as string) as NSColorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The color with the given key.

Returns nil if key doesn't exist.

NSColorListMBS.Create(name as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a color list; specify "" if you don't want a name.

Note that this does not add the color list to availableColorLists until the color list is saved into the user's path with writeToFile("").

See also:

NSColorListMBS.Create(name as string, path as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a color list; specify "" if you don't want a name.

Note that this does not add the color list to availableColorLists until the color list is saved into the user's path with writeToFile("").

See also:

NSColorListMBS.insertColor(theColor as NSColorMBS, key as string, index as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Inserts color at the specified location.

If a color by the same key is already in the list but at a different location it is removed from there.

NSColorListMBS.isEditable as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Whether this color list is editable.

True if it is editable.

NSColorListMBS.Load(name as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Loads the named color list from availableColorLists.

Returns true on success.

NSColorListMBS.name as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Name of the color list.

NSColorListMBS.removeColorWithKey(key as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Removes the color with the given key.

Does nothing if the key does not exist.

NSColorListMBS.removeFile

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
If the color list is in the user's path, removes the corresponding file in user's colorlists directory.

Also removes the color list from availableColorLists. If there are no outstanding references to the color list this might deallocate the object as well.

NSColorListMBS.setColor(theColor as NSColorMBS, key as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
If key already exists, sets the corresponding color; otherwise inserts the color at the end.

NSColorListMBS.writeToFile(path as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Drawing MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Writes the color list to the given path.

Use "" to save to the user's private colorlists directory. If the color list is named, this method will also insert the color list into availableColorLists.
Returns true for success.

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...