Re: [Zope-dev] FTP error messages

2001-02-20 Thread Jonothan Farr

> I've now added the ability to set the message to be sent back to the FTP
> client on FTPResponse. The patch is attached. We'll be using it and I hope
> that it, or something similar, makes it into the 2.3.1.

Try submitting it to the collector. It's likely to get lost on the mailing list.

--jfarr



___
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] FTP error messages

2001-02-20 Thread richard

One of our developers just spent another annoying morning trying to figure
why his FTP transfers to Zope were sometimes responding with "426 Error
creating file." with no other information being supplied.

I've now added the ability to set the message to be sent back to the FTP
client on FTPResponse. The patch is attached. We'll be using it and I hope
that it, or something similar, makes it into the 2.3.1.

I'd also hope that the standard PUT methods in the Zope source would set
the message to something useful. At the moment, we set the message to the
type and value of any exception raised in the PUT method.

Of course, if there's a "better" way to do this, please tell me.


 Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)
 xx


Re: [Zope-dev] ZPatterns goes crazy after ZClass change

2001-02-20 Thread Itai Tavor

Steve Alexander wrote:

>Itai Tavor wrote:
>
>>Hi,
>>
>>I have a Rack which uses ZClass Company for storage. I renamed 
>>Company to CompanyX and created a new Company ZClass, giving it the 
>>same methods, propertysheets and properties as CompanyX. When I 
>>tried to view editInstanceForm_html of an instance of this class, I 
>>got the method stored in CompanyX. So I deleted CompanyX from the 
>>control panel. I still got the CompanyX method. I used the Rack's 
>>Storage tab to select another ZClass. Still got the method from 
>>CompanyX.
>>
>>when I click Remove Orphaned Slots on this Rack, I get:
>>
>>Any ideas how I can fix this without recreating the Rack and all my 
>>persistent data?
>
>Use the Zope Undo mechanism to return your application to the state 
>it was in before you renamed Company to CompanyX.
>
>Either that, or restore from one of your backups.
>
>Check things are working. Now, take another backup.
>
>
>Then, do the same renaming thing as you did before, but ensure that 
>you make the new Company ZClass have the same "Class Id" as the old 
>one had, and that the old Company ZClass (now CompanyX) has a 
>different "Class Id". You can find the "Class Id" field on the Basic 
>tab of a ZClass.
>
>This "Class Id" is how Zope works out what ZClass to use when it 
>comes across a ZClass instance.

Thanks for the advice! I really didn't want to go back to where I 
started and then have to redo all the changes I made to this class... 
but it turns out I didn't have to. I simply copied the class id from 
a backup into the new class, and everything's back to normal now.

I think I've severely misunderstood how Racks work. I thought 
persistent Racks just store properties, and then use the ZClass set 
in the Storage tab to wrap that data when providing it. Which means 
that I can change the class set for storage and all the objects in 
the Rack will be provided as the new class. But if changing the 
storage class doesn't change the object provided by the Rack, it 
means the actual ZClass instance is stored. Is this right?

Thanks again,

Itai
-- 
--
Itai Tavor  -- "Je sautille, donc je suis."--
[EMAIL PROTECTED]--   - Kermit the Frog --
-- --
-- "If you haven't got your health, you haven't got anything"  --


___
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 goes crazy after ZClass change

2001-02-20 Thread Phillip J. Eby

At 10:29 AM 2/21/01 +1100, Itai Tavor wrote:
>
>I think I've severely misunderstood how Racks work. I thought 
>persistent Racks just store properties, and then use the ZClass set 
>in the Storage tab to wrap that data when providing it. Which means 
>that I can change the class set for storage and all the objects in 
>the Rack will be provided as the new class. But if changing the 
>storage class doesn't change the object provided by the Rack, it 
>means the actual ZClass instance is stored. Is this right?

Yes... unless you use a Persistent External Attribute Provider, and set the
"load attribute" so that the rack is virtual.  The "store objects
persistently" option stores the actual ZClass instances.


___
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] DTML Documents/Folders in ZClasses fail to access anything

2001-02-20 Thread Itai Tavor

Hi,

