[ZPatterns] Problem with a skinscript

Joachim Schmitz js@aixtraware.de
Thu, 11 Oct 2001 22:11:26 +0200 (CEST)


Hi Steve,

thanks a lot, that did it. This was my first more complicatet Skinscript.


On Thu, 11 Oct 2001, Steve Spicklemire wrote:

>
> 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
> > ZPatterns@eby-sarna.com
> > http://www.eby-sarna.com/mailman/listinfo/zpatterns
>
>

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