Re: [Zope] Base ZClass propertysheet management

2000-10-06 Thread Jim Washington

Hi, Seb

Go to the "Views" tab of the ProductItem ZClass.  You should be able to
add another tab referring to propertysheets/Picture/manage.  This has
worked for me in a similar situation.

-- Jim Washington

Seb Bacon wrote:
> 
> Thanks,
> 
> I'll rephrase it using my real life problem:
> 
> I have a Picture class, which comprises image, title, description, etc.
> I also have a ProductItem class, which subclasses Picture to include a
> price, etc.
> 
> So finally I have got a ProductItem class, which has a title, image, price,
> ...
> 
> I can access properties inherited from the Picture no problem.  The problem
> is that the default management screen for editing the properties of
> ProductItem, propertysheets/Details/manage, only provides a means of editing
> the unique properties of ProductItem.  Is there a means of managing all the
> properties of a ZClass, including those of its parent class?  Or do I have
> to code my own management screen to do this?  And if so, what is the correct
> way of refering to these properties in DTML?

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Base ZClass propertysheet management

2000-10-06 Thread Seb Bacon

Thanks,

I'll rephrase it using my real life problem:

I have a Picture class, which comprises image, title, description, etc.
I also have a ProductItem class, which subclasses Picture to include a
price, etc.

So finally I have got a ProductItem class, which has a title, image, price,
...

I can access properties inherited from the Picture no problem.  The problem
is that the default management screen for editing the properties of
ProductItem, propertysheets/Details/manage, only provides a means of editing
the unique properties of ProductItem.  Is there a means of managing all the
properties of a ZClass, including those of its parent class?  Or do I have
to code my own management screen to do this?  And if so, what is the correct
way of refering to these properties in DTML?

Feeling a bit dumb...cheers,

Seb


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Base ZClass propertysheet management

2000-10-06 Thread knight

Either I don't fully understand your question, or I'm misinterpreting what
you are trying to accomplish.

If you are subclassing A, calling it B, then it _already_ has the
properties of A when it was subclassed. However, if you have two instances
running, one A, and one subclass of A called B, then you can not access
that data in A from B since they are seperate instances.

Maybe you could clarify what you are trying to accomplish (example
maybe)...

Regards,

Knight
[EMAIL PROTECTED]

On Fri, 6 Oct 2000, Seb Bacon wrote:

> I've got a ZClass "A" that subclasses another ZClass "B".  I can use the
> default propertysheets/B/manage method to update B's properties; but how do
> I access the properties of A through the management interface?
> 
> Many thanks
> 
> Seb.
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> knight
> Sent: 06 October 2000 10:05
> To: [EMAIL PROTECTED]
> Cc: Mark Twiddy
> Subject: Re: [Zope] external method database connection
> 
> 
> Also, you could always import the specific module for your database, and
> create a db connection, then execute() and fetch() directly. Although, if
> you are putting this in an external method, it would be wiser to use your
> existing ZSQL methods ;]
> 
> Knight
> [EMAIL PROTECTED]
> 
> On Fri, 6 Oct 2000, knight wrote:
> 
> >
> > > How do I get  a zope database connection from an enternal method?
> >
> > You can access your db using your existing ZSQL Methods by calling them
> > from the namespace passed in, specifically self.
> >
> > Example:
> >
> > def myextmethod(self):
> >   mfl_id = 3
> >   results = self.sqlCountUsers(mfl_id=mfl_id)
> >   for result in results:
> > print result[0], result[3]
> >
> >
> >
> > Keep in mind that a list is returned, not a dictionary.
> >
> > Knight
> > [EMAIL PROTECTED]
> >
> >
> >
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> >
> 
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )