plugin menuCommandFor issue
Re: plugin menuCommandFor issue
great,
i also try to use setparent method, it seems to work, do you see any reason to not use it ?
do you think you could add a function for template similar to the existing one : "pedia://bruji.com/findTitle=" in order to select a Collection,
something like pedia://bruji.com/findCollection=Collection Title
i would be huge !
i also try to use setparent method, it seems to work, do you see any reason to not use it ?
do you think you could add a function for template similar to the existing one : "pedia://bruji.com/findTitle=" in order to select a Collection,
something like pedia://bruji.com/findCollection=Collection Title
i would be huge !
Re: plugin menuCommandFor issue
You can select a collection from inside the plug-in by using the selectCollection: method in the collections instance. Just like the setParent: method I not going to officially recommend the following because these are not exposed methods. But if you hold on to the "collections" instance you can select collections and create collections at any time. I'll look at adding the ability to select collection via the URL protocol scheme as well.
Re: plugin menuCommandFor issue
thks Conor,
Do you think you can add the feature for next release ? it would be great to be able to jump from a record to a collection, particularly for comics !I'll look at adding the ability to select collection via the URL protocol scheme as well.
Re: plugin menuCommandFor issue
It's done in the beta for testing.
Code: Select all
pedia://bruji.com/findCollection=Library
Re: plugin menuCommandFor issue
Hi Conor,
how is it possible to retrieve plugins objects ?
I would like to call a plugin from an other.
Thks
how is it possible to retrieve plugins objects ?
I would like to call a plugin from an other.
Thks
Re: plugin menuCommandFor issue
It's not possible, are you trying to integrate another search?
Re: plugin menuCommandFor issue
At this time i have to duplicate code and class in some plugins
Furthermore, i would like to add a small HUD panel in order to access very quickly functions of iBédé, that are distribute in different plugin.
Could you add or expose a method that can retrieve a NSArray of Plugins loaded by name ?
Furthermore, i would like to add a small HUD panel in order to access very quickly functions of iBédé, that are distribute in different plugin.
Could you add or expose a method that can retrieve a NSArray of Plugins loaded by name ?
Re: plugin menuCommandFor issue
What would be better is to try to rework the way menu commands are added, so that you can have a single plug-in that can add several menu commands to Bookpedia and has access to the same code and to the other menu commands. I'll take a look at the problem in the next few days and let you know the details.
Re: plugin menuCommandFor issue
Great
thanks
thanks
Re: plugin menuCommandFor issue
hi,
i tested the new function for selecting a collection with last beta, but it doesn't work for me.
i added the following line to the template:
but nothing happened when i click on it, i also try with other collection name.
Edit :
i have an other problem with pedia://... Call doesn't work when there is a special char in the name, like : space, é and so one, even if the percent encoding is applied. For example "pedia://bruji.com/menuPlugin=test" works but "pedia://bruji.com/menuPlugin=test again" doesn't and "pedia://bruji.com/menuPlugin=test%20again" neither.
Could you help me ?
thks
i tested the new function for selecting a collection with last beta, but it doesn't work for me.
i added the following line to the template:
Code: Select all
<a href="pedia://bruji.com/findCollection=Library">Library</a>
Edit :
i have an other problem with pedia://... Call doesn't work when there is a special char in the name, like : space, é and so one, even if the percent encoding is applied. For example "pedia://bruji.com/menuPlugin=test" works but "pedia://bruji.com/menuPlugin=test again" doesn't and "pedia://bruji.com/menuPlugin=test%20again" neither.
Could you help me ?
thks
Re: plugin menuCommandFor issue
hi Conor, any news about pedia://bruji.com/findCollection=Library and multiple menuCommand ?
thksWhat would be better is to try to rework the way menu commands are added, so that you can have a single plug-in that can add several menu commands to Bookpedia and has access to the same code and to the other menu commands.
Re: plugin menuCommandFor issue
Still working on the multiple menu command, should have it ready in a day or two.
Re: plugin menuCommandFor issue
Beta version 3 will now be able to use the link "pedia://bruji.com/findCollection=Library" as well as the ability to add several menu items to the plugin menu by adding the following declarations to MyControllerForPlugins:
An example would be to add the following code to the init method of the plug-in:
Code: Select all
@interface MyPluginManager : NSManagedObject
- (void)addMenuItem:(NSMenuItem *)aMenuItem;
@end
@interface MyControllerForPlugins : NSObject
- (MyPluginManager *)pluginManager;
@end
An example would be to add the following code to the init method of the plug-in:
Code: Select all
- (id)init {
if (self = [super init]) {
NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease];
[aMenuItem setTitle:@"A Test Menu"];
[aMenuItem setTarget:self];
[aMenuItem setAction:@selector(doTest:)];
NSMenuItem *secondMenuItem = [[[NSMenuItem alloc] init] autorelease];
[secondMenuItem setTitle:@"A Second Menu"];
[secondMenuItem setTarget:self];
[secondMenuItem setAction:@selector(doSecondTest:)];
MyPluginManager *pluginManager = [[NSApp delegate] pluginManager];
[pluginManager addMenuItem:aMenuItem];
[pluginManager addMenuItem:secondMenuItem];
}
return self;
}
- (IBAction)doTest:(id)sender {
NSLog(@"Doing a Test");
}
- (IBAction)doSecondTest:(id)sender {
NSLog(@"Doing another Test");
}
Re: plugin menuCommandFor issue
Wow, first sign of beta version numbering… thanks, Conor!Conor wrote:Beta version 3…
Ideally filenames would be <pediatype>-beta-<v#>.zip but I won't push my luck.
Re: plugin menuCommandFor issue
that's great , i did a few tests for both functions, it works very well.
Some comments :
Some comments :
- it seem's that menuCommandFor method and pluginName in info.plist are always mandatory for the plugin, exact ?
Menu items are alphabetically sorted, it would be interresting to keep the creation order in the menu.
It would also be interresting to be able to add menu separator.