<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Hi, there.<div><br></div><div>It looks like you do double styling via #editText: and "self changed: #style". Why not just calling that refreshing in #toggleIndex:? The PluggableTextMorph will re-style on its own during typing.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 07.07.2019 19:58:50 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">A new version of Tools was added to project The Inbox:<br>http://source.squeak.org/inbox/Tools-ct.853.mcz<br><br>==================== Summary ====================<br><br>Name: Tools-ct.853<br>Author: ct<br>Time: 7 July 2019, 7:58:37.726178 pm<br>UUID: a11f70d4-3f36-894a-89e7-78011f6ab2e2<br>Ancestors: Tools-ct.852<br><br>Refine styling in Inspector & Debugger<br><br>This commit is based on ToolBuilder-Morphic-ct.228 (#aboutToStyle:forMorph:).<br>- Introduce a state for Inspector (shouldStyleValuePane) that indicates whether to style the value pane<br>- Name the value pane to identify it<br>- Allow styling in every inspector window<br>- Refactor the debugger toolbuilding and refer to inspector's building methods (they shared many common properties)<br>Also see the following thread: http://forum.world.st/The-Inbox-Tools-ct-852-mcz-td5100784.html<br><br>=============== Diff against Tools-ct.852 ===============<br><br>Item was changed:<br> ----- Method: Debugger>>buildFullWith: (in category 'toolbuilder') -----<br> buildFullWith: builder<br> | windowSpec listSpec textSpec |<br> windowSpec := builder pluggableWindowSpec new<br> model: self;<br> label: 'Debugger';<br> children: OrderedCollection new.<br> <br> listSpec := builder pluggableListSpec new.<br> listSpec <br> model: self;<br> list: #contextStackList; <br> getIndex: #contextStackIndex; <br> setIndex: #toggleContextStackIndex:; <br> menu: #contextStackMenu:shifted:; <br> icon: #messageIconAt:;<br> helpItem: #messageHelpAt:;<br> keyPress: #contextStackKey:from:;<br> frame: (0@0 corner: 1@0.22).<br> windowSpec children add: listSpec.<br> <br> <br> textSpec := self buildCodePaneWith: builder.<br> textSpec frame: (0@0.22corner: 1@0.8).<br> windowSpec children add: textSpec.<br> <br>+ listSpec := self receiverInspector buildFieldListWith: builder.<br>- listSpec := builder pluggableListSpec new.<br> listSpec <br>- model: self receiverInspector;<br>- list: #fieldList; <br>- getIndex: #selectionIndex; <br>- setIndex: #toggleIndex:; <br>- menu: #fieldListMenu:; <br>- keyPress: #inspectorKey:from:;<br> frame: (0@0.8 corner: 0.2@1);<br> help: 'Receiver''s\Instance\Variables' withCRs.<br> windowSpec children add: listSpec.<br> <br>+ textSpec := self receiverInspector buildValuePaneWith: builder.<br>- textSpec := builder pluggableCodePaneSpec new.<br> textSpec <br>- model: self receiverInspector;<br>- getText: #contents; <br>- setText: #accept:; <br> help: '<- select="" receiver''s="" field'=""></-><br>- selection: #contentsSelection; <br>- menu: #codePaneMenu:shifted:;<br> frame: (0.2@0.8 corner: 0.5@1).<br> windowSpec children add: textSpec.<br> <br>+ listSpec := self contextVariablesInspector buildFieldListWith: builder.<br>- listSpec := builder pluggableListSpec new.<br> listSpec <br>- model: self contextVariablesInspector;<br>- list: #fieldList; <br>- getIndex: #selectionIndex; <br>- setIndex: #toggleIndex:; <br>- menu: #fieldListMenu:; <br>- keyPress: #inspectorKey:from:;<br> frame: (0.5@0.8 corner: 0.7@1);<br> help: 'Other\Context\Bindings' withCRs.<br> windowSpec children add: listSpec.<br> <br>+ textSpec := self contextVariablesInspector buildValuePaneWith: builder.<br>- textSpec := builder pluggableCodePaneSpec new.<br> textSpec <br>- model: self contextVariablesInspector;<br>- getText: #contents; <br>- setText: #accept:; <br> help: '<- select="" context''s="" field'=""></-><br>- selection: #contentsSelection; <br>- menu: #codePaneMenu:shifted:;<br> frame: (0.7@0.8 corner: 1@1).<br> windowSpec children add: textSpec.<br> <br> ^builder build: windowSpec!<br><br>Item was changed:<br> StringHolder subclass: #Inspector<br>+ instanceVariableNames: 'object selectionIndex timeOfLastListUpdate selectionUpdateTime context expression shouldStyleValuePane'<br>- instanceVariableNames: 'object selectionIndex timeOfLastListUpdate selectionUpdateTime context expression'<br> classVariableNames: ''<br> poolDictionaries: ''<br> category: 'Tools-Inspector'!<br> <br> !Inspector commentStamp: '<historical>' prior: 0!<br> I represent a query path into the internal representation of an object. As a StringHolder, the string I represent is the value of the currently selected variable of the observed object.!<br><br>Item was removed:<br>- ----- Method: Inspector>>aboutToStyle: (in category 'styling') -----<br>- aboutToStyle: aStyler<br>- <br>- aStyler <br>- classOrMetaClass: object class;<br>- parseAMethod: false.<br>- ^true!<br><br>Item was added:<br>+ ----- Method: Inspector>>aboutToStyle:forMorph: (in category 'styling') -----<br>+ aboutToStyle: aStyler forMorph: aMorph<br>+ <br>+ (aMorph knownName = #valuePane and: [shouldStyleValuePane not])<br>+ ifTrue: [^ false].<br>+ <br>+ aStyler <br>+ classOrMetaClass: object class;<br>+ parseAMethod: false.<br>+ ^true!<br><br>Item was changed:<br> ----- Method: Inspector>>buildValuePaneWith: (in category 'toolbuilder') -----<br> buildValuePaneWith: builder<br> | textSpec |<br>+ textSpec := builder pluggableCodePaneSpec new.<br>- textSpec := builder pluggableTextSpec new.<br> textSpec <br> model: self;<br>+ name: #valuePane;<br> getText: #contents; <br> setText: #accept:; <br>+ editText: #typeValue:;<br> help: 'Selection details.';<br> selection: #contentsSelection; <br> menu: #codePaneMenu:shifted:.<br> ^textSpec!<br><br>Item was changed:<br> ----- Method: Inspector>>initialize (in category 'initialize-release') -----<br> initialize<br> <br> selectionIndex := 0.<br>+ shouldStyleValuePane := true.<br> super initialize!<br><br>Item was changed:<br> ----- Method: Inspector>>toggleIndex: (in category 'selecting') -----<br> toggleIndex: anInteger<br> "The receiver has a list of variables of its inspected object. One of these <br> is selected. If anInteger is the index of this variable, then deselect it. <br> Otherwise, make the variable whose index is anInteger be the selected <br> item."<br> <br> selectionUpdateTime := 0.<br> selectionIndex = anInteger<br> ifTrue: <br> ["same index, turn off selection"<br> selectionIndex := 0.<br> contents := '']<br> ifFalse:<br> ["different index, new selection"<br>+ shouldStyleValuePane := false.<br> selectionIndex := anInteger.<br> self contentsIsString<br> ifTrue: [contents := self selection]<br> ifFalse: [contents := self selectionPrintString]].<br> self changed: #selection.<br> self changed: #contents.<br> self changed: #selectionIndex.!<br><br>Item was added:<br>+ ----- Method: Inspector>>typeValue: (in category 'selecting') -----<br>+ typeValue: aTextOrString<br>+ <br>+ shouldStyleValuePane := true.<br>+ self changed: #style!<br><br><br></historical></div></blockquote>
</div></body>