[texworks] SCRIPTING: global __FILE__ now only available when debugger on?

Stefan Löffler st.loeffler at gmail.com
Sun Dec 11 12:01:40 CET 2011


Hi,

On 2011-11-20 09:57, Paul A Norman wrote:
> Seems any script locating the script's directory through __FILE__ no
> longer works when the Debugger is off (eg .ui(s)). I don;t know when
> this started but I am reasonably sure I have not had this happen at
> all before now. I can not say what version of TW I last successfully 
> ran __FILE__ with Debugger off I am sorry.
>
> Is this a new Qt  4.7.3  feature (hmm), or something I should put on
> Tw issues?

I assume it's a Qt-related thing. In r952, I added a couple of
properties to deal with that. The new properties are (as visible in
scripts):
TW.script.fileName
TW.script.title
TW.script.description
TW.script.author
TW.script.version

Probably only fileName is of any real interest (as the others are
defined exclusively by the script author), but I thought I'd include the
rest for the sake of completeness, too.

HTH
Stefan


More information about the texworks mailing list