How can I access properties from the QSProxies section of a plugin's plist file?

5 views
Skip to first unread message

cwd

unread,
Jun 10, 2014, 2:34:44 PM6/10/14
to quicksilver-...@googlegroups.com
I see that according to the plugin documentation:

resolveProxyObject - This method is responsible for returning the "real" object referred to by one or more proxies. If the class is only responsible for one proxy object, it usually returns an object blindly, but if it handles more than one, it needs to see which (usually by checking the identifier) before returning a value.

In my plugin in the resolveProxyObject function I am using NSString *ident = [proxy identifier]; to get the identifier.

How can I get the other plist properties such as class, description, name, icon, etc ? I would ideally like to be able to add other key/value pairs to the plist file that the plugin could then check for and use.

Rob McBroom

unread,
Jun 10, 2014, 11:35:29 PM6/10/14
to quicksilver-...@googlegroups.com

The thing being passed in is either a string (the identifier itself) or more likely a QSObject (not an NSDictionary).

In any case, you’re going to return a QSObject that you have complete control over. If you want to add additional data that actions in the plug-in can use, I’d recommend using [thing setObject:whatever forMeta:key] before you return it.

If you truly need the information from the plist, I’m pretty sure there’s a way to get at it using QSRegistry (i.e. [QSReg tableNamed:@"QSProxies"] or something similar).

Let me know if I’m completely misunderstanding your question.

--
Rob McBroom
http://www.skurfer.com/

Reply all
Reply to author
Forward
0 new messages