Am 13.10.2014 um 11:15 schrieb Jean-Luc Arnaud <[email protected]>:
> Thanks, Christian.
>
> I'm able to get the info I need after converting CFDictionaryMBS to Xojo
> Dictionary.
> Is there a way to convert only CFDictionaryMBS.Value (As CFObjectMBS)
> directly to String? I don't catch the mecanism...
There is a better example:
// info for boot volume
dim info as CFDictionaryMBS = volume(0).DarwinMediaInfoMBS
if info = nil then
beep // error
else
CFShowMBS info // show in console
dim RemovableKey as CFStringMBS = NewCFStringMBS("Removable")
dim RemovableCFO as CFObjectMBS = info.Value(RemovableKey)
dim RemovableCFB as CFBooleanMBS = CFBooleanMBS(RemovableCFO)
dim Removable as Boolean = RemovableCFB.Value
MsgBox "Removable: "+str(Removable)
dim EjectableKey as CFStringMBS = NewCFStringMBS("Ejectable")
dim EjectableCFO as CFObjectMBS = info.Value(EjectableKey)
dim EjectableCFB as CFBooleanMBS = CFBooleanMBS(EjectableCFO)
dim Ejectable as Boolean = EjectableCFB.Value
MsgBox "Ejectable: "+str(Ejectable)
dim SizeKey as CFStringMBS = NewCFStringMBS("Size")
dim SizeCFO as CFObjectMBS = info.Value(SizeKey)
dim SizeCFN as CFNumberMBS = CFNumberMBS(SizeCFO)
dim Size as double = SizeCFN.doubleValue / 1000000000.0
MsgBox "Size: "+str(Size, "0.0")+" GB"
end if
or you use the dictionary method of CFDictionaryMBS to get a normal Xojo
dictionary and work with that.
Sincerely
Christian
--
Read our blog about news on our plugins:
http://www.mbsplugins.de/
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info