Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basil scripts fail to run if story editor is open #94

Open
trych opened this issue Sep 17, 2016 · 4 comments
Open

basil scripts fail to run if story editor is open #94

trych opened this issue Sep 17, 2016 · 4 comments
Assignees
Labels

Comments

@trych
Copy link
Contributor

trych commented Sep 17, 2016

If the story editor is open, basil scripts will fail to run.

The error happens in the setup stage, when currPage is getting defined. It occurs in line 990:

currPage = app.activeWindow.activePage;

'Object does not support property or method active page'. Apparently it is not sufficient in the previous check to see if currDoc.windows.length, but there needs to be an additional check, if activePage can be accessed.

@trych trych added the bug label Sep 17, 2016
@trych trych added this to the Close all those bugs! milestone Sep 17, 2016
@ff6347
Copy link
Member

ff6347 commented Sep 26, 2016

So should we close it for the user?
http://yearbook.github.io/esdocs/#/InDesign/StoryWindow/close
Or just break if the returned value is instanceof StoryWindow?
http://yearbook.github.io/esdocs/#/InDesign/Application/activeWindow

The line is this one I guess https://github.com/basiljs/basil.js/blob/master/src/includes/environment.js#L161

@trych
Copy link
Contributor Author

trych commented Sep 26, 2016

No, we should not close it, I think we should interfere with the user's setup as little as possible. Surely there must be a way to retrieve the activePage from the frontmost LayoutWindow, even when there is a StoryWindow open?

Yes, that was the line IIRC.

@b-g
Copy link
Member

b-g commented Sep 26, 2016

@trych good luck! If it is too painful just use the less dirty workaround possible to fix the bug.

@ff6347
Copy link
Member

ff6347 commented Nov 11, 2016

@trych What is the state of this? Can I assign you to it?

@trych trych self-assigned this Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants