I'm afraid there is no other way currently than wrapping this API in ObjC as 
John suggested.

We are working on a better BridgeSupport system but it won't be available soon.

Laurent

On Jul 2, 2010, at 10:34 PM, John Labovitz wrote:

> Depending on what you need to do, you should check out 
> IXSCNotificationManager, an ObjC wrapper around parts of SC.  I've used it a 
> few times and it's quite helpful, and obviously an better impedance match to 
> MacRuby code.  It's mentioned & linked here:
> 
>       http://www.cocoadev.com/index.pl?NotificationOnNewNetwork
> 
> --John
> 
> 
> 
> On 2 Jul 2010, at 8:03 PM, Michael Jackson wrote:
> 
>> Not sure yet. The whole framework is a bit of a mess from my point of
>> view. I need to be able to tinker a bit in order to figure out how to
>> use it. ;)
>> 
>> I'd probably start with the SCNetworkConfiguration and SCDynamicStore API's.
>> 
>> --
>> Michael Jackson
>> http://mjijackson.com
>> @mjijackson
>> 
>> 
>> 
>> On Fri, Jul 2, 2010 at 5:09 PM, Thibault Martin-Lagardette
>> <[email protected]> wrote:
>>> Which specific inline function are you trying to use?
>>> 
>>> --
>>> Thibault Martin-Lagardette
>>> 
>>> 
>>> 
>>> On Jul 2, 2010, at 15:44, Michael Jackson wrote:
>>> 
>>>> It's complaining that there aren't any inline functions in the
>>>> SystemConfiguration framework. This is the command I ran and the
>>>> output I received:
>>>> 
>>>> $ gen_bridge_metadata -f
>>>> /System/Library/Frameworks/SystemConfiguration.framework -F dylib -o
>>>> SystemConfiguration.dylib
>>>> No inline functions in the given framework/library, no need to generate a 
>>>> dylib.
>>>> 
>>>> However, this doesn't make any sense to me. The documentation clearly
>>>> lists lots of inline functions. C isn't my best language, so maybe I'm
>>>> misunderstanding something...
>>>> 
>>>> --
>>>> Michael Jackson
>>>> http://mjijackson.com
>>>> @mjijackson
>>>> 
>>>> 
>>>> 
>>>> On Fri, Jul 2, 2010 at 4:23 PM, Thibault Martin-Lagardette
>>>> <[email protected]> wrote:
>>>>> To use inline C function you need to generate a dylib using 
>>>>> gen_bridge_metatada.
>>>>> If you do `man gen_bridge_metadata`, you'll see:
>>>>> 
>>>>>> If the custom framework has inline functions and you want to be able to 
>>>>>> call them, here is how you can generate a ``dylib'' file:
>>>>>>    gen_bridge_metadata -f /Path/To/YourFramework.framework -F dylib -o 
>>>>>> /Path/To/YourFramework.framework/Resources/BridgeSupport/YourFramework.dylib
>>>>> 
>>>>> Then you just need to require the generated dylib :-)
>>>>> 
>>>>> It looks like this corresponds to what you want to do? :-)
>>>>> 
>>>>> --
>>>>> Thibault Martin-Lagardette
>>>>> 
>>>>> 
>>>>> 
>>>>> On Jul 2, 2010, at 14:49, Michael Jackson wrote:
>>>>> 
>>>>>> How exactly does one go about using the SystemConfiguration framework
>>>>>> in MacRuby?
>>>>>> 
>>>>>> http://developer.apple.com/mac/library/documentation/Networking/Reference/SysConfig/index.html
>>>>>> 
>>>>>> When I try "framework 'SystemConfiguration'" it returns true, but none
>>>>>> of the inline C functions are available. From the reading I've done,
>>>>>> it seems that static C libraries like SystemConfiguration should be
>>>>>> loaded via a BridgeSupport file, but I have no idea how to generate
>>>>>> one in this case.
>>>>>> 
>>>>>> --
>>>>>> Michael Jackson
>>>>>> http://mjijackson.com
>>>>>> @mjijackson
>>>>>> _______________________________________________
>>>>>> MacRuby-devel mailing list
>>>>>> [email protected]
>>>>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>>> 
>>>>> _______________________________________________
>>>>> MacRuby-devel mailing list
>>>>> [email protected]
>>>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>>> 
>>>> _______________________________________________
>>>> MacRuby-devel mailing list
>>>> [email protected]
>>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> 
>>> _______________________________________________
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> 
>> _______________________________________________
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to