Re: [Zope-dev] Debugging spinning Zope?

2006-04-18 Thread Morten W. Petersen
Dieter Maurer wrote:
 Morten W. Petersen wrote at 2006-4-18 16:45 +0200:
 I guess the next step is to use pdb og gdb - are there perhaps any
 documents out there describing the process?
 
 You use your favorite search engine and search for Zope spinning debug.

Yep.  ;)

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


Re: [Zope-dev] New ways of getting transactions?

2005-12-11 Thread Morten W. Petersen
 This works since 2.8, but not in 2.7. Nearly every project has come 
 up with its own backward compatibility module though. See for example 
 CMFCore.utils.transaction or CMFPlone.transaction.
 
 
 I'm dispayed to hear this. :(  The old use of __builtins__.get_transaction
 should be deprecated and supported for a period of time.  If it isn't,
 then this is *definately* a bug.

I agree.  I've reported it as a bug:

http://www.zope.org/Collectors/Zope/1965

-- 
Morten W. Petersen

Email: [EMAIL PROTECTED]
Phone: +47 45 44 00 69
Title: Project manager

Nidelven IT (http://www.nidelven-it.no)
We provide Zope/Plone hosting and consulting
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


Re: Get rid of configure/make? (was Re: [Zope-dev] Re: SVN: Zope/trunk/ Merge philikon-zope32-integration branch. Basically, this branch entails:)

2005-11-05 Thread Morten W. Petersen
 I wasn't arguing that configure/make was hard to use.  I'm arguing
 that it's something extra to maintain and is just silly.
 
 It's main benefit is that it leverages a familiar pattern, but
 I'm not convinced that it's worth it. Also, as tools like rpm and
 deb become more widely used, I'm not sure how familar the configure/make
 dance is.  Other than Python and Zope, I never use configure/make anymore.

My experience is that .rpm and .deb packages are poorly maintained, so
if someone is serious about using Zope and related products, downloading
and installing from source is the only way to go.

We also have tools internally that depend on the configure/make dance,
and I'm sure others who put up a lot of Zope instances do as well..  :)

-Morten
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


Re: [Zope-dev] Problems adding many objects

2005-09-26 Thread Morten W. Petersen
Chris,

the implementation looks like this

def manage_add_issue(self, id=None, title='', contents='',
state='', type='', referrer='', format=None,
REQUEST=None):
Add an Issue.
if id is None:
id = self.get_unique_id()
issue_ = issue(id, title, contents, state, type,
   creator=self.get_user().get_id(),
   owner=self.get_user().get_id(),
   format=format or
self.get_user_preferences().issue_format)
self._setObject(id, issue_)
self.order.append(issue_.id)
self.order = self.order
issue_ = self[id]
issue_.version = self.get_issue_dealer().version
try:
self.index_object()
except AttributeError:
pass
if referrer and REQUEST is not None:
REQUEST.RESPONSE.redirect(referrer)
print 'redirect'
else:
if REQUEST is not None:
if self.inCMF():
print 'admin url'
return self.get_admin_url()
else:
print 'manage_main'
return self.manage_main(self, REQUEST)
else:
print 'returning issue', issue_
return issue_

and before returning none, it says 'returning issue' on stdout.

-Morten

Chris McDonough wrote:
 Hi Morten,
 
 You'd probably need to show us the implementation of whatever 
 manage_add_issue is.
 
 - C
 
 
 On Sep 25, 2005, at 10:09 AM, Morten W. Petersen wrote:
 
 Hi,

 I've created a script that imports XML into the ZODB, using regular  TTW
 methods - and all is fine, except for when I import large files, with
 many objects.

 After about 288 objects, the import fails when the method that adds an
 object in the ZODB returns None, instead of the object it added.  From
 what I can tell, the added object is not None before it is  returned, but
 the name object, set via the expression

   object = self.manage_add_issue(...)

 is None.  So it looks like somewhere between 'return issue_' in
 manage_add_issue and the expression above, the object is lost.

 Any ideas what could be happening here?  I've managed to work  around it
 for now, but it is interesting nonetheless.

 Regards,

 Morten

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

 
 


-- 
Regards,

Morten

Tlf:  +47 45 44 00 69
Blog: http://www.blogologue.com
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


[Fwd: Re: [Zope-dev] Problems adding many objects]

2005-09-26 Thread Morten W. Petersen
Oops, one for the list as well.

 Original Message 
Subject: Re: [Zope-dev] Problems adding many objects
Date: Mon, 26 Sep 2005 13:34:50 +0200
From: Morten W. Petersen [EMAIL PROTECTED]
To: Chris McDonough [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

 It doesn't say returning issue, None?  My guess is that the if 
 request is not none branch is called and it goes that way.  But  there's
 no way to know for sure without running it.

It says 'returning issue issue at x'

 This is a good place to use the Python debugger...  as the first line 
 of this method, insert import pdb; pdb.set_trace(), then start up 
 Zope in the foreground (runzope or zopectl fg), then cause the method 
 to be invoked through a browser.
 
 On the console you will see a pdb prompt.  You can step through the 
 code by using n.  To print the value of a variable type p 
 variablename, to step in to a function call press s.  When  you're
 finished, press c to continue or q to quit.  This will be  the
 fastest way to see what's happening in this method.

Yep, I'll have a go at this later.  Thanks for describing the debug
process.  :)

-Morten


-- 
Regards,

Morten

Tlf:  +47 45 44 00 69
Blog: http://www.blogologue.com
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


Re: [Zope-dev] Problems with Zope 2.8 on FreeBSD (was Re: Problems with PageTemplates on Zope 2.8)

2005-07-01 Thread Morten W. Petersen
I've heard of this earlier, but never experienced it until now.  :)

And yes, that was the issue!  :)

Thanks,

Morten

Andrew Sawyers wrote:
 Did you bump up the thread stack size for the python you're running Zope
 with?  This sounds like that problem.  If you search zope.org for FreeBSD -
 I have a note on how I fix it.
 
 
 Andrew
 
 --
 Zope Managed Hosting
 Software Engineer
 Zope Corporation
 (540) 361-1700 
 
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Morten W. Petersen
Sent: Thursday, June 30, 2005 7:37 PM
To: Max M
Cc: zope-dev@zope.org
Subject: [Zope-dev] Problems with Zope 2.8 on FreeBSD (was Re: Problems
with PageTemplates on Zope 2.8)


I have an application called the Issue Dealer which I'm porting to Zope
2.8.  However, whenever I try to access a PageTemplate which makes use
of a page template macro it just hangs and consumes all available CPU.

Any ideas what could be wrong here, or how I could debug it?

Does the server or the client hang?

