Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

CFArrayMBS.clone as CFArrayMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Creates a new immutable array with the values from the given array.
Notes: The values itself are not duplicated, but retained.

Feedback, Comments & Corrections

CFArrayMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 10.1 No No Yes Yes, Linux only No
Function: Creates a new editable array object.
Example:
dim b as new CFMutableArrayMBS

b.Append(NewCFStringMBS("Hello"))

MsgBox str(b.Count)

See also:

Feedback, Comments & Corrections

CFArrayMBS.Constructor(values() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 11.2 No No Yes Yes, Linux only No
Function: Creates a new CFArrayMBS object with CFString objects created from the given string array.
Example:
dim values() as string = array("Hello", "World", "Just", "a", "Test")
dim a as new CFArrayMBS(values)

MsgBox str(a.Count)+" elements"
MsgBox a.XML.Str // show as xml

See also:

Feedback, Comments & Corrections

CFArrayMBS.ContainsValue(value as CFObjectMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Reports whether or not the value is in the array.

Feedback, Comments & Corrections

CFArrayMBS.CountOfValue(value as CFObjectMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Counts the number of times the given value occurs in the array.

Feedback, Comments & Corrections

CFArrayMBS.Edit as CFMutableArrayMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Creates a new mutable array with the values from the current array.

Feedback, Comments & Corrections

CFArrayMBS.FirstIndexOfValue(value as CFObjectMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Searches the array for the value.
Notes:
Result:
The lowest index of the matching values, or -1 if no value matched.

Feedback, Comments & Corrections

CFArrayMBS.Item(index as Integer) as CFObjectMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Returns the entry with the given index.
Notes: Index from 0 to count-1.

Feedback, Comments & Corrections

CFArrayMBS.LastIndexOfValue(value as CFObjectMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Searches the array for the value.
Notes:
Result:
The lowest highest of the matching values, or -1 if no value matched.

Feedback, Comments & Corrections

CFArrayMBS.writeToFile(file as folderitem, useAuxiliaryFile as boolean) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 10.0 Yes No No Yes, macOS only No
Function: Writes the contents of the receiver to a file at a given path.
Example:
dim a as new CFMutableArrayMBS

a.Append NewCFStringMBS("Hello")
a.Append NewCFStringMBS("World")

dim f as FolderItem = SpecialFolder.Desktop.Child("test.xml")

if a.writeToFile(f, true) then
MsgBox "OK"
else
MsgBox "Failed"
end if

dim x as CFArrayMBS = CFArrayMBS.arrayWithContentsOfFile(f)
MsgBox x.XML.str
Notes:
file: The path at which to write the contents of the receiver.
useAuxiliaryFile: If true, the array is written to an auxiliary file, and then the auxiliary file is renamed to path. If false, the array is written directly to path. The true option guarantees that path, if it exists at all, won't be corrupted even if the system should crash during writing.

Returns true if the file is written successfully, otherwise false.

If the receiver's contents are all property list objects (NSString, NSData, NSArray, or NSDictionary objects), the file written by this method can be used to initialize a new array with the class method arrayWithContentsOfFile. This method recursively validates that all the contained objects are property list objects before writing out the file, and returns false if all the objects are not property list objects, since the resultant file would not be a valid property list.

Feedback, Comments & Corrections

CFArrayMBS.writeToURL(url as string, atomically as boolean) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 10.0 Yes No No Yes, macOS only No
Function: Writes the contents of the receiver to the location specified by a given URL.
Notes:
URL: The location at which to write the receiver.
atomically: If true, the array is written to an auxiliary location, and then the auxiliary location is renamed to aURL. If false, the array is written directly to aURL. The true option guarantees that aURL, if it exists at all, won't be corrupted even if the system should crash during writing.

Returns true if the location is written successfully, otherwise false.

If the receiver's contents are all property list objects (NSString, NSData, NSArray, or NSDictionary objects), the location written by this method can be used to initialize a new array with the class method arrayWithContentsOfURL.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo Plugins