VDBVariableObjectListApplication.st
changeset 62 8a52495c2108
parent 60 bcdb393c956f
child 74 1a238ee98ed3
equal deleted inserted replaced
61:a8b0e1d29ef7 62:8a52495c2108
   201     "Modified: / 03-02-2018 / 09:47:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   201     "Modified: / 03-02-2018 / 09:47:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   202 ! !
   202 ! !
   203 
   203 
   204 !VDBVariableObjectListApplication methodsFor:'change & update-delayed'!
   204 !VDBVariableObjectListApplication methodsFor:'change & update-delayed'!
   205 
   205 
       
   206 delayedInvalidateInternalList
       
   207 
       
   208     "/ Updating children may take a while as it needs to issue
       
   209     "/ several commands to the GDB and wait for results. To avoid
       
   210     "/ flickering, we first force an update of all values
       
   211     "/ in background and then force an invalidate.
       
   212     "/ 
       
   213     "/ Note, that update of each individual variable is pushed back 
       
   214     "/ to event queue, allowing the UI to react for user events that 
       
   215     "/ may have come meanwhile.
       
   216 
       
   217     | children changed |
       
   218 
       
   219     children := internalListHolder root children.
       
   220     changed := false.
       
   221     children do:[:each | 
       
   222         self enqueueDelayedAction: [ 
       
   223             "/ Update the child, but only if the list of currently displayed
       
   224             "/ children remains the same. Keep in mind that user may have
       
   225             "/ have switched to another frame before we're finished with the update.
       
   226             internalListHolder root children == children ifTrue: [ changed := each varobj hasChanged or:[changed] ] 
       
   227         ].
       
   228     ].
       
   229     self enqueueDelayedAction:[ 
       
   230         (internalListHolder root children == children and:[changed]) ifTrue:[ super delayedInvalidateInternalList ].
       
   231     ]
       
   232 
       
   233     "Created: / 06-02-2018 / 12:52:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   234     "Modified: / 21-03-2018 / 09:42:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   235 !
       
   236 
   206 delayedUpdateInternalList
   237 delayedUpdateInternalList
   207     | root |
   238     | root |
   208 
   239 
   209     debugger isNil ifTrue:[
   240     debugger isNil ifTrue:[
   210         self internalListHolder root children:#().
   241         self internalListHolder root children:#().