CoreFoundation: NewCFObjectMBS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

NewCFObjectMBS(handle as Integer) as CFObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a CFObjectMBS object for the given handle.
Example
dim d as CFMutableDictionaryMBS
dim s as CFStringMBS
dim o as CFObjectMBS
dim t as CFStringMBS

d=NewCFMutableDictionaryMBS
s=NewCFStringMBS("Hello")

d.Add s,s

o=d.Value(s) // uses NewCFObjectMBS internally

t=cfstringMBS(o) // Now you can cast here in v5.2!

MsgBox t.str

Handle is just a CFTypeRef.
If release is true, the destructor of the CFObjectMBS will release the handle later.
In Version 5.2 this function can return objects which may be casted to CFURL, CFDictionary, CFString, CFNumber, CFCharacterSet, CFBag, CFArray, CFBoolean, CFBinaryData or CFSet.

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


💬 Ask a question or report a problem