Re: [Zope-dev] Exceptions

2000-11-12 Thread Jim Fulton


I think that this would make a great dev.zope.org fish-bowl project.

I'd love to see someone come up with an exception model for
Zope:

  - arranging exceptions in a hierarchy.

  - defining standard APIs for exceptions.

To give an example of what I'd like to gain by having
exception APIs, I'd like there to be ab API for
finding out whether an exception is meant for a human
and getting an exception as HTML, so we stop embedding
markup in exception values to indicate errors meant 
for humans.

Any volunteers? :)

Jim

seb bacon wrote:
 
 I was just building in some error handling into some UI code, and wanted to catch 
errors relating to duplicate ids.  The problem is that just about every client-side 
error raises the same kind of Exception, a 'Bad Request'.  A quick grep counted 41 
different types of 'Bad Request' in my Zope source.
 
 Wouldn't it be *much* nicer to have a hierarchy of exception types, so that 
applications can deal with them at an arbitrarily granular level?  e.g.
 
 ZopeException
 |
 `RequestException
   |  |
   |  `XMLException
   |
   `IdException
 |  |
 |  `ReservedWordException
 |
 `DuplicateException
 
 Has this discussion taken place before?  Would it be useful?  Would its 
effort:benfits ratio be too great to justify doing?
 
 seb
 
 ___
 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 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] PythonMethods: Can't Slice context.REQUEST.PARENTS

2000-11-12 Thread Dieter Maurer

The Doctor What writes:
  ...
  Now here is my next problem.
  
  Using context.REQUEST.PARENTS doesn't give me the DTML Document that
  called me (so to speak).
  
  I have:
  /test/new/foo_html
  
  My PARENTS shows Zope, Test, and New, but doesn't show foo_html.
"PARENTS" contain the objects from root up to but excluding
the final object on the URL.

You may try to reference the final object by "this()".


Dieter

___
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] PythonMethods: Can't Slice context.REQUEST.PARENTS

2000-11-12 Thread The Doctor What

* Dieter Maurer ([EMAIL PROTECTED]) [001112 17:12]:
 The Doctor What writes:
   ...
   Now here is my next problem.
   
   Using context.REQUEST.PARENTS doesn't give me the DTML Document that
   called me (so to speak).
   
   I have:
   /test/new/foo_html
   
   My PARENTS shows Zope, Test, and New, but doesn't show foo_html.
 "PARENTS" contain the objects from root up to but excluding
 the final object on the URL.
 
 You may try to reference the final object by "this()".

Dieter, thanks for your help, but I'm unsure where to use it.

Using context.this().id, self.this().id, m_self.this().id all get me
the same things:
Folder, Zope, and my method.  None give me the DTML Document
foo_html.

This would seem to be an important thing.

To re-iterate in a different way, it's the same as trying to do:
dtml-var id in a DTML Method that is called by a DTML Document.
You expect the id of the DTML Document that called you, not the
Folder that the DTML Document resides in.

Did you mean to do a this().id?  That doesn't work at all, it gives
me a Name Error.

There *must* be a way to do this.

Ciao!

-- 
It has just been discovered that research causes cancer in rats.

The Doctor What: A Holtje Production http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
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] Security/Acquisition Bug? (take two)

2000-11-12 Thread Charlie Wilkinson

On Sun, Nov 12, 2000 at 11:42:32PM +0100, Dieter Maurer waxed eloquent:
 
 I tried it on my ZopeCVS installation.
 The Python parts are quite new. The C-part is about 2 weeks old.
 
 I can not observe what you describe.
 "/index_html" can be viewed as "Annonymous" without any
 change in permissions.

Hi Dieter,
Thanks for investigating.  I also gave it another try, with the same
results as my previous attempts.  Maybe I'm doing something dumb?
I have followed exactly these steps (as a regular user):

1. mkdir Zope2

2. cvs -z7 -d :pserver:[EMAIL PROTECTED]:/cvs-repository checkout Zope2

3. cd Zope2

4. python wo_pcgi.py

5. python zpasswd.py -u XX -p XX access

6. Edit start file (for port change and stupid log):

#! /bin/sh
reldir=`dirname $0`
PYTHONHOME=`cd $reldir; pwd`
export PYTHONHOME
exec /usr/bin/python \
 $PYTHONHOME/z2.py -P 9000 \
 -D "$@" STUPID_LOG_FILE=$PYTHONHOME/zope.log

7. ./start 

8. Visit http://www.boinklabs.com:9080/index_html

8. Get BASICAUTH login box...  ??

Box is Redhat 6.0 with updates, Python 1.5.2 from source.  CVS is v1.10.5.
The only bit I left out was setting up the CVS login on a prior occasion:

cvs -d :pserver:[EMAIL PROTECTED]:/cvs-repository login

-cw-

-- 
~
Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ
Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer...
Visit the Radio For Peace International Website: http://www.rfpi.org/
~
CLOBBER INTERNET SPAM:  See!! http://spam.abuse.net/
   Join!! http://www.cauce.org/
~
QOTD:
Al Gore: Please, just concede.  I can't handle another four years of
whiney Republican bumper stickers!

___
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] Security/Acquisition Bug? (take two)

2000-11-12 Thread Charlie Wilkinson

I should have included this in my previous reply - this is the Zope
error I am getting after failing out of BASICAUTH login:

--
Zope Error

Zope has encountered an error while publishing this resource. 

Unauthorized

You are not authorized to access this resource.

No Authorization header found. 

Traceback (innermost last):
  File /share4/Zope2/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /share4/Zope2/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /share4/Zope2/lib/python/ZPublisher/Publish.py, line 162, in publish
  File /share4/Zope2/lib/python/ZPublisher/BaseRequest.py, line 463, in traverse
  File /share4/Zope2/lib/python/ZPublisher/HTTPResponse.py, line 569, in unauthorized
Unauthorized: (see above)
--

Does that provide any (additional) clues?

-cw-

-- 
~
Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ
Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer...
Visit the Radio For Peace International Website: http://www.rfpi.org/
~
CLOBBER INTERNET SPAM:  See!! http://spam.abuse.net/
   Join!! http://www.cauce.org/
~
QOTD:
Al Gore: Please, just concede.  I can't handle another four years of
whiney Republican bumper stickers!

___
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] problems reading tar file

2000-11-12 Thread Robert Rottermann



Hi there,
I have problems reading tar files when I download 
them from the zope web site.
I am working on a NT2000 box. 
Winzip does recognize the tarfiles as compressed 
archives but balks when trying to open them.

Is there an other utility out there I can use to 
deal with these files?

Thanks for your tips
Robert


Re: [Zope] problems reading tar file

2000-11-12 Thread Wolfgang Strobl

On 12 Nov 2000, at 12:47, Robert Rottermann wrote:

 I have problems reading tar files when I download them from the zope web site.
 I am working on a NT2000 box. 
 Winzip does recognize the tarfiles as compressed archives but balks when trying to 
open them.

Rename xyz.tar to xyz.tgz locally.


-- 
Wolfgang Strobl

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




Re: [Zope] Please Tell Me...

2000-11-12 Thread Maik Röder

Hi Ben !

Ben Ocean wrote:
 
 Hi;
 I'm new. I can see Zope will help me on larger projects, but what if I want
 to allow the owner of a small Web site (under 200 pages) that I develop the
 ability to edit text and photos? Is this the right application, or is Zope
 overkill? 

It is just right.

 If so, any recommendations on a content manager?

Try the ZDP-Tools: http://www.zope.org/Members/roeder

Best regards,

Maik Röder

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




Re: [Zope] problems reading tar file

2000-11-12 Thread Ansgar W. Konermann

Hi!


 I have problems reading tar files when I download them from the zope web site.
 I am working on a NT2000 box.
 Winzip does recognize the tarfiles as compressed archives but balks when trying to 
open them.

My WinZip (V 7.0 SR1) *does* handle tar.gz files properly.
Use "Open Archive", File Type "All archives", select your archive file,
"Open".

WinZip should ask you whether you want to decompress that single file
contained in the archive and open it. Enough temporary disk space 
assumed, this should work well. You can extract any files you wish
afterwards from within the GUI.


-- 
Best regards,

Ansgar W. Konermann
eMail: [EMAIL PROTECTED]

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




RE: [Zope] problems reading tar file

2000-11-12 Thread Max M

From: Robert Rottermann

I have problems reading tar files when I download them from the zope web
site.
I am working on a NT2000 box.
Winzip does recognize the tarfiles as compressed archives but balks when
trying to open them.

For some reason IE saves a *.tar.gz file as *.tar.tar. Just re-rename it to
*.tar.gz and Winzip will do the right stuf.

Regards Max M


Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


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




Re: [Zope] XML-RPC

2000-11-12 Thread Steve Spicklemire


OK... I thought I'd put a little effort into this concept, and out came:

http://www.zope.org/Members/sspickle/Zwiff

Take a look it's a start at the concept of 'on the fly' swf from
Zope. I needed a quick way to get up and running so I sub-classed
PythonMethod and used the existing swf library from
http://www.opaque.net/ming. Anyway this is another way to do
'flash' with Zope

-steve

 "Jason" == Jason Cunliffe [EMAIL PROTECTED] writes:

Jason Hello

Jason I am missing the start of this thread, so I may be off
Jason topic, but you might want to look seriously at Flash5 for
Jason the client side programming and graphics.




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




Re: [Zope] Can't get dtml-tree to work in a sub-folder.

2000-11-12 Thread Michael Bernstein

[EMAIL PROTECTED] wrote:
 
 Howdy Folks,
 
 I'm trying to make use of the dtml-tree gizmo and it only works in
 the root directory.
 
 I'm trying to create a dynamic navigation display so users can click
 their way through the sub-directories of files. Kind of a
 "Zope Explorer".

Maybe this will help:

http://classic.zope.org:8080/Documentation/HowTo/DTML/treetag

Michael Bernstein.

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




[Zope] Editing images

2000-11-12 Thread Anders Eriksson

Hello zopistas,

I have some images in an image folder within Zope. Now I need to edit
these images but I can't figure out how?

I guess that the images are withing the Data.fs but how to get them
out? If I do an export they wind up in a .zexp which I don't now how
to expand outside of Zope...

Please help!!

  

-- 
Best regards,
 Anders  mailto:[EMAIL PROTECTED]

Science is everything we understand well enough to explain to a computer. Art is 
everything else. - David Knuth



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




[Zope] W9x Patch program

2000-11-12 Thread Brendon Grunewald



Sometime ago I got help to patch the Mime.py using 
Linux. Thanks.

Does such a program / utility exist for Win9x? 
Where can one find it?

Regards,Brendon
--70South: the No.1 source for 
Antarcticles.For the latest news and views on Antarctica visit : http://www.70south.com


Re: [Zope] Editing images

2000-11-12 Thread Peter Bengtsson

Click the Image object you have created and then click the Upload tab (at the top).
That let's you edit the image content. That almost changes the Content-Type, width and 
height.


Lycka till!



 Hello zopistas,
 
 I have some images in an image folder within Zope. Now I need to edit
 these images but I can't figure out how?
 
 I guess that the images are withing the Data.fs but how to get them
 out? If I do an export they wind up in a .zexp which I don't now how
 to expand outside of Zope...
 
 Please help!!
 
   
 
 -- 
 Best regards,
  Anders  mailto:[EMAIL PROTECTED]
 
 Science is everything we understand well enough to explain to a computer. Art is 
everything else. - David Knuth
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


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




Re: [Zope] Editing images

2000-11-12 Thread Steen Suder

Anders Eriksson wrote:
 
 Hello zopistas,
 
 I have some images in an image folder within Zope. Now I need to edit
 these images but I can't figure out how?
 
 I guess that the images are withing the Data.fs but how to get them
 out? If I do an export they wind up in a .zexp which I don't now how
 to expand outside of Zope...

I really can't figure out how you imagine to edit those images, but it
should as simple as to view the picture, edit it and then upload it into
the ID from where you obtained it in the first place.

Zope is not an image editor at the moment, but who really knows...?

CUT

-- 
Best regards / Mvh.,
Steen Suder, sysadm kollegie6400.dk -|- OpenSource --- Sign of the time

Scan-Aqua ADVARSEL WARNING http://www.uk.k64.dk/sfs/Scan-Aqua/

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




[Zope] Editing images

2000-11-12 Thread Michael Blewett

Why not just ftp them out? Zope has built-in ftp. For more information look at:

http://www.zope.org/Members/mblewett/ZopeFTP

Hope this helps...


  - Michael






Message: 14
Date: Sun, 12 Nov 2000 21:00:48 +0100
From: Anders Eriksson [EMAIL PROTECTED]
Reply-To: Anders Eriksson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Zope] Editing images
Hello zopistas,
I have some images in an image folder within Zope. Now I need to edit
these images but I can't figure out how?
I guess that the images are withing the Data.fs but how to get them
out? If I do an export they wind up in a .zexp which I don't now how
to expand outside of Zope...
Please help!!
--
Best regards,
Anders mailto:[EMAIL PROTECTED]
Science is everything we understand well enough to explain to a computer. 
Art is everything else. - David Knuth





~~~
Michael Blewett
Computer Support Mgr - Biological Sciences
Monash University (Clayton Campus)
Victoria Australia 3168

"I'm out of my mind at the moment, but feel free to leave a message..."




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




[Zope] Win9x Patch found.

2000-11-12 Thread Brendon Grunewald



I found a version of Patch for Win9x
The site is Japanese, but you can make out the 
download and ftp signs :-)

http://www.vector.co.jp/soft/dl/win95/prog/s0015025.html


Regards,Brendon
--70South: the No.1 source for 
Antarcticles.For the latest news and views on Antarctica visit : http://www.70south.com


[Zope] Newbie question(s)

2000-11-12 Thread Bowyer, Alex

Hi,

I have what I'm sure is a very simple question about Zope programming style:
I want to count how many objects are contained in the current container
object and then do something with that value, but I can't do the bit I need
to do at the point of reading the count variable because I am in the wrong
namespace.
I can't begin a dtml-let because I would need to close dtml-if before
dtml-let, which is not allowed.

dtml-in objectValues
dtml-if sequence-end
dtml-var count-id  !-- this is the value I want to use --
/dtml-if
/dtml-in
!-- this is the scope in which I want to do something with the value. --

What is the "accepted" way of passing a value into a different scope? Do I
have do a REQUEST.set or is there a tidier way?
Also I think I read somewhere that you can use the object.subobject or
object.property syntax but I never got that to work, what's the catch?

One last thing, I sent a couple of mails to the list about problems I had
with manage_delObjects. I still haven't got it to work. Since the best way
to learn Zope is by example, I wonder if anyone could direct me to a sample
piece of code where a container of some sort deletes one of its children
subobjects?

Thanks very much for your help,

Alex

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

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




Re: [Zope] XMLDcoument setAttribute error

2000-11-12 Thread Dieter Maurer

Matt writes:
  I have an external method like the following
  
  def make_an_element(self,REQUEST):
  new_elem = self.createElement(REQUEST.new_elem_name)
Use:
   new_elem = self.createElement(REQUEST.new_elem_name).__of__(self)
  new_elem.setAttribute('hello','there')
  self.appendChild(new_elem)
  
  I call this on an XMLdocument root node and get the following error at
  the setAttribute stage :
  
 Error Type: AttributeError
 Error Value: aq_base



Dieter

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




Re: [Zope] Editing images

2000-11-12 Thread Dieter Maurer

Anders Eriksson writes:
  I have some images in an image folder within Zope. Now I need to edit
  these images but I can't figure out how?
  
  I guess that the images are withing the Data.fs but how to get them
  out? If I do an export they wind up in a .zexp which I don't now how
  to expand outside of Zope...
One option would be FTP access.

There are FTP file system tools out there.
They allow you to "mount" FTP hierarchies into your local
file system and work with the files as though there were local
files.



Dieter

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




Re: [Zope] querying status in zsql

2000-11-12 Thread Dieter Maurer

Rik Hoekstra writes:
  A short explanation: sql queries return a result object (so does ZCatalog
  btw), which you can't address directly in DTML (or at least I wouldn't know
  how ;-)  If it the result object is empty it won't have a (sequence) start
  in a dtml-in. This is the same code SearchInterfaces uses for returning a
  'this query has no results'.
"Result" objects behave like sequences.
You can ask for their length ("_.len") and access the elements
by subscription("[i]"). Of cause, you can use them in
"dtml-in".


Dieter

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




Re: [Zope] why DTML confusing

2000-11-12 Thread Curtis Maloney

On Sat, 11 Nov 2000, Andy McKay wrote:
  It might be that fixing one or both of the above would reduce the DTML
  pain factor quite a bit. Certainly, it's time to do whatever it takes
  to banish these "-"-named variables, IMHO.

 I agree, changing the "-" to "_" would remove a whole ton of posts on this
 list and mean I could chop a whole bunch of dtml-let item=sequence-item.
 I really only see negative reasons for a "-".


I've tried starting this call some time ago, but it never managed to pick up 
steam.  Last time, however, someone pointed to an existing patch to do just 
that:  change *-* variable names to *_* .

If only I could remember where it was...

Have a better one,
Curtis Maloney

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




[Zope] Forcing Content-Type of Image object

2000-11-12 Thread Peter Bengtsson

I don't want Zope to find out what content type an Image has. I want to be able to 
force that programmatically myself from DTML.

Here are some code examples that doesn't work:

dtml-call "PARENTS[0].manage_addImage('awapimage.wbmp',file,'Give it a 
Title','','image/vnd.wap.wbmp')"
dtml-call "PARENTS[0].manage_addImage('awapimage.wbmp',file,'Give it a 
Title','image/vnd.wap.wbmp','image/vnd.wap.wbmp')"
dtml-call "PARENTS[0].manage_addImage('awapimage.wbmp',file,'Give it a 
Title','image/vnd.wap.wbmp','')"

Image.py contains this:
def manage_addImage(self, id, file, title='', precondition='', 
content_type='',REQUEST=None):

I have searched the mailing list and looked at Image.py but can't find it.
Help, please

Best regards, Peter


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




RE: [Zope] Newbie question(s)

2000-11-12 Thread Max M

From: Bowyer, Alex

I want to count how many objects are contained in the current container
object and then do something with that value, but I can't do the bit I 
need to do at the point of reading the count variable because I am in 
the wrong namespace.

I would try and do it like this (untested):

dtml-call "REQUEST.set('itemCount', len(objectIds()))"

Regards

Max M

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




RE: [Zope] Newbie question(s)

2000-11-12 Thread Bowyer, Alex

 I want to count how many objects are contained in the 
 current container
 object and then do something with that value, but I can't do 
 the bit I 
 need to do at the point of reading the count variable 
 because I am in 
 the wrong namespace.
 
 I would try and do it like this (untested):
 
 dtml-call "REQUEST.set('itemCount', len(objectIds()))"
 
 Regards
 
 Max M

Thanks Max, that is certainly useful in this case.

My query is really more general though, that was just an example, I need to
know what the generally accepted method is for transferring values through
the code (i.e between namespaces)

IMHO as far as Zope documentation goes, the thing that is really lacking is
a document introducing people to how to program in Zope, explaining the
overlaps between Python and Zope/DTML and explaining the different syntaxes
for calling variables, methods etc? There are a lot of references on
specific functions, methods etc but no general overview. Maybe the
forthcoming Zope book will address this better.

I am also still looking for example code using manage_delObjects.

Thanks,

Alex

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

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




Re: [Zope] Newbie question(s)

2000-11-12 Thread Morten W. Petersen

[Alex Bowyer]

| My query is really more general though, that was just an example, I need to
| know what the generally accepted method is for transferring values through
| the code (i.e between namespaces)

Unless I've misunderstood your problem, wouldn't dtml-let do the trick?
(See DTML manual for more info).

-Morten

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




[Zope] [ANNOUNCE] New Minimal product How-To

2000-11-12 Thread Max M

Hi

I have just added this Product How-To:

http://www.zope.org/Members/maxm/HowTo/minimal_01/index_html

I would very much like some feedback as to whether this type of How-To is
worth the effort. I wrote it because I would have liked something like this
myself when I started. So should I write more like this, or is it a waste of
time?

Introduction text:

'Zope product programming has gotten a reputation as being difficult. This
is not true. I belive that It's simply because the examples that has been
shown, like the Boring class, has been too full featured. Furthermore the
samples have skipped several steps when explaining the functionality, making
"the Zope" way seem long and a bothersome. With all kinds of unnessecary
extra code that is added "just because".

I remember reading the Boring examples the first time thinking that there
was all this deep black magic about Zope that no one really understood, but
just did because the had seen it elsewhere.

Therefore I have choosen to write a series of How-To's explaining in the
simplest possible way how to program Zope. The pace will be VERY slow and
every line of code will be explained in detail. If there is ANYTHING that is
unclear please tell me about it. (Use the " Feedback to this page's author"
link in the bottom of this page.)'


Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


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




RE: [Zope] Newbie question(s)

2000-11-12 Thread Max M

From: Bowyer, Alex

My query is really more general though, that was just an example,
I need to know what the generally accepted method is for
transferring values through the code (i.e between namespaces)

I do believe that our ugly friend REQUEST.set() is the way to go here. I
cannot remember having seen any other way of doing it. I expect that better
days will be here with v.2.3 as we will get Python Methods, or whatever they
are called.

I am also still looking for example code using manage_delObjects.

Sorry I cannot help there.

Regards
Max M


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




RE: [Zope] Zope declining?

2000-11-12 Thread Max M

From: Hung Jung Lu

From the mailing list volume in the last 3 months, it is not hard to see
that there is a steady decline. This compared to the trend of last two
years
(doubling volume every year), should probably raise a red flag.

My experience here is that the list isn't much help. It can be very hard to
get a question answered!

Especially when it gets out of the "Hello World" level.

And when a question eventually do get answered it is often terse and hard to
understand.

It would be nice if more of the devlopers would spend some time on this
list, as it would really save those of us still learning a LOT of time.

Coming from the Python list this is really a big difference. If I have a
Python question I get an answer very quickly from the top Python guys. On
this list I hardly ever see the top guys, and it can be really frustrating
sitting with a problem for hours or days knowing that somebody could solve
it in a few minutes.

I am using the 2 minutes rule myself. Any qustion that I can answer in less
than 2 minutes I will. 2 minutes isn't to much so I can answer a reasonable
amount of questions and still get work done. When I get better I will be
able to solve harder problems in 2 minutes.

If only somebody better would take 2 minutes to solve some of my questions
:-)

Regards

Max M


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




Re: [Zope] [ANNOUNCE] New Minimal product How-To

2000-11-12 Thread Bak @ kedai

On Monday 13 November 2000 09:02, Max M wrote:
 Hi

 I have just added this Product How-To:

 http://www.zope.org/Members/maxm/HowTo/minimal_01/index_html

this kind of handholding is really great for us newbies.  hoping to see the 
continuation, e.g. nested products --Folderish_product
|-Product_item

thanks for the enlightening doc.

-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

use Zope?  then you got HOPE!


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




[Zope] can multiple users access gadfly database simultaneously ?

2000-11-12 Thread jacintha menezes

Hi,
When two users enter their login name  password and press enter
simultaniously,the first who entered among the two gets the following error.

Error Type: SyntaxError
Error Value: unexpected token sequence.near :: 'of_que\012from noq'*''
*** current state = 277 expects: '*', ';', ')',
'ORDER', ('nomatch1',) current token = ((-6, 'FROM'), 'FROM')


The above error is while entering the Zope .Again If they fill the form 
click submit button simultaniously.The following error occurs for the user
who presses submit button first.

Error Type: SyntaxError
Error Value: unexpected token sequence.near :: "\012Q_name = 'q24'"*''
*** current state = 231 expects: 'EXCEPT', '+',
')', 'HAVING', '-', 'UNION', 'AND', 'GROUP', '*', ';', 'OR', 'ORDER',
'INTERSECT', ('nomatch1',) current token = ((-6, 'WHERE'), 'WHERE')


Both users will be accessing the same database.

I don't know why this error occurs.If we refresh the error occurred page
then it doesn't give error(that time no other user was pressing submit
button). In the product which i have implemented multiple users will enter 
fill the forms simultaneously.

waiting for your immediate reply.
  bye,
   jacintha


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




[Zope] requests for some dtml tags

2000-11-12 Thread jacintha menezes

Hi,
   Is there any dtml tags for creating a new work space also for locking
some page.Locking some page in the sense for second user the operations in
that page should not be processed
unless the process for first user is completed.If there dtml tags for these
kindly give me
those tags.

waiting for your reply.
   Thanks,
bye,
 jacintha



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




[Zope] Does anybody work on a database adapter for SAP DB?

2000-11-12 Thread Joachim Werner

Hello!

I'd like to know if anybody is working on a database adapter for the SAP DB.

Some background info:

The SAP DB is a version of Adabas D that was bought by SAP for use with their
enterprise software R/3 a couple of years ago. It's an enterprise-level, fast
relational database with transaction support, stored procedures, subselects, and
the like. And: It's under the GPL now! The binaries are up already on
http://www.sabdb.org - source is going to be published soon.

SAP provides three Python modules to
- access the database using SQL
- manage the database
- manage the replication manager of the DB

That means building a DA should be straightforward (I just don't know if the
modules are threadsafe already ...).

Any feedback welcome ...

Joachim


-- 
Iuveno - Smart Communication


Joachim Werner


_

Marie-Curie-Straße 6
85055 Ingolstadt

Tel.: +49 841/90 14-325 (Fax -322)
Mobil: +49 179/39 60 327
E-Mail: [EMAIL PROTECTED][EMAIL PROTECTED]
WWW: www.iuveno.de/www.iuveno-net.de



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




[Zope] Can I run Zope with i-Planet?

2000-11-12 Thread Plaza Diez, Antonio


Hello, 

I'm a beginner using zope, and I would like someone answer me some
questions:

- Can I run Zope with i-Planet Web Server?
- How can I do this?
-Where can I found some Documentation about it?

Thanks,

Antonio Plaza Diez
e-Busiess Solutions
Gedas Iberia, S.A.
Avenida Europa, 14
Pol. Empresarial "La Moraleja"
28108 Alcobendas, Madrid
 mailto:[EMAIL PROTECTED]
Tfno: 91 6 59 83 44
fax: 91 659 83 33


***

DISCLAIMER: Este mensaje contiene información propietaria 
de la cual parte o toda puede contener información confidencial
o protegida legalmente. Esta exclusivamente destinado al 
usuario de destino.
Si, por un error de envio o transmisión, ha recibido este mensaje 
y usted no es el destinatario del mismo, por favor, notifique
de este hecho al remitente.
Si no es el destinatario final de este mensaje no debe usar, 
informar, distribuir, imprimir, copiar o difundir este mensaje 
bajo ningún medio.

-

DISCLAIMER: This e-mail contains propietary information some 
or all of which may be legally privileged. It is for the intended 
recipient only. If an addressing or transmission error has 
misdirected this e-mail, please notify the author by replying to
this e-mail. If you are not the intended recipient you must not use,
disclose, distribute, copy, print or rely on this e-mail.

***

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