susurros / evoluspencil

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

Loading files from the command line on the standalone version (windows) #83

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Launch the standalone version specifying a filename to load at the end
2. Pencil opens and shows the filename in the title bar
3. Nothing loads

What is the expected output? What do you see instead?
Expect the file to load, it doesn't

What version of the product are you using? On what operating system?
1.0.4 standalone on windows

Please provide any additional information below.

This is irritating as I want to create an association to open ep and epz
files directly in pencil

Original issue reported on code.google.com by jonra...@gmail.com on 9 Jan 2009 at 5:10

GoogleCodeExporter commented 8 years ago
Technical details:

The problem lies in Pencil.boot() (Pensil.js).
This function invokes Pencil.postBoot() (MainWindow.js).

Pencil.postBoot() reads command line parameters and uses a timeout (100ms) to 
open
the specified document.

However, after that Pencil.boot() uses a timeout to create a new empty document 
using
a timeout (500ms).

As a result the command line specified document is opened but a new document is
created afterwards. Since it all happens very fast, the user won't notice.

Another problem is when opening a document from command line when a Pencil 
window is
already open. It seems Xulrunner now also passes "-app", "application.ini" and
"-console" (no clue why), and this ends up in the file path being loaded. Of 
course
this won't load a document.

Original comment by dejong.a...@gmail.com on 17 Jun 2009 at 10:17

GoogleCodeExporter commented 8 years ago
I have fixed this in 
http://code.google.com/p/evoluspencil/issues/detail?id=215.  I had the same 
issue on OS X and actually, I never saw any code to load a document based on 
command line arguments so I just created my own attempt and it works.

Original comment by jcscoob...@gmail.com on 24 Sep 2010 at 3:32