Re: [Zope-dev] Why is it _setObject(), and why is it undocumented

2003-02-01 Thread maxm
Dieter Maurer wrote: _setObject has an _ because it is a private method which should not be called by TTW code. Ok ... but that is not really what is meant by a private method. Usually a private method is used purely as a mean of implementation. And should never be called from other objects.

[Zope-dev] [Zope] Header information on file upload

2003-02-01 Thread Martin Gebert
Hi! I already asked this question on the main Zope list, but there was no answer so far; so I hope I find the right audience here... In my HowTo about dealing with BLOBs http://www.zope.org/Members/murphy/MySQL-BLOBs I use a rather unelegant but working method to get the content type of an

Re: [Zope-dev] Why is it _setObject(), and why is it undocumented

2003-02-01 Thread Lennart Regebro
From: maxm [EMAIL PROTECTED] Usually a private method is used purely as a mean of implementation. And should never be called from other objects. This is not the case here, as the method is clearly a part of the api. Well, no, it isn't really, since it starts with _. However, python do not in

Re: [Zope-dev] Why is it _setObject(), and why is it undocumented

2003-02-01 Thread Max M
Lennart Regebro wrote: From: maxm [EMAIL PROTECTED] Usually a private method is used purely as a mean of implementation. And should never be called from other objects. This is not the case here, as the method is clearly a part of the api. Well, no, it isn't really, since it starts with _.

Re: [Zope-dev] Why is it _setObject(), and why is it undocumented

2003-02-01 Thread Lennart Regebro
From: Max M [EMAIL PROTECTED] Sorry but I don't see that. How on earth are you suposed to add an object to an objectmanager, if you don't use _setObject() ?? You use another method that in turn calls _setObject. Now you may argue that there should be a public method that does the same, but

Re: [Zope-dev] Why is it _setObject(), and why is it undocumented

2003-02-01 Thread Florent Guillaume
maxm [EMAIL PROTECTED] wrote: I have a few tutorials / How_to's on zope.org. And sometimes I get some interresting mails because of that. Somebody asked me today why _setObject() has that name, as it is used in many products, and thus ought to be an interface method. And called

Re: [Zope-dev] [Zope] Header information on file upload

2003-02-01 Thread Florent Guillaume
Martin Gebert [EMAIL PROTECTED] wrote: In my HowTo about dealing with BLOBs http://www.zope.org/Members/murphy/MySQL-BLOBs I use a rather unelegant but working method to get the content type of an uploaded file. Stefan Tjarks has now drawn my attention to the Header attributes of the

Re: [Zope-dev] Why is it _setObject(), and why is it undocumented

2003-02-01 Thread Dieter Maurer
Lennart Regebro wrote at 2003-2-1 15:48 +0100: From: Max M [EMAIL PROTECTED] Sorry but I don't see that. How on earth are you suposed to add an object to an objectmanager, if you don't use _setObject() ?? You use another method that in turn calls _setObject. Now you may argue