Cleaning unneeded code.
This commit is contained in:
parent
9c613ddf84
commit
e36e0b3247
@ -133,69 +133,15 @@ GrafoscopioNotebook >> header: anObject [
|
|||||||
header := anObject
|
header := anObject
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #operation }
|
|
||||||
GrafoscopioNotebook >> highlightItemFor: nodeContent [
|
|
||||||
| currentItem |
|
|
||||||
currentItem := tree highlightedItem.
|
|
||||||
currentItem
|
|
||||||
ifNotNil: [ | allItems allContents index childrenSize parentNode |
|
|
||||||
currentItem parentNode
|
|
||||||
ifNil: [
|
|
||||||
parentNode := currentItem container.
|
|
||||||
allItems := parentNode roots ]
|
|
||||||
ifNotNil: [
|
|
||||||
parentNode := currentItem parentNode.
|
|
||||||
allItems := parentNode children value ].
|
|
||||||
allContents := allItems collect: [ :each | each content ].
|
|
||||||
childrenSize := currentItem content parent children size.
|
|
||||||
index := allContents indexOf: currentItem content.
|
|
||||||
(index < childrenSize) ifTrue: [
|
|
||||||
currentItem := (allItems at:(index+1)) selected: true.
|
|
||||||
"currentItem := parentNode highlightedItem: ((allItems at:(index+1)) selected:true;
|
|
||||||
takeHighlight;yourself); yourself."
|
|
||||||
{ parentNode . currentItem . nodeContent } inspect.
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #operation }
|
|
||||||
GrafoscopioNotebook >> highlightNextItem [
|
|
||||||
| currentItem |
|
|
||||||
currentItem := tree highlightedItem.
|
|
||||||
currentItem
|
|
||||||
ifNotNil: [ | allItems index childrenSize parentNode |
|
|
||||||
currentItem parentNode
|
|
||||||
ifNil: [
|
|
||||||
parentNode := currentItem container.
|
|
||||||
allItems := parentNode roots ]
|
|
||||||
ifNotNil: [
|
|
||||||
parentNode := currentItem parentNode.
|
|
||||||
allItems := parentNode children value. ].
|
|
||||||
childrenSize := currentItem content parent children size.
|
|
||||||
index := allItems indexOf: currentItem.
|
|
||||||
(index < childrenSize) ifTrue: [
|
|
||||||
"{allItems . currentItem . index } inspect."
|
|
||||||
currentItem selected: false.
|
|
||||||
parentNode
|
|
||||||
highlightedItem: ((allItems at:(index+1)) selected:true;
|
|
||||||
takeHighlight;yourself).
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #initialization }
|
{ #category : #initialization }
|
||||||
GrafoscopioNotebook >> initializePresenter [
|
GrafoscopioNotebook >> initializePresenter [
|
||||||
tree whenHighlightedItemChanged: [ :item |
|
tree whenHighlightedItemChanged: [ :item | tree highlightedItem ifNotNil: [self updateBodyFor: item]].
|
||||||
tree highlightedItem ifNotNil: [
|
|
||||||
self inform: item content header.
|
|
||||||
self updateBodyFor: item].
|
|
||||||
].
|
|
||||||
tree whenTreeUpdated: [ :item | item ifNotNil: [self updateBodyFor: item]].
|
tree whenTreeUpdated: [ :item | item ifNotNil: [self updateBodyFor: item]].
|
||||||
header whenTextChanged: [ :arg |
|
header whenTextChanged: [ :arg |
|
||||||
(tree highlightedItem content header) = arg
|
(tree highlightedItem content header) = arg
|
||||||
ifFalse: [ (tree highlightedItem) content header: arg.
|
ifFalse: [
|
||||||
|
(tree highlightedItem) content header: arg.
|
||||||
tree roots: tree roots]].
|
tree roots: tree roots]].
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #initialization }
|
{ #category : #initialization }
|
||||||
|
Loading…
Reference in New Issue
Block a user