|
From: David G. <dg...@co...> - 2003-08-06 03:34:18
|
I noticed that the constructor for Scanner looks like (or, actually, IS):
public Scanner(String[] args) {
super("scanner", I18n.get("scanner.Scanner.toolDescription"), args);
}
which I believe causes the parent BabelDocCommand class constructor to
initialize the command line properly and then invoke execute() on Scanner.
What seems to be happening, though, is that, should any private variables be
initialized at declaration (private boolean test = false;), and then set to
true in execute(), it will be false again in finishUp(). Apparently, not all
variables are initialized at the time that the constructor is called, and so
the variables are initialized sometime after execute() is executing...
This caused me some intersting moments in trying to have the Scanner class end
elegantly after displaying the help screen. I assume that all the other
tools use the same architecture. Is this a known side effect?
David
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
|