[BUG][FIX] SmallSmaCCUIFix-JW

Jesse Welton jwelton at pacific.mps.ohio-state.edu
Wed Mar 5 19:48:42 UTC 2003


I had a somewhat difficult time at first with the SmaCCParserGenerator
due to some minor bugs with the UI.  (Sq 3.4, SmaCC 1.0)  Once I
figured out what was going on, it was easily enough fixed.  Preamble
gives probably too many details:

"Change Set:		SmallSmaCCUIFix-JW
Date:			5 March 2003
Author:			Jesse Welton

SmaCCParserGenerator required the text of the scanner page and the
parser page to be manually accepted.  This was apparently unintended,
which I infer from the lines of the form

	(self tabList tabNamed: 'Scanner') referent changed: #contents

in SmaCCParserGenerator>>compile:.  These lines have no effect, because
the PluggableTextMorphs in question have no dependents.  Changing
these lines to the form

	(self tabList tabNamed: 'Scanner') referent accept

has the requisite effect.  The problem was further compounded by the
fact that these PluggableTextMorphs did not visibly respond to having
their text accepted, making it that much harder for the new user to
determine what e was doing wrong.  The reson for this is that
PluggableTextMorph>>accept expects

	model perform: setTextSelector with: textToAccept

to return true on success; otherwise, although the text was being
accepted, the PluggableTextMorphs would continue to register as having
unaccepted edits.  This is fixed by returning true from #parserText:,
#scannerText:, and #testText:.  The change to #testText: has the
unfortunate side-effect of causing the test text pane to flash
unexpectedly when the text has not been changed.  This in turn is fixed
by adding setting the PluggableTextMorph's #alwaysAccept property to
true in SmaCCParserGenerator>>addTextToTestPage:.

These latter changes are not strictly necessary from a usability
standpoint, but they do make SmaCCParserGenerator's interface behave
more consistently with the rest of Squeak.
"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SmallSmaCCUIFix-JW.1.cs.gz
Type: application/octet-stream
Size: 1704 bytes
Desc: gzipped changeset
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030305/7f7a6c19/SmallSmaCCUIFix-JW.1.cs.obj


More information about the Squeak-dev mailing list