[ZPatterns] name error when executing a skinscript
Joachim Schmitz
[email protected]
Fri, 2 Nov 2001 21:34:46 +0100 (CET)
another try for the same problem.
I have Specialist which stores it's data in a SQL-table, therefore I use a
dummy ZClass with no attributes as the storage class. The dataskin contains:
WHEN OBJECT ADDED CALL
SQL_insert(
buchhandlungID=self.id
,name=self.name
,plz=self.plz
,strasse=self.strasse
)
WHEN OBJECT ADDED CALL
SQL_insert(
buchhandlungID=self.id
,name=self.name
,plz=self.plz
,strasse=self.strasse
)
WITH QUERY SQL_find(buchhandlungID=self.id)
COMPUTE
buchhandlungID
,name
,plz
,strasse
WHEN OBJECT CHANGED STORE
buchhandlungID
,name
,plz
,strasse
USING
SQL_update(
buchhandlungID=self.id
,name=self.name
,plz=self.plz
,strasse=self.strasse
)
WHEN OBJECT DELETED CALL
SQL_delete(buchhandlungID=self.id)
this works for editing and deleting, but when I create a new object it
complains, that "name" is not defined, which is correct. I tried an
INITIALZE OBJECT WITH name=" ", ....
but that did not define the attribute, how can I create the attributes for a
new object ?
Mit freundlichen Grüßen
Joachim Schmitz
AixtraWare, Ing. Büro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven
Telefon: +49-2464-8851, FAX: +49-2464-905163