I got a ZClass 'Test', with a DTML Method 'view' containing , and a DTML Document 'view2' with the same line. instance/view 
works. instance/view2 returns (ZDebug output):

Error type: Unauthorized
Error value: The object /test/view2, which is contained in 
/test/view2, is marked as private.

Traceback (innermost last):
   File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 222, in publish_module
   File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 187, in publish
   File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 171, in publish
   File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/mapply.py, 
line 160, in mapply
 (Object: view2)
   File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 112, in call_object
 (Object: view2)
   File /opt/Zope-2.3.0-linux2-x86/lib/python/OFS/DTMLDocument.py, 
line 189, in __call__
 (Object: view2)
   File /opt/Zope/lib/python/Products/ZDebug/DTMLLocator.py, line 103, 
in __call__
 (Object: view2)
   File 
/opt/Zope-2.3.0-linux2-x86/lib/python/DocumentTemplate/DT_String.py, 
line 538, in __call__
 (Object: view2)
   File /opt/Zope/lib/python/Products/ZDebug/DTMLDebug.py, line 259, 
in debug_render_blocks
   File /opt/Zope/lib/python/Products/ZDebug/DTMLDebug.py, line 239, 
in debugException
   File /opt/Zope/lib/python/Products/ZDebug/DTMLDebug.py, line 256, 
in debug_render_blocks
   File /opt/Zope-2.3.0-linux2-x86/lib/python/OFS/DTMLMethod.py, line 
261, in validate
 (Object: view2)
   File 
/opt/Zope-2.3.0-linux2-x86/lib/python/AccessControl/SecurityManager.py, 
line 144, in validate
   File /opt/Zope/lib/python/Products/ZDebug/DebugSecurityPolicy.py, 
line 304, in validate
Unauthorized: (see above)

The same happens if I place a copy of 'view' inside a Folder in the 
ZClass and call instance/folder/view, except that this time the 
Folder is flagged as the 'private' object.

Why? What? Is this a bug? Or is it supposed to work this way and I 
just don't get it? Did I fall behind on my sheep sacrifices? Or was 
it changed to goats and I missed the memo?

Environment: Zope 2.3.0, ZClass subclassing only ZObject, using stock 
acl_users and storing the instance in a standard Folder.
-- 
--
Itai Tavor  -- "Je sautille, donc je suis."--
[EMAIL PROTECTED]--   - Kermit the Frog --
-- --
-- "If you haven't got your health, you haven't got anything"  --


___
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 Lazy Results

2001-02-20 Thread Johan Carlsson

> How many is "a lot" of meta datas?

At least 20-30.
Johan


> Catalog.searchResults(query,schema=('id','title','keywords'))
> > > 
> > > Why is this important? I would suggest not putting
> > big
> > > stuff in the meta-data that might warrant this.
> > Just
> > > use the nifty new (v2.3) getObject method of the
> > brain
> > > to access whatever properties/methods of the
> > actual
> > > object you might need.
> > 
> > If I have allot of MetaDatas and do allot of
> > searches,
> > one for each page hit, I assume it would use up
> > allot of
> > memory and do allot of copying of attributes?
> > I want to use ZCatalog for dynamic linking.
> > 
> > 
> > > > 2. The laziness of the ZCatalog search result
> > means
> > > > it's batched?
> > > Lazy sequences work by not loading the result
> > items in
> > > memory until they are actually accessed.
> > 
> > Ok, suppose I should have known that. Thanks.
> > Johan
> > 
> > 

h¥àÞ¾f¢–X¬µš)x7¯ÎŠ^¢¸!¶ÚþX¬¶Ìè¥ê+ƒùšŠYšŸùb²Ø§~ó¢—zóhrº,²š,¶Ê+3zw(v)àEéZµçeŠËl†Ûiÿùb²Û3¢—¨®æj)fjåŠËbú?Ί^jyèºw†Ûiÿùb²Û3¢—¨®æj)fjåŠËbú?Ί^


[Zope-dev] kill Zserver zombie channels

2001-02-20 Thread Júlio Dinis Silva

Hi,

blatantly taken from ZServer/HTTPServer.py and adultered is this code to 
kill zhttp channels used in zope by way of an external method:

def killzombies():
import ZServer
from ZServer import HTTPServer
from ZServer import medusa
from ZServer.medusa import asyncore
from ZServer.medusa import http_server

for channel in asyncore.socket_map.values():
if channel.__class__ == HTTPServer.zhttp_channel:
channel.close()

return 1

I ignore here the zombie_timeout, Im just killing all channels.
The problem is that I also kill the main python process.
I would apreciate if any zserver/medusa guru can iluminate my mind
on what I'm doing wrong here. In this code I only close
zhttp_channels and not zhttp_server ones, so I dont understand why the
server is also closed.

Thanx for comments,
Júlio Dinis Silva
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


___
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] Zope 2.2.4 Dying

2001-02-20 Thread Dieter Maurer

Andre Schubert writes:
 > my problems are going on :( and i need help.
 > ...
 > 2001-02-19T20:21:07 ERROR(200) zdaemon zdaemon: Mon Feb 19 21:21:07 2001: Aiieee!
 > 20154 exited with error code: 13
This is a SIGPIPE.

Zope probably has opened a communication (socket or pipe) with an
external process (database?) and this process closed unexpectedly
the connection (probably because it died).

 > 2001-02-19T20:21:08 ERROR(200) zdaemon zdaemon: Mon Feb 19 21:21:08 2001: Aiieee!
 > 938 exited with error code: 256
This is an "exit(1)".

Some external component (database adapter?) has called exit with
code 1.


Unfortunately, I can not tell you which component does not work
or even explain why.
At your place, I would try to find log file of external components
and see whether they contain some hints.


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] ZCatalog Lazy Results

2001-02-20 Thread Johan Carlsson

> > 
> > I would rather be able to construct a Brain Schema
> > at search time
> > equivalent to the way theSELECT statement sets up
> > the result attributes
> > in SQL. 
> > Example: 
> > resultset =
> > Catalog.searchResults(query,schema=('id','title','keywords'))
> 
> Why is this important? I would suggest not putting big
> stuff in the meta-data that might warrant this. Just
> use the nifty new (v2.3) getObject method of the brain
> to access whatever properties/methods of the actual
> object you might need.

If I have allot of MetaDatas and do allot of searches,
one for each page hit, I assume it would use up allot of
memory and do allot of copying of attributes?
I want to use ZCatalog for dynamic linking.


> > 2. The laziness of the ZCatalog search result means
> > it's batched?
> Lazy sequences work by not loading the result items in
> memory until they are actually accessed.

Ok, suppose I should have known that. Thanks.
Johan

¢—ƒzùšŠYb²Öh¥àÞ¿:)zŠà†Ûiÿùb²Û3¢—¨®æj)fjåŠËbú?Ί^uëÍ¡Êè²Êh²Û(¬tÌ-éܡا¥jם–+-²m§ÿåŠËlΊ^¢¸?™¨¥™©ÿ–+-Šwèÿ:)y©ç¢éÜzm§ÿåŠËlΊ^¢¸?™¨¥™©ÿ–+-Šwèÿ:)


Re: [Zope-dev] ZCatalog Lazy Results

2001-02-20 Thread Casey Duncan

--- Johan Carlsson <[EMAIL PROTECTED]> wrote:
> Hi,
> I need to check an assumption I have made on the
> ZCatalog Brains and Lazy Results from reading the
> source.
> 
> 1. The Brains gets its schema from the ZCatalog and
> this
> schema is basicly fixed. E.g. a search result
> always has
> the attributes defined by the Meta Data in the
> ZCatalog?

Yes, you always get all the meta-data. However, does
anyone know how the "used" argument of
ZCatalog.searchResults works, or why you would use it?

> 
> I would rather be able to construct a Brain Schema
> at search time
> equivalent to the way theSELECT statement sets up
> the result attributes
> in SQL. 
> Example: 
> resultset =
>
Catalog.searchResults(query,schema=('id','title','keywords'))

Why is this important? I would suggest not putting big
stuff in the meta-data that might warrant this. Just
use the nifty new (v2.3) getObject method of the brain
to access whatever properties/methods of the actual
object you might need.

> 
> 2. The laziness of the ZCatalog search result means
> it's batched?
> 

Lazy sequences work by not loading the result items in
memory until they are actually accessed.

> Regards,
> Johan Carlsson

=
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`->

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

___
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] Product release: ExtFile/ExtImage 1.1.0.beta1

2001-02-20 Thread Gregor Heine

ExtFile/ExtImage Product 1.1.0.beta1 has just been released.
Get it at http://www.zope.org/Members/MacGregor/ExtFile

The new Version comes with many, many internal changes and some new features

which will (hopefully) make ExtFile/ExtImage even more reliable:
- You can set a 'level of undo' which determines in wich cases the external
  file is overwritten/deleted or renamed to '.undo'.
- 'id collision bug' fixed, which caused unreferenced files in the
repository, 
  when an id of a new object already existed (thanks to Fred Yanowski).
  Instead of in the __init__ method, the file data is now passed to the
object 
  after it has been successfully added, via manage_file_upload.
- 'wrong file size bug' fixed, which caused a wrong file size and resolution
  of the image and preview, after a new file was uploaded followed by an
undo
  of this transaction. The filesize and resolution attributes have been 
  replaced by corresponding methods which determine the respective value
  directtly from the file(e.g. width(), height(), prev_size(), ...) 
- Objects can be assigned an alternative id (instead of the filename) by the

  optional 'id' field in the manage_add method of ExtFile and ExtImage.
- Uploaded preview images can be resized during upload (like the generated 
  previews).
- Images can be dynamically resized (thanks to Arno Gross): the index_html 
  method now has two additional parameters ('width' and 'height') which
cause 
  the image to be resized on the fly.
- Documentation updated.

Because the product was rewritten in big parts this release is a beta 
version which might still have some bugs. I haven't had too much time for 
testing, so please report me any bug you find. I hope I will be ableto
publish 
the next stable release within the next two or three weeks.

___
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 Lazy Results

2001-02-20 Thread Johan Carlsson

Hi,
I need to check an assumption I have made on the
ZCatalog Brains and Lazy Results from reading the source.

1. The Brains gets its schema from the ZCatalog and this
schema is basicly fixed. E.g. a search result always has
the attributes defined by the Meta Data in the ZCatalog?

I would rather be able to construct a Brain Schema at search time
equivalent to the way theSELECT statement sets up the result attributes
in SQL. 
Example: 
resultset = Catalog.searchResults(query,schema=('id','title','keywords'))


2. The laziness of the ZCatalog search result means it's batched?

Regards,
Johan Carlsson



torped
johan carlsson
birkagatan 9
113 36 stockholm
[EMAIL PROTECTED]
www.torped.se
voice +46-(0)-8-32 31 23
mobil +46-(0)-70-558 25 24

workshop
västmannagatan 67



___
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: Photo Product Strangeness

2001-02-20 Thread Ron Bickers

I'll take a look at it when I get a chance.  I just moved into my new house
(perhaps you've seen the photos using the Photo product at
bickersfamily.org) and I don't have everything setup yet.  It sounds like it
might be something fairly simple to fix once you know what you're looking
for.

_
Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]

- Original Message -
From: "Michael R. Bernstein" <[EMAIL PROTECTED]>
To: "Ron Bickers" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 10:41 AM
Subject: Re: Photo Product Strangeness


> Ron Bickers wrote:
> >
> > I noticed this behavior a while ago.  The author said he didn't have
time to
> > mess with it and it was a low priority.  I've been able to get the
photos
> > back the way they should be by some combination of saving properties on
the
> > properties screen and other such fumbling around.  I haven't bothered
trying
> > to figure out why it's happening, though.
>
> I found an even more revealing scenario:
>
> When you create a Photo in a folder, alter it's display
> setings, *delete* it, and then create a new Photo in the
> same folder, the new Photo will have the altered display
> settings.
>
> This tells me that the displays persistent atribute (a
> tuple) is being created in the Folder's namespace, not the
> Photo's. but I don't know enough to figure out where in the
> source it's going wrong.
>
> Michael Bernstein.
>


___
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: [Zope] New Python Script Logo?

2001-02-20 Thread Andy Dawkins

[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> Here's take II of the funky logo for python scripts (adapted from the Win32
> Python distribution)
> This one is transaparent where it needs to be...
> 
> enjoy :-)
> 
> Chris

Totally Groovy

Its made its way in to my Zope installation's

-Andy

___
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: Photo Product Strangeness

2001-02-20 Thread Michael R. Bernstein

Ron Bickers wrote:
> 
> I noticed this behavior a while ago.  The author said he didn't have time to
> mess with it and it was a low priority.  I've been able to get the photos
> back the way they should be by some combination of saving properties on the
> properties screen and other such fumbling around.  I haven't bothered trying
> to figure out why it's happening, though.

I found an even more revealing scenario:

When you create a Photo in a folder, alter it's display
setings, *delete* it, and then create a new Photo in the
same folder, the new Photo will have the altered display
settings.

This tells me that the displays persistent atribute (a
tuple) is being created in the Folder's namespace, not the
Photo's. but I don't know enough to figure out where in the
source it's going wrong.

Michael Bernstein.

___
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] Editing DTML Documents

2001-02-20 Thread Martijn Pieters

On Tue, Feb 20, 2001 at 03:54:29PM +0100, Philipp von Weitershausen wrote:
> Hi there,
> 
> Is there an efficient way to use an external editor to edit DTML Documents? 
> Some people in my homepage group are tired of the ZMI and I can understand 
> them, especially because of a lack of syntax highlighting.
> There is the possibility of copy'n'paste and upload again, but that's ugly. I 
> also read that development on the Mozilla-based management tool is not 
> continued. (That's sad, BTW...)
> Could I use WebDAV (don't have any experience with it) to retrieve and save 
> the DTML source? If so, is there a good HTML source code editor (don't want 
> WYSIWYG!) for Windows or Linux supporting WebDAV?
> 
> Any suggestions welcome!

You can use HTMLKit: 

  http://www.chami.com/html-kit
  
It supports FTP better than any other Windows tool I know; it can
optionally open files without an extension inside itself. This is a
god-sent for DTML objects like standard_html_header.

There aren't any WebDAV enabled editors I know of that actually make use
of the added functionality of WebDAV server; they treat it like any other
FTP server. The only exception is Adobe GoLive 5; it uses WebDAV
properties and locking extensively; but you said No WYSIWYG.. :)

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

___
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] Python Scripts Bug & Question

2001-02-20 Thread Chris Withers

Evan Simpson wrote:
> 
> "aimed at"?  This will pass the dictionary as a single positional parameter.
> It won't do anything with bound names or keyword parameters.

Cool, that's what I meant... I just wondered if the way I was calling it might
have had something to do with cotnext not being bound to its correct name.

cheers,

Chris

___
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] Python Scripts Bug & Question

2001-02-20 Thread Evan Simpson

From: Chris Withers <[EMAIL PROTECTED]>
> I'm calling a python script with the context bound to, lets say, 'fred'.
> I call the python script like this:
>
> result = self.aq_acquire(variable_containing_name_of_PS)(a_dictionary)
>
> ...where self is an instance of my python product, and a_dictionary, is,
well, a
> dictionary that's aimed at the specified parameter of the python script.

"aimed at"?  This will pass the dictionary as a single positional parameter.
It won't do anything with bound names or keyword parameters.

Cheers,

Evan @ digicool & 4-am


___
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] Editing DTML Documents

2001-02-20 Thread Philipp von Weitershausen

Hi there,

Is there an efficient way to use an external editor to edit DTML Documents? 
Some people in my homepage group are tired of the ZMI and I can understand 
them, especially because of a lack of syntax highlighting.
There is the possibility of copy'n'paste and upload again, but that's ugly. I 
also read that development on the Mozilla-based management tool is not 
continued. (That's sad, BTW...)
Could I use WebDAV (don't have any experience with it) to retrieve and save 
the DTML source? If so, is there a good HTML source code editor (don't want 
WYSIWYG!) for Windows or Linux supporting WebDAV?

Any suggestions welcome!

Phil

-- 
Philipp von Weitershausen
[ *pronounce: "fun Viters-houzen" ]
 http://www.philikon.de/

___
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: Photo Product Strangeness

2001-02-20 Thread Ron Bickers

I noticed this behavior a while ago.  The author said he didn't have time to
mess with it and it was a low priority.  I've been able to get the photos
back the way they should be by some combination of saving properties on the
properties screen and other such fumbling around.  I haven't bothered trying
to figure out why it's happening, though.

_
Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]

- Original Message -
From: "Michael R. Bernstein" <[EMAIL PROTECTED]>
To: "Ron Bickers" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, February 18, 2001 3:48 PM
Subject: Photo Product Strangeness


> I've been messing around with the Photo product, and I've
> noticed something odd about how it handles changes to the
> display sizes:
>
> When you create several Photo objects in the same folder
> (not in a ZPhotoAlbumPage), they affect each others display
> sizes. For example, changing one of the display sizes in one
> Photo will change the corresponding display in sibling
> Photo.
>
> Can anyone suggest how to fix this?
>
> Michael Bernstein.
>


___
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] Unindex_Object, bug (Again)

2001-02-20 Thread Brian Lloyd

> > > It is already fixed in 2.3 from public CVS.
> >
> > But, ominously, not in the 2.3.1b1 release ;-)
>
> Probably because the fix was checked in *after* the 2.3.1b1 release. Steve
> was pointing out tthat the fix is on the 2.3 branch, which means it will
> be in the next 2.3 series release (likely to be 2.3.1).


Looks like someone fixed this in the trunk but forgot
to merge the fix to the release branch :( It's fixed
for 2.3.1 final.




Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909
Digital Creations  http://www.digicool.com




___
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] Python Scripts Bug & Question

2001-02-20 Thread Evan Simpson

From: Chris Withers <[EMAIL PROTECTED]>
> Cool :-) And even though I pass it in as _, it'll get bound to whatever is
> specified on the bindings tab, right?

Nope.  If you called it "fred" on the bindings tab, pass it as "fred".

Cheers,

Evan @ digicool & 4-am


___
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] Python Scripts Bug & Question

2001-02-20 Thread Chris Withers

Evan Simpson wrote:
> 
> From: Chris Withers <[EMAIL PROTECTED]>
> > Cool :-) And even though I pass it in as _, it'll get bound to whatever is
> > specified on the bindings tab, right?
> 
> Nope.  If you called it "fred" on the bindings tab, pass it as "fred".

rats :-( How hard would it be to make it work like that though?

I wonder if that's not the root of the bug I reported?

I'm calling a python script with the context bound to, lets say, 'fred'. 
I call the python script like this:

result = self.aq_acquire(variable_containing_name_of_PS)(a_dictionary)

...where self is an instance of my python product, and a_dictionary, is, well, a
dictionary that's aimed at the specified parameter of the python script.

HTH,

Chris

___
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] Unindex_Object, bug (Again)

2001-02-20 Thread Martijn Pieters

On Tue, Feb 20, 2001 at 01:38:26PM +, Chris Withers wrote:
> Steve Alexander wrote:
> > 
> > >> Can we please get rid of it this time??
> > >>
> > >> Do I need to submit anything to the collector for this to happen?
> > 
> > It is already fixed in 2.3 from public CVS.
> 
> But, ominously, not in the 2.3.1b1 release ;-)

Probably because the fix was checked in *after* the 2.3.1b1 release. Steve
was pointing out tthat the fix is on the 2.3 branch, which means it will
be in the next 2.3 series release (likely to be 2.3.1).

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

___
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] Python Scripts Bug & Question

2001-02-20 Thread Chris Withers

Evan Simpson wrote:
> 
> From: Chris Withers <[EMAIL PROTECTED]>
> > The Bug:
> >
> > If I use an name other than 'context' to bind to context, I quite often
> (but not
> > always :-S) get a KeyError on that name.
> 
> I'll check this out.  It's in the Collector, right?

It is now ;-)

http://classic.zope.org:8080/Collector/1982/view

> > The Question:
> >
> > If I'm calling a Python Script from a Python Product (for example), how
> would I
> > pass a namespace to the script that would get bound as the namespace
> argument?
> 
> Treat it as a keyword argument.  "Caller's namespace" is the only one of the
> binding names that behaves this way, since the caller has complete control
> over the contents of the namespace anyway.  For example:
> 
> myps(_=ns)

Cool :-) And even though I pass it in as _, it'll get bound to whatever is
specified on the bindings tab, right?

Thanks for the quick reply,

Chris

___
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] Unindex_Object, bug (Again)

2001-02-20 Thread Chris Withers

Steve Alexander wrote:
> 
> >> Can we please get rid of it this time??
> >>
> >> Do I need to submit anything to the collector for this to happen?
> 
> It is already fixed in 2.3 from public CVS.

But, ominously, not in the 2.3.1b1 release ;-)

cheers,

Chris

___
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] Python Scripts Bug & Question

2001-02-20 Thread Evan Simpson

From: Chris Withers <[EMAIL PROTECTED]>
> The Bug:
>
> If I use an name other than 'context' to bind to context, I quite often
(but not
> always :-S) get a KeyError on that name.

I'll check this out.  It's in the Collector, right?

> The Question:
>
> If I'm calling a Python Script from a Python Product (for example), how
would I
> pass a namespace to the script that would get bound as the namespace
argument?

Treat it as a keyword argument.  "Caller's namespace" is the only one of the
binding names that behaves this way, since the caller has complete control
over the contents of the namespace anyway.  For example:

myps(_=ns)

Cheers,

Evan @ digicool & 4-am


___
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] Unindex_Object, bug (Again)

2001-02-20 Thread Steve Alexander

Chris McDonough wrote:

> Andy,
> 
> Eek!!  Please do submit this to the collector again.
> 
> Apologies,
> 
>  - C
> 
> - Original Message -
> From: "Andy Dawkins" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, February 20, 2001 7:18 AM
> Subject: [Zope-dev] Unindex_Object, bug (Again)
> 
> 
> 
>> The bug with zope 2.3.0 that I reported with this mail:
>> 
>> http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/5FE0F6EF4EFF2299
>> 
>> Has made it in to 2.3.1b1
>> 
>> Can we please get rid of it this time??
>> 
>> Do I need to submit anything to the collector for this to happen?

It is already fixed in 2.3 from public CVS.

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



___
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] Unindex_Object, bug (Again)

2001-02-20 Thread Andy Dawkins

Chris McDonough wrote:
> 
> Andy,
> 
> Eek!!  Please do submit this to the collector again.
> 
> Apologies,
> 
>  - C
> 
I have submitted it to the collector with a patch, so there will be no
excuses next time :)

-Andy

___
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] Unindex_Object, bug (Again)

2001-02-20 Thread Chris McDonough

Andy,

Eek!!  Please do submit this to the collector again.

Apologies,

 - C

- Original Message -
From: "Andy Dawkins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 7:18 AM
Subject: [Zope-dev] Unindex_Object, bug (Again)


> The bug with zope 2.3.0 that I reported with this mail:
>
> http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/5FE0F6EF4EFF2299
>
> Has made it in to 2.3.1b1
>
> Can we please get rid of it this time??
>
> Do I need to submit anything to the collector for this to happen?
>
> -Andy
>
> ___
> 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 )



[Zope-dev] Unindex_Object, bug (Again)

2001-02-20 Thread Andy Dawkins

The bug with zope 2.3.0 that I reported with this mail:

http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/5FE0F6EF4EFF2299

Has made it in to 2.3.1b1

Can we please get rid of it this time??

Do I need to submit anything to the collector for this to happen?

-Andy

___
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] Python Scripts Bug & Question

2001-02-20 Thread Chris Withers

Hi,

Got a bug and an old unanswered question:

The Bug:

If I use an name other than 'context' to bind to context, I quite often (but not
always :-S) get a KeyError on that name.

The Question:

If I'm calling a Python Script from a Python Product (for example), how would I
pass a namespace to the script that would get bound as the namespace argument?

cheers,

Chris

___
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] Zope 2.3.1b1 bug? (:tokens)

2001-02-20 Thread Steve Alexander

Erik Enge wrote:

> Hiya.
> 
> variable:tokens
> 
> is a bit fubar.  If I raise it on the next page it says stuff like 
> 
>   ['item', 'item1', 'item', 'item']
> 
> ie. it repeats some of the items in variable for no apparent
> reason (variable contains only 'item' and 'item1').  Also, if I do:
> 
>   ">
> 
> and raise variable2 on the "next page" it says:
> 
>   ['item', ['item1']]

> Is it just my installation?  Zope 2.3.1b1 on Linux 2.4.1 with python
> 1.5.2.  If need be I can do a thorougher report and possibly a patch, but
> not till later this week I'm afraid.

I just tried to reproduce this with 2.3 from CVS.
Here's the DTML Method I used:




  
  
">
  
  



It all works as I expect; no problems.

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


___
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] Zope 2.3.1b1 bug? (:tokens)

2001-02-20 Thread Erik Enge

Hiya.

variable:tokens

is a bit fubar.  If I raise it on the next page it says stuff like 

['item', 'item1', 'item', 'item']

ie. it repeats some of the items in variable for no apparent
reason (variable contains only 'item' and 'item1').  Also, if I do:

  ">

and raise variable2 on the "next page" it says:

['item', ['item1']]

Is it just my installation?  Zope 2.3.1b1 on Linux 2.4.1 with python
1.5.2.  If need be I can do a thorougher report and possibly a patch, but
not till later this week I'm afraid.


___
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 goes crazy after ZClass change

2001-02-20 Thread Steve Alexander

Itai Tavor wrote:

> Hi,
> 
> I have a Rack which uses ZClass Company for storage. I renamed Company 
> to CompanyX and created a new Company ZClass, giving it the same 
> methods, propertysheets and properties as CompanyX. When I tried to view 
> editInstanceForm_html of an instance of this class, I got the method 
> stored in CompanyX. So I deleted CompanyX from the control panel. I 
> still got the CompanyX method. I used the Rack's Storage tab to select 
> another ZClass. Still got the method from CompanyX.
> 
> when I click Remove Orphaned Slots on this Rack, I get:
> 
> Any ideas how I can fix this without recreating the Rack and all my 
> persistent data?

Use the Zope Undo mechanism to return your application to the state it 
was in before you renamed Company to CompanyX.

Either that, or restore from one of your backups.

Check things are working. Now, take another backup.


Then, do the same renaming thing as you did before, but ensure that you 
make the new Company ZClass have the same "Class Id" as the old one had, 
and that the old Company ZClass (now CompanyX) has a different "Class 
Id". You can find the "Class Id" field on the Basic tab of a ZClass.

This "Class Id" is how Zope works out what ZClass to use when it comes 
across a ZClass instance.

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


___
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] Python Product as DataSkin

2001-02-20 Thread Steve Alexander

Michael R. Bernstein wrote:
 >

>> In Zope 2.3) it is aliased to Globals.InitializeClass.
>  
> So, if I'm developing this on 2.2, I need to use
> Globals.default__class_init__(FooClass) instead of
> Globals.InitializeClass(FooClass)?

Yes. At least, using default__class_init__ will work on Zope 2.2 and 2.3.
I don't know whether InitializeClass is in Zope 2.2, but it is definitely in Zope 2.3.
  
>> Use it by having
>> 
>>   import Globals
>> 
>> somewhere in your class definition,
> 
> If 'import Globals' appears at the start of the FooClass.py
> file, does it still need to appear in the class definition
> itself?

Sorry -- my imprecise language!
"import Globals" needs to be in the .py file that your
class is defined in, at the module level of indentation.
You're importing Globals so that you can use it in the 
module rather than in the Class definition.


>>   Globals.InitializeClass(YourClassName)
>> 
>> at the end.
> 
> 
> At the end on the file, or the end of the class definition?

After the class definition, so, qiute probably at the end of the file.

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


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