-
Notifications
You must be signed in to change notification settings - Fork 30
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
b.objectStyle(), b.characterStyle() and b.paragraphStyle() don't work #64
Comments
And we have to think about how to handle For getting a 1.) Decide to only search on top level (assuming that in basil.js scripts hardly ever a Opinions? |
@trych I'm until beginning of August to busy to review this. Basically we can't ignore those damn groups so we need to fix this. If the helper is not working we should fall back to IDAPI calls. |
So option 2 it is. |
@fabiantheblind No worries! No need to respond to everything immediately, it is just that I finally found some time right now, so I want to hunt for bugs and bring the project forward, so atm I just post issues when I find some. Of course they can all be reviewed when you or somebody else finds the time. Github issues don't expire. ;) And yes, I agree it should be option 2, so we get rid of one helper function and add another small helper function to handle the styleGroups where necessary. Small side question: newCol = findInCollectionByName(currentDoc().swatches, a); (that expect either a A) newCol = currentDoc().swatches.itemByName(a) || null; B) newCol = currentDoc().swatches.itemByName(a).isValid ? currentDoc().swatches.itemByName(a) : null; C) if (currentDoc().swatches.itemByName(a).isValid) {
newCol = currentDoc().swatches.itemByName(a);
} else {
newCol = null;
} I prefer notation type A), it's the one that Douglas Crockford suggests for falling back on default values after receiving a |
Ok, just to let you guys know, I'm working on this. However, in the current master (so before my fixes) I found some minor errors with |
@trych whats the status of this issue? |
Just closed them. |
As the title states, neither of these methods work at the moment, as they make an incorrect call to
findInCollectionByName()
by only providing aname
parameter instead of both acollection
andname
parameter. At the moment the methods conveniently return the first letter of the paragraphStyle name you provide. ;)I suggest getting rid of the
findCollectionByName()
helper function altogether and replace it bycollection.itemByName("name").isValid
throughout basil.js.The text was updated successfully, but these errors were encountered: