[Zope] Private Product Objects (was: object icons)

Loren Stafford lstaffor@dynalogic.com
Thu, 24 Feb 2000 09:18:22 -0800


From: Martijn Pieters <mj@digicool.com>
Sent: February 24, 2000 02:54 AM


> From: Loren Stafford [mailto:lstaffor@dynalogic.com]
> > but trying to
> > enforce a singleton is more trouble than it's worth.
>
> What are your problems? Doesn't my code work anymore?
>

Your code works fine. My code-under-development causes errors. I got locked
out a few times (and I never did figure out precisely why). The possibility
of a lock-out occurring in a production system (and the nature of the email
I would receive from users) scares me. So I'm considering all the
alternatives.

> What are the problems you are experiencing? Especially for the
> development and alpha/beta stages of the ZScheduler product, I put a
> hook onto the ZScheduler Product folder to release the protection on the
> root ZScheduler object when you delete the Products folder. Yes, it is a
> hack, but it worked for me. I planned on removing it when releasing a
> stable version.

> If you run into problems with the code, you can use the Monitor to
> release the lock manually.

I've disabled the lock for development purposes. So I don't get locked out.

> > > You can override the setId() method to prefent changing the id;
> > BasicUserFolder
> > > does this::
> > >
> > >
> > >     def _setId(self, id):
> > >         if id != self.id:
> > >             raise Globals.MessageDialog(
> > >                 title='Invalid Id',
> > >                 message='Cannot change the id of a UserFolder',
> > >                 action ='./manage_main',)
> > >
> >
> > Thanks. I'll use that.
> >
>
> Doesn't using the proetction I implemented also protect you from
> changing the id? It should! You can't change the id of the
> standard_html_header/_footer and Control_Panel either, can you?

Right. We were just exploring other possibilities.

> Anyway, since I sort of dumped the code on you, please feel free to ask
> more questions =)

Don't worry, Martijn; I'm not about to change designs in mid-stream. But,
yes, I've got lots of questions. More to come, I'm sure. And remember I'm a
relative newbie to Python, Zope, and OO; so, what seems obvious to you will
only become obvious to me after some exploration and experience.

-- Thanks for your help
-- Loren