[Zope] ZClass problem again when zope restarts

2008-03-26 Thread Yuri

Hi!

redoing the process of upgrading, it has worked again.

When I restart it with zopectl fg, it gives back the same error again.

So there's something in the startup process which creates problem.

It seems like something don't get written in the zodb, could be?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZClass - object is broken

2005-12-12 Thread Jens Walte



Hello,
 
i have a little Problem with an old self-made ZClass-Product named 
"CMSFolder".
Allready existing objects of CMSFolder are broken since the last restart of 
the instance.
It is really strange because there is no broken-sign in 
/Control_Panel/Products.
 
It is still possible to create new objects with CMSFolder, but if i restart 
the instance, the new objects are broken too.
CMSFolder is folderish and it's subobjects of other meta_types are still 
accessable!
 
I get the following message, if i try to access 
an CMSFolder-object:
"This object's class was CMSFolder in module 
*sCk2LCT0ragDyG33NdapTQ==."
The CMSFolder-ZClass-Product still has this ID and show's no errors.
 
An export-import don't work, a rename too.
 
I couldn't remember any changes that could be a reason 
for this effect.
 
Thanks for help
regards
Jens
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZClass in 2.8.4 - error help

2005-11-15 Thread Dieter Maurer
Jake wrote at 2005-11-12 12:35 -0500:
>I am trying to get an old, old product to work in 2.8.4 and I am  
>getting the following error:
> ...
>   Module Zope2.App.ClassFactory, line 29, in ClassFactory
>   Module OFS.Uninstalled, line 61, in Broken
>   File "", line 1
>
> class (BrokenClass): ' ';  
>__module__=None
>
>   ^
>SyntaxError: invalid syntax

Looks as if your class contains some feature no longer supported
by Python.

I would attack this problem as follows:

  *  identify the problematic feature (by extracting the string
 above which exhibits the SyntaxError

  *  find a new way how to spell this

  *  fix the storage file by means of a text editor
 (be careful!: operate on a copy; ensure that the total size
 does not change.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZClass in 2.8.4 - error help

2005-11-12 Thread Jake
I am trying to get an old, old product to work in 2.8.4 and I am  
getting the following error:


Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module App.special_dtml, line 175, in _exec
  Module DocumentTemplate.DT_Let, line 76, in render
  Module DocumentTemplate.DT_In, line 643, in renderwob
  Module DocumentTemplate.DT_In, line 771, in sort_sequence
  Module ZODB.Connection, line 704, in setstate
  Module ZODB.Connection, line 760, in _setstate
  Module ZODB.serialize, line 495, in setGhostState
  Module ZODB.serialize, line 488, in getState
  Module ZODB.serialize, line 399, in _persistent_load
  Module ZODB.serialize, line 372, in _get_class
  Module Zope2.App.ClassFactory, line 29, in ClassFactory
  Module OFS.Uninstalled, line 61, in Broken
  File "", line 1

class (BrokenClass): ' ';  
__module__=None


  ^

SyntaxError: invalid syntax

I know, that it has something to do with the new extension class, but  
I can't seem to find any documentation on the new classes, how to  
write them or how to convert old classes?


Any pointers?

Jake

http://www.ZopeZone.com
"Zoping for the rest of us"



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZClass Adding Magic Needed

2001-01-17 Thread Geoffrey L. Wright

Jim Washington <[EMAIL PROTECTED]> writes:

> Hi, Geoff
> 
> Your situation looks like application logic confusion enhanced by the
> weirdness of DTML.

Application logic confusion in what way?

Perhaps I didn't give enough detail about what I'm doing.  Here's a
little ASCI art that may clear things up:

  CLASS META TYPE   PROPERTIES
  --
  ZClass1   (blob)   -> id, displayOrder
 \
  \
  \/
ZClass2 (chunk)  -> id, displayOrder, alignment, text

ZClass1 is basicly a container class for a bunch of displayable
subobjects.  

Each blob can contain a variable number of chunks, although for the
purpose of creating a new blob I'm only concerned about it starting
with a single chunk.

Right now (if I create a number of sample blobs and chunks by hand)
users can manipulate the display order of individual chunks within a
blob.  The can also manipulate the display order of blobs relative to
one another.

But now I need to give them the capacity to generate a new blob with
one default chunk.  This _seems_ like it should be an easy thing to
do.  And in fact I have no problem with creating a public add method.
My problem comes when I want to give these two new objects starting
values from the same form.  Something like this works perfectly:


  


Where I change the add method of a blob to also always also add a
chunk and appropriately adjust the permession of my add method so that
anybody can use it.

The user will need to control the the displayOrder of the blob.  It's
default chunk will always have a displayOrder of 1.  The user also
needs to control the alignment and text of the default chunk.

And note again that when both the blob and it's chunk are created they
are given a random id based on ZopeTime, since I don't want my users
to have to care about the id of either object.  Because of this I
don't need to worry about passing an id to either one of them from my
form...

I hope this at least manages to clear up my problem a bit.

> Use a Python Script/Method to do the background heavy lifting. If you
> are using ,   and REQUEST.set() to access your items, it can
> be done much more simply and understandably in a Python Script/Method.  

I'm open to doing this the Python Way as well, but I have the same
problem there.

> -- Jim Washington
> 
> "Geoffrey L. Wright" wrote:
> > 
> > So:
> > 
> > I have a odd little problem that I can't seem to solve.  I have two
> > zclasses.  We'll call them zclass1 and zclass2.  zclass2 lives inside
> > of zclass1.  zclass1 has the following two properties:  id and
> > displayOrder.  zclass2 has the four properties: id, displayOrder,
> > alignment and content.  In both cases the id is an automaticly
> > generated unique number based on ZopeTime.
> > 
> > My problem is that I need to make a public add method that generates a
> > new instance of zclass1 with a new instance of zclass2 inside of it.
> > I also need to be able to control set the displayOrder of zclass1, and
> > the alignment and content of zclass2 from the same form.  The
> > displayOrder of zclass2 will be static for the time being, but I'll
> > ultimately need to control that as well.
> > 
> > I hacked the default add method of zclass1 so that it generates a new
> > instance of zclass2 each time, and using the Job Board HOWTO I managed
> > to make a public add method.  So far so good.  But now I can't for the
> > life of me figure out how to pass some form variables to one object
> > and some to the other, especially while they have some identically named
> > properties.
> > 
> > Any hints on this one?


___
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] ZClass Adding Magic Needed

2001-01-17 Thread Jim Washington

Hi, Geoff

Your situation looks like application logic confusion enhanced by the
weirdness of DTML.

Use a Python Script/Method to do the background heavy lifting. If you
are using ,   and REQUEST.set() to access your items, it can
be done much more simply and understandably in a Python Script/Method.  

-- Jim Washington

"Geoffrey L. Wright" wrote:
> 
> So:
> 
> I have a odd little problem that I can't seem to solve.  I have two
> zclasses.  We'll call them zclass1 and zclass2.  zclass2 lives inside
> of zclass1.  zclass1 has the following two properties:  id and
> displayOrder.  zclass2 has the four properties: id, displayOrder,
> alignment and content.  In both cases the id is an automaticly
> generated unique number based on ZopeTime.
> 
> My problem is that I need to make a public add method that generates a
> new instance of zclass1 with a new instance of zclass2 inside of it.
> I also need to be able to control set the displayOrder of zclass1, and
> the alignment and content of zclass2 from the same form.  The
> displayOrder of zclass2 will be static for the time being, but I'll
> ultimately need to control that as well.
> 
> I hacked the default add method of zclass1 so that it generates a new
> instance of zclass2 each time, and using the Job Board HOWTO I managed
> to make a public add method.  So far so good.  But now I can't for the
> life of me figure out how to pass some form variables to one object
> and some to the other, especially while they have some identically named
> properties.
> 
> Any hints on this one?

___
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] ZClass Adding Magic Needed

2001-01-17 Thread Geoffrey L. Wright


So:

I have a odd little problem that I can't seem to solve.  I have two
zclasses.  We'll call them zclass1 and zclass2.  zclass2 lives inside
of zclass1.  zclass1 has the following two properties:  id and
displayOrder.  zclass2 has the four properties: id, displayOrder,
alignment and content.  In both cases the id is an automaticly
generated unique number based on ZopeTime.

My problem is that I need to make a public add method that generates a
new instance of zclass1 with a new instance of zclass2 inside of it.
I also need to be able to control set the displayOrder of zclass1, and
the alignment and content of zclass2 from the same form.  The
displayOrder of zclass2 will be static for the time being, but I'll
ultimately need to control that as well.

I hacked the default add method of zclass1 so that it generates a new
instance of zclass2 each time, and using the Job Board HOWTO I managed
to make a public add method.  So far so good.  But now I can't for the
life of me figure out how to pass some form variables to one object
and some to the other, especially while they have some identically named
properties.

Any hints on this one?


//glw


___
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] [ZClass]User Form to add an Instance of one ZClass to an instanceof another ZClass of another ZClass

2001-01-16 Thread Farrell, Troy

Hello all-

Being new to ZClasses, I'm having some difficulties.
I have a ZClass NetShowLogFile.  I can add this to normal Folder Objects
through the management interface.
I have a second ZClass StreamingEvent.  I would like an user to be able to
add a NetShowLogFile to an existing Folder Object logs inside
StreamingEvent.

StreamingEvent
 L__logs (folder object)
 L__newNetShowLogFile (DTML method)
 L__newNetShowLogFileForm (DTML method)

If I have a BigEvent StreamingEvent and a user goes to:
http://localhost/BigEvent/newNetShowLogFileForm
They get a form where they upload a log file through a 
If newNetShowLogFile only says:

none of the form variables are passed by NS6.

1)Netscape 6 (WINNT 4) is not passing REQUEST properly when the form enctype
is multipart/form-data.  Anybody else seen this?  IE5.5 seems to get it
okay.

Next:

newNetShowLogFile looks like this:

  

  

  

  Netscape lost the REQUEST again.


This calls NetShowLogFile_add in the same way the management UI does.
However, IE  is not able to do the .
I keep getting the error that I am unauthorized to access
manage_editProperties. I don't know which permissions I need to adjust on
the ZClass.

Thanks for reading my long email.  In case you are curious, I am writing a
Zope/Python-based streaming media log file analyzer.

Troy Farrell
Video Operations Technician III
Williams VYVX Services
918.573.3029
918.573.1441 fax
mailto:[EMAIL PROTECTED]
http://www.williams.com

___
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] ZClass Define Permissions confusion

2001-01-07 Thread Ron Bickers

After having read the Zope Book Security chapter and various other security
howtos, I understand better how permissions apply in ZClass methods and
property sheets.  However, I'm still confused about a couple things.

1) What is affected by each of the 'Define Permissions' settings in the
ZClasses main screen?  I created a new permission and assigned it to
different things in the list, but the only one that seems to do as I might
expect is the 'Create class instances'.  I can't figure out what the others
do.

2) I have a ZClass that, upon creation of a new instance, creates an Image
object in the new instance.  Everything works as I would expect, but I'm not
sure how (or if) I can define permissions to that object in the ZClass.
More specifically, I have to give Image create/change/delete access in the
container Folder where the ZClass instance is in order for the user to be
able to modify the image inside the ZClass object.  Is there a better way
using the ZClass permissions?

Does this make sense?  I understand pretty well the permission system
outside of ZClasses, it's just inside them that's giving me a headache.

___

Ron Bickers
Logic Etc, Inc.
[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 )




Re: [Zope] ZClass with images

2000-12-11 Thread Aleksander Salwa

On Sat, 9 Dec 2000, Diego Rodrigo Neufert wrote:

> Anyone know how to put some images in  ZClass? I have done things like 
> putting ZClass with base class OFS:Image but with it I can only assing one 
> Image do the object... I need to assign two or tree images do the object.

Try to subclass OFS:Folder. In that folder you can put as many images as
you want.
I have 1 ZClass deriving from both Folder and DTMLMethod and it works
fine. (I had some trouble with setting view tabs properly, but finally I
solved it.)

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/





___
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] ZClass with images

2000-12-10 Thread Michael Bernstein

Diego Rodrigo Neufert wrote:
> 
> Anyone know how to put some images in  ZClass? I have done things like
> putting ZClass with base class OFS:Image but with it I can only assing one
> Image do the object... I need to assign two or tree images do the object.

I've been thinking about something similar myself. I'd like
to create a ZClass/ZPatterns version of the Photo and
ZPhotoAlbum products (or at least a reasonable equivalent).

Specifically, I'd like to incorporate the functionality
that, upon instantiation of the object, creates the
neccesary sized versions and stores them. I'd like to use
ZPatterns to be able to switch the storage between the ZODB,
the file-system, or BLOBs in an RDBMS without altering the
rest of the application.

Any progress that you make would be very helpful to me.

Michael Bernstein.

___
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] ZClass with images

2000-12-09 Thread Diego Rodrigo Neufert

Anyone know how to put some images in  ZClass? I have done things like 
putting ZClass with base class OFS:Image but with it I can only assing one 
Image do the object... I need to assign two or tree images do the object.


Thanks...


-- 
Diego Rodrigo Neufert
Webmaster / Web Developer - Magic Web Design
---
[EMAIL PROTECTED]
www.magicwebdesign.com.br
Curitiba - PR - Brasil

___
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] ZClass report

2000-12-07 Thread Didier Georgieff

Hello,

I have some scripts for describing and generating a report about Zclass, 
but only partial  and method foucused (nothing on permissions, property 
sheets, subobjects, etc ...).

Strangely i found nothing on the list ot on the products. Did i missed 
something about existing scripts, or should i upgrade mine ?

Thanks for any tip.
--
Didier Georgieff
DDAF du Bas-Rhin - Cellule SIG 
2, rue des Mineurs 67070 Strasbourg Cedex
tél : 03.88.25.20.33 - fax : 03.88.25.20.01
email : [EMAIL PROTECTED]
SIT du Bas-Rhin : http://www.bas-rhin.sit.gouv.fr
GéoWeb http://sertit10.u-strasbg.fr

___
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] ZClass security : a solution

2000-11-30 Thread 'seb bacon'

* Bowyer, Alex <[EMAIL PROTECTED]> [001129 22:21]:

> Essentially what we are doing is saying "If you want to View this object,
> you have to have the Manage Properties permission"
> 
> There are probably better ways, but if it ain't broke don't fix it.
> 
> I don't understand why you have to choose a permission for each permission
> (which is a very confusing concept). It would be much better if you could
> choose a role to say e.g. "If you want to View this object, you have to have
> the UAAdmin Role"

yep, that's what I figured it had to mean.  however, I tried it and it
didn't work.  This is probably because I messed up where the user was
defined or something, but the whole thing took so long even to try out
that I gave up.  Are we the only ones who find it counter-intuitive?!
or at the very least, downright unpleasant... perhaps it's just
ZClasses.  It usually is :) I gave up and did it in a product eventually.

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] ZClass security : a solution

2000-11-29 Thread Bowyer, Alex

Seb, you were right, I was referring to ZClass security, which is very
poorly documented. And no you're not being intellectually lazy, that
sentence does make no sense

I have kind of got a working solution now, so I will share it for anyone
interested:

To recap, the scenario is a news page with a DTML method for viewing which
is accessible by all but also DTML methods for editing the content, which
are only to be available to users holding a certain role, which I happen to
have called UAAdmin (if you're wondering what UA is, it's the name of the
newsletter "Update Australia"). Each instance of the class is a separate
news page.

What I did is this, it's a bit of a messy solution but it works for me:

1) Create a role at the root level of Zope called UAAdmin (I keep all roles
at this level for simplicity).
2) At the level which instances of the news page class are to be created, go
to the Security tab and assign permissions to the UAAdmin role. If possible
include at least one permission which is not held by any other roles or
users at this level (other than the Manager of course). In my case "Manage
properties" could only be done by UAAdmin or Manager roles. This could be
anything, even something you don't use such as perhaps "Add ZGadfly Database
Connection" (ZODBC is much better!).
3) Within your ZClass class definition, for each DTML method you want to
assign security to:
   a) Go to the 'Define Permissions' tab
   b) Go to the dropdown next to 'View' and change "View" to "Manage
properties" (or whatever permission was unique to the role you want to give
access to). For methods that should have anonymous access, leave it as
"View"

You will find that this will have the desired effect of limiting access to
those pages/methods only.

Essentially what we are doing is saying "If you want to View this object,
you have to have the Manage Properties permission"

There are probably better ways, but if it ain't broke don't fix it.

I don't understand why you have to choose a permission for each permission
(which is a very confusing concept). It would be much better if you could
choose a role to say e.g. "If you want to View this object, you have to have
the UAAdmin Role"

Apparently there's something called ZPermissions where you can create your
own, so I could create a permission "Manage News Pages" and then say "If you
want to View this object, you have to have the Manage News Pages permission"
but I never worked this out fully.

If anyone has any suggestions for improvement, by all means put me straight,
but this worked for me.

Thanks

Alex

==
Alex Bowyer
IT Contractor, Logica Australasia
Tel: +61 2 9202 8130
Fax: +61 2 9922 7466
E-mail : [EMAIL PROTECTED]
WWW: http://www.logica.com.au/
==


> -Original Message-
> From: seb bacon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 30, 2000 12:53 AM
> To: Dieter Maurer
> Cc: Bowyer, Alex; '[EMAIL PROTECTED]'
> Subject: Re: [Zope] security
> 
> 
> * Dieter Maurer <[EMAIL PROTECTED]> [001128 00:12]:
> > Bowyer, Alex writes:
> >  > Can some one explain how the Define Permissions screen 
> works. I really don't
> >  > understand the concept behind it, what does it mean for 
> a permission setting
> >  > to own a permission?
> >  > 
> >  > All I need to do is to make certain ZClass methods have 
> a certain level of
> >  > security and the other methods of the class have no security.
> 
> > It is quite good explain in the upcoming Zope book.
> 
> In fact, I think Alex was referring to ZClass security, which isn't
> covered in the book, and is something I've never go to the 
> bottom of either.
> on the 'define permissions' tab, it says:
> 
>The table below has two columns. The first column lists the 
>permissions for this object. The second column specifies the
>permissions that should have this permission in this product 
>or ZClass. 
> 
> I'm probably being intellectually lazy or something, but that doesn't
> make any sense to me at all.
> 
> 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] ZClass within ZClass

2000-11-26 Thread Tim Cook

Daryl Stultz wrote:
> 
> Tim Cook wrote:
> 
> > But, If you subclass OFS:Folder when building CDLibrary and
> > CDManager then they can 'contain' other objects.
> > A HOWTO that really helped me was the one on building a Job
> > Board.
> 
> Yes, that's precisely where I started, however, the actual product is a
> job_board_entry. What I want is a product that IS the entire job board,
> contains an object that is a job_board_entry manager (holds the entries)
> and then, the user creates job_board_entries.
> 
> In the example, the job board itself, and the "manager" are done with
> folders. Following the ZCMG example (Stan's InstantSite), I can clone
> such a setup - but I don't get full class modification cascading, i.e.,
> once it's duplicated, only changes to the job_board_entry class will
> carry through existing job boards.

You might want to take a look at how I built the FreePMProduct. 
The product contains several ZClasses.  
One example is an EMRClass (electronic medical record) it
subclasses OFS:Folder
Inside the EMR I can instantiate several of the other ZClasses.
Such as a Consult or an Address.
Some of those subclass Folder and some Document, depending on
it's actual use.
A change to one of these ZClasses cascades through all existing
instances.

Is that not what you are trying to do?

-- Tim Cook, President --
Free Practice Management,Inc. | http://FreePM.com
Office: (901) 884-4126
Censorship: The reaction of the ignorant to freedom.

___
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] ZClass within ZClass

2000-11-26 Thread Daryl Stultz

Tim Cook wrote:

> But, If you subclass OFS:Folder when building CDLibrary and
> CDManager then they can 'contain' other objects.
> A HOWTO that really helped me was the one on building a Job
> Board.

Yes, that's precisely where I started, however, the actual product is a
job_board_entry. What I want is a product that IS the entire job board,
contains an object that is a job_board_entry manager (holds the entries)
and then, the user creates job_board_entries.

In the example, the job board itself, and the "manager" are done with
folders. Following the ZCMG example (Stan's InstantSite), I can clone
such a setup - but I don't get full class modification cascading, i.e.,
once it's duplicated, only changes to the job_board_entry class will
carry through existing job boards.

I'll keep at it, though. I hope this is all clear.
Thanks.
-- 
"I ain't no stewin' rabbit, I'm a fricassein' rabbit. Have you got a
fricassein' rabbit license?"

Daryl Stultz - python, blender, robots, really bad harmonica playing...
[EMAIL PROTECTED]  
RedHat Linux 6.1 - Dual Pentium Pro

___
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] ZClass within ZClass

2000-11-26 Thread Tim Cook

Daryl Stultz wrote:
> 
> Hi folks, I am yet another Zope newbie.
> 
> I am trying to create a ZClass hierarchy.
> Let's say I have a CDLibrary. Every CDLibrary has a CDManager (just one)
> and the CDManger holds all the CDEntry items. (The CDLibrary may have
> parts other than the CDManager, like a label maker or something- but
> that's not important now...)
> 
> My question is this: How do I set up such a product with ZClasses within
> ZClasses. I have the HOW-TO collection, the ZBook, the Zope Book and the
> Guides. I've tried the HOW-TO on ZClasses and ObjectManagers, and Adding
> ZClass Instances Programmatically with no success.
> 
> I am an experienced Python programmer with strong object-oriented
> knowledge and good HTML.
> 
> Any help will be greatly appreciated.

This may just be 'any help'. 

But, If you subclass OFS:Folder when building CDLibrary and
CDManager then they can 'contain' other objects.
A HOWTO that really helped me was the one on building a Job
Board. 

HTH,
-- Tim Cook, President --
Free Practice Management,Inc. | http://FreePM.com
Office: (901) 884-4126
Censorship: The reaction of the ignorant to freedom.

___
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] ZClass within ZClass

2000-11-26 Thread Daryl Stultz

Hi folks, I am yet another Zope newbie.

I am trying to create a ZClass hierarchy.
Let's say I have a CDLibrary. Every CDLibrary has a CDManager (just one)
and the CDManger holds all the CDEntry items. (The CDLibrary may have
parts other than the CDManager, like a label maker or something- but
that's not important now...)

My question is this: How do I set up such a product with ZClasses within
ZClasses. I have the HOW-TO collection, the ZBook, the Zope Book and the
Guides. I've tried the HOW-TO on ZClasses and ObjectManagers, and Adding
ZClass Instances Programmatically with no success.

I am an experienced Python programmer with strong object-oriented
knowledge and good HTML.

Any help will be greatly appreciated.
Thanks.

-- 
"I ain't no stewin' rabbit, I'm a fricassein' rabbit. Have you got a
fricassein' rabbit license?"

Daryl Stultz - python, blender, robots, really bad harmonica playing...
[EMAIL PROTECTED]  
RedHat Linux 6.1 - Dual Pentium Pro

___
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] ZClass/DTML Document transparency

2000-11-22 Thread Stefan H. Holek

On Tue, 21 Nov 2000, Dieter Maurer wrote:

> Randall Kern writes:
>  > 
>  > In the case of DTML Documents, the following works fine:
>  > 
>  > 
>  > 
>  > In the case of ZClasses, I have to use something like this:
>  > 
>  > 
>  >   
>  > 
>  > 
>  > But this is rather ugly, and it's the sort of thing one shouldn't have =
>  > to do in an oo system.
>
> You may look at the mixin "ZCallable".
> I do not know what it does but the name suggests, it might
> perhaps help you.

I could not make ZCallable work ("too many datafull baseclasses" even if
it is the *only* baseclass). 

Maybe you could use the Renderable product, which lets you override the
__str__ method. 

Stefan


___
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] ZClass/DTML Document transparency

2000-11-21 Thread Dieter Maurer

Randall Kern writes:
 > 
 > In the case of DTML Documents, the following works fine:
 > 
 > 
 > 
 > In the case of ZClasses, I have to use something like this:
 > 
 > 
 >   
 > 
 > 
 > But this is rather ugly, and it's the sort of thing one shouldn't have =
 > to do in an oo system.
I understand you, but in all "oo" systems, you can avoid this
only if both objects have the same method.

In Zope, DTML objects have a "__call__" method which is
called automatically.
ZInstances do not have a "__call__" method.

What suggests to you, that these too should be unified
is the fact, that ZPublisher does it.
If an object has a "__call__", it is used; if not,
"index_html" is called, if it exists.

You may look at the mixin "ZCallable".
I do not know what it does but the name suggests, it might
perhaps help you.


Dieter

___
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] ZClass/DTML Document transparency

2000-11-20 Thread Randall Kern



Hi all,
 
I have a folder (foo) which contains a set of DTML Documents, and instances 
of a ZClass.
 
From another DTML document, I enumerate the contents of this folder, using 
a DTML-IN tag:
 

...

 
My problem is with ..., namely dealing with both 
DTML documents and ZClasses.  In the case of 
DTML Documents, the following works fine:
 

 
In the case of ZClasses, I have to use something 
like this:
 

  

 
So I'm using this:
 
          

 
 
But this is rather ugly, and it's the sort of thing 
one shouldn't have to do in an oo system.
 
So, is there a better way?
-Randy


[Zope] ZClass

2000-11-10 Thread kosh

>From inside what object should I inherit from to get a history option for
a zclass or what method would I need to write. I have looked at lots of
examples of zclasses and so far none of them have a history tab. 

I am working with the STX_Document type and made a new zclass based on
that which includes renderable and catalogaware as base classes. Those
were the instructions on the STX document page but that still did not give
me the option for a history tab but it did fix other things that I needed.

Thanks
Kosh



___
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] ZClass and SQL Table

2000-10-27 Thread Steve Spicklemire


Hi Cesar,

   Try ZPatterns: http://www.zope.org/Members/pje/ZPatterns

it allows you to 'dress' your old SQL system with ZClasses
(subclassed by DataSkins..)

-steve

> "CG" == =?iso-8859-1?Q?C=E9sar?= A K Grossmann  writes:

CG> Hi

CG> I have an old system based on a SQL database, and wanna to
CG> make a Web version of it.

CG> Are there any way to represent the SQL tables as ZClasses? I
CG> mean, the attributes of the ZClasses be stored in a SQL table?

CG> TIA --
CG> +-+-+
CG> | César A. K. Grossmann | Capacitação Solidária | |
CG> [EMAIL PROTECTED] | http://www.uol.com.br/umminuto/ | |
CG> http://members.xoom.com/ckant/ | Clique e doe - é de graça |
CG> +-+-+
CG> http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html A
CG> long-forgotten loved one will appear soon.

CG> Buy the negatives at any price.

CG> ___ Zope maillist
CG> - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope **
CG> No cross posts or HTML encoding!  ** (Related lists -
CG> http://lists.zope.org/mailman/listinfo/zope-announce
CG> 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] ZClass and SQL Table

2000-10-26 Thread César A. K. Grossmann

Hi

I have an old system based on a SQL database, and wanna to make a Web
version of it.

Are there any way to represent the SQL tables as ZClasses? I mean, the
attributes of the ZClasses be stored in a SQL table?

TIA
-- 
 +-+-+
 | César A. K. Grossmann   | Capacitação Solidária   |
 | [EMAIL PROTECTED]| http://www.uol.com.br/umminuto/ |
 | http://members.xoom.com/ckant/  | Clique e doe - é de graça   |
 +-+-+
   http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html
A long-forgotten loved one will appear soon.

Buy the negatives at any price.

___
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] ZClass derrived from Image does not call "view" fromwithin

2000-10-16 Thread Stefan H. Holek

On Sun, 15 Oct 2000, Noah wrote:

> I'm a Zope beginner. I'm trying to create an ImageTemplate ZClass. This will work
> similar to an Image, but the user can insert it directly in DTML using MyImage>
> and it will get expanded into HTML (with formatting,  tag, caption, etc.)

FWIW the Image object does exactly that already.

> 2. The Publisher does not call the view method (index_html) of the object!
> Instead it calls str() which is __str__ in Image and that calls Image.tag().
> I can't overload __str__ because Zope does not allow a method to start
> with _ underscore.

This is the way it works! For creating ZClasses that render on __str__
see http://www.zope.org/Members/lalo/Renderable-ZClass

HTH
Stefan


___
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] ZClass derrived from Image does not call "view" from within

2000-10-15 Thread Noah

Hi,

I'm a Zope beginner. I'm trying to create an ImageTemplate ZClass. This will work
similar to an Image, but the user can insert it directly in DTML using 
and it will get expanded into HTML (with formatting,  tag, caption, etc.)
This may be long and complicated, but I thought that #4 below was interesting
because it demonstrates how to get at base class methods even if you have
overridden them.

OK, here's the situation:
1. I created a ZClass derived from Image. 
2. I overloaded the index_html to add spit out some HTML instead of the image.
3. If I call an instance of the ZClass directly I get the expected results. 
The index_html is called and I get back some HTML.
Here: http://63.199.26.229:8080/c/gato
4. To get to the image I created an External Method that calls the index_html
method of the my base class (Image):
# I create an External Method called IMG that calls this Python method:
def super_index_html (self):
 for classy in self.__class__.__bases__:
 if classy.__name__ == 'Image':
 return classy.index_html (self, self.REQUEST,\
 self.REQUEST.RESPONSE)
Example: http://63.199.26.229:8080/c/gato/IMG

So far, so good!

Now all I want to do is insert my ZClass in some DTML. Here's what happens:
1. I try to insert in instance of my ZClass into a DTML Method using:

2. The Publisher does not call the view method (index_html) of the object!
Instead it calls str() which is __str__ in Image and that calls Image.tag().
I can't overload __str__ because Zope does not allow a method to start
with _ underscore.

I ran this in the debugger, Publish.publish() (line 173) has this code:
 if result is not response: response.setBody(result)
This is where the trouble begins. setBody() calls str() function on the object.

How do I insert my ZClass into DTML now?

Yours,
Noah



___
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] ZClass, Product comparison

2000-10-05 Thread Maik Roeder

Hi Nestor !

"Nestor A. Diaz L." wrote:
> 
> HI, thanks you for the latest answer on testing products, however i have a
> doubt i know how to make ZClass however i think they are more restrictive,
> can anyone telling me advantanges or disadvantes of using Zclass instead
> of products?

Have a look at:

http://zdp.zope.org/portals/developers/designstrategies

All about the different tradeoffs between developing your class as a Zope
product in Python, as a ZClass, and mixing the two approaches. Add to this
portal subject if you find out more.

Regards,

Maik Röder
-- 
Uzopia - Digging la vida Zopa - http://uzopia.editthispage.com

___
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] ZClass, Product comparison

2000-10-05 Thread Nestor A. Diaz L.

HI, thanks you for the latest answer on testing products, however i have a
doubt i know how to make ZClass however i think they are more restrictive,
can anyone telling me advantanges or disadvantes of using Zclass instead
of products?

Thank you,

--
Nestor A. Diaz
Ingeniero de Desarrollo
Engendro.com - Comercio Electronico sobre Linux
Email: [EMAIL PROTECTED] - WWW: http://www.engendro.com


___
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] ZClass + ZSQLmethods bug in 2.2.2?

2000-09-26 Thread Alexander Schonfeld
Hi,

I've seen lots of ZSQLmethods patches and such and tried a few of them
under 2.1.6, but thought upgrading to 2.2.2 would fix this problem.  It
didn't.

Basically:
1. Create a ZClass
2. Inside create a DTML method and ZSQLmethod
3. from the dtml method call the ZSQLmethod
4. do a  

5. get a Unauthorized error no matter what the access privileges
are set to

This is with the "MySQLda".  Is there a newer MySQLda somewhere that
fixes this?  Or some patch (that works with 2.2.2???)?!

Running 2.2.2 from source... now with less hair...
Sincerely,

Alex.


Zope Error
Zope has encountered an error while publishing this resource. 

Unauthorized

You are not authorized to access sqlGetValue. 
Traceback (innermost last):
  File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /Zope-2.2.2/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: testmeth)
  File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: testmeth)
  File /Zope-2.2.2/lib/python/OFS/DTMLMethod.py, line 172, in __call__
(Object: testmeth)
  File /Zope-2.2.2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__
(Object: testmeth)
  File /Zope-2.2.2/lib/python/DocumentTemplate/DT_With.py, line 146, in render
(Object: testcrp)
  File /Zope-2.2.2/lib/python/OFS/DTMLMethod.py, line 168, in __call__
(Object: craptest)
  File /Zope-2.2.2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__
(Object: craptest)
  File /Zope-2.2.2/lib/python/DocumentTemplate/DT_In.py, line 633, in renderwob
(Object: 
sqlGetValue(tableId='Artist',columnId='Name',keyId='3f69016017c39d5da0a1d60d0a98dbed55d46414'))
  File /Zope-2.2.2/lib/python/DocumentTemplate/DT_Util.py, line 331, in eval
(Object: 
sqlGetValue(tableId='Artist',columnId='Name',keyId='3f69016017c39d5da0a1d60d0a98dbed55d46414'))
(Info: sqlGetValue)
  File /Zope-2.2.2/lib/python/OFS/DTMLMethod.py, line 194, in validate
(Object: testmeth)
  File /Zope-2.2.2/lib/python/AccessControl/SecurityManager.py, line 139, in validate
  File /Zope-2.2.2/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in 
validate
Unauthorized: (see above)

 
1010011010101001101010100110101010011010
0  Digital Garage$B!!%G%8%?%khttp://www.zope.ne.jp/ http://www.garage.co.jp



___
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] ZClass property sheets and lists of values

2000-09-11 Thread Brian and JoAnn Burton

Is there a way to have 2 property sheets in a ZClass where one property in
one sheet uses a property in another sheet to fill out its list?  This way,
I can manage who can control what is in the list.  How do I refer to the
property that contains the list?  I tried things like
../othersheet/listproperty but that did not work.


___
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] ZClass, acquisition, dtml confusion

2000-09-08 Thread Tim Cook

Jon Franz wrote:
 
> 
> 
> However, I place the DTML into a new class, and then make
> a new instance of the class, and it wont work as above.
> I now have to do this:
> 
> 
> 
> 
> 
> And, instead of modifying the property of the calling document,
> it modifies the parent folder's properties.  Below is the DTML,
> can someone please explain what I need to do to get this to

I hope someone can answer this. I am having a similar problem. I
posted yesterday but haven't received an answer yet either. 
There is a significant difference in the way properties get
changed in a ZClass depending on it being a folderish property or
a document property.  
Trouble is I have figured out those differences. 

Can someone shed some light on this?

-- Tim Cook --
FreePM Project Coordinator http://www.freepm.org
OS Health Care Alliance Supporter http://www.oshca.org

___
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] ZClass, acquisition, dtml confusion

2000-09-08 Thread Jon Franz

Hello,
Previously I made a DTML method that when used within a 
DTML Document would modify properties on that document.  
Having this floating around in root made it visible to the 
whole site, but seemed 'unclean'.  So, I attempted to make 
the DTML method into a ZClass, and making the index_html 
method in the ZClass contain the exact same DTML as the 
method... But it doesn't work.  So, I tried again - this 
time with as simple a method as possible, a very basic 
counter.  The DTML method I made in root increments and 
displays the 'z_count' property on the page that calls it, 
and creates the property if it doesn't exist, so using it 
is as simple as:



However, I place the DTML into a new class, and then make 
a new instance of the class, and it wont work as above.  
I now have to do this:





And, instead of modifying the property of the calling document, 
it modifies the parent folder's properties.  Below is the DTML, 
can someone please explain what I need to do to get this to 
work on the calling DTML document instead?  If I can't get 
this simple counter to work I'm going to go mad, since changing 
properties is something I need to be able to do from many of my 
planned ZClasses... Thanks in advance!


  
  
  

  
  01


___
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] ZClass for PDFs

2000-09-07 Thread Loren Stafford

From: "Timothy Wilson" <[EMAIL PROTECTED]>


> On Thu, 7 Sep 2000, Tim Cook wrote:
>
> > Timothy Wilson wrote:
> > >
> > > I'd like to make a large number of PDF files available for download
from my
> > > site. HTML versions of the files will also be available for online
viewing.
> > >
> > > I could certainly include the PDF files as regular file objects or I
could
> > > create a ZClass specifically for PDF files.
> > >
> > > I suspect that this question may be of general interest, so I'm asking
for
> > > comments about the pros and cons of either approach.
> > >
> >
> > Does this not do what you want?
> >
> > http://www.zope.org/Members/gaaros/ZpdfDocument
>
> Thanks for the pointer.
>
> It doesn't appear that the ZpdfDocuments is what I'm looking for.
> ZpdfDocument seems to render PDF on the fly from structured text or HTML.
I
> was interested in simply storing an existing PDF file in the ZODB and
making
> it available for download.
>
> Is there a reason to make a PDF ZClass? Would it make things easier?
>
> -Tim
>
>
There's an example of a PDF ZClass at
http://www.zope.org/Members/lstaffor/zProperties. If all you do in the class
is add simple properties as in this example, the arguments are in favor of
making a ZClass boil down to:

1. You can enforce the presence of certain properties.
2. In your navigation methods, you can use the metatype to distinguish PDF
files from other files and thereby treat them differently.
3. You can help content managers handle PDF files in a consistent manner.

...worthwhile, but not all that compelling arguments.

On the other hand, once you have a separate class, it's easier to add
functionality; for example,

1. Automatically catalog the content of the PDF by running it thru some
converter (like XPDF),
2. Extract the document properties from the PDF identification block.
3. Provide an alternative byte-serving access to large PDFs.

-- HTH
-- Loren


___
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] ZClass for PDFs

2000-09-07 Thread Tim Cook

Timothy Wilson wrote:

> It doesn't appear that the ZpdfDocuments is what I'm looking for.
> ZpdfDocument seems to render PDF on the fly from structured text or HTML. I
> was interested in simply storing an existing PDF file in the ZODB and making
> it available for download.
> 
> Is there a reason to make a PDF ZClass? Would it make things easier?
> 

I can't think of one. But if you need it then someone else
probably does too. 

-- Tim Cook --
FreePM Project Coordinator http://www.freepm.org
OS Health Care Alliance Supporter http://www.oshca.org

___
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] ZClass for PDFs

2000-09-07 Thread Timothy Wilson

On Thu, 7 Sep 2000, Tim Cook wrote:

> Timothy Wilson wrote:
> > 
> > I'd like to make a large number of PDF files available for download from my
> > site. HTML versions of the files will also be available for online viewing.
> > 
> > I could certainly include the PDF files as regular file objects or I could
> > create a ZClass specifically for PDF files.
> > 
> > I suspect that this question may be of general interest, so I'm asking for
> > comments about the pros and cons of either approach.
> > 
> 
> Does this not do what you want?
> 
> http://www.zope.org/Members/gaaros/ZpdfDocument

Thanks for the pointer.

It doesn't appear that the ZpdfDocuments is what I'm looking for.
ZpdfDocument seems to render PDF on the fly from structured text or HTML. I
was interested in simply storing an existing PDF file in the ZODB and making
it available for download.

Is there a reason to make a PDF ZClass? Would it make things easier?

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] || http://linux.com/


___
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] Zclass not reindexing (it is CatalogAware)

2000-09-07 Thread R. David Murray

On Thu, 7 Sep 2000, Tim Hicks wrote:
> So each time there is a change made to the text, I must call
> reindex_object, is that correct?  If so, how do I make it so that each
> time I hit the 'Change' button at the bottom of the text box,
>  is executed?

If you take a close look at the how-to, it also tells you you have
to write your own management 'editForm' method and assign it to the
view tab.  In the action method for that form, you do the
reindex_object.

--RDM


___
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] ZClass for PDFs

2000-09-07 Thread Tim Cook

Timothy Wilson wrote:
> 
> Hi everyone,
> 
> I'd like to make a large number of PDF files available for download from my
> site. HTML versions of the files will also be available for online viewing.
> 
> I could certainly include the PDF files as regular file objects or I could
> create a ZClass specifically for PDF files.
> 
> I suspect that this question may be of general interest, so I'm asking for
> comments about the pros and cons of either approach.
> 

Does this not do what you want?

http://www.zope.org/Members/gaaros/ZpdfDocument

-- Tim Cook --
FreePM Project Coordinator http://www.freepm.org
OS Health Care Alliance Supporter http://www.oshca.org

___
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] Zclass not reindexing (it is CatalogAware)

2000-09-07 Thread Tim Hicks


- Original Message -
From: "R. David Murray" <[EMAIL PROTECTED]>
To: "Tim Hicks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, September 07, 2000 10:12 PM
Subject: Re: [Zope] Zclass not reindexing (it is CatalogAware)


> On Thu, 7 Sep 2000, Tim Hicks wrote:
> > The question is, do I need to add the equivalent of what is
written in
> > 'How-To: Creating a CatalogAware ZClass' for reindexing zclass
> > properties, but for reindexing the actual text?  How could I do
this?
>
> When is the text created?  After it is, you have to call
reindex_object.
>

So each time there is a change made to the text, I must call
reindex_object, is that correct?  If so, how do I make it so that each
time I hit the 'Change' button at the bottom of the text box,
 is executed?

cheers

tim
> --RDM
>


___
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] ZClass for PDFs

2000-09-07 Thread Timothy Wilson

Hi everyone,

I'd like to make a large number of PDF files available for download from my
site. HTML versions of the files will also be available for online viewing.

I could certainly include the PDF files as regular file objects or I could
create a ZClass specifically for PDF files.

I suspect that this question may be of general interest, so I'm asking for
comments about the pros and cons of either approach.

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] || http://linux.com/


___
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] Zclass not reindexing (it is CatalogAware)

2000-09-07 Thread R. David Murray

On Thu, 7 Sep 2000, Tim Hicks wrote:
> The question is, do I need to add the equivalent of what is written in
> 'How-To: Creating a CatalogAware ZClass' for reindexing zclass
> properties, but for reindexing the actual text?  How could I do this?

When is the text created?  After it is, you have to call reindex_object.

--RDM


___
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] Zclass not reindexing (it is CatalogAware)

2000-09-07 Thread Tim Hicks

I have created a Zclass, the the _ZClass_for_CatalogAware base class
as the first added base class (second in the list of base classes).
My zcatalog (named Catalog) is set to 'Find objects of type:
"myClass_metatype"' and therefore, when I add a new instance of my
class, it is automatically added to the catalog.  By that, I mean that
once I have added the instance, I can go the the 'Cataloged Objects'
view and see it listed there. However, if I try a search using the raw
(TextIndex) search outlined in one of the tutorials, the search fails
to find words that I *know* are in the zclass that I just added, and
that I thought had been cataloged.  Clicking on 'Update Catalog' in
the 'Cataloged Objects' view and then researching means that the
search succeeds in finding the word in the new instance.

The question is, do I need to add the equivalent of what is written in
'How-To: Creating a CatalogAware ZClass' for reindexing zclass
properties, but for reindexing the actual text?  How could I do this?









Help much appreciated,

tim


___
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] ZClass base classes

2000-09-07 Thread Chris McDonough

Hi Nick

(please don't post HTML mail to the list).

I *think* the "Include standard Zope persistent object base classes"
check box gives your ZClass the "ZObject" interface which is similar to
the SimpleItem interface (see the Zope API docs in the help system - I
think it's under Help->Zope Help->API Documentation->ObjectManagerItem).

As far as inheritance order, the first base class you add to the ZClass
base class list will be ZObject if you use check the "standard base
classes" checkbox.  The next one will be the first base class you choose
(the topmost), the next one will be the one under that, etc. 

-Original Message-
From: Nick Trout [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 07, 2000 8:59 AM
To: Zope Mail list
Subject: [Zope] ZClass base classes


I've looked all throught docs but I cant find anywhere an explanation of
what properties the ZClass base classes give you. Also which order to
inherit them, as the Developers Guide claims the order is important. Can
anyone please enlighten me?

Regards,
Nick.

___
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] ZClass base classes

2000-09-07 Thread Nick Trout

> (please don't post HTML mail to the list).
sorry

> I *think* the "Include standard Zope persistent object base classes"
> check box gives your ZClass the "ZObject" interface which is similar to
> the SimpleItem interface (see the Zope API docs in the help system - I
> think it's under Help->Zope Help->API Documentation->ObjectManagerItem).

I dont seem to have this in my Zope Help System. Where can I obtain this? I
have 2 items in the Contents tab frame: ZeopTutorial and ZopeHelp. The API
Documentation I have is very sparse.

> As far as inheritance order, the first base class you add to the ZClass
> base class list will be ZObject if you use check the "standard base
> classes" checkbox.  The next one will be the first base class you choose
> (the topmost), the next one will be the one under that, etc.

But what I need to know is what properties does the derivation give the new
object and how does the order affect its behaviour.

Ta,
Nick

> I've looked all throught docs but I cant find anywhere an explanation of
> what properties the ZClass base classes give you. Also which order to
> inherit them, as the Developers Guide claims the order is important. Can
> anyone please enlighten me?



___
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] ZClass base classes

2000-09-07 Thread Nick Trout



I've looked all throught docs but I cant find 
anywhere an explanation of what properties the ZClass base classes give you. 
Also which order to inherit them, as the Developers Guide claims the order is 
important. Can anyone please enlighten me?
 
Regards,
Nick.
 
 


[Zope] ZClass Bug (was: Re: [Zope] How to access id and title of document calling standard_html_header)

2000-09-05 Thread Dieter Maurer

Tim Hicks writes:
 > OK, I think that I am perhaps misusing zclasses then.  Here is what I
 > have.
No you did not.

 > I have a Folder that was created by using the 'Add new item' menu
 > within Zope.  This folder is called 'Site'.
 > 
 > I have a Zclass called 'theatre_class' that has "Base classes ZObject,
 > _ZClass_for_CatalogAware, _ZClass_for_DTMLDocument"
 > 
 > Within the Folder 'Site', I have standard_html_header dtml-method ...
 > However, if I try to put  into the standard_html_header,
 > I get nothing...

I analysed your problem (in Zope 2.1.6).
It is *NOT* a problem of "standard_html_header".
Instead, it is a ZCLass problem.

The id of a ZInstance created as
you described it returns "". The browser shows this
as "empty" because it is a tag it does not understand and
therefore ignores.
You see it, though, when you look at the HTML source.

The reason for this strange id lies in a mismatch between
your ZClass, more precisely its __init__ method, and
the content of REQUEST:
   For some reason, your ZClass uses
   "DocumentTemplate.DT_String.__init__" as constructor.
   "DocumentTemplate.DT_String" defines a "id" function
   and lets it return the value of the "__init__" parameter
   "__name__". The default for "__name__" is, you guess it,
   "''".

   "ZClass.createInObjectManager" constructs the ZInstance.
   If the instance has a 'id', it takes this id and
   ignores the 'id' passed as parameter.

   Thus, you get a ZInstance with this strange id.


I am convinced, this is a ZClass bug.
I think, that the bug results from the fact, that
the constructor for a ZCLass deriving from DTML Document
used "__name__" as "id" replacement.


The analysis provides a workaround for you.
In your ZClass constructor, add

before the
.createInObjectManager(REQUEST['id'],REQUEST)"> 



Now, after I did some work for you, I have some tasks for you:

  * check, whether the bug is in Zope 2.2.1, too
  * if this turns out to be the case, file a bug report into
the collector.


Dieter


___
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] ZClass <--> Product

2000-08-31 Thread Karl Anderson

Steve Spicklemire <[EMAIL PROTECTED]> writes:

> Umm.. did you try it? I use it all the time...  it does really work. You just
> can't use the ZClass 'folder' directly, you need to 'skip' to propertysheets/methods.

Amazing!  Yeah, I tried it by walking from the root, but as you
demonstrate, if you go directly to the method, you can edit it.

I swear this didn't work before.  I haven't thrown away days of my
life editing in the textarea.  Really.

-- 
Karl Anderson  [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 )




Re: [Zope] ZClass <--> Product

2000-08-31 Thread Steve Spicklemire


Umm.. did you try it? I use it all the time...  it does really work. You just
can't use the ZClass 'folder' directly, you need to 'skip' to propertysheets/methods.

-steve

example:

--

anotherhost.foo.com> ftp onehost.foo.com 13021
Connected to onehost.foo.com.
220 onehost.foo.com FTP server (Medusa Async V1.12.4.1 [experimental]) ready.
Name (onehost.foo.com:steve): 
331 Password required.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
227 Entering Passive Mode (208,150,70,197,9,101)
150 Opening ASCII mode data connection for file list
drwxrwx---   1 Zope Zope0 Dec 30  1998 Control_Panel
--   1 foouser Zope0 Jul  7 18:08 acl_users
-rw-rw   1 Zope Zope 1024 May  3  1999 index_html
-rw-rw   1 Zope Zope 1381 May  3  1999 standard_error_message
-rw-rw   1 Zope Zope   55 Dec 30  1998 standard_html_footer
-rw-rw   1 Zope Zope   81 Dec 30  1998 standard_html_header
226 Transfer complete
ftp> cd Control_Panel
250 CWD command successful.
ftp> dir
227 Entering Passive Mode (208,150,70,197,9,102)
150 Opening ASCII mode data connection for file list
drwxrwx---   1 Zope Zope0 Aug 31 14:55 ..
--   1 Zope Zope0 Dec 30  1998 Database
--   1 Zope Zope0 Dec 30  1998 DebugInfo
drwxrwx---   1 Zope Zope0 Aug 31 13:59 Products
--   1 Zope Zope0 Dec 30  1998 Versions
226 Transfer complete
ftp> cd Products/My_ZClasses/My_ZClass/propertysheets/methods
250 CWD command successful.
ftp> dir
227 Entering Passive Mode (208,150,70,197,9,103)
150 Opening ASCII mode data connection for file list
--   1 foouser Zope0 Aug 31 14:55 ..
-rw-rw   1 steveZope  165 Aug 31 14:55 defaultRedirect 
-r--r-   1 foouser Zope  214 Aug 31 14:55 findPrevArea 
-rw-rw   1 foouser Zope 2548 Aug 31 14:55 index_html 
-rw-rw-r--   1 foouser Zope  123 Aug 31 14:55 l-tab.gif 
-rw-rw-r--   1 foouser Zope   98 Aug 31 14:55 lb-tab.gif 
-rw-rw-r--   1 foouser Zope   93 Aug 31 14:55 r-tab.gif 
-rw-rw-r--   1 foouser Zope   91 Aug 31 14:55 rb-tab.gif 
-rw-rw-r--   1 foouser Zope   60 Aug 31 14:55 t-tab.gif 
-rw-rw-r--   1 foouser Zope   90 Aug 31 14:55 tabs-lb.gif 
-rw-rw-r--   1 foouser Zope   91 Aug 31 14:55 tabs-rb.gif 
-rw-rw-r--   1 foouser Zope   84 Aug 31 14:55 tabs.gif 
226 Transfer complete
ftp> pwd
257 "/Control_Panel/Products/My_ZClasses/My_ZClass/propertysheets/methods" is the 
current directory.
ftp> quit
221 Goodbye.
anotherhost.foo.com> 

> "Karl" == Karl Anderson <[EMAIL PROTECTED]> writes:

Karl> Steve Spicklemire <[EMAIL PROTECTED]> writes:

>> How about:
>> 
>> /you@server
>> 
port:/Control_Panel/Products/YourProduct/YourZClass/propertysheets/methods/yourMethod

Karl> How about it?

Karl> Hint: that ZClass doesn't look like a directory to FTP.

>>  -steve
>> 
>> > "Karl" == Karl Anderson <[EMAIL PROTECTED]> writes:
>> 
>> 
Karl> What FTP editing options are there for ZClass definitions?
Karl> I've never been able to do much.  What I have done is use
Karl> folderish ZClasses, edit DTML methods contained in the
Karl> *instance* thru FTP, and then moved them to the definition
Karl> latler, but that's kind of hacky - it adds a little more
Karl> confusion about finding things with large projects.
>>
Karl> -- Karl Anderson [EMAIL PROTECTED]
>>
Karl> ___ Zope
Karl> maillist - [EMAIL PROTECTED]
Karl> http://lists.zope.org/mailman/listinfo/zope ** No cross
Karl> posts or HTML encoding!  ** (Related lists -
Karl> http://lists.zope.org/mailman/listinfo/zope-announce
Karl> 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 )
>> 

Karl> -- Karl Anderson [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 )




Re: [Zope] ZClass <--> Product

2000-08-31 Thread Karl Anderson

Steve Spicklemire <[EMAIL PROTECTED]> writes:

> How about:
> 
> /you@server 
>port:/Control_Panel/Products/YourProduct/YourZClass/propertysheets/methods/yourMethod

How about it?

Hint: that ZClass doesn't look like a directory to FTP.

> 
> -steve
> 
> > "Karl" == Karl Anderson <[EMAIL PROTECTED]> writes:
> 
> 
> Karl> What FTP editing options are there for ZClass definitions?
> Karl> I've never been able to do much.  What I have done is use
> Karl> folderish ZClasses, edit DTML methods contained in the
> Karl> *instance* thru FTP, and then moved them to the definition
> Karl> latler, but that's kind of hacky - it adds a little more
> Karl> confusion about finding things with large projects.
> 
> Karl> -- Karl Anderson [EMAIL PROTECTED]
> 
> Karl> ___ Zope
> Karl> maillist - [EMAIL PROTECTED]
> Karl> http://lists.zope.org/mailman/listinfo/zope ** No cross
> Karl> posts or HTML encoding!  ** (Related lists -
> Karl> http://lists.zope.org/mailman/listinfo/zope-announce
> Karl> 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 )
> 

-- 
Karl Anderson  [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 )




Re: [Zope] ZClass <--> Product

2000-08-30 Thread Steve Spicklemire


How about:

/you@server 
port:/Control_Panel/Products/YourProduct/YourZClass/propertysheets/methods/yourMethod

-steve

> "Karl" == Karl Anderson <[EMAIL PROTECTED]> writes:


Karl> What FTP editing options are there for ZClass definitions?
Karl> I've never been able to do much.  What I have done is use
Karl> folderish ZClasses, edit DTML methods contained in the
Karl> *instance* thru FTP, and then moved them to the definition
Karl> latler, but that's kind of hacky - it adds a little more
Karl> confusion about finding things with large projects.

Karl> -- Karl Anderson [EMAIL PROTECTED]

Karl> ___ Zope
Karl> maillist - [EMAIL PROTECTED]
Karl> http://lists.zope.org/mailman/listinfo/zope ** No cross
Karl> posts or HTML encoding!  ** (Related lists -
Karl> http://lists.zope.org/mailman/listinfo/zope-announce
Karl> 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 )




Re: [Zope] ZClass <--> Product

2000-08-30 Thread Karl Anderson

Chris Withers <[EMAIL PROTECTED]> writes:

> Karl Anderson wrote:
> > What FTP editing options are there for ZClass definitions?  
> 
> Your email address suggests you should be able to find out more easily
> than me ;-)

Well, I'm pretty sure the answer is "none", but I'm asking to the list
so if someone does have some kind of workaround, the reply will be
public.

> Maybe you could suggest better editing support for FTP or is WebDAV the
> way of the future?
> Mention was made of Adobe GoLive! in Paris, what's that like for doing
> this sort of this?

FTP is limited for this sort of thing because it works on files with
no metadata.

I *think* that the only reason one can't edit DTML methods in a ZClass
definition is that the intermediate steps don't support a FTP
directory interface.  That'd be a nice first step.

I've heard some ideas about how we could edit properties, permissions,
etc. with FTP, some more hackish than others.  Best is probably some
sort of XML text file associated with an item.

But from what I've been reading, the focus will be on through the web
editing whenever possible.  I personally find it much more convenient
to work with python baseclasses & have a python shell looking at the
ZODB in an emacs buffer, so I have a history of what I've done and
seen and can look at the objects & attributes on any level.

And yes, the wave of the future does appear to be with the various
clients that are coming out, Radio Userland being the most recent that
I've heard about.

-- 
Karl Anderson  [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] ZClass and Propertysheets

2000-08-30 Thread Andy Pahne



Hi,

I have created a ZClass with a propertysheet called "Basic". I added a
property "db_id", integer value with a default value of 0. Then I created
two instances and changed the value to 1 in the first and 2 in the second
instance.

When I try to render the property with a  I get a 1 in both
instances. That's not what I expected in the beginning. In particular not
because there doesn't seen to be anything wrong when I have a look at the
property sheet in the instance's management screen. I have different values
there.

Am I wrong or is there something wrong with Zope 2.2.1 and ZClasses?


Andy Pahne
[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 )




Re: [Zope] ZClass <--> Product

2000-08-30 Thread Chris Withers

Karl Anderson wrote:
> What FTP editing options are there for ZClass definitions?  

Your email address suggests you should be able to find out more easily
than me ;-)

Maybe you could suggest better editing support for FTP or is WebDAV the
way of the future?
Mention was made of Adobe GoLive! in Paris, what's that like for doing
this sort of this?

cheers,

Chris

___
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] ZClass <--> Product

2000-08-29 Thread Karl Anderson

Chris Withers <[EMAIL PROTECTED]> writes:

> "Nestor A. Diaz L." wrote:
> > I want to know if there is any utility that let translate a ZClass to a
> > Product, i'm worry using the frames based interface, so i'm considering to
> > switch to a Product a utility that let that would be usefull howevere a
> > HOWTO on doing this would be fine.
> 
> Not sure abotu what you're asking...
> If you want to convert your ZClass-based product to a pythno based
> product so you don't have to do development through the managemetn
> interface, then the answer is sorry, no you can't.

I always put python base classes under my ZClasses, even if the
baseclass doesn't do anything at the start.  Then it's easy to
move attributes from the ZClass to the baseclass, or throw simple
test/debug/prototype methods in the ZClass temporarily.

Likewise, I usually put a ZClass on top of my python base classes,
even if the ZClass doesn't do much at the start (which is more often).

> However, if it's just the through-the-web part of developing a
> ZClass-based product that's causing you problems, have you considered
> editing the ZClasses using FTP or WebDAV?

What FTP editing options are there for ZClass definitions?  I've never
been able to do much.  What I have done is use folderish ZClasses,
edit DTML methods contained in the *instance* thru FTP, and then moved
them to the definition latler, but that's kind of hacky - it adds a
little more confusion about finding things with large projects.

-- 
Karl Anderson  [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 )




Re: [Zope] ZClass <--> Product

2000-08-29 Thread Chris Withers

"Nestor A. Diaz L." wrote:
> I want to know if there is any utility that let translate a ZClass to a
> Product, i'm worry using the frames based interface, so i'm considering to
> switch to a Product a utility that let that would be usefull howevere a
> HOWTO on doing this would be fine.

Not sure abotu what you're asking...
If you want to convert your ZClass-based product to a pythno based
product so you don't have to do development through the managemetn
interface, then the answer is sorry, no you can't.

However, if it's just the through-the-web part of developing a
ZClass-based product that's causing you problems, have you considered
editing the ZClasses using FTP or WebDAV?

cheers,

Chris

___
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] ZClass <--> Product

2000-08-28 Thread Nestor A. Diaz L.

HI,

I want to know if there is any utility that let translate a ZClass to a
Product, i'm worry using the frames based interface, so i'm considering to
switch to a Product a utility that let that would be usefull howevere a
HOWTO on doing this would be fine.

thanks,

Nestor A. Diaz
Ingeniero de Desarrollo
Engendro - Comercio Electronico sobre Linux
Email: [EMAIL PROTECTED] - WWW: http://www.engendro.com


___
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] ZClass and Custom Personal Zclass included

2000-08-25 Thread Vincent

Hi,

I created a ZClass named 'Z1' and another one classed 'Z2',
I defined a Property Sheet 'P1' into Z2, how is it possible to declared a
property inside P1 of the type Z1 ?

Thanks


___
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] ZClass Property : DTML Document ?

2000-08-25 Thread Rik Hoekstra



Vincent wrote:
> 
> Dow do I create a ZClass Property of the type : DTML Document ?
> 

If you want a DTML Document accessible in all ZClasses - just include it
in the ZClass. If you want you may make it available as a View by
mapping it under the 'Views' tab (in the ZClass definition area)

hth

Rik

___
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] ZClass Property : DTML Document ?

2000-08-25 Thread Vincent

Dow do I create a ZClass Property of the type : DTML Document ?

Thanks

Vincent

___
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] ZClass and external Methods

2000-08-24 Thread Chris Withers

Vincent wrote:
> I just would like to call from a DTMl document an external method defined in
> a ZClass.
>- I created an instance of this ZClass  -> Ztest (for example),
>- But I can't call the external method : ->  "Ztext.myMethod(Arg1)">

Some error messages and tracebacks would help a lot...

cheers,

Chris

___
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] ZClass Date Fields

2000-08-24 Thread Loren Stafford

I don't know of any bug that would produce this kind of behavior. It's more
likely a problem in communication between the add form and the method
invoked by that form. Can you show us the DTML for both? Then we can
probably see what's going wrong.

-- Loren

- Original Message -
From: "Craig" <[EMAIL PROTECTED]>
To: "Loren Stafford" <[EMAIL PROTECTED]>
Sent: August 24, 2000 07:05 AM
Subject: Re: [Zope] ZClass Date Fields


