Re: [Pyobjc-dev] Loading Classes from Private Frameworks with objc.lookUpClass
Brought to you by:
ronaldoussoren
|
From: Georg S. <geo...@gm...> - 2015-05-06 19:10:23
|
Hi
I usually use NSClassFromString().
Georg
> Am 06.05.2015 um 12:42 schrieb Ronald Oussoren <ron...@ma...>:
>
>
>> On 06 May 2015, at 10:06, Robert Klep <rob...@gm...> wrote:
>>
>> Hey Eric,
>>
>> I think that MVMailBundle is implemented by the Mail application itself, so you can only look it up within that context (ie running as a plug-in inside Mail). It's not clear to me if you're doing that.
>>
>> FWIW, my Mail plug-in actually uses `objc.runtime.MVMailBundle` instead of using `objc.lookUpClass()` for that particular class (can't remember why; at some point I switched from using lookUpClass() to using objc.runtime), although I do look up other (Mail-only) classes using it.
>
> objc.runtime is deprecated, and IIRC I removed it in PyObjC 3.0
>
> Ronald
>
>>
>> – robert
>>
>> Eric Fernance <er...@di...> wrote on Wed May 06 2015 at 09:13:25:
>>> Hi Folks,
>>>
>>> I feel like I’ve been banging my head against a wall and looking for a couple of pointers.
>>>
>>> I have seen examples of writing mail.app plugins where the private class is loaded using objc.lookUpClass. For some reason I seem completely unable to get this to work.
>>>
>>> I have tested from the command line using a variety of class names and any of the classes from public frameworks seem to load just fine (i.e NSOjbect etc). When I try to load the MVMailBundle class using:
>>>
>>> objc.lookUpClass('MVMailBundle’)
>>>
>>> I receive an error: objc.nosuchclass_error: MVMailBundle
>>>
>>> System details are: Mac OSX 10.10.2
>>> Python: 2.7
>>> PyObjC: PyObjC 3.0.4
>>>
>>> Is there somewhere that I need to switch on or enable the support for loading classes from private frameworks?
>>>
>>> Any guidance would be really appreciated.
>>>
>>> Cheers,
>>> Eric.
>>>
>>> ------------------------------------------------------------------------------
>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>> Widest out-of-the-box monitoring support with 50+ applications
>>> Performance metrics, stats and reports that give you Actionable Insights
>>> Deep dive visibility with transaction tracing using APM Insight.
>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
>>> Pyobjc-dev mailing list
>>> Pyo...@li...
>>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
>> Pyobjc-dev mailing list
>> Pyo...@li...
>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
|