<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
this is a really great improvement, Paul! Here some more
comments/suggestions:<br>
<br>
Am 2010-07-07 05:15, schrieb Ben Harrison:
<blockquote
cite="mid:AANLkTimRTt1PtV2_9QE9FlrcCsQgjiy2CthJanDToxEc@mail.gmail.com"
type="cite">1.<br>
I had to enable the QtScript debugger in Tw preferences before
this would run (otherwise I got an error message "ReferenceError:
__FILE__ is not defined"). Is that expected?<br>
</blockquote>
<br>
This is quite helpful, thanks.<br>
@Paul: No, it should not be necessary to turn on the debugger. If it
is turned on, however, there apparently is some additional debugging
information (like __FILE__) available. I have posted a patch to
expose the filename (and some other data) to scripts in a normal way
at <a class="moz-txt-link-freetext" href="http://code.google.com/p/texworks/issues/detail?id=393">http://code.google.com/p/texworks/issues/detail?id=393</a>, though.<br>
<br>
<blockquote
cite="mid:AANLkTimRTt1PtV2_9QE9FlrcCsQgjiy2CthJanDToxEc@mail.gmail.com"
type="cite">3a.<br>
I searched for \usepackage by highlighting it in my editor, and
running the menu command. The twin panes opened, then showed four
choices on the left (usebox, usecounter, usefont, usepackage), and
the help text for usepackage on the right - nice! I clicked on
usepackage in the LHS pane, and got an error: <br>
<meta name="qrichtext" content="1">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<blockquote style="border-left: 1px solid rgb(204, 204, 204);
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"
class="gmail_quote">
<p style="margin-top: 0px; margin-bottom: 0px; margin-right:
0px; text-indent: 0px;">Cannot read file
"/home/ben/.TeXworks/scripts/Help/html/QVariant(QUrl)":<br>
<br>
No such file or directory</p>
</blockquote>
</blockquote>
<br>
Strange... this works for me (Ubuntu 10.04 i386, Tw r671). I do have
one question about this, though: why does it only highlight "\use"
(and consequently finds other entries) when I selected
"\usepackage"? This seems counterintuitive to me.<br>
<br>
<blockquote
cite="mid:AANLkTimRTt1PtV2_9QE9FlrcCsQgjiy2CthJanDToxEc@mail.gmail.com"
type="cite">3b.<br>
The error causes the QtScript debugger to open in the background,
but I can 't do anything to it. If I click on the Help dialogue at
this point in time, the Help dialogue is focussed, which hides the
error popup (I didn't realise this at first, just thought it had
been dismissed). <br>
<br>
3c.<br>
I can't do anything to the debugger until I cancel the Help
dialogue. I wouldn't know what to do with it anyway, but just
curious if this is supposed to be useful?<br>
</blockquote>
<br>
You're right, you can't work with the debugger in this case. The
reason for this is that the help dialog is modal. This is necessary
to avoid the user closing the calling window (accidentally), which
would result in a crash of Tw once the help dialog is dismissed. So,
this is a peculiarity of modal dialogs that is unavoidable at
present.<br>
<br>
A few additional points of my own:<br>
<br>
* Your recent .zip file contains a file "x.txt". Is this
intentional, or should it be removed?<br>
<br>
* When I resize the dialog, the controls resize nicely. However,
there is an increasing border on the left and right margin of the
dialog (see attached screenshot). I believe this can be remedied
easily by setting a non-null value for at least one column in
"layoutColumnStretch" of the layout section of the dialog object in
the .ui file. You might also want to add a horizontal (stretchable)
spacer between the buttons so they don't blow up too much.<br>
<br>
* I noticed you set a maximum size of 290 for the LHS panel. Is
there a reason for that? If not, I'd prefer to let the user resize
it arbitrarily. If you just want it to be smaller initially, you
could set "helpBrowser.horizontalSizeStretch" to 1 (this would also
make the LHS stay at the same size when the dialog is resized)<br>
<br>
* There still is the problem that an unmodified, untitled (i.e.,
empty) window is closed by your getText() routine, resulting in a
crash of Tw when I experimented with your help dialog just after
starting Tw (without generating any content). This should be
irrelevant once we get a real read() function for scripts, but until
then I'd recommend to follow the procedure I outlined previously
(only close if "untitled" and "!modified" are not both true;
otherwise simply empty the window again).<br>
<br>
HTH<br>
Stefan<br>
</body>
</html>