It's the client that's hanging.  The first time I tested it, it was as a
simple Zope instance.  http://instance/manage worked fine, but accessing
an Issue Dealer instance (http://instance/stuff) didn't work.

Now when I try setting up a ZEO server/client version 2.8 with python
2.3.5 on FreeBSD 5.4, the server hangs even when I try to access
http://instance/manage.  http://instance/manage_copyright works fine
however.

-Morten
 
 
 


-- 
Regards,

Morten

Tlf:  +47 45 44 00 69
Blog: http://www.blogologue.com
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


[Zope-dev] Problems with Zope 2.8 on FreeBSD (was Re: Problems with PageTemplates on Zope 2.8)

2005-06-30 Thread Morten W. Petersen
 I have an application called the Issue Dealer which I'm porting to Zope
 2.8.  However, whenever I try to access a PageTemplate which makes use
 of a page template macro it just hangs and consumes all available CPU.

 Any ideas what could be wrong here, or how I could debug it?
 
 Does the server or the client hang?

It's the client that's hanging.  The first time I tested it, it was as a
simple Zope instance.  http://instance/manage worked fine, but accessing
an Issue Dealer instance (http://instance/stuff) didn't work.

Now when I try setting up a ZEO server/client version 2.8 with python
2.3.5 on FreeBSD 5.4, the server hangs even when I try to access
http://instance/manage.  http://instance/manage_copyright works fine
however.

-Morten
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


[Zope-dev] Problems with PageTemplates on Zope 2.8

2005-06-24 Thread Morten W. Petersen
Hi,

I have an application called the Issue Dealer which I'm porting to Zope
2.8.  However, whenever I try to access a PageTemplate which makes use
of a page template macro it just hangs and consumes all available CPU.

Any ideas what could be wrong here, or how I could debug it?

Thanks,

Morten

PS: CC me as I'm not on the list
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


[Zope-dev] Re: Renaming a product

2003-06-18 Thread Morten W. Petersen
 Somebody correct me please, if I'm wrong, but
 
 1. tinkering with __class__ is the only way to do this.
 2. you can not tinker with __class__ of an ExtensionClass, i.e. all 
 Persistent objects.

It's not easily doable, no.  I settled on converting each instance
(copying properties) from the old product name to the new, and
it worked.

Thanks for your help everybody.  :)

Regards,

Morten W. Petersen

--
Technologies: Zope, Linux, Python, HTML, CSS, PHP
Homepage: http://www.nidelven-it.no
Phone number: (+47) 45 44 00 69


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


[Zope-dev] Renaming a product

2003-06-17 Thread Morten W. Petersen
Hi all,

does anyone know how to rename a product, so that instances of the product 
stored in ZODB will work (with the new name) after the rename?

Thanks,

Morten W. Petersen

--
Technologies: Zope, Linux, Python, HTML, CSS, PHP
Homepage: http://www.nidelven-it.no
Phone number: (+47) 45 44 00 69


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


Re: [Zope-dev] Zope builds (new Intel C++ compiler)

2002-02-14 Thread Morten W. Petersen

On Tue, Feb 12, 2002 at 12:17:28PM +, seb bacon wrote:
  However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with 
  various compile options can get a 17% speedup.  
 
 Could you share the compile options with us?

BTW seb, I tried compiling Python with the pgcc compiler [1] and that
gave a perfomance increase of 15% on the pystones test.

[1] http://www.goof.com/pcg/

-Morten



msg09402/pgp0.pgp
Description: PGP signature


Re: [Zope-dev] Zope builds (new Intel C++ compiler)

2002-02-12 Thread Morten W. Petersen

On Tue, Feb 12, 2002 at 12:17:28PM +, seb bacon wrote:
  However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with 
  various compile options can get a 17% speedup.  
 
 Could you share the compile options with us?

I'd like to see those compile options as well...

Thanks,

Morten



msg09383/pgp0.pgp
Description: PGP signature


[Zope-dev] KeyError in UnIndex

2001-10-26 Thread Morten W. Petersen

Hi guys,

I've got an issue here, the following traceback can be seen after several
users modify and view the same object in a short (2-3) minute period.

I've tried recataloging the objects but that doesn't help either;  this
error is seen every time..

 Site Error
An error was encountered while publishing this resource.

KeyError

Sorry, a site error occurred.

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 223, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 226, in
zpublisher_exception_hook
(Object: api)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: index_html)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: index_html)
  File
/usr/local/zope/lib/python/Products/warp_framework/object_manager_inter
face.py, line 88, in index_html
(Object: api)
  File /usr/local/zope/lib/python/Shared/DC/Scripts/Bindings.py, line
324, in __call__
(Object: object_manager_index)
  File /usr/local/zope/lib/python/Shared/DC/Scripts/Bindings.py, line
354, in _bindAndExec
(Object: object_manager_index)
  File /usr/local/zope/lib/python/App/special_dtml.py, line 244, in
_exec
(Object: object_manager_index)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_In.py, line 770,
in renderwob
(Object: get_meta_types)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line
231, in eval
(Object: get_number_of_objects(meta_type=_['sequence-item']))
(Info: get_number_of_objects)
  File string, line 0, in ?
  File
/usr/local/zope/lib/python/Products/warp_framework/object_manager.py,
line 115, in get_number_of_objects
(Object: api)
  File /usr/local/zope/lib/python/Products/WarpFramework/catalog.py,
line 210, in __call__
(Object: LockableItem)
  File /usr/local/zope/lib/python/Products/ZCatalog/ZCatalog.py, line
597, in searchResults
(Object: LockableItem)
  File /usr/local/zope/lib/python/Products/ZCatalog/Catalog.py, line
649, in searchResults
  File /usr/local/zope/lib/python/Products/ZCatalog/Catalog.py, line
601, in _indexedSearch
  File
/usr/local/zope/lib/python/Products/PluginIndexes/common/UnIndex.py,
line 474, in keyForDocument
(Object: PluggableIndex)
KeyError: 1074768801

Any help much appreciated,

Morten

-- 
About Thingamy:

  http://www.thingamy.com - For the CEO
  http://www.thingamy.org - The good stuff
  http://www.thingamy.net - Rants




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



[Zope-dev] monitor_client.py in Zope 2.4.1 not working properly

2001-09-26 Thread Morten W. Petersen

Hi,

I've been playing a bit with the monitor_client (ZServer/medusa), and it
seems all exceptions aren't raised so it's visible in the client, it's
seen in the debug output from Zope itself.

Has anyone experienced this?

-Morten


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



[Zope-dev] ImportError (No module names utils)

2001-09-26 Thread Morten W. Petersen

Hi,

after using a module named utils in a Zope product the root management
screen is no longer available (the module is now renamed).

The traceback looks like this:

Traceback (innermost last):
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/Zope/__init__.py, line
226, in zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: manage_main)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: manage_main)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 324, in __call__
(Object: manage_main)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 354, in _bindAndExec
(Object: manage_main)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/App/special_dtml.py,
line 244, in _exec
(Object: manage_main)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/DocumentTemplate/DT_In.py, line
711, in renderwob
(Object: objectItems)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/DocumentTemplate/DT_In.py, line
839, in sort_sequence
(Object: objectItems)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZODB/Connection.py, line
544, in setstate
ImportError: (see above)


Any ideas?

Thanks,

Morten


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



[Zope-dev] KeyError on UnIndex.keyForDocument

2001-09-26 Thread Morten W. Petersen

Hia,

While trying to reindex an entire catalog an error is raised, which looks
like this:

Traceback (innermost last):
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Zope/__init__.py,
line 221, in zpublisher_exception_hook
(Object: api)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: update_instances)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: update_instances)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/WarpFramework/catalog.py,
line 438, in update_instances
(Object: api)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/WarpFramework/catalog.py,
line 195, in __call__
(Object: Traversable)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/ZCatalog.py,
line 535, in searchResults
(Object: Traversable)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/Catalog.py,
line 666, in searchResults
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/Catalog.py,
line 614, in _indexedSearch
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/SearchIndex/UnIndex.py,
line 453, in keyForDocument
KeyError: (see above)


Any clues?

Thanks a whole bunch,

Morten


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



Re: [Zope-dev] DISCUSS: Community checkins for CVS

2001-09-20 Thread Morten W. Petersen

On Thu, 20 Sep 2001, Paul Everitt wrote:

 So, let's begin what I'm sure will be a lively and illuminating
 discussion. :^)

First man out?  :-)

Will a ZPL-ish license [1] be accepted (declared, ref. paragraph
4 of the Zope Contributor Agreement) by the Zope Corporation?

[1] http://www.thingamy.org/tpl

-Morten


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



Re: [Zope-dev] Spell checking module

2001-06-27 Thread Morten W. Petersen

On Wed, 27 Jun 2001, Remi Delon wrote:

 I have a website where users can post messages (using a textarea).
 I would like to be able to spell-check what they submit and
 notify them of possible mistakes. (much like the online
 spell-checker of hotmail that I'm using right now :-))
 
 Has anybody ever written anything for zope that does something
 similar ?

There is a spellchecker at http://www.zope.org/Members/noa

We're currently planning how to implement a new one using the pspell
library over at SourceForge:

http://sourceforge.net/projects/zope-spellcheck/

-Morten


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



Re: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))

2001-06-26 Thread Morten W. Petersen

On Tue, 26 Jun 2001, Erik Enge wrote:

 On Tue, 26 Jun 2001, Morten W. Petersen wrote:
 
  How about meta-programming (designing) via the Zope interface, with
  UML or somesuch; automatically generating Python code, then enable
  designers to use a ZFormulator-ish product to edit the interface while
  a programmer can work on the 'backend' (emacs on a terminal)?
 
 What are you on my friend?  ;-)

Well, it's quite logical: UML can be used to map out both software and
business development (they are, after all, two sides of the same story),
the designer can twiddle-n-polish the interface and the programmer can
take care of 'exceptional tasks' that can't easily be taken care of via
the UML interface without adding too much complexity.

-Morten


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



Re: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))

2001-06-26 Thread Morten W. Petersen

On Tue, 26 Jun 2001, Morten W. Petersen wrote:

 Well, it's quite logical: UML can be used to map out both software and
 business development (they are, after all, two sides of the same story),
 the designer can twiddle-n-polish the interface and the programmer can
 take care of 'exceptional tasks' that can't easily be taken care of via
 the UML interface without adding too much complexity.

The UML interface may be a bit far fetched, but that's because nobody has
done it yet.  ;-)

-Morten




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



Re: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))

2001-06-26 Thread Morten W. Petersen

On Tue, 26 Jun 2001, Stephan Richter wrote:

 - A simple DTML Zope programmers costs are okay and maybe below programmer 
   average.
 - A good Zope/Python programmer will cost above average.
 - A good Zope/Python System-Designer is very expensive.
 
 Because of that you try to minimize the Designer's time by providing a nice 
 tool (UML tool, such as ObjectDomain). Then you try to minimize the Python 
 Programmers time by auto-generating the framework and only make him to fill 
 the methods with life. Now, because we have a UML diagram, the DTML 
 programmer can start right away with programming the DTML and HTML around 
 the data/functional model, since the API is clear. This way you optimized 
 several things:

If DTML programming / interface design is so simple, and cheap, why not
automate it?  (Strike two for low cost development).

I've been trying to save some time (and my fingers!) by building a RAD
framework, named the WarpFramework [1], which deals with the low level
complexity of properties and how to display / manipulate them in addition
to other common programming tasks.. this could perhaps blend in easily..

Say for example that we could provide the odd designer with the
possibility of simply pushing widgets and displays (generated
automatically of course) around the page, and changing colors and
backgrounds (CSS); then we have a tool that designers would love as well.

 - Minimize the time of the expensive people.

Minimize the time of people.  Period.  :-)

. o O ( Many small rivers make.. )

 - Minimize the development time, since many people can work parallel.

..lessen the complexity and add to robustness.

 - Because of the above, you minimize risk and money spent. And voila, you 
   have a well functioning RAD team.*
 
 * This assumes that your team works together well. ;-)

Well, somebody's got to do something, eh?  ;-)

[1] http://www.sourceforge.net/projects/warp-framework

Regards from France,

Morten





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



Re: [Zope-dev] Re: ZPL and GPL licensing issues

2001-06-24 Thread Morten W. Petersen

On 22 Jun 2001, Simon Michael wrote:

 Now here, I have to assume RMS is using combine above to mean
 combine and redistribute.
 
 I hope I'm right ? If combine included install zwiki on your zope
 installation and use it then everything I know is wrong..  I did
 intend for that to be fairly danger-free.

I'm not sure, I've fired off another email to get a clarification.

While we're one the topic, I just read an article [1] over at Kuro5hin
that could enlighten the management over at Digicool and us as well; it
discusses the impacts of Free Software and relates it to Free Trade, talks
about barriers and other interesting things.

From the practical point of view, being able to use GPL-ed software with
Zope is a Good Thing (TM) for most developers.

Another thing is that some people / companies may be reluctant to add
signifcant modules that could be included in the Zope core, as they will
not get the same level of recognition for their work as Digital Creations
would.

For me personally, a Zope license without the advertising clause would
motivate me, as the 'protection barrier' / 'restriction' / 'attribution
issue' wouldn't be there;  I have a ton of things I'd like to change in
Zope and add to Zope, and as time goes by, the who-gets-credit-issue will
undoubtedly be raised again, if we're so lucky that Digicool decides to
open up Zope for read/write CVS access.

[1] http://www.kuro5hin.org/?op=displaystory;sid=2001/6/23/3451/16661

-Morten



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



Re: [Zope-dev] ZPL and GPL licensing issues

2001-06-22 Thread Morten W. Petersen

On Fri, 22 Jun 2001, Erik Enge wrote:

 Now I think I have two different answers to one of my fundamental
 questions in this discussion: if I have a GPL-compatible licensed product
 and I distribute it with a GPL product, do I need to relicense the former
 one to GPL?  Because that is what I understand you to say.  Others have
 said the opposite.

Yes, you can distribute a GPL-compatible licensed code with GPL
licensed code without licencing the former under GPL.  Take a look in the
Linux-kernel source tree for example.

And yes, it would be very interesting to see the underlying reason(s) for
the ZPL..

Regards,

Morten


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



Re: [Zope-dev] ZPL and GPL licensing issues

2001-06-22 Thread Morten W. Petersen

On Fri, 22 Jun 2001, Erik Enge wrote:

 Ok, good.  Then Thingamy's intermediate solution will be to create a TPL
 which is basically the ZPL with the incompatible-clauses ripped out
 (number 4 and 7, I think).  That way we are compatible with both the ZPL
 and the GPL.

Something like that.  Verifying the license with the GNU people now.

-Morten


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



Re: [Zope-dev] Re: ZPL and GPL licensing issues

2001-06-22 Thread Morten W. Petersen

On 22 Jun 2001, Simon Michael wrote:

 Shane Hathaway [EMAIL PROTECTED] writes:
  One of the consequences being that someone re-distributing zope 
  zwiki together, under their default licenses, is technically in
  violation right now, I think we are all agreeing.
  
  Technically yes, although I like to think that the product developers
  implicitly grant redistribution permission by attempting to apply the
  GPL.
 
 I'm not sure that would be a valid assumption. Speaking for myself, it
 wasn't my particular intention to unconditionally grant that
 permission given the licenses as they stand. I mean, I didn't intend
 that zwiki's GPL be some kind of watered-down GPL. :)

May Stallman forgive me (fun intended :-):


Date: Thu, 21 Jun 2001 16:43:05 -0600 (MDT)
From: Richard Stallman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Mixing different licences
 
Another question is whether or not it's legal to use GPL-ed Zope
products with Zope.
 
That is a hard question.  I don't know whether Zope is just an interpreter
or contains facilities that, in effect, the user program links with.
It makes a difference.
 
If the former, you can run programs on Zope regardless of their
licenses.
 
If the latter, then in general, you can't take someone's GPL-covered
code and combine it with Zope, because the Zope license is
GPL-incompatible.
 
If someone wrote a GPL-covered program specifically for Zope, you are
pretty safe taking that as implicit permission to combine it with
Zope.  But it would be better for them to give explicit permission.


Implicitly yours,

Morten


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



[Zope-dev] ZPL and GPL licensing issues

2001-06-20 Thread Morten W. Petersen

Hi there,

we @ thingamy are considering changing our license to a ZPL-ish one [1] to
better serve our clients' needs.  However, some of the (Zope) products
we've developed may need to rely on GPL'ed code, or needs to be
incorporated within it, and the 'obnoxious advertising clause'
seemingly puts a stop to it..

The ZPL is listed as a license incompatible with the GPL, but it doesn't
really say clearly what the reason is, as far as we can figure, it's
because of the advertising clause.

Anyways, I'm wondering if any of you have encountered the same issue
developing Zope products and any solutions towards it.

Some interesting articles, food for thought:

http://www.zdnet.com/enterprise/stories/main/0,10228,2777053,00.html
http://www.gnu.org/philosophy/license-list.html#GPLIncompatibleLicenses
http://www.gnu.org/philosophy/bsd.html

[1] http://www.thingamy.com/tpl

Regards,

Morten


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



Re: [Zope-dev] command-line zope.org product upload ?

2001-06-19 Thread Morten W. Petersen

On Tue, 19 Jun 2001, Andy McKay wrote:

 Ive been successfully finding other things to do other ZPM which is an
 attempt to make a package manager for Zope ala RPM, PPM etc. A command line
 interface to it would be cool.

Cool.  And maybe some apt-get functionality?  Like 'zope-apt-get
dist-upgrade'?  :-)

Cheers,

Morten


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



Re: [Zope-dev] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?

2001-06-15 Thread Morten W. Petersen

On Fri, 15 Jun 2001, Evan Simpson wrote:

 Morten W. Petersen wrote:
 
  one of my products landed flat on its face when an ImportError was raised
  trying to import VSEval from DocumentTemplate;  is there a new class /
  function of some sort or simply another name for the class?
 
 See $ZOPE/lib/python/RestrictedPython.  That replaces both 
 DocumentTemplate's VSEval and PythonScripts' zbytecodehacks.  It 
 contains an Eval class that should be drop-in compatible with the old one.

