[texworks] HELP: Integrated Tw LaTeX2e Help dialogue

Stefan Löffler st.loeffler at gmail.com
Wed Jun 30 19:20:22 CEST 2010


Am 2010-06-30 16:54, schrieb Jonathan Kew:
> On 30 Jun 2010, at 07:34, kap4lin wrote:
>> Error:
>> Script "LaTeX2e Help": ReferenceError: Can't fine variable: __FILE__
>> Does this need any other script? Any dependencies? Is this windows only?
> The Help script works for me on Mac OS X.

Works for me on Ubuntu 10.04 as well. And I have to say it's pretty cool! :)

> One thing: if you use Qt's Layout mechanism in the window, it'll handle cross-platform differences and resizing better. (When I first tried it, many button labels were clipped.)

I second that. It would also allow resizing the dialog (right now, that
is possible, but the content area doesn't change size).

Some additional comments/bugs/feature requests:
* I'd love to see a splitter widget between the index on the left and
the main content on the right so that the user can resize the areas as
* I sometimes got an empty window when clicking on an item in the list
(the content area was updated correctly, though). This seems to be a
display error with the helper window from getText() that is not hidden
properly. Adding TW.yield() after the close() statement got rid of this.
* There's a bug in getText(). If I have an unmodified, untitled
document, Tw automatically replaces it with the content of the loaded
file. If that is the only window and it is closed later on, Tw
effectively closes as soon as the script ends. Also, it seems to
segfault in this case, though I don't know exactly why (probably it
tries to free some memory that is no longer available; @Jonathan: we
should look into this before the release; also see below)
* "<Back" and "Forward >" seem to be grayed out all the time
* What's the difference between "Commands" and "Commands (Tw User)"?
Maybe this can be clarified somehow/renamed?
* I find it rather odd that there are "Cancel" and "OK" buttons, with
the latter pasting the current selection automatically (without
indicating to do so), especially since there's "Paste Selection...".
IMO, a simple "Close" button would be sufficient. But that's probably a
matter of taste.

> I also think this would be better as a non-modal Window rather than a Dialog, though I haven't experimented to know whether that's actually possible yet.

Curiously enough, the dialog is non-modal for me :O. Maybe this is
related to the fact that the .ui file has a non-modal flag set. The
script doesn't end, but I can interact with the calling Tw window. If I
close the calling window, the script dialog remains open, but Tw
segfaults as soon as the script ends (also see above). Note that only
the ApplicationModal flag gives the expected behavior, WindowModal does
not. This certainly is not the way this is supposed to work...

Sorry for all the negative-sounding feedback, Paul. Your script is
really excellent, and a great example of what scripting can do. But
minor bugs and feature requests are the daily bread of the programmer
;). And about half of this mail is about a problem in the Tw C++ code.

Thanks for the script,

More information about the texworks mailing list