[gnue] r10251 - in trunk/gnue-forms: . src src/GFObjects src/input/displayHandlers
[email protected] Thu, 2 Dec 2010 14:47:41 -0600 (CST)
| Newsgroups | gmane.comp.cms.gnue.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: reinhard Date: 2010-12-02 14:47:40 -0600 (Thu, 02 Dec 2010) New Revision: 10251 Modified: trunk/gnue-forms/ trunk/gnue-forms/src/GFForm.py trunk/gnue-forms/src/GFObjects/GFBlock.py trunk/gnue-forms/src/GFObjects/GFEntry.py trunk/gnue-forms/src/GFObjects/GFField.py trunk/gnue-forms/src/GFObjects/GFTabStop.py trunk/gnue-forms/src/input/displayHandlers/Checkbox.py trunk/gnue-forms/src/input/displayHandlers/Cursor.py Log: Changed some function parameters for record index from relative offset to absolute number, so these functions can still work when there is no curre= nt record. Property changes on: trunk/gnue-forms ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2010-12-02 17:00:21.529000044 +0100 committer: Reinhard M=C3=BCller <[email protected]> properties:=20 branch-nick: forms + timestamp: 2010-12-02 18:46:43.677000046 +0100 committer: Reinhard M=C3=BCller <[email protected]> properties:=20 branch-nick: forms Name: bzr:file-ids - src/GFObjects/GFObj.py 1459@3a364389-8fce-0310-8f11-cc363fde16c7:tru= nk%2Fgnue-forms:src%2FGFObjects%2FGFObj.py src/GFObjects/GFTabStop.py 3166@3a364389-8fce-0310-8f11-cc363fde16c7:trun= k%2Fgnue-forms:src%2FGFObjects%2FGFTabStop.py src/input/displayHandlers/Cursor.py 7862@3a364389-8fce-0310-8f11-cc363fde= 16c7:trunk%2Fgnue-forms:src%2Finput%2FdisplayHandlers%2FCursor.py + src/GFForm.py 6@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-fo= rms:src%2FGFForm.py src/GFObjects/GFBlock.py 1459@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%= 2Fgnue-forms:src%2FGFObjects%2FGFBlock.py src/GFObjects/GFEntry.py 1459@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%= 2Fgnue-forms:src%2FGFObjects%2FGFEntry.py src/GFObjects/GFField.py 1459@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%= 2Fgnue-forms:src%2FGFObjects%2FGFField.py src/GFObjects/GFTabStop.py 3166@3a364389-8fce-0310-8f11-cc363fde16c7:trun= k%2Fgnue-forms:src%2FGFObjects%2FGFTabStop.py src/input/displayHandlers/Checkbox.py 7862@3a364389-8fce-0310-8f11-cc363f= de16c7:trunk%2Fgnue-forms:src%2Finput%2FdisplayHandlers%2FCheckbox.py src/input/displayHandlers/Cursor.py 7862@3a364389-8fce-0310-8f11-cc363fde= 16c7:trunk%2Fgnue-forms:src%2Finput%2FdisplayHandlers%2FCursor.py Name: bzr:revision-id:v4 - 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] 3140 [email protected] 3141 [email protected] 3142 [email protected] 3143 [email protected] 3144 [email protected] 3145 [email protected] 3146 [email protected] 3147 [email protected] 3148 [email protected] 3149 [email protected] 3150 [email protected] 3151 [email protected] 3152 [email protected] 3153 [email protected] 3154 [email protected] 3155 [email protected] 3156 [email protected] 3157 [email protected] 3158 [email protected] 3159 [email protected] 3160 [email protected] 3161 [email protected] + 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] 3140 [email protected] 3141 [email protected] 3142 [email protected] 3143 [email protected] 3144 [email protected] 3145 [email protected] 3146 [email protected] 3147 [email protected] 3148 [email protected] 3149 [email protected] 3150 [email protected] 3151 [email protected] 3152 [email protected] 3153 [email protected] 3154 [email protected] 3155 [email protected] 3156 [email protected] 3157 [email protected] 3158 [email protected] 3159 [email protected] 3160 [email protected] 3161 [email protected] 3162 [email protected] Name: bzr:text-parents - src/GFObjects/GFObj.py svn-v3-single1-dHJ1bmsvZ251ZS1mb3Jtcw..:3a364= 389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-forms:10149 src/GFObjects/GFTabStop.py [email protected]= tv8mf0wbiycuw1 src/input/displayHandlers/Cursor.py [email protected]= 140804-sn3npws1ykm81ubx + src/GFForm.py [email protected]= 95zlo2 src/GFObjects/GFBlock.py [email protected]= mpvy5nvhkzqz src/GFObjects/GFEntry.py [email protected]= ys8y4ivtfzo4 src/GFObjects/GFField.py [email protected]= 9fkj6z95zlo2 src/input/displayHandlers/Checkbox.py [email protected]= 06140804-sn3npws1ykm81ubx Modified: trunk/gnue-forms/src/GFForm.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-forms/src/GFForm.py 2010-12-02 20:47:36 UTC (rev 10250) +++ trunk/gnue-forms/src/GFForm.py 2010-12-02 20:47:40 UTC (rev 10251) @@ -489,7 +489,7 @@ =20 # ------------------------------------------------------------------= ------- =20 - def _event_focus_changed(self, target, row_offset): + def _event_focus_changed(self, target, record_number): """ Notify the form that the user has moved the focus with a mouse c= lick. =20 @@ -503,7 +503,7 @@ try: self.endEditing() try: - self.__move_focus(target, row_offset) + self.__move_focus(target, record_number) finally: self.beginEditing() except: @@ -894,7 +894,7 @@ # If we've not yet reached the end of the entry list, we just fo= rward # the focus to the next entry. if nextEntry !=3D firstEntry: - self.change_focus(nextEntry, 0) + self.change_focus(nextEntry) return =20 # We have reached the end of the entry list. Do we want to navig= ate to @@ -903,12 +903,12 @@ if currentBlock.autoNextRecord and \ operation in currentBlock.get_possible_operations(): if reverse: - offset =3D -1 + direction =3D "-" else: - offset =3D 1 + direction =3D "+" else: - offset =3D 0 - self.change_focus(nextEntry, offset) + direction =3D None + self.change_focus(nextEntry, direction) return =20 # We've reached the end of the page. Do we want to jump to the n= ext @@ -919,7 +919,7 @@ list =3D pages[i+1:] + pages[:i] self.__find_and_change_focus(list, reverse) else: - self.change_focus(nextEntry, 0) + self.change_focus(nextEntry) =20 # ------------------------------------------------------------------= ------- =20 @@ -1003,7 +1003,7 @@ =20 entry =3D self.__find_focus(list, last) if entry: - self.change_focus(entry, 0) + self.change_focus(entry) =20 =20 # ------------------------------------------------------------------= ------- @@ -1076,19 +1076,23 @@ # Changes to the requested entry object requested by an event source # ------------------------------------------------------------------= ------- =20 - def change_focus(self, widget, row_offset): + def change_focus(self, widget, record_number=3DNone): """ Changes focus to the requested entry object on GF and UI layer. =20 @param widget: entry or page to put focus on. If it is a page, t= he form changes to that page and does not focus any widget. This is = useful to activate a page without a focusable widget on it. + + @param record_number: record number to jump to, or None to keep = the + current record, or "+" to move to the next record, or "-" to= move + to the previous record. """ =20 self.endEditing() old_page =3D self._currentPage try: - self.__move_focus(widget, row_offset) + self.__move_focus(widget, record_number) if self._currentPage !=3D old_page: self.uiWidget._ui_goto_page_(self._currentPage.uiWidget) finally: @@ -1101,14 +1105,8 @@ # Changes to the requested entry object requested by an event source # ------------------------------------------------------------------= ------- =20 - def __move_focus(self, widget, row_offset): - """ - Changes focus to the requested entry object on GF layer. + def __move_focus(self, widget, record_number): =20 - @param widget: entry to put focus on - @param row_offset: number of rows to jump up or down in new widg= et - """ - assert gDebug(5, "Change focus: %s->%s" % (self._currentEntry, w= idget)) =20 if isinstance(widget, GFTabStop): @@ -1126,7 +1124,7 @@ =20 # if we move the record pointer, we also want to run the block-l= evel # focus in and focus out triggers - blockChange =3D (new_block !=3D self._currentBlock) or row_offse= t !=3D 0 + blockChange =3D (new_block !=3D self._currentBlock) or record_nu= mber is not None pageChange =3D (new_page !=3D self._currentPage) =20 self.__editing_blocked =3D True @@ -1158,11 +1156,12 @@ self._currentEntry =3D None self._currentBlock =3D None =20 - if row_offset =3D=3D 1: - # Special case: next_record() can also trigger a new_rec= ord() + if record_number =3D=3D '+': new_block.next_record() - elif row_offset !=3D 0: - new_block.jump_records(row_offset) + elif record_number =3D=3D '-': + new_block.prev_record() + elif record_number is not None: + new_block.goto_record(record_number) =20 self._currentEntry =3D new_entry self._currentBlock =3D new_block Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-forms/src/GFObjects/GFBlock.py 2010-12-02 20:47:36 UTC (re= v 10250) +++ trunk/gnue-forms/src/GFObjects/GFBlock.py 2010-12-02 20:47:40 UTC (re= v 10251) @@ -57,11 +57,11 @@ L{next_record}, L{last_record}, L{goto_record}, L{jump_records}, and L{search_record} methods. =20 - Read and write access to the data of the current record (and the - surrounding records) is possible with the L{get_value} and L{set_val= ue} - methods. New records can be inserted with the L{new_record} and - L{duplicate_record} methods. Records can be marked for deletion at n= ext - commit with the L{delete_record} method and this mark can be undone = with + Read and write access to the data of the current record (and to any = other + record) is possible with the L{get_value} and L{set_value} methods. = New + records can be inserted with the L{new_record} and L{duplicate_recor= d} + methods. Records can be marked for deletion at next commit with the + L{delete_record} method and this mark can be undone with L{undelete_record}. =20 The L{post} and L{requery} methods are available to write the block'= s @@ -930,34 +930,40 @@ # Status information # ------------------------------------------------------------------= ------- =20 - def get_record_status(self, offset=3D0): + def get_record_status(self, record_number=3DNone): """ - Find out about the status of the record. + Find out about the status of a record. =20 The status can be one of 'empty', 'inserted', 'void', 'clean', - 'modified', or 'deleted', or C{None} if there is no current reco= rd. + 'modified', or 'deleted', or C{None} if the block is unbound or = in + query mode, the given record doesn't exist, or the current recor= d was + selected and there is no current record. + + @param record_number: the record number to investigate, or None = for the + current record. """ =20 if self._dataSourceLink.type =3D=3D 'unbound': return None =20 - elif self.mode =3D=3D 'query': + if self.mode =3D=3D 'query': return None =20 - elif self.mode =3D=3D 'init': + if self.mode =3D=3D 'init' and record_number is None: rec =3D self.__initializing_record - else: if self.__resultset is None: return None =20 - record_number =3D self.__resultset.getRecordNumber() + offse= t + if record_number is None: + record_number =3D self.__resultset.getRecordNumber() + if record_number < 0 or \ record_number >=3D self.__resultset.getRecordCount()= : return None - else: - rec =3D self.__resultset[record_number] =20 + rec =3D self.__resultset[record_number] + # try functions that do not depend on detail records first, beca= use # they are faster if rec.isVoid(): @@ -1100,40 +1106,39 @@ # Field access # ------------------------------------------------------------------= ------- =20 - def get_value(self, field, offset): + def get_value(self, field, record_number): """ Return the value of the given field, depending on the block's st= ate. =20 @param field: the GFField object. - @param offset: the offset from the current record (to get data f= or - records other than the current one). + @param record_number: the record number to get the value from, o= r None + for the current record. """ =20 - if offset =3D=3D 0: - if self.mode =3D=3D 'query' and self.queryable: - value =3D self.__query_values.get(field) + if self.mode =3D=3D 'query' and self.queryable: + if record_number is None or record_number =3D=3D 0: + return self.__query_values.get(field) + else: + return None =20 - elif self.mode =3D=3D 'init': - value =3D self.__initializing_record[field.field] - + if self.mode =3D=3D 'init': + if record_number is None: + return self.__initializing_record[field.field] else: - if self.__resultset and self.__resultset.current: - value =3D self.__resultset.current[field.field] - else: - value =3D None - else: - if self.mode in ['query', 'init'] or self.__resultset is Non= e: - value =3D None - else: - record_number =3D self.__resultset.getRecordNumber() + o= ffset - if record_number < 0 or \ - record_number >=3D self.__resultset.getRecordCou= nt(): - value =3D None - else: - value =3D self.__resultset[record_number][field.fiel= d] + return None =20 - return value + if self.__resultset is None: + return None =20 + if record_number is None: + record_number =3D self.__resultset.getRecordNumber() + + if record_number < 0 or \ + record_number >=3D self.__resultset.getRecordCount(): + return None + + return self.__resultset[record_number][field.field] + # ------------------------------------------------------------------= ------- =20 def set_value(self, field, value): @@ -1394,11 +1399,10 @@ self.mode =3D 'normal' =20 try: - for recno in xrange(0, self.__resultset.getRecordCount()): - offset =3D recno - self.__resultset.getRecordNumber() + for record_number in xrange(0, self.__resultset.getRecordCou= nt()): add =3D {} for field in fields: - add[field.name] =3D field.get_value(offset) + add[field.name] =3D field.get_value(record_number) result.append(add) finally: self.mode =3D save_mode Modified: trunk/gnue-forms/src/GFObjects/GFEntry.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-forms/src/GFObjects/GFEntry.py 2010-12-02 20:47:36 UTC (re= v 10250) +++ trunk/gnue-forms/src/GFObjects/GFEntry.py 2010-12-02 20:47:40 UTC (re= v 10251) @@ -122,10 +122,10 @@ # Consider empty labels disabled. This makes a differenc= e for # the enclosing boxes. if index is None: - offset =3D 0 + record_number =3D None else: - offset =3D index - self._visibleIndex - return (self._field.get_value(offset) is not None) + record_number =3D self.visible_offset + index + return (self._field.get_value(record_number) is not None= ) else: return GFFieldBound._is_enabled_(self, index) =20 Modified: trunk/gnue-forms/src/GFObjects/GFField.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-forms/src/GFObjects/GFField.py 2010-12-02 20:47:36 UTC (re= v 10250) +++ trunk/gnue-forms/src/GFObjects/GFField.py 2010-12-02 20:47:40 UTC (re= v 10251) @@ -284,7 +284,7 @@ # Determine wether a field is editable or not # ------------------------------------------------------------------= ------- =20 - def is_editable(self, offset=3D0): + def is_editable(self, record_number=3DNone): =20 if self._block.mode =3D=3D 'query' or self.autosearch: return self._block.queryable @@ -297,7 +297,7 @@ if self.editable =3D=3D 'N': return False =20 - new =3D (self._block.get_record_status(offset) \ + new =3D (self._block.get_record_status(record_number) \ in ['empty', 'inserted', 'void']) =20 if self._block.editable =3D=3D 'new' and not new: @@ -310,7 +310,8 @@ if self.editable =3D=3D 'update' and new: return False =20 - if self.editable =3D=3D 'null' and self.__get_value(offset) = is not None: + if self.editable =3D=3D 'null' \ + and self.__get_value(record_number) is not None: return False =20 return True @@ -402,16 +403,16 @@ # Reading and writing the user value of the field # ------------------------------------------------------------------= ------- =20 - def get_value(self, offset=3D0): + def get_value(self, record_number=3DNone): """ Return the current user value of the field. For lookup fields, t= his is the foreign key description. """ =20 if not self.__is_lookup: - return self.__get_value(offset) + return self.__get_value(record_number) =20 - db_value =3D self.__get_value(offset) + db_value =3D self.__get_value(record_number) =20 if self._block.mode =3D=3D 'query' and db_value =3D=3D chr(0): return u_("(empty)") @@ -450,17 +451,10 @@ # Reading and writing the DB value of a field # ------------------------------------------------------------------= ------- =20 - def __get_value(self, offset=3D0): - """ - Return the current value of the field, depending on the state of= the - form and the block. + def __get_value(self, record_number=3DNone): =20 - @param offset: offset from the current record (to get values of = records - other than the current record). - """ + value =3D self._block.get_value(self, record_number) =20 - value =3D self._block.get_value(self, offset) - if isinstance(value, datatypes.InvalidValueType): raise value.exception =20 Modified: trunk/gnue-forms/src/GFObjects/GFTabStop.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-forms/src/GFObjects/GFTabStop.py 2010-12-02 20:47:36 UTC (= rev 10250) +++ trunk/gnue-forms/src/GFObjects/GFTabStop.py 2010-12-02 20:47:40 UTC (= rev 10251) @@ -143,7 +143,8 @@ and index =3D=3D self._visibleIndex: return =20 - self._form._event_focus_changed(self, index - self._visibleIndex= ) + self._form._event_focus_changed(self, + self.__first_visible_record + index) =20 # ------------------------------------------------------------------= ------- =20 @@ -232,6 +233,39 @@ =20 =20 # ------------------------------------------------------------------= ------- + # Information about the visible records + # ------------------------------------------------------------------= ------- + + @property + def visible_offset(self): + """ + Record number of the first visible record in this entry. + + If this entry is part of a grid, this property contains the reco= rd + number of the record visible in the first line. This is equal to= the + number of records which have scrolled out through the top of the= grid. + + If this entry is not part of a grid, this property simply contai= ns the + record number currently visible in the entry, or None if no reco= rd is + visible (because there is no current record). + """ + return self.__first_visible_record + + @property + def visible_index(self): + """ + Zero-based index of the current record within the visible record= s. + + If this entry is part of a grid, this property contains the row = number + that holds the current record. Numbering starts with zero. If th= e + current record is not visible in the grid (for example, because = there + is no current record set), this property holds None. + + If this entry is not part of a grid, this property always contai= ns 0. + """ + return self._visibleIndex + + # ------------------------------------------------------------------= ------- # Recalculate the visible index of an object # ------------------------------------------------------------------= ------- =20 @@ -395,7 +429,7 @@ return False =20 # Attached field is not editable in current mode: not navigable. - if isinstance(self, GFFieldBound) and not self._field.is_editabl= e(0): + if isinstance(self, GFFieldBound) and not self._field.is_editabl= e(): return False =20 # Control not navigable in query mode. @@ -415,7 +449,7 @@ Move the UI and GF focus to this object. """ =20 - self._form.change_focus(self, index - self._visibleIndex) + self._form.change_focus(self, self.__first_visible_record + inde= x) =20 =20 # ------------------------------------------------------------------= ------- @@ -595,10 +629,10 @@ return False else: if index is None: - offset =3D 0 + record_number =3D None else: - offset =3D index - self._visibleIndex - return self._field.is_editable(offset) + record_number =3D self.visible_offset + index + return self._field.is_editable(record_number) =20 =20 # ------------------------------------------------------------------= ------- @@ -717,7 +751,7 @@ if not (index =3D=3D self._visibleIndex \ and self._displayHandler.editing): try: - value =3D self._field.get_value(index - self._visibl= eIndex) + value =3D self._field.get_value(self.visible_offset = + index) except Exception: # invalid value value =3D None display =3D self._displayHandler.build_display(value, Fa= lse) Modified: trunk/gnue-forms/src/input/displayHandlers/Checkbox.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-forms/src/input/displayHandlers/Checkbox.py 2010-12-02 20:= 47:36 UTC (rev 10250) +++ trunk/gnue-forms/src/input/displayHandlers/Checkbox.py 2010-12-02 20:= 47:40 UTC (rev 10251) @@ -116,7 +116,7 @@ =20 def beginEdit(self): =20 - self.editing =3D self.field.is_editable(0) + self.editing =3D self.field.is_editable() self.display =3D self.build_display(self.field.get_value(), self.edi= ting) self.modified =3D False self._cursor =3D 0 Modified: trunk/gnue-forms/src/input/displayHandlers/Cursor.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-forms/src/input/displayHandlers/Cursor.py 2010-12-02 20:47= :36 UTC (rev 10250) +++ trunk/gnue-forms/src/input/displayHandlers/Cursor.py 2010-12-02 20:47= :40 UTC (rev 10251) @@ -139,7 +139,7 @@ with this display handler, and creates the string to display in = the form. """ - self.editing =3D self.field.is_editable(0) + self.editing =3D self.field.is_editable() self.modified =3D False self.display =3D self.build_display(self.field.get_value(), self= .editing) self._cursor =3D len(self.display)