[ZPatterns] Problem with a skinscript

Joachim Schmitz [email protected]
Thu, 11 Oct 2001 21:08:01 +0200 (CEST)


Hi,

I have this skinscript:

WITH "%s %s" % (editor and "Editor",author and "Author")
COMPUTE rollen = RESULT
DEPENDENT ON editor, author

WHEN OBJECT ADDED CALL
       SQL_insert(rechte_id=self.id,user_id=self.user_id,bereichs_id=self.bereichs_id
       ,rollen=self.rollen)

WHEN OBJECT CHANGED STORE user_id, bereichs_id, rechte_id
    ,editor, author, rollen
USING
    SQL_update(rechte_id=self.id,user_id=self.user_id,bereichs_id=self.bereichs_id
    ,rollen=self.rollen)

WITH QUERY SQL_find(rechte_id=self.id) COMPUTE
    rechte_id=rechte_id, user_id=user_id, bereichs_id=bereichs_id,
    rollen=rollen
    ,editor=_.string.find(rollen,'Editor') > -1
    ,author=_.string.find(rollen,'Author') > -1

where "rollen" is a computet attribute from the boolean attributes editor and
author. This works fine, when first creating the object, but when I change the
boolean values, the rollen value does not change.



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