-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 07.03.2009 um 18:01 schrieb Christiaan Hofman: >> But that's just >> minor. I wanted to get a link to the file with abbreviated path (just >> as in the standard template), but using the linkedText key instead. >> However, while the key itself works, it doesn't take any modifiers >> (output is blank). > > I think you misunderstand linkedText: it gives an attributed string > with a link attribute to link to the URL or file, useful for rich text > templates. As it is an attributed string, it won't take string > modifiers. Ah, OK, good to know... > >> I can modify the absoluteString key, however, that >> also doesn't give a tilde-abbreviated path. > > absoluteString is the URL string, and > stringByAbbreviatingWithTildeInPath expects a path. right, I haven't seen the "Local file, Remote URL" section in the help... so I mixed it all up. > > What you miss is that you need to get path instead of linkedText. If > you still want a link, you should add linkedText at the end. < > $path.stringByAbbreviatingWithTildeInPath.linkedText/> > > Also, linkedFiles are /linked file/ objects, not paths or URLs. BD > applies a trick to make keys like absoluteString and richTextSkimNotes > work, but it's more correct to add a url key in the path. However > @nonEmpty won't work, because linked files are never 'empty' (the url > or path can be 'empty'). So either add a condition tag, or perhaps > better use the following (which also addresses the above comment): > > <$localfiles.u...@nonempty> > <$path.stringByAbbreviatingWithTildeInPath.linkedText/> > <$absoluteString/> > <$richTextSkimNotes?> > Notes: > <$richTextSkimNotes/> > </$richTextSkimNotes?> > </$localfiles.u...@nonempty> this, however, does not work for me (I just get blank lines). When I change it to <$localFiles> <$path.stringByAbbreviatingWithTildeInPath.linkedText/> </$localFiles> it works (I've left out the other stuff in the loop). Makes sense, since path is a property of a localFile, right? And I think I misunderstood the @nonEmpty modifier... I misconstrued it as a condition on the non-emptyness of the collection, i.e. existence of at least 1 item. I guess if there's no localFile, the loop won't be executed. Stupid me... Thanks very much, Jonas -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) iEYEARECAAYFAkmyvegACgkQoSxXdTdhxZo6aQCcCGZhF/CdrjMYVlW9FZYB0F3u VMAAnj9+hpqt7ty2mJ8zGti8jY7GONeM =FmDC -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Bibdesk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-users
