New version of Insert Image add-on

Re: New version of Insert Image add-on

Postby boercher » Sun Mar 09, 2014 9:43 pm

jokro wrote:I would like to invoke your addon with the pathname or File of the image

A collaboration of two add-ons would be interesting but I have no idea how this could work. It's always possible to execute other actions via menu items but I don't see an easy way to pass parameters... Although you could use the clipboard for this (compare the behavior of the edit hyperlink action):

ClipboardController.getController().setClipboardContents(string)
ClipboardController.getController().getClipboardContents()

Regards,
Volker
boercher
 
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am

Re: New version of Insert Image add-on

Postby jokro » Mon Mar 10, 2014 9:44 pm

Volker,
thx.
1. I have uploaded dView version 0.1.9 with a link to addon Inline image from the context menu for files.
I have copied the full pathname of the image file to clipboard.
At present the user must use Ctrl-V to paste it in the adress field.
Could you make the inline image addon to do this ?

2. I have includedn the Inline script in dView. Wouldn't it be a better idea if in addon dView it could be specified that also (the latest vesion of) addon Inline image is loaded automatically ?

Regards
Jodi
jokro
 
Posts: 486
Joined: Sun Jul 24, 2011 2:56 pm

Re: New version of Insert Image add-on

Postby jokro » Wed Mar 12, 2014 8:19 am

Volker,
I tried to modify your script in Eclipse-Groovy. However each catch statement has a red cross with the message: Groovy:Catch statement type is not a subclass of Throwable ??

My problem with the current solution is that
1. the script does not take the filename in the Clipboard
2. I put the filename in the Clipboard and add it with Ctrl-V when the dialog is displayed. The problem is that width and size are not taken over, hence proportial resizing is not possible.

3. At present I need addon insertInlineImage to be separately installed. This is an extra burdon for user.
This could be prevented if the main part of the script is reorganized in a class which I can include in my jar.
This class (also) could have a method to open with a patname.
What do you think
Regards
Jodi
jokro
 
Posts: 486
Joined: Sun Jul 24, 2011 2:56 pm

Re: New version of Insert Image add-on

Postby boercher » Thu Mar 20, 2014 1:35 am

Hi Jodi,

jokro wrote:I tried to modify your script in Eclipse-Groovy.

Actually rickenbroc is the current maintainer. He already provided the last improvements and bugfixes.

jokro wrote:3. At present I need addon insertInlineImage to be separately installed. This is an extra burdon for user.

Admitted, but I don't think that we could do anything sensible unless we provide a full "dependency management" for add-ons which would automatically load required add-ons. Even if you change the way you access other add-ons you still hat to have them installed (separately).

Regards,
Volker
boercher
 
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am

Re: New version of Insert Image add-on

Postby jokro » Fri Mar 21, 2014 9:17 pm

Rickenbroc,
On opening the addon, could you make it check if a file address is in the clipboard, and if so, use it ?! :D
Thx
Jodi
jokro
 
Posts: 486
Joined: Sun Jul 24, 2011 2:56 pm

Previous

Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron