Author: johannes
Date: 2006-03-27 02:41:26 -0600 (Mon, 27 Mar 2006)
New Revision: 8267
Modified:
trunk/gnue-appserver/src/geasSession.py
trunk/gnue-appserver/src/test.py
Log:
Fixed findItem () for calculated properties
Modified: trunk/gnue-appserver/src/geasSession.py
===================================================================
--- trunk/gnue-appserver/src/geasSession.py 2006-03-27 08:10:56 UTC (rev
8266)
+++ trunk/gnue-appserver/src/geasSession.py 2006-03-27 08:41:26 UTC (rev
8267)
@@ -552,14 +552,14 @@
for p in propertylist:
item = classdef.findItem (p)
- if isinstance (item, repository.Property):
- typelist.append (item.fullType)
+ if item is None:
+ raise repository.PropertyNotFoundError, (p, classdef.fullName)
- elif isinstance (item. repository.Procedure):
+ elif isinstance (item, repository.Procedure):
typelist.append ('procedure')
else:
- raise repository.PropertyNotFoundError, (p, classdef.fullName)
+ typelist.append (item.fullType)
result.append (typelist)
Modified: trunk/gnue-appserver/src/test.py
===================================================================
--- trunk/gnue-appserver/src/test.py 2006-03-27 08:10:56 UTC (rev 8266)
+++ trunk/gnue-appserver/src/test.py 2006-03-27 08:41:26 UTC (rev 8267)
@@ -108,7 +108,8 @@
rset = session.load ("address_person", [None],
["address_name", "address_street", "address_city",
"address_country.address_code",
- "address_country.address_name"])
+ "address_country.address_name",
+ "address_nextmeeting"])
self._ok ()
print "These are again the values of the first instance:"
@@ -116,12 +117,14 @@
print " Street :", rset[0][1]
print " City :", rset[0][2]
print " Country:", rset[0][3] + '/' + rset[0][4]
+ print " Meeting:", rset[0][5]
print "Loading the first instance with load () ...",
rset = session.load ("address_person", [first_id],
["address_name", "address_street", "address_city",
"address_country.address_code",
- "address_country.address_name"])
+ "address_country.address_name",
+ "address_nextmeeting"])
self._ok ()
print "These are again the values of the first instance:"
@@ -129,6 +132,7 @@
print " Street :", rset[0][1]
print " City :", rset[0][2]
print " Country:", rset[0][3] + '/' + rset[0][4]
+ print " Meeting:", rset[0][5]
print "Now I call the procedure 'show' for the first instance:"
try:
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue