[Zope-dev] Virtual dataskinned ZClass instance

Godefroid Chapelle gotcha@swing.be
Wed, 18 Apr 2001 20:39:54 +0200


Steve Alexander a =E9crit :

> Godefroid Chapelle wrote:
>
> >
> >         where getNames is a python method in a DataSkin Class Extende=
r.
> > It is defined as :
> >
> >              import string
> >              list =3D string.split(context.id, '_')
> >              return list[1]
>
> use getId() perhaps?
>
> --
>
> Steve Alexander

When using context.getId(), I get the id of the specialist, not of the
HumanClass instance...

Actually, what I present is a "toy test" where I try to access the id as =
you
do in the skinscript exapmle you sent me...


If I change the skinscript to something simpler...

WITH 'test' COMPUTE prenom=3DRESULT


and the DTML to :

<dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<dtml-var "defaultRack.getItem('100_Peter').prenom">
<dtml-var standard_html_footer>


I get the same unauthorized error response but this time when accessing
'prenom'.

I suppose ther something wrong with the default ZClass constructor which =
is
used by the rack to make the instance... but is that correct ... no idea.=
..

--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849