> On Wed, Aug 23, 2000 at 08:01:54PM -0700, Loren Stafford wrote:
> > I think what you need is here:
> >
> > http://www.zope.org/Members/lstaffor/zProperties
> >
>
> This is what I followed. I used a different file type than PDF for my
> example, but I named the date property the same (pub_date) and when I
create
> a new one, it gets created with pub_date set to 1970/01/01. My co-worker
> also followed your tutorial and had the same problem. Could this be a bug
in
> Zope
>
> > -- Loren
> >
> > - Original Message -
> > From: "Craig" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: August 23, 2000 07:32 PM
> > Subject: [Zope] ZClass Date Fields
> >
> >
> > > I'm sure you've heard this question before, so bare with me. I went
> > through
> > > the ZClass tutorial and got everything working right except Date
> > properties.
> > > Lets assume, for example, that my ZCLass is called CDClass. When I
create
> > a
> > > new CDClass instance (using the addForm), it always uses the default
date
> > > for Date properties instead of the ones I've entered in the form. A
> > > co-worker of mine has had the same problem but we have not yet
discovered
> > > why. Thoughts? Solutions?
> > >
>
> Later,
> --
> \ Craig "Cowboy" McDaniel
> /_\ Software Engineer
> /_/_\ Internet Tool & Die
> /_/_/_\ [EMAIL PROTECTED]
> /_/_/_/_\ (502) 584-8665 ext 108
>


___
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] ZClass and external Methods

2000-08-24 Thread Vincent

Hi,

I just would like to call from a DTMl document an external method defined in
a ZClass.
   - I created an instance of this ZClass  -> Ztest (for example),
   - But I can't call the external method : -> 
If somebody knows where I am wrong ;-)

Thansk again

Vincent


___
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] ZClass Date Fields

2000-08-23 Thread Loren Stafford

I think what you need is here:

http://www.zope.org/Members/lstaffor/zProperties

-- Loren

- Original Message -
From: "Craig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: August 23, 2000 07:32 PM
Subject: [Zope] ZClass Date Fields


> I'm sure you've heard this question before, so bare with me. I went
through
> the ZClass tutorial and got everything working right except Date
properties.
> Lets assume, for example, that my ZCLass is called CDClass. When I create
a
> new CDClass instance (using the addForm), it always uses the default date
> for Date properties instead of the ones I've entered in the form. A
> co-worker of mine has had the same problem but we have not yet discovered
> why. Thoughts? Solutions?
>
> Later,
> --
> \ Craig "Cowboy" McDaniel
> /_\ Software Engineer
> /_/_\ Internet Tool & Die
> /_/_/_\ [EMAIL PROTECTED]
> /_/_/_/_\ (502) 584-8665 ext 108
>
> ___
> 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] ZClass Date Fields

2000-08-23 Thread Craig

I'm sure you've heard this question before, so bare with me. I went through
the ZClass tutorial and got everything working right except Date properties.
Lets assume, for example, that my ZCLass is called CDClass. When I create a
new CDClass instance (using the addForm), it always uses the default date
for Date properties instead of the ones I've entered in the form. A
co-worker of mine has had the same problem but we have not yet discovered
why. Thoughts? Solutions?

Later,
-- 
\ Craig "Cowboy" McDaniel 
/_\ Software Engineer
/_/_\ Internet Tool & Die
/_/_/_\ [EMAIL PROTECTED]
/_/_/_/_\ (502) 584-8665 ext 108

___
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] ZClass inheriting from image question

2000-08-11 Thread Steve Alexander


Kapil wrote:
> > I want to change the default way the ZClass renders it's information. I
> > want more than simply a picture so I crated a new method "index_html" in
> > my ZClass.
> >
> > My question is: How do I display the picture from this index_html method?


http://www.zope.org/Members/lalo/Renderable-ZClass

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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] ZClass inheriting from image question

2000-08-11 Thread Meeting Maker Webmaster

Hello,

At 18:36 10.08.2000 +, Kapil Thangavelu wrote:
>make a dtml doc id:return_image
>with body
>
>
>and use that as your source
>so in index_html
>
>">

Works great. Thank you very much for your help.

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.com


___
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] ZClass strangeness: broken basic management actions

2000-08-10 Thread Bill Anderson

Darran Edmundson wrote:
> 
> I'm almost at my wit's end (again).
> 
> I have several very simple ZClasses (*none* of which
> are subclassed from CatalogAware).  The "Basic" tab
> shows them all to be subclassed from "ZObject,
> ZObjectManager".  Recently I posted asking how to
> implement copy/paste programatically.  It turns out
> this was somewhat premature - I can't even get this
> to work via the management interface, all of my
> ZClass instances reporting that "object X doesn't
> support this operation".  One of my ZClasses doesn't
> even allow renaming, throwing the same error as above.
> In all other respects the classes work as expected.


Does the traceback mention CatalogAware? i have the same problem. I have ZClass 
objects that are _not_ in any way,
shape, or form associated w/CatalogAware, and they are unrenameable, and complain in 
the traceback about CatalogAware


I tried an object inheriting from DataSkin, and a plain-jane one. Nada.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] ZClass inheriting from image question

2000-08-10 Thread Kapil Thangavelu

Meeting Maker Webmaster wrote:
> 
> Hello,
> 
> At 16:31 10.08.2000 +, Kapil Thangavelu wrote:
> > > I am still working on my "users preferences" I mentioned earlier. For now
> >I
> > > will stay with the standard acl_users as they seem to offer everything I
> > > currently need to authenticate the user. On the other side, I am creating
> >a
> > > new ZClass that will be used to store the user information in properties.
> > > As I finally also want to store the picture of the user, I decided to
> > > create ZClass that will subclass _ZClass_for_Image.
> > >
> > > I want to change the default way the ZClass renders it's information. I
> > > want more than simply a picture so I crated a new method "index_html" in
> >my
> > > ZClass.
> > >
> > > My question is: How do I display the picture from this index_html method?
> >
> >from the Image.py file
> >
> > should do it
> 
> This doesn't work. The problem is that  returns the 
> tag using the object name. Well if it does that, it will use the content of
> index_html, resulting in an error.
> 

2nd try 

make a dtml doc id:return_image
with body


and use that as your source
so in index_html

">

Cheers

Kapil

___
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] ZClass inheriting from image question

2000-08-10 Thread Meeting Maker Webmaster

Hello,

At 16:31 10.08.2000 +, Kapil Thangavelu wrote:
> > I am still working on my "users preferences" I mentioned earlier. For now
>I
> > will stay with the standard acl_users as they seem to offer everything I
> > currently need to authenticate the user. On the other side, I am creating
>a
> > new ZClass that will be used to store the user information in properties.
> > As I finally also want to store the picture of the user, I decided to
> > create ZClass that will subclass _ZClass_for_Image.
> >
> > I want to change the default way the ZClass renders it's information. I
> > want more than simply a picture so I crated a new method "index_html" in
>my
> > ZClass.
> >
> > My question is: How do I display the picture from this index_html method?
>
>from the Image.py file
>
> should do it


This doesn't work. The problem is that  returns the  
tag using the object name. Well if it does that, it will use the content of 
index_html, resulting in an error.

Thank you.

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.com


___
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] ZClass inheriting from image question

2000-08-10 Thread Kapil Thangavelu

Meeting Maker Webmaster wrote:
> 
> Hello,
> 
> I am still working on my "users preferences" I mentioned earlier. For now I
> will stay with the standard acl_users as they seem to offer everything I
> currently need to authenticate the user. On the other side, I am creating a
> new ZClass that will be used to store the user information in properties.
> As I finally also want to store the picture of the user, I decided to
> create ZClass that will subclass _ZClass_for_Image.
> 
> I want to change the default way the ZClass renders it's information. I
> want more than simply a picture so I crated a new method "index_html" in my
> ZClass.
> 
> My question is: How do I display the picture from this index_html method?

from the Image.py file

 should do it

Cheers 

Kapil

___
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] ZClass inheriting from image question

2000-08-10 Thread Meeting Maker Webmaster

Hello,

I am still working on my "users preferences" I mentioned earlier. For now I 
will stay with the standard acl_users as they seem to offer everything I 
currently need to authenticate the user. On the other side, I am creating a 
new ZClass that will be used to store the user information in properties. 
As I finally also want to store the picture of the user, I decided to 
create ZClass that will subclass _ZClass_for_Image.

I want to change the default way the ZClass renders it's information. I 
want more than simply a picture so I crated a new method "index_html" in my 
ZClass.

My question is: How do I display the picture from this index_html method?

Thank you for your help.

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.com


___
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] ZClass

2000-08-10 Thread Petr Knapek

Hi Zopists,
I have created a ZClass (TestClass) with an external python function
'foo'. Now I would like to create an instance (myTest) of my TestClass
in a dtml template and call its method foo.

When I put the code below

 


I can see this error:

Error Type: AttributeError
Error Value: __call__

When I looked at the returned type of myTest.foo, the Zope says that it
is an instance of Folder.
Can anybody help me how to call create instances of ZClasses
programatically only in the name-space (not in ZODB) and call their
functions?

Petr 
-- 
Petr Knápek
NEXTRA Czech Republic, s.r.o., Veveří 102, 659 10 Brno, Czech Republic
e-mail: mailto:[EMAIL PROTECTED]
tel:+420-5-41 558 394
FAX:+420-5-41 558 390

___
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] ZClass strangeness: broken basic management actions

2000-08-10 Thread Darran Edmundson


I'm almost at my wit's end (again).

I have several very simple ZClasses (*none* of which
are subclassed from CatalogAware).  The "Basic" tab
shows them all to be subclassed from "ZObject, 
ZObjectManager".  Recently I posted asking how to
implement copy/paste programatically.  It turns out
this was somewhat premature - I can't even get this
to work via the management interface, all of my
ZClass instances reporting that "object X doesn't
support this operation".  One of my ZClasses doesn't 
even allow renaming, throwing the same error as above.
In all other respects the classes work as expected.

This is happening on a number of Zope platforms (irix,
NT, Win98) with versions of Zope everywhere from
1.61 to 2.2 which leads me to believe that I'm doing
something fundamentally wrong.  Any ideas are
much appreciated - I'll even send along an exported
ZClass to anyone willing to investigate the source
of my error on their local machine.

Cheers,
Darran.

___
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] ZClass property that is a map

2000-08-08 Thread Scott Brodsky

It's my understanding that this can only be done
in python in the Products subfolder.

I did something like this with David Murray's help
for a BannerProduct.  I modified an existing
python-based banner class and added two "maps" to
each banner object called 'history_views' and
'history_clicks' indexed by a date.

Here's part of code I'm using:

in /Products/ Ban.py file:

__doc__="""Ban Ad Classes"""
__version__=0.1

from Globals import HTMLFile
from Globals import MessageDialog
from Globals import Persistent
from OFS.Image import Image
#import OFS.Image
import OFS.ObjectManager
import Acquisition# Various
acquisition types.
import AccessControl.Role # Zope Security
management.
import string


class Ban:
" A Ban Ad Class"

meta_type="Banner Base Class"

def
__init__(self,id,title,file,content_type='',precondition=''):
self.history_clicks = {}
self.history_views = {}

def __setstate__(self,state):
Persistent.__setstate__(self,state)

if not hasattr(self,'history_views'):
self.history_views = {}
if not hasattr(self,'history_clicks'):
self.history_clicks= {}

later in the code the history_views map is updated
when a banner ad is viewed:

keydate=time.strftime("%y%m%d",time.localtime(time.time()))
if self.history_views.has_key(keydate):
self.history_views[keydate] =
self.history_views[keydate]+1

DV,
Scott Brodsky
http://scottb.homepage.com
icq:2202686, Yahoo:sbrodsky2000 
Romans 14:11


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


___
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] ZClass property that is a map

2000-08-07 Thread Cary O'Brien


I would like to add a property to an object that is a map, so I could
use map[s] to look things up symbolicaly.  Is there an easy way to do
this with property sheets?  If so, what is it?  If not, what is the
hard way.

Thanks,

-- cary

___
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] ZClass authorization problem (You are not authorized to access manage_changeProperties)

2000-08-07 Thread Gaspard, Bradley S

I have created a new ZClass which contains a dtml method that first clones
an object and then edits it's properties:





When I fill out the 'add' form and try to create a new instance I am
presented with the error message (as a user with
a manager role):

You are not authorized to access manage_changeProperties

I am able to successfully create an instance if I am the superuser.

How do I fix this??

Brad




___
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] ZClass tutorial

