[ZPatterns] Problem with a skinscript

Steve Spicklemire [email protected]
Thu, 11 Oct 2001 15:01:48 -0500


Hi Joachim,

	It looks like you have two attribute providers for rollen. Shouldn't
the last statement be:

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


without the "rollen=rollen" line?

-steve

Joachim Schmitz wrote:
> 
> 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
> 
> _______________________________________________
> ZPatterns mailing list
> [email protected]
> http://www.eby-sarna.com/mailman/listinfo/zpatterns