Platforms to show: All Mac Windows Linux Cross-Platform
CFObjectMBS.close
Function:
The destructor.
Notes: There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.
CFObjectMBS.DeepCopy as CFObjectMBS
Function:
Creates a deep copy of the CFObject.
Notes: Copies all sub objects if the Object has sub objects (like the Dictionary).
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Copies all sub objects if the Object has sub objects (like the Dictionary).
CFObjectMBS.EncodedData as MemoryBlock
Function:
Returns the content of the object and all subobjects as a binary encoded plist file content.
Notes:
Returns nil on any error. For example if you have CFDictionary with keys not being CFStringMBS objects.
You can write this to a plist file.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes:
Returns nil on any error. For example if you have CFDictionary with keys not being CFStringMBS objects.
You can write this to a plist file.
CFObjectMBS.Equal(o as CFObjectMBS) as boolean
Function:
Returns true if both CFObjects are equal in type and content.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CFObjectMBS.ReleaseObject
Function:
Decreases the retain count of this object.
Notes: If the retain count falls below 1, the object is destroyed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: If the retain count falls below 1, the object is destroyed.
CFObjectMBS.RetainCount as Integer
Function:
Returns the reference counter of the object.
Example:
Notes:
If the retain count falls below 1, the object is destroyed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Example:
dim o as CFObjectMBS
dim s as CFStringMBS
s=NewCFStringMBS("Hello")
MsgBox "s has "+str(s.RetainCount)+" refs in CF"
o=s
MsgBox "o has "+str(o.RetainCount)+" refs in CF"
o.RetainObject
MsgBox "o has "+str(o.RetainCount)+" refs in CF"
o.ReleaseObject
MsgBox "o has "+str(o.RetainCount)+" refs in CF"
o.Close
MsgBox "o has "+str(o.RetainCount)+" refs in CF"
CFObjectMBS.RetainObject
Function:
Increases the retain count of this object.
Example:
Notes:
If the retain count falls below 1, the object is destroyed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Example:
Function CFDateFromCFObject(o as cfobjectMBS) As cfdateMBS
dim d as CFDateMBS
if o<>nil then
if o.Type=kCFDateMBSTypeID then
d=new CFDateMBS
d.Handle=o.Handle
d.RetainObject
end if
end if
Exception
End Function
CFObjectMBS.XML as CFBinaryDataMBS
Function:
Returns the content of the object and all subobjects as a XML file content.
Example:
Notes:
Returns nil on any error. For example if you have CFDictionary with keys not being CFStringMBS objects.
You can write this to a plist file.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Example:
// Save a dictionary in a XML file:
dim d as CFMutableDictionaryMBS
dim f as FolderItem
dim t as TextOutputStream
// Create dictionary
d=NewCFMutableDictionaryMBS
// Fill dictionary
d.Add NewCFStringMBS("Key"),NewCFStringMBS("Value")
// get file name
f=GetFolderItem("CF XML Test.txt")
// create file
t=f.CreateTextFile
// Write XML
t.Write d.XML.Str
// close file
t.Close
Returns nil on any error. For example if you have CFDictionary with keys not being CFStringMBS objects.
You can write this to a plist file.
CFObjectMBS.XMLdata as String
Function:
Returns the content of the object and all subobjects as a XML file content.
Notes:
Returns empty string on any error. For example if you have CFDictionary with keys not being CFStringMBS objects.
You can write this to a plist file.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreFoundation | MBS MacCF Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes:
Returns empty string on any error. For example if you have CFDictionary with keys not being CFStringMBS objects.
You can write this to a plist file.
The items on this page are in the following plugins: MBS MacCF Plugin.
Feedback: Report problem or ask question.
