lourenzo / evoluspencil

Automatically exported from code.google.com/p/evoluspencil
0 stars 0 forks source link

Cannot load user stencils since resource:app results in error #373

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to load any of the stencils from the homepage

What is the expected output? What do you see instead?
Expected that the stencils are loaded and added to the program. 
result is: In the bottom bar an error is displayed: 0x80004005 NS_ERROR_FAILURE

What version of the product are you using? On what operating system?
Version 1.3.2, Win 7 x64, Standalone XULRunner

Please provide any additional information below.
After failing to load any stencils I tried to copy them to the directory 
myself. However this did not work either. After some testing in the 
collectionManager.js I found out that the line 

    if (Util.isXulrunner()) {
        stencilDir = properties.get("resource:app", Components.interfaces.nsIFile);

inside the getUserStencilDirectory function throws an error (0x80004005 
NS_ERROR_FAILURE).
Querying the properties object with has("resource:app") returns false.
I tried googling the issue but found nothing that could help.

Original issue reported on code.google.com by psychol...@gmail.com on 22 Nov 2011 at 3:38

GoogleCodeExporter commented 9 years ago
Note: A temporary workaround is to manually add the collections inside the 
\app\content\pencil\definition\collectionManager.js file after the system 
stencils (around line 100).
(You need to extract the zip files first to a location, preferrably inside the 
pencil directory structure.)

Original comment by psychol...@gmail.com on 22 Nov 2011 at 4:01

GoogleCodeExporter commented 9 years ago
In case anybody is not familiar with basic JavaScript do the following:

Create a new directory for the stencil inside the Pencil program directory, for 
me Windows 7 x64 this is:
C:\Program Files (x86)\Evolus\Pencil\app\content\pencil\stencil\
e.g. Glyphish: C:\Program Files 
(x86)\Evolus\Pencil\app\content\pencil\stencil\Glyphish

Now extract the stencil zip file inside the directory.

Next open \app\content\pencil\definition\collectionManager.js with an editor 
(e.g. notepad) and go to line 100.

There you should see a line like like the following:
CollectionManager.addShapeDefCollection(parser.parseURL("chrome://pencil/content
/stencil/SketchyGUI/Definition.xml"));

Now copy that line and paste it below. Change the path to the right so it 
points to your newly unzipped directory, like so:
CollectionManager.addShapeDefCollection(parser.parseURL("chrome://pencil/content
/stencil/Glyphish/Definition.xml"));

Next time Pencil starts the colleciton is loaded.

Original comment by psychol...@gmail.com on 22 Nov 2011 at 4:07

GoogleCodeExporter commented 9 years ago
After some more digging and experiencing a similar issue with the export 
templates, I found the best way is to change "resource:app" to "CurProcD".

So inside of exportTemplateManager.js, collectionManager.js and 
privateCollectionManager.js (inside /app/content/pencil/definition) replace 
"resource:app" with "CurProcD".

After that it seems to work normally

Original comment by psychol...@gmail.com on 23 Nov 2011 at 11:54

GoogleCodeExporter commented 9 years ago
Changing "resource:app" to "CurProcD" did the trick for me, thanks!

Original comment by esbe...@gmail.com on 2 Dec 2011 at 9:40

GoogleCodeExporter commented 9 years ago
it works perfectly ... thanks

Original comment by redhacho...@gmail.com on 7 Dec 2011 at 4:36

GoogleCodeExporter commented 9 years ago
great!!
It works. http://case35.tistory.com/257

Original comment by g20020...@gmail.com on 12 Dec 2011 at 4:42

GoogleCodeExporter commented 9 years ago
CurProcD change resolved issue completely (without having to manually add 
anything). Thanks!

Original comment by dwgabb...@gabbard.me on 13 Dec 2011 at 10:04

GoogleCodeExporter commented 9 years ago
In case you need to do this on a mac...

Go to Applications
Right click on Pencil App and select Show Package Contents
Then navigate to /Contents/Resources/content/pencil/stencils
Then follow same instructions as above

Original comment by john...@gmail.com on 19 Dec 2011 at 11:37

GoogleCodeExporter commented 9 years ago
Changing "resource:app" to "CurProcD" did the trick for me as well.  Thanks!

Original comment by richard....@fairwarningaudit.com on 20 Dec 2011 at 6:56

GoogleCodeExporter commented 9 years ago
Changing "resource:app" to "CurProcD" did the job. Thanks you so much for the 
work.

Original comment by ranjith....@gmail.com on 4 Jan 2012 at 1:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by ngtdungnt@gmail.com on 17 Jan 2012 at 5:03