280 |
# |
# |
281 |
def changeFocus(self, widget, fireFocusTriggers=1): |
def changeFocus(self, widget, fireFocusTriggers=1): |
282 |
|
|
283 |
GDebug.printMesg (1, 'changing focus') |
GDebug.printMesg (1, 'changing focus fireFocusTriggers=%s' % fireFocusTriggers) |
284 |
# for i in dir (widget): |
# for i in dir (widget): |
285 |
# attr= getattr (widget, i) |
# attr= getattr (widget, i) |
286 |
# if not callable (attr): |
# if not callable (attr): |
312 |
self._currentBlock.processTrigger('Pre-FocusOut') |
self._currentBlock.processTrigger('Pre-FocusOut') |
313 |
if pageChange: |
if pageChange: |
314 |
self._currentPage.processTrigger('Pre-FocusOut') |
self._currentPage.processTrigger('Pre-FocusOut') |
|
self._currentPage.processTrigger('Post-FocusOut') |
|
|
if blockChange: |
|
|
self._currentBlock.processTrigger('Post-FocusOut') |
|
|
if fieldChange: |
|
|
self._currentEntry.processTrigger('Post-FocusOut') |
|
315 |
except AttributeError: |
except AttributeError: |
316 |
pass |
pass |
317 |
|
|
318 |
oldEntry = self._currentEntry |
oldEntry = self._currentEntry |
319 |
|
oldBlock = self._currentBlock |
320 |
|
olgPage = self._currentPage |
321 |
|
|
322 |
self._currentEntry = widget |
self._currentEntry = widget |
323 |
self._currentBlock = self._currentEntry._block |
self._currentBlock = self._currentEntry._block |
324 |
self._currentPage = self._currentBlock._page |
self._currentPage = self._currentBlock._page |
333 |
self.dispatchEvent(GFEvent('updateENTRY', self._currentEntry)) |
self.dispatchEvent(GFEvent('updateENTRY', self._currentEntry)) |
334 |
|
|
335 |
if fireFocusTriggers: |
if fireFocusTriggers: |
336 |
|
try: |
337 |
|
if pageChange: |
338 |
|
oldPage.processTrigger('Post-FocusOut') |
339 |
|
if blockChange: |
340 |
|
oldBlock.processTrigger('Post-FocusOut') |
341 |
|
if fieldChange: |
342 |
|
oldEntry.processTrigger('Post-FocusOut') |
343 |
|
except AttributeError: |
344 |
|
pass |
345 |
|
|
346 |
|
if fireFocusTriggers: |
347 |
if pageChange: |
if pageChange: |
348 |
self._currentPage.processTrigger('Pre-FocusIn') |
self._currentPage.processTrigger('Pre-FocusIn') |
349 |
if blockChange: |
if blockChange: |