Ok, (for future reference) replacing all the VSEval.Eval references with
Eval.RestrictionCapableEval fixed it.

Thanks  Cheers,

Morten


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



[Zope-dev] TypeError on FieldIndex

2001-06-15 Thread Morten W. Petersen

Hia guys,
 
running the GUM product on a fresh BerkeleyDB based 2.4.0a1 instance on
Linux raises the following issue for the field index type:
 
Site Error
 
An error was encountered while publishing this resource.
 
Error Type: ('type', 0, type 'string', type 'int')
Error Value: None
 
 
Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering
an error.
 
For more detailed information about the error, please refer to the HTML
source for this page.
 
If the error persists please contact the site maintainer. Thank you for
your patience.
Traceback (innermost last):
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Zope/__init__.py, line
226, in zpublisher_exception_hook
(Object: CatalogAware)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: index_html)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: index_html)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/App/special_dtml.py,
line 127, in __call__
(Object: index_html)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/DocumentTemplate/DT_String.py,
line 543, in __call__
(Object: index_html)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/DocumentTemplate/DT_In.py,
line 681, in renderwob
(Object: get_incoming_message_containers)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/GUM/gum.py,
line 591, in get_incoming_message_containers
(Object: CatalogAware)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/GUM/gum.py,
line 858, in get_gum_message_containers
(Object: CatalogAware)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/ZCatalog.py,
line 582, in searchResults
(Object: LockableItem)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/Catalog.py,
line 663, in searchResults
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/Catalog.py,
line 550, in _indexedSearch
('type', 0, type 'string', type 'int'): (see above)
 
I added an extra try except block:
 
if request.has_key(index.id) :
try:
   if len(request[index.id])0:
r=index._apply_index(request)
except:
   raise str((index.id, request[index.id],
type(index.id), type(request[index.id])))
 
The original exception was a TypeError, len() of unsized object.

Cheers,

Morten


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



[Zope-dev] Non-undoable storage

2001-06-12 Thread Morten W. Petersen

Hia guys,

during testing of a mail product I've discovered that the Data.fs file may
bloat considerably after storing 50 messages.  Packing the database will
reduce the Data.fs file to 20 MB (from 40 MB).  Another thing is that
storing 50 messages takes a *long time* on a 600Mhz 256 MB RAM system.

The thing that struck me was that transactions may cause a lot of
overhead, both in database size and for execution speed, so, the thing I'm
wondering about is if there exists a non-undoable storage, or something
similar that doesn't support transactions..

Another thing I noticed BTW, is that retrieving 500 messages and packing
the database on every 50th message (all messages retrieved during one
request) would lead to off the charts memory usage, the process ended up
using 700 MB of RAM (had to add swap files as the footprint grew!)

Cheers,

Morten




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



Re: [Zope-dev] Non-undoable storage

2001-06-12 Thread Morten W. Petersen

On Tue, 12 Jun 2001, Shane Hathaway wrote:

 Did you catalog each message?  What version of Zope?

Yes, every message was cataloged.  Zope version 2.3.2

 3) Manually zap the caches periodically, which is a capability of Zope
 2.4.x.

Okay, this is interesting.  Any examples on how to implement cache 
zapping? 

Cheers,

Morten


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



Re: [Zope-dev] Non-undoable storage

2001-06-12 Thread Morten W. Petersen

On Tue, 12 Jun 2001, Chris McDonough wrote:

 Morten W. Petersen wrote:

  Yes, every message was cataloged.  Zope version 2.3.2
 
 Were subtransactions in the Catalog turned on (see the Advanced page)?

Yes, and the threshold was at 1.

-Morten


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



[Zope-dev] Building custom DTML tags and accessing _.something

2001-05-09 Thread Morten W. Petersen

Hia guys,

I was wondering if any of you could give me a couple of hints about how to
make the _.{random,string,range,Datetime} thingies from a tag expression.

I.e. instead of doing this:

dtml-widget select options=[1,2,3,4,5,6,7,8,9,10,11,12,13]
selected=[1,3,5,7,9,11,13

This could be done:

dtml-widget select options=_.range(1,14,1)
selected=_.range(1,14,2)

Like this (with the DTML var tag):

dtml-var [1,2,3,4,5,6,7,8,9,10]

dtml-var _.range(1,11)

Thanks  cheers,

Morten


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



[Zope-dev] ZCatalog features

2001-04-28 Thread Morten W. Petersen

Hia guys,

A couple of comments and questions about the ZCatalog:

Is it possible to pass an argument to the catalog so that returned brains
would instead be actual objects?

Given that we have to manually join search results, because ZCatalog
doesn't support ORs etc (for FieldIndexes), wouldn't it be useful to have
some sort of tool that could take a set of results, and return a result
with only unique values?

Cheers,

Morten



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



[Zope-dev] REQUEST and values stored there

2001-04-04 Thread Morten W. Petersen

Hia guys,

the recent changes to the HTTPRequest class breaks some of my
code.  I may have missed some notifications, but why wasn't
this made clear as it could obviously break code?

-Morten


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



Re: [Zope-dev] REQUEST and values stored there

2001-04-04 Thread Morten W. Petersen

On Wed, 4 Apr 2001, Chris McDonough wrote:

 What breaks?  There was no intention to break code or change the API.

Code that looked like this:

REQUEST['key_name1']
REQUEST['key_name2']

Now has to be changed to this:

REQUEST.form['key_name1']
REQUEST.form['key_name2']

(The former method raises a KeyError.)

These problems started to appear in the 2.3.x tree.

-Morten


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



[Zope-dev] INSTANCE_HOME vs. SOFTWARE_HOME

2001-03-18 Thread Morten W. Petersen

Hi guys,

some people have asked me to use INSTANCE_HOME instead of SOFTWARE_HOME,
which breaks their products on debian distros.

Now, I'm not sure that won't break other systems if I change it; anyone
care to share?

Thanks,

Morten


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



[Zope-dev] Ensuring 'freshness' of dynamic pages (slightly offtopic)

2001-03-11 Thread Morten W. Petersen

Hi guys,

I've been trying to ensure that documents from a certain website are
always fresh, that is, every request for a new page must be validated
before the client sees it.

I've tried using these HTTP Cache-control directives:

no-cache
no-store
max-age (1)
must-revalidate

but no such luck.  If I for example specify 'Check against server: Never'
in IE, the pages are cached, no matter what.

Is it possible to ensure that pages are always fresh, even if it is
specified on the client side that the client should never try to
retrieve a 'fresher' page?

I've been contemplating a new solution, which is to append a string
like ?ensure_freshness=02349025180.12 (some random, unique id) on each
link, but that's not a thing which I wish to do now, at such a late
stage in the project.

Also, it strikes me that it isn't possible to specify multiple
cache-control directives with the current HTTPRequest implementation,
am I missing something here, or is this a bug / missing feature?

Any ideas?

Thanks,

Morten



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



[Zope-dev] ZPatterns, DynPersist.dll and Zope 2.3.0

2001-03-04 Thread Morten W. Petersen

Hi guys,

I've got a problem making a version of the DynPersist.dll file work
on windows.  The message when trying to load the DynPersist module
says (paraphrasing) "A unit attached to the system doesn't work".
Anyone else experienced this?

Also, I read that users of  Zope 2.2.x could skip this module,
is there any quick hack to fix this?

Thanks,

Morten

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



Re: [Zope-dev] ZPatterns, DynPersist.dll and Zope 2.3.0

2001-03-04 Thread Morten W. Petersen

[Steve Alexander]

| Try this one:
| 
|http://www.cat-box.net/steve/DynPersist-0.4.3b1.dll
| 
| I've had this one working on Windows 2000, Zope 2.3.

Yep, this works.  On Windows 98 with Zope 2.3.0.

Thanks again,

Morten

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



Re: [Zope-dev] ZCatalog hackery

2001-03-03 Thread Morten W. Petersen

[Chris McDonough]

| Note that the algoritm is simple - for each index, compare the what exists
| in the index to what is to be put in.  If they're the same, do nothing.  If
| they're different, reindex.  I wasn't able to understand completely from
| your description whether the object method your're attempting to index via a
| TextIndex actually returns different data or not when you recatalog it.
| Does it?

Will the new data be 'made ready for indexing' before it is compared to the
existing data?  That is, will ZCatalog have to compute the data in some
way before it compares it to what is already stored?

I'm wondering because it would be significant overhead to 'make a data field
of 100MBs into an index-like value' and then compare it to what already
exists in the ZCatalog.

Thanks,

Morten

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



[Zope-dev] ZCatalog hackery

2001-03-01 Thread Morten W. Petersen

Hi guys,

I've got a problem with ZCatalog.  I've got plenty of large
objects, ranging from 100KB to 100MB in size.  Needless to
say, these take up a lot of processor time when indexed by
the ZCatalog.

Now, these object have to be moved from time to time, only
moved, so that one or two of the related columns and indexes
are affected (the path and the parent container id); is
there a way to go around this so that those two, the
one column and the index are updated, and not, let's say
the indexed body (which is 100KB - 100MB in size) ?

Thanks,

Morten

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



Re: [Zope-dev] ZCatalog hackery

2001-03-01 Thread Morten W. Petersen

[Casey Duncan]

| Actually what I wrote assumes you are passing a Catalog not a ZCatalog.
| So you will need to change it for a ZCatalog to:

I figured that out.  :-)

There is one problem, the uids stored in the Catalog are based on the path of the
object, so I guess I'll have to make a copy of the records, and then paste it in
under the new uid (path).

-Morten

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



Re: [Zope-dev] Synchronize GUD or Worldpilot with IPAQ

2001-02-28 Thread Morten W. Petersen

[Valérie Aulnette]

| Did someone try ? And how ?

You can't synchronize at this point.  It's a planned feature, but
don't hold your breath.  :-)

Cheers,

Morten

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



[Zope-dev] ZCatalog problems

2001-02-26 Thread Morten W. Petersen

Hi guys,

I'm having trouble making ZCatalog work.  The problem is that
there are 29 objects of a given meta type, with the same
booleans that should be returned for an iteration; but only
20 are.  Is this a result of caching perhaps?  Or lazy
results?

Thanks,

Morten

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



Re: [Zope-dev] catalog object owners?

2001-02-26 Thread Morten W. Petersen

[Tim McLaughlin]

| Anybody know how to catalog the object "owner"?  I can't seem to find a
| property to catalog the value of getUserName().  (of course I could always
| kludge it with a property in the constructor, but I would prefer use what is
| already there).

I'll second that, the ability to catalog values returned by method calls
would be sweet..

-Morten

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



Re: [Zope-dev] catalog object owners?

2001-02-26 Thread Morten W. Petersen

[Chris McDonough]

|  I'll second that, the ability to catalog values returned by method calls
|  would be sweet..
| 
| Not sure what you mean, this works now.

Aha?  So if I specify a field index of, get_parent_node_id, which is a
function call on all objects that are to be indexed, this would
index the returned value?

If so, how long has this been available?

Cheers,

Morten

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



Re: [Zope-dev] Minor typos/changes to ZCatalog.

2001-02-24 Thread Morten W. Petersen

[Steve Alexander]

| But it's not just characters. A field index indexes an object, and uses 
| the overloaded comparison operators for that object to put it in an 
| appropriate place. So, you can index DateTime objects, tuples, strings, 
| numbers, floats...

Could a field index succesfully handle the example you posted some
time ago, storing the relative path of each object?

-Morten

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



Re: [Zope-dev] Storing lots of big objects in containers

2001-02-24 Thread Morten W. Petersen

[Erik Enge]

| Can't you just subclass the BTree Folder as you would with OFS.Folder?
| 
| I think you might be confusing the Zope BTree implementation with the
| BTree Folder Product?

I've tried subclassing BTreeFolder, but then, whenever the object is
accessed, zope falls flat on its face.  :-\

Tried again, now this error is raised:


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

TypeError

Sorry, a Zope error occurred.

Traceback (innermost last):
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 187, in 
publish
  File /home/morten/Zope-2.3.0-src/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: CatalogAware)
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 171, in 
publish
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: retrieve_messages)
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
(Object: retrieve_messages)
  File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 579, in 
retrieve_messages
(Object: CatalogAware)
  File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 655, in 
_retrieve_messages
(Object: CatalogAware)
  File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 986, in 
drop_message
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/RFC822Message/util.py, line 86, in 
store_message
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/RFC822Message/rfc822_message.py, line 66, 
in manage_add_rfc822_message
(Object: CatalogAware)
  File /home/morten/Zope-2.3.0-src/lib/python/OFS/ObjectManager.py, line 285, in 
_setObject
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/BTreeFolder/BTreeFolder.py, line 187, in 
_setOb
(Object: CatalogAware)
TypeError: object does not support item assignment
"""

*sound of headscratching*

-Morten

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



[Zope-dev] REQUEST acting up and misplacing form elements in other

2001-02-23 Thread Morten W. Petersen

Hi zopers,

I've been wondering what may be causing the REQUEST object to
store form values in the other dictionary.  Is this a new
feature or simply a bug?

Cheers,

Morten

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



[Zope-dev] ConflictErrors and how to handle them

2001-02-19 Thread Morten W. Petersen

Hi guys,

I've been struggling with a problem, namely ConflictErrors.

At times, a long-running process may add 100, 1000, 1
objects to a single folder.  Under this process, several
ConflictErrors may be raised, but they are captured, and
the transaction committed again.  Problem solved.

However, the other side of the problem is that regular
requests, from other users, may be be aborted, and as a
result the user is presented with a Zope Error screen,
which says ConflictError.

If I've understood this correctly, it is because the
ZODB connection is hosed, and innocent reads trigger
ConflictErrors.

So, I'm wondering about turning up the number of Exceptions
each request may handle (it's 3 now, right?) and just
hope that the exception isn't raised more than 10-20
times.

Where can I increase the number of accepted exceptions
per request?

Any thoughts on the solution itself?

Cheers,

Morten

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



Re: [Zope-dev] Getting the parent of a container in a Python Script

2001-02-15 Thread Morten W. Petersen

[Cyril Elkaim]

|Hi all,

Hia Cyril,

[snip]

| Aside from my problems Zope rocks really.

Yes it does.  And you can find usable information in
$ZOPE_INSTANCE/lib/python/OFS/ZDOM.py .

Hope this helps,

Morten

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



Re: [Zope-dev] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Tim McLaughlin]

| Is this true on windows too?  I saw some mention of this limit be lifted,
| but if so, in what version?

It's not a problem on Windows, AFAIK.  It's a problem with Linux, if
you want to be able to use databases  2GB in size on Linux, a
kernel = 2.4.0 is required.

Hope this helps,

Morten

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



Re: [Zope-dev] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Andy McKay]

| Yes, you will hit this limit. Windows uses a 32 bit integer for file size...
| No matter what MS says, Ive hit it on Win2k.

Interesting.  Are you sure the problem lies with Win2K and not Python or
something else?

Cheers,

Morten

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



Re: [Zope-dev] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Erik Enge]

| [Morten W. Petersen]
| 
| | It's a problem with Linux, if you want to be able to use databases 
| | 2GB in size on Linux, a kernel = 2.4.0 is required.
| 
| Nope.  First, the limit is at file-level, not database-level (mind
| you, a problem with the filesystem, not Linux per se).  You can have
| tons and tons of files, but noone of those can be over 2GB.

FileStorage type database was implicit, as we're discussing ZODB,
and that's one file per database.

| Secondly, this is only true for the ext2 (and «lesser» filesystems).
| ReiserFS does not have this limitation and I've heard that is supposed
| to be shipped «batteries included» come 2.4.1.

Sorry?  Didn't I say kernel version 2.4.0 or greater?  The 2GB problem
(in ext2) is fixed there you know.

..and a side note for ReiserFS, I've had it mess up a filesystem
completely, so much for 1 second recovery after a crash.  ;-)

BTW, there is a list called [EMAIL PROTECTED], for ZODB specific
questions.

Cheers,

Morten

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



Re: [Zope-dev] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Erik Enge]

| [Morten W. Petersen]
| 
| | BTW, there is a list called [EMAIL PROTECTED], for ZODB specific
| | questions.
| 
| Actually, I think its called ZODB-Dev; [EMAIL PROTECTED]

I stand corrected.

Cheers,

Morten

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



Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen

[Erik Enge]

| What happens if you run this with ZEO?  Will the file be kept «in
| sync» with all ZEO Clients?

Good point. I don't think so.  It could be that it is kept in sync
with one Zope instance "being responsible" and the others calling
it via XML-RPC.

Cheers,

Morten

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



Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen

[Wolfgang Strobl]

| Doesn't even install on Windows, because it imports and uses fcntl.
| 
| From the fcntl docs: "Availability: Unix".

Well, the download page says "Platform: Generic UNIX-like", doesn't it?

-Morten

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



[Zope-dev] Re: ThreadSafeCounter

2001-02-12 Thread Morten W. Petersen

[Andy McKay]

| I released FSPoll recently and was going to combine the two into one
| FSCountThing with FSPoll and FSCounter subclassing of it, so maybe we could
| co-operate on ThreadSafeCounter and FSCounter?

The ideal solution would be to use an object that lives in the ZODB, I wonder
if there is a way to keep the 'object history' empty?  That is, keeping
the counter 'packed' while retaining 'object history' information on all other
objects.

In any case, I think it's possible to implement a file-locking module,
that locks the file using a .lock extension (writing the pid of the
locking process to that file) or something like that..  Which should
work on Linux and Windows (and most other OS')

Should I toss up a Wiki?

Cheers,

Morten

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



Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen

[Erik Enge]

| Forget it.  My fault.  *shame, shame*

*chuckle*  :-)

-Morten

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



Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-11 Thread Morten W. Petersen

[Chris Withers]

| So would a counter such as:
| 
| class PersistentCounter(Persistent):
| 
| # create the counter
| def __init__(self, value=0):
| self._value = value
| 
| # get the value of the counter without incrementing
| def getValue(self):
| return self._value
| 
| # increment the counter when called, and return the new value
| def __call__(self, number=1):
| self._value = self._value + number
| return self._value
| 
| ...not be thread safe?

I'm not sure whether the code above is thread safe or not.  ThreadSafeCounter was
made because

I don't know enough about Zope internals to determine whether
or not the counter would return unique values, nor do I
know enough about threads to be completely sure that it
would, every time.

File locking is a simple concept, and easy to understand.

As I've understood it, two threads serving requests have a copy each of the
database, and only when changes are committed are they reflected in
the database.  Therefore, two requests created at the same time could
get an identical copy and therefore and identical value.

..so, it basically boils down to the fact that it's simple to use file locking.

Cheers,

Morten

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



Re: [Zope-dev] LONGing for normal inetegers...

2001-02-11 Thread Morten W. Petersen

[Jon Franz]

| I had this problem in the past and hacked the mysql DA to fix it, then
| dicovered to my dismay I was using an out-of-date mysqlDA and it had already
| been fixed... Which DA are you using?

Using Python 2.0 could solve this problem, as longs are no longer rendered
with the L suffix.

HTH.

-Morten

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



[Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-10 Thread Morten W. Petersen

Hi guys,

There's a new product available, which enables unique ids in a given context,
take a look at url:http://www.zope.org/Members/morphex/ThreadSafeCounter.

Cheers,

Morten

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



[Zope-dev] ValueChecker 0.0.1

2001-02-07 Thread Morten W. Petersen

Hi zopistas,

I've managed to build a product called ValueChecker which when installed
hooks into the prosessing of form input.

It's basic at this point, a mere proof-of-concept, but I can think of
so many uses!

Cheers.  :-)

-Morten

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



[Zope-dev] The field converters (:int, :text, etc.)

2001-02-04 Thread Morten W. Petersen

Hi guys,

IIRC, there was some talk about modularizing the field
converters (checkers) so that they could be easiliy modified
and added to.  Is there currently any efforts to solving
this problem?  If not, there's definently a need for it,
IMO..

Thank you for your time.

-Morten



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



Re: [Zope-dev] ZClasses vs. Python Products

2001-02-03 Thread Morten W. Petersen

On Sat, 3 Feb 2001, Steve Alexander wrote:

 Sounds to me like your needs would best be served with two
 related products: a TTW ZClass product and a Python Product.
 Each ZClass is derived from an associated Python base class.
 
 You get to keep you flexibility, but also get the advantages
 of TTW development when you need it.

Ahah!  That's a very good (and simple) solution.
Thanks for the help!

-Morten (who still wants to add HTMLFile and Image editing
TTW for Python based products).


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



[Zope-dev] Creating IMAP and SMTP services for Zope

2001-02-03 Thread Morten W. Petersen

Hi guys,

I'm wondering about creating IMAP and SMTP services for Zope.
Someone mentioned to me that extending (using?) the ZServer
could be a Good Thing (tm).

Could anyone point me in the right direction?

Thanks.

-Morten



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



[Zope-dev] LoginManager and ZPatterns

2001-01-29 Thread Morten W. Petersen

Hi fellow zopers,

I don't know if it's a bug or feature, but whenever I try
to access parental objects from a user object in python
code, I can't seem to find anything.

That is, whenever I call acl_users.getItem('user123').getParentNode()
(the acl_users is a LoginManager instance) it returns None.  But,
if it's called from DTML, with exactly the same expression, it returns
the containing object...

Could someone shed some light on this?

Thank you.

-Morten

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




[Zope-dev] How to avoid ConflictErrors ?

2001-01-28 Thread Morten W. Petersen

Hi zopers,

I'm having problems with a product I'm developing.  The product is part of the
ZopeGUM package, the GUM product.  If you have a look in gum.py in that
product, you can see a method named _retrieve_messages, which can at
times store enourmous amounts of objects and data in one transaction.

Now, if I access the GUM instance at the same time as this method is being
called, I may either get a ConflictError raised in the page, or in the
Zope debug output. 

I've read all the posts I could find regarding ConflictErrors, and they
mention that careful programming could help in avoiding these exceptions.
I'm assuming that this applies only to whenever two threads are trying
to *modify* the same object; and frankly, I can't see where I'm modifying
any objects, unless modifying one object, an rfc822_message instance in
a message_container instance also somehow modifies the message_container.

Any idea what I'm doing wrong?

Thanks  cheers,

Morten

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




Re: [Zope-dev] How to avoid ConflictErrors ?

2001-01-28 Thread Morten W. Petersen

[Chris Withers]

| Please check that both rfc822_message and message_container subclass
| Persistence.Persistent.

They do.  *ponder*

-Morten

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




[Zope-dev] AttributeError when adding ZClass product (PortalMembership)

2001-01-26 Thread Morten W. Petersen

Hi guys,

I have a problem with a product.  This product, let's call it product
SuperSecret, adds a number of folderish objects to the new instance
when it is created.  Now, if we name the SuperSecret product instance for
a, and the class instance that raises the AttributeError b, I
will show you what happens:

I am at the root folder of the Zope instace, and select the SuperSecret
entry from the Products list.  There I enter the relevant information,
and submit the form.  But then, the SuperProduct raises an exception
when the manage_add_some_class function tries to add the new b instance
to the a instance.  (No exception is raised when the offending line
which tries to access the Control_Panel via the b instance  acquisition
is commented out).

The manage method, which looks like this:

def manage_add_b(self, id, description, REQUEST=None):
"Add an instance of the b class."

self._setObject(id, b(id, description))
#get_transaction().commit()
Shared.utils.install_authentication_folder(self[id])

which calls an external function, which looks like this:

def install_authentication_folder(container):


container.Control_Panel.Products.PortalMembership.doInstall(folder=container, 
REQUEST={})

which raises an AttributeError that looks like this:

   Zope Error

   Zope has encountered an error while publishing this resource. 

   Error Type: AttributeError
   Error Value: Control_Panel

   [...]

  File /home/morten/Zope/lib/python/Products/rs/rs.py, line 56, in manage_add_a
  File /home/morten/Zope/lib/python/Products/SuperSecret/a.py, line 168, in 
__init__
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/SuperSecret/b.py, line 61, in 
manage_add_b
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/SuperSecret/Shared/utils.py, line 
211, in install_authentication_folder
(Object: CatalogAware)
  AttributeError: (see above)

Now, I guess this could be because the new instance isn't aware of it's
surroundings, but I've tried to manually commit the transaction (which
could help?), but obviously didn't...  =)

I guess it could be a solution to call a number of methods after the
product instance is added, but that's a bit too hackish for me.

Any ideas?

Thanks in advance,

Morten

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




Re: [Zope-dev] Implementing a URL path resolver

2001-01-18 Thread Morten W. Petersen

[[EMAIL PROTECTED]]

(Bug in the encoding of the message, MHA)

| path = string.split(relative_url, '/')
| path = filter(None, path)
| new_path = '%s' % path[0]
| path = path[1:]
| 
| for element in path:
| 
|   new_path = new_path + "['%s']" % element
| 
| return eval("self%s" % new_path)

-Morten

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




Re: [Zope-dev] Implementing a URL path resolver

2001-01-18 Thread Morten W. Petersen

[Steve Alexander]

| Have you seen the methods restrictedTraverse and unrestrictedTraverse in 
| lib/python/OFS/Traversable.py ?

Exactly what I needed.  Thank you.

-Morten

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




[Zope-dev] Calling HTMLFiles

2001-01-18 Thread Morten W. Petersen

Hi,

I'm having difficulties calling an HTML file from python..

Here's the code:

[...]
from events import conflicting_events

calendar_event_add_redirect = HTMLFile('calendar_event_add_redirect',
globals())
manage_add_calendar_event_form = HTMLFile('calendar_event_add', globals())
conflicting_events_dialogue = HTMLFile('calendar_event_conflicting_events_dialogue', 
globals())

# These two expand into seconds
expand_hour = lambda x: x * 60 * 60
expand_minute = lambda x: x * 60

def manage_add_calendar_event(self, title='', note='',
alarm=0, start=0, end=0,
priority=0, status=0,
REQUEST=None, RESPONSE=None):
"Add an instance of the calendar_event class."

new_id = str(self.get_unique_id())

if REQUEST:

alarm = expand_hour(REQUEST['alarm_hour']) + \
expand_minute(REQUEST['alarm_minute'])

start = expand_hour(REQUEST['start_hour']) + \
expand_minute(REQUEST['start_minute'])

end = expand_hour(REQUEST['end_hour']) + \
expand_minute(REQUEST['end_minute'])

title = REQUEST['title']
note = REQUEST['note']
priority = REQUEST['priority']
status = REQUEST['status']


conflicting_events_ = self.check_timespan(
self.getParentNode().getParentNode().id,
self.getParentNode().id, self.id,
start, end)

if conflicting_events_:

return conflicting_events_dialogue(self, REQUEST)
[...]

Now, if there are any conflicting events, the HTMLFile is returned, with
some parameters passed along.

What I'm wondering about is how can I pass the variables defined
in the REQUEST so that they can be looked up with dtml-code in
the conflicting_events_dialogue?

And doing it without raising KeyErrors on DTMLMethod that are
called from within the conflicting_events_dialogue?

Thanks.

-Morten


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




[Zope-dev] ZCatalog and 'fuzzy logic'

2001-01-09 Thread Morten W. Petersen

Is there anyone who could try to give an estimate of how long it would
take to add fuzzy logic (regexp-like) searching capability to the
ZCatalog?

And reasoning as to why would be appreciated. ;)

-Morten


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




Re: [Zope-dev] 'Subclassing' another product

2000-12-21 Thread Morten W. Petersen

[Steve Spicklemire]

| does that help?

Yep.

Thanks  Cheers,

Morten

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




[Zope-dev] LoginManager and PTK

2000-12-21 Thread Morten W. Petersen

Hi guys,

I previously posted a couple of functions that enables users to
login at a lower level in the tree-structre than where the actual
user folder is.

I.e.,

a user could enter username and password at

/a

and get redirected to

/a/a/a/a/b

(the acl_users folder would be located in /a/a/a/a).

Now, there is a minor problem, because I can't seem to figure out
how to login the user to the actual context /a/a/a/a, except
maybe first redirecting the user to /a/a/a/a and then letting
the user log in from there..

Any thoughts / ideas?  And if you've got a completely different solution,
I'd be glad to hear it.  =)

Thanks.

-Morten

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




[Zope-dev] 'Subclassing' another product

2000-12-19 Thread Morten W. Petersen

I think I read somewhere that it was, from version 2.2
of Zope, possible to 'subclass' products.  Is this
just somebody janking my chain, or is it actually possible?

If it is possible, would someone care to explain?

Thanks.

-Morten

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




Re: [Zope-dev] Loginmanager and local roles

2000-12-19 Thread Morten W. Petersen

[Morten W. Petersen]

| Any suggestions?

Found the problem.  There needs to be a method called user_names
in the acl_users folder, which returns all the user ids:

"""
paramsself/params
user_ids = self.UserSource.getPersistentItemIDs()

