Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

CFObjectMBS.close
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 4.1 Yes No No Yes, macOS only No
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.

Feedback, Comments & Corrections

CFObjectMBS.DeepCopy 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: Creates a deep copy of the CFObject.
Notes: Copies all sub objects if the Object has sub objects (like the Dictionary).

Feedback, Comments & Corrections

CFObjectMBS.EncodedData as MemoryBlock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 17.1 Yes No No Yes, macOS only No
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.

Feedback, Comments & Corrections

CFObjectMBS.Equal(o 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: Returns true if both CFObjects are equal in type and content.

Feedback, Comments & Corrections

CFObjectMBS.ReleaseObject
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Decreases the retain count of this object.
Notes: If the retain count falls below 1, the object is destroyed.

Feedback, Comments & Corrections

CFObjectMBS.RetainCount 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: Returns the reference counter of the object.
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"
Notes: If the retain count falls below 1, the object is destroyed.

Feedback, Comments & Corrections

CFObjectMBS.RetainObject
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Increases the retain count of this object.
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
Notes: If the retain count falls below 1, the object is destroyed.

Feedback, Comments & Corrections

CFObjectMBS.XML as CFBinaryDataMBS
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 content of the object and all subobjects as a XML file content.
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
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.

Feedback, Comments & Corrections

CFObjectMBS.XMLdata as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 19.0 Yes No No Yes, macOS only No
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.

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