[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue common/src/FormatMasks/TextMask.py forms/s...
From: |
Jason Cater |
Subject: |
gnue common/src/FormatMasks/TextMask.py forms/s... |
Date: |
Fri, 15 Feb 2002 18:59:41 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/02/15 18:59:41
Modified files:
common/src/FormatMasks: TextMask.py
forms/src : GFDisplayHandler.py GFForm.py UIbase.py
UIwxpython.py
forms/src/GFObjects: GFEntry.py
Log message:
more work on input handlers [synching machines]
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/TextMask.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFDisplayHandler.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFForm.py.diff?tr1=1.146&tr2=1.147&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/UIbase.py.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/UIwxpython.py.diff?tr1=1.136&tr2=1.137&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFObjects/GFEntry.py.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
Patches:
Index: gnue/common/src/FormatMasks/TextMask.py
diff -c gnue/common/src/FormatMasks/TextMask.py:1.1
gnue/common/src/FormatMasks/TextMask.py:1.2
*** gnue/common/src/FormatMasks/TextMask.py:1.1 Wed Oct 10 19:24:50 2001
--- gnue/common/src/FormatMasks/TextMask.py Fri Feb 15 18:59:41 2002
***************
*** 1,19 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
# Copyright 2001 Free Software Foundation
--- 1,19 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
# Copyright 2001 Free Software Foundation
***************
*** 25,50 ****
#
# NOTES:
#
! # \ Next character is a literal
! # a Abbreviated weekday name (Sun..Sat)
! # b Abbreviated month name (Jan..Dec)
! # d day of month (01..31)
! # h hour (01..12)
! # g hour (00..23)
! # j day of year (001..366)
! # m month (01..12)
! # i minute (00..59)
! # p am or pm
! # s second (00..60)
! # u week number of year with Sunday as first day of
! # week (00..53)
! # v week number of year with Monday as first day of
! # week (01..52)
! # y year
#
! # Predefined literals: "/-.:, "
#
! # Example:
#
# m/d/y 01/01/2001
# m/y 01/2001
--- 25,39 ----
#
# NOTES:
#
! # Global Directives
! # {proper} Display all text in Proper case
! # {upper} Display all text in Upper case
! # {lower} Display all text in Lower case
#
! # Predefined literals: " "
#
! #
! # Example:
#
# m/d/y 01/01/2001
# m/y 01/2001
***************
*** 72,78 ****
predefinedDateLiterals = "-./: ,"
! class DateLiteral (Literal):
def addSelfToDate(self, value, date):
pass
--- 61,67 ----
predefinedDateLiterals = "-./: ,"
! class DateLiteral (Literal):
def addSelfToDate(self, value, date):
pass
Index: gnue/forms/src/GFDisplayHandler.py
diff -c gnue/forms/src/GFDisplayHandler.py:1.2
gnue/forms/src/GFDisplayHandler.py:1.3
*** gnue/forms/src/GFDisplayHandler.py:1.2 Fri Feb 15 09:52:01 2002
--- gnue/forms/src/GFDisplayHandler.py Fri Feb 15 18:59:41 2002
***************
*** 42,55 ****
#
class FieldDisplayHandler:
- def __init__(self, formatter):
-
- # Are we in "editing" mode, or display mode?
- self.editing = 0
-
- # Needs to be set by the child classes
- self.formatter = formatter
def setValue(self, value):
self.value = value
--- 42,52 ----
#
class FieldDisplayHandler:
+ #####################
+ #
+ # General methods
+ #
def setValue(self, value):
self.value = value
***************
*** 63,68 ****
--- 60,74 ----
return self.value
+ def getDisplay(self):
+ return "%s" % self.value
+
+
+ #####################
+ #
+ # Editing methods
+ #
+
def beginEdit(self, cursor=0):
self.editing = 1
***************
*** 82,87 ****
--- 88,94 ----
return 1
+ #####################
#
# Cursor movement
#
***************
*** 99,118 ****
self.moveCursor(0)
#
# Selection stuff
#
! def setSelectedArea(self, cursor1, cursor2):
self.selection1 = cursor1
self.selection2 = cursor2
! def getSelectedArea(self):
if self.selection1 == None:
return None
else:
return (self.selection1, self.selection2)
--- 106,151 ----
self.moveCursor(0)
+ #####################
#
# Selection stuff
#
! def setSelectionArea(self, cursor1, cursor2):
self.selection1 = cursor1
self.selection2 = cursor2
! def getSelectionArea(self):
if self.selection1 == None:
return None
else:
return (self.selection1, self.selection2)
+ def moveSelectionCursor(self, relative):
+ pass
+
+
+ #####################
+ #
+ # Internal methods
+ #
+ ## TEMPORARY "=None" !!!
+ def __init__(self, entry, formatter=None):
+
+ # Are we in "editing" mode, or display mode?
+ self.editing = 0
+
+ self.entry = entry
+
+ # Needs to be set by the child classes
+ self.formatter = formatter
+
+
+ #####################
+ #
+ # General methods
+ #
+
***************
*** 121,128 ****
# Handler for Date types
#
class DateDisplayHandler(FieldDisplayHandler):
! def __init__(self, displayMask, inputMask):
! FieldDisplayHandler(DateMask.DateMask(displayMask,
inputMask, displayMask))
--- 154,161 ----
# Handler for Date types
#
class DateDisplayHandler(FieldDisplayHandler):
! def __init__(self, entry, displayMask, inputMask):
! FieldDisplayHandler(entry, DateMask.DateMask(displayMask,
inputMask, displayMask))
***************
*** 133,138 ****
--- 166,180 ----
#
#
class TextDisplayHandler(FieldDisplayHandler):
+ pass
+
+
+
+ #############################################################################
+ #
+ #
+ #
+ class DropdownDisplayHandler(FieldDisplayHandler):
pass
Index: gnue/forms/src/GFForm.py
diff -c gnue/forms/src/GFForm.py:1.146 gnue/forms/src/GFForm.py:1.147
*** gnue/forms/src/GFForm.py:1.146 Sun Feb 10 18:39:42 2002
--- gnue/forms/src/GFForm.py Fri Feb 15 18:59:41 2002
***************
*** 1,4 ****
--- 1,6 ----
#
+ # Copyright 2000-2002 Free Software Foundation
+ #
# This file is part of GNU Enterprise.
#
# GNU Enterprise is free software; you can redistribute it
***************
*** 15,22 ****
# License along with program; see the file COPYING. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
- #
- # Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# GFForm.py
--- 17,22 ----
Index: gnue/forms/src/GFObjects/GFEntry.py
diff -c gnue/forms/src/GFObjects/GFEntry.py:1.39
gnue/forms/src/GFObjects/GFEntry.py:1.40
*** gnue/forms/src/GFObjects/GFEntry.py:1.39 Mon Feb 11 22:03:50 2002
--- gnue/forms/src/GFObjects/GFEntry.py Fri Feb 15 18:59:41 2002
***************
*** 1,23 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
# License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
- # Copyright 2000, 2001 Free Software Foundation
- #
#
# FILE:
# GFObjects.py
--- 1,23 ----
#
+ # Copyright 2000-2002 Free Software Foundation
+ #
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
# License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
#
# FILE:
# GFObjects.py
***************
*** 27,41 ****
#
# NOTES:
#
- # HISTORY:
- # Copyright (c) 2000, 2001 Free Software Foundation
- #
from gnue.common import GDebug, FormatMasks
from gnue.common import GConfig
from GFValue import GFValue
import string
############################################################
# GFEntry
#
--- 27,40 ----
#
# NOTES:
#
from gnue.common import GDebug, FormatMasks
from gnue.common import GConfig
+ import GFDisplayHandler
from GFValue import GFValue
import string
+
############################################################
# GFEntry
#
***************
*** 84,92 ****
def getReadonly(self):
return self.readonly
def setReadonly(self,value):
self.readonly = value
!
def _buildObject(self):
# Convert deprecated attributes
--- 83,92 ----
def getReadonly(self):
return self.readonly
+
def setReadonly(self,value):
self.readonly = value
!
def _buildObject(self):
# Convert deprecated attributes
***************
*** 167,175 ****
else:
default = None
def isQueryable(self):
! if self._queryable:
! return 1
#
# Pulls the proper value from the resultSet
#
--- 167,187 ----
else:
default = None
+
+ # Create an appropriate display handler
+ if self.style == 'checkbox':
+ self.displayHandler = GFDisplayHandler.CheckboxDisplayHandler(self,
+ self._maskHandler)
+ elif self.style == 'dropdown':
+ self.displayHandler = GFDisplayHandler.DropdownDisplayHandler(self,
+ self._maskHandler)
+ elif self.
+
+
def isQueryable(self):
! return self._queryable:
!
!
#
# Pulls the proper value from the resultSet
#
***************
*** 177,183 ****
# We have to check to see if the _block has been
# setup yet. The Trigger system calls getValue
# before it's ready so we fake it
! if hasattr(self,'_block'):
if self._block.mode == 'query':
if self._block._queryValues.has_key(self):
value = self._block._queryValues[self]
--- 189,195 ----
# We have to check to see if the _block has been
# setup yet. The Trigger system calls getValue
# before it's ready so we fake it
! if hasattr(self,'_block'):
if self._block.mode == 'query':
if self._block._queryValues.has_key(self):
value = self._block._queryValues[self]
Index: gnue/forms/src/UIbase.py
diff -c gnue/forms/src/UIbase.py:1.51 gnue/forms/src/UIbase.py:1.52
*** gnue/forms/src/UIbase.py:1.51 Thu Feb 14 01:22:23 2002
--- gnue/forms/src/UIbase.py Fri Feb 15 18:59:41 2002
***************
*** 1,4 ****
--- 1,6 ----
#
+ # Copyright 2000-2002 Free Software Foundation
+ #
# This file is part of GNU Enterprise.
#
# GNU Enterprise is free software; you can redistribute it
***************
*** 15,22 ****
# License along with program; see the file COPYING. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
- #
- # Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# UIbase.py
--- 17,22 ----
Index: gnue/forms/src/UIwxpython.py
diff -c gnue/forms/src/UIwxpython.py:1.136 gnue/forms/src/UIwxpython.py:1.137
*** gnue/forms/src/UIwxpython.py:1.136 Sat Feb 9 23:43:04 2002
--- gnue/forms/src/UIwxpython.py Fri Feb 15 18:59:41 2002
***************
*** 1,4 ****
--- 1,6 ----
#
+ # Copyright 2000-2002 Free Software Foundation
+ #
# This file is part of GNU Enterprise.
#
# GNU Enterprise is free software; you can redistribute it
***************
*** 15,22 ****
# License along with program; see the file COPYING. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
- #
- # Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# UIwxpython.py
--- 17,22 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue common/src/FormatMasks/TextMask.py forms/s...,
Jason Cater <=