user_ids2 = []

for id in user_ids:
user_ids2.append(id)

return user_ids2
"""

(Can't understand why I had to use an additional list though).

Cheers.

-Morten

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




Re: [Zope-dev] A groupware package for zope

2000-12-19 Thread Morten W. Petersen

[Magnus Heino]

| I'd appreciate to be able to download some code from zope.org :-)

Uhmm. Yeah.  http://www.zope.org/Members/morphex/ZopeGUM -- guess
you don't know about the /Product and search facilities.. ;)

Cheers,

Morten

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




[Zope-dev] A groupware package for zope

2000-12-19 Thread Morten W. Petersen

For the last couple of months I've been working on a groupware
package for Zope, named ZopeGUM.  It has reached version
0.1.63 now, and it's in steady progress.

All the planned components, like messenger, address book,
calendar, todos, etc. are there and working now; though
it's definently not ready for a production enviroment yet.

Anyways, just wanted to let you all know. (And yes, I
do appreciate feedback.  =)

-Morten

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




[Zope-dev] Re: objectIds accessiblilty and a proposal

2000-12-18 Thread Morten W. Petersen

[Brian Lloyd]

| This comes up often enough that I'm inclined to do 
| something about it for 2.3. I propose that objectIds
| (and objectValues) will not be directly accessible 
| via the Web in 2.3. For xml-rpc applications, it should
| be a simple enough task to create a Python Script (or 
| even a DTML Method) that *is* Web accessible to relay 
| that information if it is needed.
| 
| Thoughts?

This sounds like a good idea.

-Morten

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




Re: [Zope-dev] how do i check if it is an array

2000-11-13 Thread Morten W. Petersen

[Veiko Schnabel]

| how do i check out if any of my fields are arrays or strings
| is there a function like php: is_array()

I can't think of any clean way to do this; zope developers, why isn't
the type() function available from DTML?

On the other hand, you can explicitly cast all your form fields to be
sequence-like objects (in other words, an array), by doing this:

input type="text" name="field1:list"

HTH.

-Morten

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




Re: [Zope-dev] unbuffered html from external method

2000-11-13 Thread Morten W. Petersen

[Andy McKay]

| Is it possible to print unbuffered html output to the user from an external
| method. It looks to me like I can't, output occurs upon the return and I
| cant see a way of getting around that.

Try hacking the BaseResponse, located in lib/python/ZPublisher.
(implement the flush method, add some logic here and there to
handle responses that are flushed).

Or maybe just override the RESPONSE class, and use RESPONSE.stdout ..

-Morten

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




Re: [Zope-dev] DynPersist for Windows, ZPatterns 0.4.3b1 and Zope 2.2.x

2000-11-09 Thread Morten W. Petersen

[Phillip J. Eby]

| I uploaded the beta 2 release on October 31, but it has strangely
| disappeared from Zope.org, along with changes I made to other items that
| evening, so I have uploaded it again today.  The DynPersist you posted
| should still work, since there were no changes to DynPersist.c in beta 2.

Same thing happened to me; WRT to objects disappearing.  I think somebody
said something about ZODB-reset, rollback, or something.

-Morten

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




[Zope-dev] Segmentation fault when adding new objects

2000-11-07 Thread Morten W. Petersen

I'm having trouble with the adding of new objects;  specifically
it's adding of rfc822_address objects (contained within the
ZopeGUM distribution, http://www.zope.org/Members/morphex/ZopeGUM).

I haven't really got a clue what's wrong, have any of you?

-- Start debugging session

 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(244)index_object()
- old = d.has_key
pdb
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(245)index_object()
- last = None
pdb
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(253)index_object()
- src = self.getLexicon(self._lexicon).Splitter(k)
pdb
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(186)getLexicon()
- def getLexicon(self, vocab_id):
pdb
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(192)getLexicon()
- """
pdb
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(193)getLexicon()
- if type(vocab_id) is not type(""):
pdb
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(196)getLexicon()
- vocab = getattr(self, vocab_id)
pdb
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(197)getLexicon()
- return vocab.lexicon
pdb
--Return--
 /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(197)getLexicon()-Globbin... 
