972 ! |
972 ! |
973 |
973 |
974 listSelection:aSelection |
974 listSelection:aSelection |
975 "sets current selection" |
975 "sets current selection" |
976 |
976 |
977 |txt view sel| |
977 |txt view selection| |
978 |
978 |
979 aSelection isNil |
979 aSelection notNil ifTrue:[ |
980 ifTrue: [(builder componentAt: #listOfHelpKeysView) selection: nil] |
980 aSelection isNumber ifTrue:[ |
981 ifFalse: [(dictionary includesKey: aSelection asSymbol) ifFalse: [self findHelpSpecForKey: aSelection]]. |
981 aSelection ~~ 0 ifTrue:[ |
982 |
982 selection := self listChannel value at:aSelection ifAbsent:nil |
983 aSelection isNumber ifTrue:[ |
983 ] |
984 aSelection ~~ 0 ifTrue:[ |
984 ] ifFalse:[ |
985 sel := self listChannel value at:aSelection |
985 selection := aSelection withoutSeparators. |
986 ] |
986 |
987 ] ifFalse:[ |
987 selection size == 0 ifTrue:[ |
988 aSelection size ~~ 0 ifTrue:[ |
988 selection := nil |
989 sel := aSelection withoutSeparators. |
|
990 sel size == 0 ifTrue:[ |
|
991 sel := nil |
|
992 ] |
989 ] |
993 ] |
990 ] |
994 ]. |
991 ]. |
995 |
992 |
996 listSelection = sel ifFalse:[ |
993 selection isNil ifTrue:[ |
997 listSelection := sel. |
994 (builder componentAt:#listOfHelpKeysView) selection:nil |
998 |
995 ] ifFalse:[ |
999 modifiedHolder notNil ifTrue:[ |
996 (dictionary includesKey:selection asSymbol) ifFalse:[ |
1000 modifiedHolder value:true. |
997 self findHelpSpecForKey:selection |
1001 ]. |
|
1002 |
|
1003 (view := self editTextView) notNil ifTrue:[ |
|
1004 listSelection notNil ifTrue:[ |
|
1005 txt := dictionary at:(listSelection asSymbol) ifAbsent:nil. |
|
1006 |
|
1007 (txt isNil or:[maxCharsPerLine isNil]) ifFalse:[ |
|
1008 txt := UIPainter convertString:(txt asString) maxLineSize:maxCharsPerLine skipLineFeed:false. |
|
1009 ] |
|
1010 ]. |
|
1011 view contents:txt. |
|
1012 view modified:false. |
|
1013 ] |
998 ] |
|
999 ]. |
|
1000 listSelection == selection ifTrue:[ |
|
1001 ^ self |
|
1002 ]. |
|
1003 listSelection := selection. |
|
1004 |
|
1005 modifiedHolder notNil ifTrue:[ |
|
1006 modifiedHolder value:true. |
|
1007 ]. |
|
1008 |
|
1009 (view := self editTextView) notNil ifTrue:[ |
|
1010 listSelection notNil ifTrue:[ |
|
1011 txt := dictionary at:(listSelection asSymbol) ifAbsent:nil. |
|
1012 |
|
1013 (txt isNil or:[maxCharsPerLine isNil]) ifFalse:[ |
|
1014 txt := UIPainter convertString:(txt asString) maxLineSize:maxCharsPerLine skipLineFeed:false. |
|
1015 ] |
|
1016 ]. |
|
1017 view contents:txt. |
|
1018 view modified:false. |
1014 ] |
1019 ] |
1015 |
1020 |
1016 ! ! |
1021 ! ! |
1017 |
1022 |
1018 !UIHelpTool methodsFor:'startup / release'! |
1023 !UIHelpTool methodsFor:'startup / release'! |