2000-07-24 Thread George Donnelly

yeah i know how ya feel. even for little stuff i have to scrounge and beg
for help. :-(

hopefully this will improve when the O'Reilly Zope book comes out.

btw have you checked out the pdf files of all the howto's and tip's? i've
found them to be really helpful

http://www.zope.org/Members/AlexR/

also this list archives is really useful i think. i get a lot of stuff from
here

http://zope.nipltd.com/public/lists/zope-archive.nsf/$$Search?OpenForm

hth

Regards,
GEORGE DONNELLY
[EMAIL PROTECTED]
http://cyklotron.com/
He that always gives way to others will end in having no principles of his
own. --Aesop 

> Hi, some thoughts(and frustrations) from a newbie having his "first time"
> with Zope.
> 
> The documentation needs a lot of improvement.

> sigh...i foresee a rocky road ahead for this newbie to master the 'Zen' of
> Zope. Hopefully it's not a long one:(


___
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] ZClass tutorial

2000-07-24 Thread Firestar

Hi, some thoughts(and frustrations) from a newbie having his "first time"
with Zope.

The documentation needs a lot of improvement. Since October last year,
there's still only ONE chapter(which is on ZClasses) in the Zope Developer's
Guide?? Are there any more chapters forthcoming? Or do i have to fork out
money and purchase the commercial version one?:( (And don't refer me to ZDP,
please...)

As for the "Zope Content Manager Guide", the examples are easy enough for
newbies to understand, but some of the screenshots accompanying the examples
are not 'consistent'. Perhaps DC can do some proof-reading there.

As for the DTML reference, i felt "lost" after reading a few sections. At
first, I thought it would be as easy as when i first read the PHP manual,
but somehow it doesn't seem 'user-friendly' enough. Maybe i will try it
again after i have read the rest of the Reference Guides.

I'm not an expert in web development, and could not really pick up new
"technologies" fast. But i still remembered learning PHP was not that
difficult; the manual is comprehensive, easy-to-use and tutorials
contributed by other websites really speed up my learning process.

I understand that Zope is a different thing altogether from a programming
language like PHP. I have yet to read up the Z SQL Methods User Guide, but
from the docs that i have read so far, i still feel lost as to where and how
to start building an 'advanced' website, e.g. converting my current
PHP/MySQL website to Zope. Someting is missing here... Perhaps the Reference
Guides could add more explanation and details, instead of just "click here
and you will see this" kind of instructions. OR give more complex
(real-world)examples, like building an e-commerce site(with sessions, cart &
authentication).

sigh...i foresee a rocky road ahead for this newbie to master the 'Zen' of
Zope. Hopefully it's not a long one:(

regards,
firestar


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


___
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] ZClass beginners question

2000-07-03 Thread Ivan Raikov


Hello, Dierk,

There are several ways to use a relational database from within
Zope. A good start for you would be the Zope SQL methods. Read the 
documentation about them at
. 

Then experiment. When you get stuck, ask questions on this forum.

Regards,
Ivan Raikov

"Dierk Hoeppner" <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I want to connect our own proprietary database to zope. I know 
> which features I want because I did an ordinary CGI-application 
> already. I would like to use a ZClass. My question: For connecting to 
> my database do I have to use external functions? The goal is to 
> construct a product like thing that we could easily give away.
> 
> Thanks,
> 
> Dierk Hoeppner

___
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] ZClass beginners question

2000-07-03 Thread Dierk Hoeppner

Hi,

I want to connect our own proprietary database to zope. I know 
which features I want because I did an ordinary CGI-application 
already. I would like to use a ZClass. My question: For connecting to 
my database do I have to use external functions? The goal is to 
construct a product like thing that we could easily give away.

Thanks,

Dierk Hoeppner
Dierk Hoeppner
Braunschweig University Library
Pockelsstr. 13
D-38106 Braunschweig
Germany
Tel: +49-531-391-5066 Fax: -5836
E-Mail: [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] ZClass in ZClass problem

2000-07-01 Thread Oleg Broytmann

Hello!

   (Nobody dared to answer, retrying...)

   I started to learn ZClasses. I created a product, added a Zclass in it,
and added a Zcalss inside outer ZClass - I want to create ZClass that's
addable only inside outer ZClass.

   Then the problems begin. All management URLs for inner ZClass contain
%20, so URLs look like
"propertysheets/methods/RandomZItem%20/manage_workspace" and
"propertysheets/methods/RandomZItem_add%20/manage_workspace".

   If I click on the link I got the AttributeError (of course). When I
manually remove the offending %20, I can manage the object, but it's
tiresome to remove it every time.

   The problem manifested on both 2.1.4 and 2.2.0b3. What's wrong?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] ZClass in ZClass problem

2000-06-30 Thread Oleg Broytmann

Hello!

   I started to learn ZClasses. I created a product, added a Zclass in it,
and added a Zcalss inside outer ZClass - I want to create ZClass that's
addable only inside outer ZClass.

   Then the problems begin. All management URLs for inner ZClass contain
%20, so URLs look like
"propertysheets/methods/RandomZItem%20/manage_workspace" and
"propertysheets/methods/RandomZItem_add%20/manage_workspace".
   If I click on the link I got the AttributeError (of course). When I
manually remove the offending %20, I can manage the object, but it's
tiresome to remove it every time.

   The problem manifested on both 2.1.4 and 2.2.0b3. What's wrong?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] Zclass and acquisition

2000-06-27 Thread Dieter Maurer

=?iso-8859-1?q?Brown=20Fox?= writes:
 > is there a way to know the parent of a file saved in a
 > zclass?
 > The PARENTS stuff is useful also for zclasses?
 > I have tried but without any results!
The parent chain is build up during URL traversal.
Thus, it contains the ancestors in your Zope hierarchy.
It does not depend on any ZClass relationships.



Dieter

___
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] ZClass question?

2000-06-27 Thread Webmaster

I am using DTML methods on all.

> -Original Message-
> From: Erik Enge [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 27, 2000 4:37 PM
> To:   Webmaster
> Cc:   [EMAIL PROTECTED]
> Subject:  Re: [Zope] ZClass question?
> 
> On Tue, 27 Jun 2000, Webmaster wrote:
> 
> > First when I try and create a new instance remotely I get a zope error
> > "unauthorized" no matter what username and password I type. If I try and
> 
> Are you using DTML Methods or Documents?  I've heard other talking
> about creating roles, but I switched from DTML Documents to DTML
> Methods and tde 'unauthorized' message went away.  Don't know why :-(.

___
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] ZClass question?

2000-06-27 Thread Erik Enge

On Tue, 27 Jun 2000, Webmaster wrote:

> First when I try and create a new instance remotely I get a zope error
> "unauthorized" no matter what username and password I type. If I try and

Are you using DTML Methods or Documents?  I've heard other talking
about creating roles, but I switched from DTML Documents to DTML
Methods and tde 'unauthorized' message went away.  Don't know why :-(.


___
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] ZClass question?

2000-06-27 Thread Webmaster

I am running 2.2.0b2 on a RH linux and have created a simple ZClass. All of
my modified constructor objects work perfect however when I created a
separate dtml method to add instances I get some weird errors.

First when I try and create a new instance remotely I get a zope error
"unauthorized" no matter what username and password I type. If I try and
create a new instance locally on the same box (or within the internal
network) I get a KeyError and then at the bottom of the same page is a
second included page with a 404 file not found error. If I change the method
from "post" to "get" so I can see if the new_goLiveDate is being passed I
get the "unauthorized" error.

Any idea what is going on?
Here is my "add_instance_html" code.


 
 



  

  



Let me know if you need more info.

-Jamey

___
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] Zclass and acquisition

2000-06-27 Thread Brown Fox

Hello,
is there a way to know the parent of a file saved in a
zclass?
The PARENTS stuff is useful also for zclasses?
I have tried but without any results!

Thanks,
   Bruno


__
Do You Yahoo!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it

___
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] ZClass-within-a-ZClass not in subobjects list?

2000-06-18 Thread Matt Behrens

On Sun, Jun 18, 2000 at 01:28:26PM -0400, Tres Seaver wrote:

> Matt Behrens <[EMAIL PROTECTED]> wrote:
>
> > No matter what I do, I can't seem to make a ZClass a subobject of
> > another ZClass. I'm really not sure what I'm missing. Here's what
> > I've done:

[snip]

> There are a couple of items in play here:
> 
>  * Nested ZClasses are *always* addable in their containing ZClass,
>so they don't show up as options in the Subobjects tab.

OK, cool.  That makes sense.

>  * If you have *exactly one* nested ZClass in a container ZClass,
>*and* you have not specified any "outside" objects as addable
>on the Subobjects tab, then the only objects which will be
>addable in the container ZClass are instances of the nested one;
>in this case, the management interface does not display a
>dropdown list, but only the "Add" button (try clicking Add on
>your Whiteboard object's Contents tab).

What was throwing me here is that when I'd hit the ``Add'' button,
I'd get ``Resource not found''.  After mumbling on #zope for awhile,
I finally went digging though the mailing list archives and discovered
an issue dating at least back to September 1999 indicating that you
had to go into the inner ZClass's factory and hit ``Change'' to
make it work.  I did this and it worked.  Collector #1334 has
details.

[snip]

> Patches gratefully accepted :)

When I discovered that what I was seeing was a bug, that was the
first thing I tried to do -- find the problem and fix it -- but at
this point, I'm too green yet to figure it out.  Maybe in the future.

Thanks!

-- 
Matt Behrens <[EMAIL PROTECTED]>
Student of Zope Zen
Owner/Administrator, zigg.com

___
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] ZClass-within-a-ZClass not in subobjects list?

2000-06-18 Thread Tres Seaver

Matt Behrens <[EMAIL PROTECTED]> wrote:
> 
> No matter what I do, I can't seem to make a ZClass a subobject of
> another ZClass. I'm really not sure what I'm missing. Here's what
> I've done:
> 
> 1.  Created a new product: WhiteboardProduct.
> 
> 2.  Created a ZClass within that product that inherits from
> ObjectManager: Whiteboard. Allowed Zope to create all the
> methods.
> 
> 3.  On Whiteboard's method page, created another ZClass that doesn't
> inherit from anything: WhiteboardItem.
> 
> If the documentation (ZDG) is to be believed, at this point I would
> have a subobject visible in Whiteboard's subobject list. (It is not
> so.) If I instantiate Whiteboard, I do not get a drop-down list of
> items. Oddly enough, if I select a random item (say, Folder) on
> Whiteboard's subobjects list, I now get a drop-down list of items
> in my instance that does have WhiteboardItem as a choice (of course,
> its meta type, not ``WhiteboardItem'').
> 
> What am I doing wrong here?  This is a 2.1.6 installation that I'm
> playing around on, btw.

There are a couple of items in play here:

 * Nested ZClasses are *always* addable in their containing ZClass,
   so they don't show up as options in the Subobjects tab.

 * If you have *exactly one* nested ZClass in a container ZClass,
   *and* you have not specified any "outside" objects as addable
   on the Subobjects tab, then the only objects which will be
   addable in the container ZClass are instances of the nested one;
   in this case, the management interface does not display a
   dropdown list, but only the "Add" button (try clicking Add on
   your Whiteboard object's Contents tab).

The bad news here is that there are some weirder interactions
possible, as well (several recent Collector issues come to mind);
the good news is that they are almost all related to the UI -- the
underlying object system is pretty sane.

Patches gratefully accepted :)

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations"Zope Dealers"http://www.zope.org

___
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] ZClass-within-a-ZClass not in subobjects list?

2000-06-16 Thread Matt Behrens

No matter what I do, I can't seem to make a ZClass a subobject of
another ZClass. I'm really not sure what I'm missing. Here's what
I've done:

1.  Created a new product: WhiteboardProduct.

2.  Created a ZClass within that product that inherits from
ObjectManager: Whiteboard. Allowed Zope to create all the
methods.

3.  On Whiteboard's method page, created another ZClass that doesn't
inherit from anything: WhiteboardItem.

If the documentation (ZDG) is to be believed, at this point I would
have a subobject visible in Whiteboard's subobject list. (It is not
so.) If I instantiate Whiteboard, I do not get a drop-down list of
items. Oddly enough, if I select a random item (say, Folder) on
Whiteboard's subobjects list, I now get a drop-down list of items
in my instance that does have WhiteboardItem as a choice (of course,
its meta type, not ``WhiteboardItem'').

What am I doing wrong here?  This is a 2.1.6 installation that I'm
playing around on, btw.

