The Trunk: PreferenceBrowser-kb.39.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: PreferenceBrowser-kb.39.mcz

commits-2
Andreas Raab uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-kb.39.mcz

==================== Summary ====================

Name: PreferenceBrowser-kb.39
Author: kb
Time: 12 November 2009, 3:08:37 am
UUID: fd0d292d-40d9-45e1-a25f-bebe95462ea0
Ancestors: PreferenceBrowser-MAD.38

 - fix: http://bugs.squeak.org/view.php?id=4530
   TextInput of PreferenceBrowser behave strangely.
   The root of the problem was that on each keystroke the PluggableTextMorph updated the PreferenceBrowser, which in turn updated the PluggableTextMorph, what messed up its selection.
   This solution gives a getTextSelector to the PluggableTextMorph which is never triggered.
   Another solution could be to drop the auto updating behaviour.

=============== Diff against PreferenceBrowser-MAD.38 ===============

Item was added:
+ ----- Method: PreferenceBrowser>>searchPatternNeverTriggered (in category 'accessing') -----
+ searchPatternNeverTriggered
+
+ ^self searchPattern!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>newSearchTextField (in category 'submorphs - search panel') -----
  newSearchTextField
  | ptm |
  ptm := PluggableTextMorph
  on: self model
+ text: #searchPatternNeverTriggered
- text: #searchPattern
  accept: #searchPattern:.
  ptm
  hideVScrollBarIndefinitely: true;
  borderInset;
  color: Color white;
  vResizing: #rigid;
  hResizing: #spaceFill;
  height: TextStyle defaultFont height * 2;
  acceptOnCR: true;
+ onKeyStrokeSend: #value to: [ ptm hasUnacceptedEdits ifTrue: [ ptm accept ] ].
- onKeyStrokeSend: #value to: [ptm hasUnacceptedEdits ifTrue: [ptm accept]].
  ^ptm.!