[Pyobjc-dev] Using global functions and constants?
Brought to you by:
ronaldoussoren
|
From: Orestis M. <or...@or...> - 2008-02-02 23:14:32
|
Hello,
I'm trying to use IOBluetooth and IOBluetoothUI. I've figured out
using the Obj-C part (using objc.loadBundle) but IOBluetooth uses some
external functions, like IOBluetoothNSStringToDeviceAddress in
IOBluetoothUtilities. I can't find a way to use this.
I've tried using gen_bridge_metadata but I get a compiler error.
Checking, I've seen that there is a IOBluetooth.bridgesupport file
inside the framework resources but it doesn't contain the above
function. After looking around, I've tried using a constant it *does*
contain, ie kBluetoothFeatureEncryption, but Python still can't find it.
I'm using:
import objc as _objc
_objc.loadBundle('IOBluetooth', globals(),
bundle_path=u'/System/Library/Frameworks/IOBluetooth.framework')
in IOBluetooth.py and
from IOBluetooth import *
in my main class.
The documentation on wrapping global functions/constants is *severely*
lacking, so any help appreciated :)
--
Orestis Markou
or...@or...
http://orestis.gr/
|