-- 
Matt Behrens <[EMAIL PROTECTED]>
Owner/Administrator, zigg.com

___
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] ZClass newbie problem...

2000-06-14 Thread Kevin Dangoor

- Original Message -
From: "Eric L. Walstad" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 13, 2000 12:30 AM
Subject: [Zope] ZClass newbie problem...


> I'm stuck. I would like to build a "shiny new ZClass" that has the
following
> structure:
>
> WebSimProduct
>   WebSim Class
> 'Properties' Property Sheet
>   string RunID
> Calc Class Object
>   'Properties' Property Sheet
> PathToInputFile
> PathToWxFolder
>   Results Class Object
> 'Properties' Property Sheet
>   float gashtg
>   float elchtg
>   float elcclg
>   float euihtg
>   float euiclg
>
> I haven't seen anything in the Zope documentation on using Zclass
instances
> as members of a super class.  In other programming languages I would
> instantiate default objects when the WebSim class is initialized.  That
way,
> to use a WebSim object, all I would need to do is instantiate one, then
fill
> the properties of the automatiacally-created Calc object and Results
object.
> However, I'm not sure how to build these default objects in Zope.
>
> My next question is: do I have to build a bunch of products (one for the
> Calc class and one for the Results class, for example)?  I can imagine
this
> would result in a huge number of products under the control panel if this
is
> the case.  I would like to have just a WebSim product and have all the
other
> classes defined within this product.  Does Zope work this way?  If not,
how
> is this class structure (or one similar) achieved?

You can certainly have multiple ZClasses within a single Product. Some
people recommend not nesting ZClasses, because when you do so you can only
use the nested classes within the top level class... ZClasses can't be
cut-and-pasted, so you're stuck with that hierarchy. If you're sure you only
want to add those classes in that particular way, you can pretty easily do
what you want.

In the WebSim_add method, you would do something like:

this line is already there
 
  ...set your properties here...
   
 ...set your Results properties here...

  


HTH,

Kevin


___
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] ZClass newbie problem...

2000-06-12 Thread Eric L. Walstad

I'm stuck. I would like to build a "shiny new ZClass" that has the following
structure:

WebSimProduct
  WebSim Class
'Properties' Property Sheet
  string RunID
Calc Class Object
  'Properties' Property Sheet
PathToInputFile
PathToWxFolder
  Results Class Object
'Properties' Property Sheet
  float gashtg
  float elchtg
  float elcclg
  float euihtg
  float euiclg

I haven't seen anything in the Zope documentation on using Zclass instances
as members of a super class.  In other programming languages I would
instantiate default objects when the WebSim class is initialized.  That way,
to use a WebSim object, all I would need to do is instantiate one, then fill
the properties of the automatiacally-created Calc object and Results object.
However, I'm not sure how to build these default objects in Zope.

My next question is: do I have to build a bunch of products (one for the
Calc class and one for the Results class, for example)?  I can imagine this
would result in a huge number of products under the control panel if this is
the case.  I would like to have just a WebSim product and have all the other
classes defined within this product.  Does Zope work this way?  If not, how
is this class structure (or one similar) achieved?

BTW, I've read, and disected to the best of my ability, the Zope Developer's
Guide and the Searchable Job Board HowTo and Ta'sss Adding ZClass
Instances Programmatically and the Zope Content Manager's Guide 'Turining an
Application into a Product.'  However none of these deals with classes that
contain custom class objects.

Thanks for the guidance (TFTG?)!

Eric.


___
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] ZClass and class variable

2000-06-05 Thread Loren Stafford

Yes, if what you need is a variable shared by all instances of the class.
You need to use a property sheet.

The "How-To" http://www.zope.org/Members/lstaffor/zProperties might help
answer this question, though it speaks more about instance variables.

-- Loren

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Francois-Regis CHALAOUX
> Sent: Monday, June 05, 2000 09:12
> To: Receipt Notification Requested
> Subject: [Zope] ZClass and class variable
> Sensitivity: Personal
>
>
> Hi all,
>
> Is it possible to declare a class variable in a Zclass?
> And if yes, how to call this variable in class ZClass methodes?
>
> Bye, FR.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ___
> 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] ZClass and class variable

2000-06-05 Thread Francois-Regis CHALAOUX

Hi all,

Is it possible to declare a class variable in a Zclass?
And if yes, how to call this variable in class ZClass methodes?

Bye, FR.
  
  
  
  
  
  
  
  
  


___
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] ZClass question

2000-06-05 Thread Jerome Alet

Hi,

I'm currently trying to store all of the Medicine School (I work for) 
events in Zope, using the Calendar product to store them.

I've created from my browser a Zclass which has a propertysheet and some
properties in it, and some DTML methods. I've called this class
GenericEvent. 

I want to create 4 or five other Zclasses which only differ from the first
one by their meta type and the value (not the name) of one of their
properties. For example I want to create ExamEvents, CoursesEvents, and so
on...

Then I want to give permissions to some people to add some type of events
in the database.

For example I want John to be able to add (and delete) both GenericEvents
and ExamEvents, while I want Jane to only be allowed to add CoursesEvents,
and not be allowed to delete CoursesEvents she hasn't created.

I've created my GenericEvent ZClass and it works fine, thanks to Jason
Spisak, but now when I try to create other ZClasses deriving from this
ZClass I can't choose it as the base class for the new classes.

Can I do that from my browser (How ?) or must I do it in python ?

If it's not possible I plan to add the event type as a property of
GenericEvent, but then how can I deal with the different permissions I
need ?

thanks in advance for any hint.

Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE


___
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] ZClass book from Beehive.de

2000-06-03 Thread Mark Pratt

hi,

Steve Alexander wrote:

> However, there  were a few iffy bits: some of the HTML in 
> the examples was technically incorrect, and the DTML coding 
> style was sometimes over-verbose and not properly explained. 

we have had several discussions at beehive about making 
code examples easier to read. we are currently working
on a specification which would be followed in all our
tutorials.

> My biggest problem using the tutorial was caused by my
> not realising that ZClass meta-types are case-sensitive. 
> This was not stressed in the tutorial - take care!

wow! we had no idea --- we'll add this note to future
versions of the tutorial. from what i remember hearing
at the last python conference this is a common python
problem also.

> Overall I'd rate it 8/10, losing points chiefly for poor
> coding style and a few inadequate explanations. As a whole, 
> it's been very useful (and saved the CTO a lot of time 
> talking me through things).

thanks! the cool thing about our tutorials is that
all our customers get free updates for one year ---
giving us bees a chance to correct any errors as well as 
document any (in this case ZClass) new features/changes.

> We'll be sending our detailed comments on the
> explanations, and HTML and DTML problems, back to Beehive. 

we'll be looking forward to these comments. we're happy about
any feedback we get!

regards,

mark

--
mark pratt  (managing director) [EMAIL PROTECTED]
beehive elektronische medien GmbH   http://www.beehive.de
phone: +49 30 847-82 0  fax: +49 30 847-82 299


___
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] ZClass book from Beehive.de

2000-06-03 Thread Steve Alexander

FR Chalaoux wrote:
> 
> Hi,
> 
> Before I insert 25DM in Beehive for the ZClass book, I would like to
> have your point of view on this book !

One of my colleagues has just finished working through the tutorial.

I asked her a few questions about it. Here are her answers.



> 1: Is the tutorial you've been doing worth 10 quid?

Definitely (though that's not saying it couldn't be improved)


> 2: What skill level is it aimed at?

Ostensibly beginner, but to really understand it I needed to have a
general understanding of Zope (from doing the Zope tutorial), Python (at
absolute beginner level), a bit of DTML (from reading the DTML
reference, and being talked to by a clever person) and HTML. It was
probably also helpful that I had a vague background knowledge of OO
principles, databases and stuff.

So, aimed at ZClass beginners with relevant background knowledge.


> 3: What did you get out of it?

I feel competent to set up a simple interactive application using
ZClasses now.
Security and linking to external databases were outside the scope of the
tutorial.
 

> 4: Other general comments?

It told a good story, presented coherent examples, built up a little
self-contained system, and generally speaking, taught it well.

However, there  were a few iffy bits: some of the HTML in the examples
was technically incorrect, and the DTML coding style was sometimes
over-verbose and not properly explained. 

My biggest problem using the tutorial was caused by my not realising
that ZClass meta-types are case-sensitive. This was not stressed in the
tutorial - take care!

Overall I'd rate it 8/10, losing points chiefly for poor coding style
and a few inadequate explanations. As a whole, it's been very useful
(and saved the CTO a lot of time talking me through things).



We'll be sending our detailed comments on the explanations, and HTML and
DTML problems, back to Beehive. 


You may also wish to look at the ZCatalog tutorial, the Job-Board
how-to, and the Creating a catalog-aware ZClass how-to.

  http://www.zope.org/Documentation/How-To/ZCatalogTutorial
  http://www.zope.org/Members/mukhsein/job_board_howto
  http://www.zope.org/Members/AlexR/CatalogAware

Also, see what you can find on the Zope Documentation Project pages:

  http://zdp.zope.org/

--
Steve Alexander
Software Engineer
Cat-Box limited

___
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] ZClass book from Beehive.de

2000-06-03 Thread FR Chalaoux

Hi,

Before I insert 25DM in Beehive for the ZClass book, I would like to
have your point of view on this book !

FRC


___
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] ZClass and python subclass __init__ method

2000-05-30 Thread Pete Kazmier

According to the Zope Developer's Guide, when you create a ZClass by
subclassing from custom python classes "your subclass's __init__
method will not be called when instances of the Z Class are created."

Could someone help explain why my __init__ method is being called?  Is
the document just out of date?  What should be the correct behavior?
Also, is there a simple way of detecting from my python class's init
method if it is being called within the Zope environment?

I'm trying to keep my python class as non-Zope centric as possible
because I use that class in other programs as well. 

Oh, I am using the 2.2.0a1.

Thanks,
Pete

-- 
Peter Kazmier http://www.kazmier.com
PGP Fingerprint   4FE7 8DA3 D0B5 9CAA 69DC  7243 1855 BC2E 4B43 5654

___
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] ZClass Error

2000-05-30 Thread Pete Kazmier

I've created a ZClass that was subclassed from a custom Python class.
Everything is working well, thanks to the help of this mailing list,
but I am having one problem that I am unable to figure out.  

If I add my subclass to the root of my Zope world, then I am unable to
click on the Properties tab while managing it.  However, if I create
my ZClass anywhere else (ie not in the root), everything works fine.
Here is the traceback that I receive.  Any help would be appreciated,
I am also using 2.2.0a1.  Thanks.

Traceback (innermost last):
  File /home/zope/lib/python/ZPublisher/Publish.py, line 224, in
  publish_module
  File /home/zope/lib/python/ZPublisher/Publish.py, line 189, in
  publish
  File /home/zope/lib/python/Zope/__init__.py, line 221, in
  zpublisher_exception_hook
  File /home/zope/lib/python/ZPublisher/Publish.py, line 175, in
  publish
  File /home/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage)
  File /home/zope/lib/python/ZPublisher/Publish.py, line 112, in
  call_object
(Object: manage)
  File /home/zope/lib/python/App/special_dtml.py, line 121, in
  __call__
(Object: manage)
(Info: /home/zope/lib/python/OFS/properties.dtml)
  File /home/zope/lib/python/DocumentTemplate/DT_String.py, line 500,
  in __call__
(Object: manage)
  File /home/zope/lib/python/App/special_dtml.py, line 121, in
  __call__
(Object: manage_tabs)
(Info: /home/zope/lib/python/App/manage_tabs.dtml)
  File /home/zope/lib/python/DocumentTemplate/DT_String.py, line 500,
  in __call__
(Object: manage_tabs)
  File /home/zope/lib/python/DocumentTemplate/DT_With.py, line 146, in
  render
(Object: _(manage_options=filtered_manage_options()))
  File /home/zope/lib/python/DocumentTemplate/DT_With.py, line 133, in
  render
(Object: _(option=manage_options[a_]))
  File /home/zope/lib/python/DocumentTemplate/DT_Util.py, line 333, in
  eval
(Object: _(option=manage_options[a_]))
(Info: manage_options)
  File , line 0, in ?
NameError: (see above)

-- 
Peter Kazmier http://www.kazmier.com
PGP Fingerprint   4FE7 8DA3 D0B5 9CAA 69DC  7243 1855 BC2E 4B43 5654

___
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 )




  1   2   >