280 |
# |
# |
281 |
def changeFocus(self, widget, fireFocusTriggers=1): |
def changeFocus(self, widget, fireFocusTriggers=1): |
282 |
|
|
283 |
GDebug.printMesg (1, 'changing focus fireFocusTriggers=%s' % fireFocusTriggers) |
GDebug.printMesg (1, 'changing focus') |
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): |
317 |
|
|
318 |
oldEntry = self._currentEntry |
oldEntry = self._currentEntry |
319 |
oldBlock = self._currentBlock |
oldBlock = self._currentBlock |
320 |
olgPage = self._currentPage |
oldPage = self._currentPage |
321 |
|
|
322 |
self._currentEntry = widget |
self._currentEntry = widget |
323 |
self._currentBlock = self._currentEntry._block |
self._currentBlock = self._currentEntry._block |
872 |
return not event.__error__ |
return not event.__error__ |
873 |
|
|
874 |
|
|
875 |
def prevRecord(self): |
def prevRecord(self,block=None): |
876 |
if self._currentBlock.mode == 'query': |
if self._currentBlock.mode == 'query': |
877 |
GDebug.printMesg(5,'Cannot go to previous record: in query mode!') |
GDebug.printMesg(5,'Cannot go to previous record: in query mode!') |
878 |
return |
return |
879 |
self._currentBlock.prevRecord() |
if block: |
880 |
|
block.prevRecord() |
881 |
|
else: |
882 |
|
self._currentBlock.prevRecord() |
883 |
|
|
884 |
def firstRecord(self): |
def firstRecord(self): |
885 |
if self._currentBlock.mode == 'query': |
if self._currentBlock.mode == 'query': |
893 |
return |
return |
894 |
self._currentBlock.lastRecord() |
self._currentBlock.lastRecord() |
895 |
|
|
896 |
def nextRecord(self): |
def nextRecord(self,block=None): |
897 |
if self._currentBlock.mode == 'query': |
if self._currentBlock.mode == 'query': |
898 |
GDebug.printMesg(5,'Cannot go to next record: in query mode!') |
GDebug.printMesg(5,'Cannot go to next record: in query mode!') |
899 |
return |
return |
900 |
self._currentBlock.nextRecord() |
if block: |
901 |
|
block.nextRecord() |
902 |
|
else: |
903 |
|
self._currentBlock.nextRecord() |
904 |
|
|
905 |
def jumpRecord(self,count): |
def jumpRecord(self,count,block=None): |
906 |
if self._currentBlock.mode == 'query': |
if self._currentBlock.mode == 'query': |
907 |
GDebug.printMesg(5,'Cannot jump to record: in query mode!') |
GDebug.printMesg(5,'Cannot jump to record: in query mode!') |
908 |
return |
return |
909 |
self._currentBlock.jumpRecord(count) |
if block: |
910 |
|
block.jumpRecord(count) |
911 |
|
else: |
912 |
|
self._currentBlock.jumpRecord(count) |
913 |
|
|
914 |
def toggleInsertMode(self): |
def toggleInsertMode(self): |
915 |
self._insertMode = not self._insertMode |
self._insertMode = not self._insertMode |