89f3e28
- return vocab.lexicon
pdb
 /usr/local/Zope/lib/python/SearchIndex/GlobbingLexicon.py(242)Splitter()
- def Splitter(self, astring, words=None):
pdb
 /usr/local/Zope/lib/python/SearchIndex/GlobbingLexicon.py(243)Splitter()
- """ wrap the splitter """
pdb
 /usr/local/Zope/lib/python/SearchIndex/GlobbingLexicon.py(248)Splitter()
- return Splitter(astring)
pdb
--Return--
Segmentation fault
morten@slakka:/usr/local/Zope/lib/python 

-- End debugging session

-Morten






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




[Zope-dev] Passing namespace to method

2000-11-01 Thread Morten W. Petersen

How do I construct a method of an object, so that whenever that method
is called, the current namespace is passed with it?

I.e.:

class myclass:
[...]
def myfunc(self, context):
if context['sequence-index'] == 10:
raise 'sequence-index is %s' % \
context['sequence-index'] 

called from DTML, like so:

dtml-in "objectValues('Spam')"
dtml-var myfunc
/dtml-in

will raise an exception if sequence-index is 10 or more?

Specifically, the reason I want this function is that I feel using

dtml-if sequence-even
tr bgcolor="dtml-var color_sequence_even"
dtml-else
tr bgcolor="dtml-var color_sequence_odd"
/dtml-if

is a bit tedious (and ugly!) in the long run..

If this isn't implemented, where would the right place to implement it
be?

-Morten

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




[Zope-dev] Using the monitor_client

2000-10-31 Thread Morten W. Petersen

When using the monitor_client, I do this:

-- Start monitor_client usage

python monitor_client.py localhost 8099
Enter Password:
warning: unhandled connect event
Python 1.5.2 (#1, Mar 11 2000, 13:03:53)  [GCC 2.95.2 19991024 (release)]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Welcome to secure_monitor_channel connected 127.0.0.1:2959 at 88fbf80
 import Zope
 app=Zope.app()
 app.addDTMLMethod
Traceback (innermost last):
  File "/usr/local/Zope/ZServer/medusa/monitor.py", line 94, in found_terminator
result = eval (co, self.local_env)
  File "secure_monitor_channel connected 127.0.0.1:2959 at 88fbf80", line 0, in ?
AttributeError: addDTMLMethod
 app.manage_addDTMLMEthod
Traceback (innermost last):
  File "/usr/local/Zope/ZServer/medusa/monitor.py", line 94, in found_terminator
result = eval (co, self.local_env)
  File "secure_monitor_channel connected 127.0.0.1:2959 at 88fbf80", line 0, in ?
AttributeError: manage_addDTMLMEthod
 app.manage_addDTMLMethod
Python Method object at 82ee058
 app.manage_addDTMLMethod('tester','tester','tester')
''
 app._p_jar.sync()
 get_transaction().commit()
 warning: unhandled close event

closed.
morten@slakka:/usr/local/Zope/ZServer/medusa 

-- End monitor_client usage

However, when I enter the management screen of the Zope instance, no DTMLMethod
called tester is listed..

(I used http://www.zope.org/Documentation/Misc/DEBUGGING.txt as a guide..)

Can anyone see what I'm doing wrong?

Thanks in advance.

-Morten

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




Re: [Zope-dev] Using the monitor_client

2000-10-31 Thread Morten W. Petersen

[Yves-Eric Martin]

| - Zope.app() gives you a *copy* of the *real* application object.
| - app._p_jar.sync() reloads your copy with the real (losing your changes)

Ah, there it is; sync discards the changes made from the monitor, and then
reloads...

An extra thanks for the thorough (not-very-newbie-like) explanation, much
appreciated!  =)

-Morten

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




[Zope-dev] Using the Zope debugger (authenticating)

2000-10-22 Thread Morten W. Petersen

How do I authenticate myself when using the Zope debugger?
(I've seen this before I think, but I couldn't find it)

Thanks.

-Morten

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




Re: [Zope-dev] Excluding meta_types

2000-10-22 Thread Morten W. Petersen

[[EMAIL PROTECTED]]

| btw how is GUM going?

It's ZopeGUM now.. =)

It's coming along; I'm planning on releasing a stable version of it available
within a week.

(CVS will be available soon from SourceForge).

-Morten

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




[Zope-dev] Excluding meta_types

2000-10-21 Thread Morten W. Petersen

When I'm building a class which inherits from the OFS.Folder.Folder, how
do I exlude the meta_types it brings with it (if it's there they come
from).

In other words, if I have a class, with meta_type 'MessageFilterFolder',
which should only be able to contain instances of meta_type 'MessageFilter',
what do I do (i.e. exlude all the other meta_types)?

Thanks in advance.

-Morten

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




[Zope-dev] LoginManager and ZPatterns

2000-10-15 Thread Morten W. Petersen

I've been fiddling a bit with the LoginManager; but can't seem to make
it work.

The product versions are ZPatterns 0.3.0 and LoginManager 0.8.6.

(Downgraded the ZPatterns product because the LoginManager couldn't
find a class named .. SheetProviderContainer, I think).

When adding a LoginManager object, it raises a TypeError exception, on
line 313 in PlugIns.py, saying that a keyword parameter was redefined.

I've also been looking around for some useful documentation and searched
the mailing-lists..

Anyone had success with these two products, and would care to share a
howto?

Thanks in advance.

-Morten

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




[Zope-dev] Getting all objectIds, recursively (ZODB)

2000-10-15 Thread Morten W. Petersen

Is there a method available that'll return a nested list of ids (or
something similar) of the current object?

-Morten

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




Re: [Zope-dev] Getting all objectIds, recursively (ZODB)

2000-10-15 Thread Morten W. Petersen

[Erik Enge]

| On 15 Oct 2000, Morten W. Petersen wrote:
| 
|  Is there a method available that'll return a nested list of ids (or
|  something similar) of the current object?
| 
| "current object"?  You probably mean objects?

No, the current (containing) object.
 
| Couldn't you do that with getParentNode().id?

Then I'd get the parent of the current object, wouldn't I?

An example to elaborate:

ZOPE

tmp

folder_a
folder_b

item_a

Now, if I'm in the context of tmp, I'd like to have a method that will
return this list:

['tmp',
['folder_a',[]],
['folder_b',[
'item_a',[]]
]
]

Anyhow, I got a tip to read the ZDOM.py file.. thanks. =)

-Morten


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




Re: [Zope-dev] LoginManager and ZPatterns

2000-10-15 Thread Morten W. Petersen

[Phillip J. Eby]

| 0.8.6 won't work with 0.3.0 ZPatterns, IIRC.  I'm pretty positive it
| requires one of the 0.4.x releases, but I'm not positive which one.  You
| might be better off with the latest (current) releases of both.

Okay, I tried different ZPattern versions against the most recent
LoginManager (0.8.7a1) and 0.4.2a2 worked!

| If that still doesn't work for you, Ty is very close to releasing an 0.8.8
| LM, and I'm about as close to releasing 0.4.3 ZPatterns.  Both will be
| beta-quality releases, which is to say better than anything we've put out
| on either product so far.  :)  0.4.3 ZPatterns will even have some
| documentation in it.  :)  I expect that we will make our releases some time
| during this coming week.

I'm looking forward to it.  Especially some documentation.  =)

Thanks.

-Morten

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




Re: [Zope-dev] Is this a ZClass/Propertysheet bug?

2000-10-06 Thread Morten W. Petersen

 Is this behavior correct?

See http://www.zope.org/Members/paulabrams/howto_deleteundeadzclassprops
for help.

It is not a bug per se, Python (upon which ZOPE is based) is built this
way, i.e. if you create a class with certain attributes, every instance
will keep those attributes, even if they are deleted from the class
itself, and new instances that are instansiated from the now modified
class will not.

-Morten


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




Re: [Zope-dev] Is this a ZClass/Propertysheet bug?

2000-10-06 Thread Morten W. Petersen

On Fri, 6 Oct 2000, Morten W. Petersen wrote:

 It is not a bug per se, Python (upon which ZOPE is based) is built this
 way, i.e. if you create a class with certain attributes, every instance
 will keep those attributes, even if they are deleted from the class
 itself, and new instances that are instansiated from the now modified
 class will not.

Context got mixed up, please disregard.

-Morten


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