/[gnue]/gnue-forms/src/GFForm.py
ViewVC logotype

Diff of /gnue-forms/src/GFForm.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.249 by reinhard, Mon Oct 20 19:31:26 2003 UTC revision 1.250 by siesel, Fri Nov 7 18:27:56 2003 UTC
# Line 157  class GFForm(GRootObj, GFObj, events.Eve Line 157  class GFForm(GRootObj, GFObj, events.Eve
157        'GUI:STATUSBAR:SUPPRESS': 0,        'GUI:STATUSBAR:SUPPRESS': 0,
158      }      }
159    
160        self._in_trigger_lock = 0
161    
162    #    #
163    # primaryInit    # primaryInit
164    #    #
# Line 845  class GFForm(GRootObj, GFObj, events.Eve Line 847  class GFForm(GRootObj, GFObj, events.Eve
847    # to a specfic entry widget    # to a specfic entry widget
848    #    #
849    def triggerSetFocus(self,object):    def triggerSetFocus(self,object):
850      self.changeFocus(object._object,1)      # add global focus locking
851        if self._in_trigger_lock:
852          print "Already called by a trigger"
853          return
854    
855        self._in_trigger_lock = 1
856        
857        focus = object._object
858        if focus._type=='GFField':
859          try:
860            focus = focus._entryList[0]
861          except KeyError:
862            raise "setFocus failed: GFField is not bound to an GFEntry object."
863    
864        if focus._type != 'GFEntry':
865          raise "setFocus failed: Can just switch to GFEntry objects. " +\
866                "You passed a '%s' object." % focus._type
867        self.changeFocus(focus,1)
868      self.dispatchEvent('gotoENTRY',object=self._currentEntry,_form=self)      self.dispatchEvent('gotoENTRY',object=self._currentEntry,_form=self)
869    
870        self._in_trigger_lock = 0
871        
872    #    #
873    # allow the trigger to get a handle to    # allow the trigger to get a handle to
874    # an actual GFEntry object    # an actual GFEntry object

Legend:
Removed from v.1.249  
changed lines
  Added in v.1.250

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26