[Zope-dev] Adding and setting properties from a virtual Specialist

2000-12-13 Thread Itai Tavor

Hi,

I have a Specialist ('OrderingEntities') which creates virtual 
objects, mapped to existing objects (using ZClass 'Employee') in 
another Specialist ('Employees'). I want OrderingEntities to add and 
modify a property 'current_order_id' on the Employee objects. I can 
get the virtual object to access properties from the real object, but 
I can't figure out how to implement the property add/change.

To make things simpler, I added the property current_order_id to the 
Employee class, so I can test just modifying this property, leaving 
creating it for later.

OrderingEntities has an employeeRack, set to use the Employee class 
and to load by accessing attribute current_order_id. The Rack has 
this SkinScript:

 WITH Employees.getItem(self.id) COMPUTE
 original_object=RESULT or NOT_FOUND

 WITH self.original_object COMPUTE
 current_order_id

 WHEN OBJECT ADDED,CHANGED STORE current_order_id USING
 
self.original_object.manage_changeProperties(current_order_id=self.current_order_id)

Doing dtml-var 
"OrderingEntities.getItem(some_id).current_order_id)" shows me the 
value of current_order_id of the Employee object some_id. But I can't 
figure out how to change the property so it get changed in the 
Employee object. dtml-call 
"OrderingEntities.getItem(some_id).manage_changeProperties(current_order_id='123')" 
does nothing, it doesn't even trigger the WHEN OBJECT CHANGED line 
(not that I really expected it to work... this object is virtual, how 
can I call changeProperties on it?)

Other than figuring out how to get the change to work, I two more problems:

-Eventually the OrderingEntities Specialist will have several Racks 
mapping to several other Specialists, so it will end up returning 
different classes. Should I instead create a new ZClass with just the 
current_order_id property and use this class in all the virtual Racks?

- How do I add a property to the original object from the virtual 
object (assuming I did not add it manually to the Employee class)? Do 
I call self.original_object.manage_addProperty(...) from the 
SkinScript?

TIA
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[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] Validation

2000-12-13 Thread Chris Withers

Brad Clements wrote:
 
 I keep making this patch to each Zope release, but would like to talk
 about a more permanant and "correct" solution. What do others think?

Validation as a whole could do with looking at, it's be great if there
were hooks to catch validation problems rather than just raising
exceptions...

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 )




[Zope-dev] Re: [Zope] ANNOUNCE: Zope 2.3.0 alpha 1 released...

2000-12-13 Thread Lalo Martins

Found a bug, I think... when I try to add a property to a
PropertyManager (but not a PropertySheet?) I get:

Error Type: ImportError
Error Value: cannot import name checkValidId

Traceback (innermost last):
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /opt/Zope-2.3.0a1-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
(Object: Traversable)
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: manage_addProperty)
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: manage_addProperty)
  File /opt/Zope-2.3.0a1-src/lib/python/OFS/PropertyManager.py,
line 318, in manage_addProperty
(Object: Traversable)
  File /opt/Zope-2.3.0a1-src/lib/python/OFS/PropertyManager.py,
line 247, in _setProperty
(Object: Traversable)
ImportError: (see above)


[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar


___
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: [Zope] ANNOUNCE: Zope 2.3.0 alpha 1 released...

2000-12-13 Thread Brian Lloyd

 Found a bug, I think... when I try to add a property to a
 PropertyManager (but not a PropertySheet?) I get:
 
 Error Type: ImportError
 Error Value: cannot import name checkValidId

Thanks - the fix should be checked in shortly...


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 )




[Zope-dev] python 2.0, windows and zope

2000-12-13 Thread Andy McKay

Has anyone got python 2.0 working with Zope on windows? Just curious if
anyone has any pointers before I start done this (potentially) painful
path...

--
  Andy McKay, Developer.
  ActiveState.


___
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 2.0, windows and zope

2000-12-13 Thread Josh Zeidner


Ive successfully installed the latest version of zope on windows and have it
running my website.  http://www.brooklynmedialabs.com .  Its actually easier
than running it on linux!

 -josh



Has anyone got python 2.0 working with Zope on windows? Just curious if
anyone has any pointers before I start done this (potentially) painful
path...

--
  Andy McKay, Developer.
  ActiveState.


___
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] python 2.0, windows and zope

2000-12-13 Thread Andy McKay

using python 2.0 and not the default python installation?
--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Josh Zeidner" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 9:18 AM
Subject: RE: [Zope-dev] python 2.0, windows and zope



 Ive successfully installed the latest version of zope on windows and have
it
 running my website.  http://www.brooklynmedialabs.com .  Its actually
easier
 than running it on linux!

  -josh



 Has anyone got python 2.0 working with Zope on windows? Just curious if
 anyone has any pointers before I start done this (potentially) painful
 path...

 --
   Andy McKay, Developer.
   ActiveState.


 ___
 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 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: persistant objects hold DataSkin-Items - KeyError: _v_dm_

2000-12-13 Thread Ulrich Eck

after one more day of source-code-reading i got that far:

When I want to use a Folder /w Customizer (FwCS) I cannot/don't need to use
Specialists.

i create a FwCS and put my 'Framework' in it.
if i want to access (get/new) an object handled by a customizer
i can ask FwCS._getDataManagerFor(client,default) for my datamanager (DM)

Do I need to implement methods like
createItem/retrieveItem/_v_itemConstructor as well
or how do i "get" my objects ??

If I have an object whose metatype is handled via
customizer/skinscript/sqlmethod it'll
probably work managing attributes ..

I'm searching for something that handles a newItem(meta_type,key) function
that is provided
from the FwCS who decides which object-type is created and gets those
attributes from the customizer

did I get this right so far ??

is there an example those newItem(meta_type,key) -
getItem(meta_type,key) ??


thanks
Ulrich Eck

 
 a) tell my TransactionManager that my attribute "ds_object" is not
pickeable
 (e.g. call it  _v_ds_object)
  and how to know if zope is restarted ?!?!?
 or
 b) store this object persistantly in my TO without showing it in the
 folder-structure but behave like a DSO
  set/get attributes through Skinscripts

 Yes.  Use a Folder w/Customization Support above your transactions.  When
 you access TO.ds_object, the DataSkin will search for a DataManager and
 find one in the FwCS, assuming you've configured one.

 Note that this is mutually exlcusive to using Specialists to store the
 DataSkins.  In the FwCS approach, you configure Customizers for each
 meta_type of objects you'll be dealing with.  You can then give them
 SkinScript, etc. to configure behaviors.  Also, this approach requires use
 of the ZODB to store at least the "shell" (class reference and ID) of each
 DataSkin.  But since your application is ZODB-dependent already, this is
 not an issue.

 Personally, I'd suggest that if you want to take advantage of ZPatterns'
 database independence, you should instead restructure your app so that
your
 TO's are themselves DataSkins, stored in a Specialist.  Right now, you
have
 a very heavy dependence on the ZODB.



___
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: persistant objects hold DataSkin-Items - KeyError: _v_dm_

2000-12-13 Thread Phillip J. Eby

At 06:31 PM 12/13/00 +0100, Ulrich Eck wrote:
after one more day of source-code-reading i got that far:

When I want to use a Folder /w Customizer (FwCS) I cannot/don't need to use
Specialists.

Not to store your objects, no.  You can still use Specialists to
concentrate search methods, constructors, UI snippets, and the like.
Typically, in that configuration some of your Specialists may contain (or
be) ZCatalogs which index selected objects from your FwCS hierarchy.


i create a FwCS and put my 'Framework' in it.
if i want to access (get/new) an object handled by a customizer
i can ask FwCS._getDataManagerFor(client,default) for my datamanager (DM)

Not necessary.  If you retrieve your DataSkin as an attribute of its
container, the DataSkin __of__ method will automatically find and bind the
DataManager (assuming you're not using some class that overrides __of__).


Do I need to implement methods like
createItem/retrieveItem/_v_itemConstructor as well
or how do i "get" my objects ??

Just retrieve the objects from their containers in the normal Zope way.
Ditto for creation - use the standard way of constructing objects in an
ObjectManager.


If I have an object whose metatype is handled via
customizer/skinscript/sqlmethod it'll
probably work managing attributes ..

Yes, it should.  Likewise triggers, if you want to set up cataloging triggers.


I'm searching for something that handles a newItem(meta_type,key) function
that is provided
from the FwCS who decides which object-type is created and gets those
attributes from the customizer

Just use the normal Zope "add list" to create one manually, or call the
appropriate constructors (e.g. SomeZClass.createInObjectManager()).


is there an example those newItem(meta_type,key) -
getItem(meta_type,key) ??

You want examples?  You forget, this is ZPatterns.  ;)  Seriously, look for
examples of how to create an object by meta_type in a Zope ObjectManager.


___
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] ZClass registry repair utility

2000-12-13 Thread Shane Hathaway

I've written a utility you can use to clean up the global registry of
ZClasses.  The registry can become corrupt through product upgrades--not
ZODB corruption, but missing base classes and so forth.  This utility
recreates the registry.

http://www.zope.org/Members/hathawsh/ZGlobalsRepair

It's probably a good idea to run it after a major Zope upgrade.

Shane

___
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 2.0, windows and zope

2000-12-13 Thread Andy McKay

Waffling on to my own posts... but it would seem I have to build Zope from
source to get it to use another version of python since the use of
python15.dll is entrenched in Zope... All the install scripts seem to be
based on unix.

Can DC give me a hand here on pointers to how they build it for Windows?

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Andy McKay" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 9:21 AM
Subject: Re: [Zope-dev] python 2.0, windows and zope


 using python 2.0 and not the default python installation?
 --
   Andy McKay, Developer.
   ActiveState.

 - Original Message -
 From: "Josh Zeidner" [EMAIL PROTECTED]
 To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2000 9:18 AM
 Subject: RE: [Zope-dev] python 2.0, windows and zope


 
  Ive successfully installed the latest version of zope on windows and
have
 it
  running my website.  http://www.brooklynmedialabs.com .  Its actually
 easier
  than running it on linux!
 
   -josh
 
 
 
  Has anyone got python 2.0 working with Zope on windows? Just curious if
  anyone has any pointers before I start done this (potentially) painful
  path...
 
  --
Andy McKay, Developer.
ActiveState.
 
 
  ___
  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 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] Adding and setting properties from a virtual Specialist

2000-12-13 Thread Steve Spicklemire


Hi Itai,

 "Itai" == Itai Tavor [EMAIL PROTECTED] writes:

Itai "OrderingEntities.getItem(some_id).current_order_id)" shows
Itai me the value of current_order_id of the Employee object
Itai some_id. But I can't figure out how to change the property
Itai so it get changed in the Employee object. dtml-call
Itai 
"OrderingEntities.getItem(some_id).manage_changeProperties(current_order_id='123')"
Itai does nothing, it doesn't even trigger the WHEN OBJECT
Itai CHANGED line (not that I really expected it to work... this
Itai object is virtual, how can I call changeProperties on it?)

How about 
'OrderingEntities.getItem(some_id).propertysheets.TheRightPropertysheet.manage_changeProperties()

or you could create an external method to set the property you want... 

YourExternalMethod( OrderingEntities.getItem(some_id), theValue)

where

def YourExternalMethod( theObject, theValue):
setattr(theObject, 'current_order_id', theValue)

I think these could/should work...

Itai Other than figuring out how to get the change to work, I two
Itai more problems:

Itai -Eventually the OrderingEntities Specialist will have
Itai several Racks mapping to several other Specialists, so it
Itai will end up returning different classes. Should I instead
Itai create a new ZClass with just the current_order_id property
Itai and use this class in all the virtual Racks?

This is what I do in most cases... each rack has different SkinScript
to map the attributes of different classes onto the common attribute
set of the single Storage class used by all the racks.

Itai - How do I add a property to the original object from the
Itai virtual object (assuming I did not add it manually to the
Itai Employee class)? Do I call
Itai self.original_object.manage_addProperty(...) from the
Itai SkinScript?

I think this should work  but it will only add the propertysheet
to the instance.. not the class. If the property is completely missing
from the original class then it seems to me either there is really no
real need to save it there... or the class was incomplete somehow to
begin with... and it should be added at the ZClass level..

Just random thoughts... 

;-)

-steve


Itai TIA -- Itai Tavor "Je sautille, donc je suis."  C3Works
Itai [EMAIL PROTECTED] - Kermit the Frog

Itai "If you haven't got your health, you haven't got anything"


Itai ___ Zope-Dev
Itai maillist - [EMAIL PROTECTED]
Itai http://lists.zope.org/mailman/listinfo/zope-dev ** No cross
Itai posts or HTML encoding!  ** (Related lists -
Itai http://lists.zope.org/mailman/listinfo/zope-announce
Itai 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] zPoPyDA and DB Transactions

2000-12-13 Thread Casey Duncan

I had been using Postgres with the zPyGreSQLDA and recently switched to
zPoPyDA for a new project. I noticed that zPoPyDA does not seem to
implicitly wrap each zSQL method in a database transaction as
zPyGreSQLDA did.

Reading the code for zPoPyDA seems to confirm this. Is this behavior by
design or a bug or am I missing something? 

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

___
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 2.0, windows and zope

2000-12-13 Thread Brian Lloyd

 Waffling on to my own posts... but it would seem I have to build Zope from
 source to get it to use another version of python since the use of
 python15.dll is entrenched in Zope... All the install scripts seem to be
 based on unix.
 
 Can DC give me a hand here on pointers to how they build it for Windows?

Hi Andy - 

We have a little python script that creates NMAKE compatible 
makefiles out of the Setup files. I've attached it + the .bat 
file we use to run it. Hope this helps!


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





'''Build t Python extension using Visual C++ 40

This script generates and runs a series of .mak and .def
files for extensions defined in a Setup file.

Note that you must have set up your environment to run VC command-line
ustilities.  This can be done by running the vcvar32.bat file in the
VC++ bin directory.

Usage: python ext.py [options]

Options:

   -r Run nmake to build release version
   -d Run nmake to build debug version
   -c If used with -r or -d, runs nmake on clean target.
   -p Specify location of Python source tree.  Default
  is ..\.. (assuming you are in Extensions/some_name)

The script reads a file named "Setup" in the current directory.  The
Setup file has lines that describe the contents of an extension.
Here\'s an example:

  ExtensionClass ExtensionClass.c
  Acquisition Acquisition.c

Note that I\'ve intented for readability.  The Setup file shouldn\'t
be indented.  Basically, the first token on the line is the module
name, and the second token on the line is the sorce file. Additional
source files and include directories may be included as well, as in:

  pyexpat pyexpat.c -DXML_NS -Iexpat/xmlparse -Iexpat/xmltok expat/xmlparse/xmlparse.c 
expat/xmlparse/hashtable.c expat/xmltok/xmlrole.c expat/xmltok/xmltok.c


''' # '

import sys, getopt, os, string, regex

def die(m):
print m
print
print __doc__
sys.exit(1)

def setup():

poptlist,pargs=getopt.getopt(sys.argv[1:],'p:drcI:o:h')
if opt(poptlist,'h'): print __doc__
if poptlist==[('-h','')]: sys.exit(0)

pargs and die('Unrecognized arguments: %s', string.join(args))

ext_regex = regex.compile('\([a-z][a-z0-9_]*\)[ \t]'
  '\([.a-z][./a-z0-9_]*[.]c\)[ \t\n]',
  regex.casefold)

for line in open('Setup').readlines():

if ext_regex.match(line) = 0:
sargs=string.split(line)
module=sargs[0]
src=sargs[1]
if src[:2]=='./': continue
soptlist, sargs = getopt.getopt(sargs[2:],'I:D:')

filter(lambda a: a[:1]=='-' or string.find(a,'.')  0,
   sargs) and die('Invalid arguments in Setup file: %s' %
  string.join(sargs))

sargs=map(lambda a: string.replace(a, '/','\\'), sargs)
simple(module,poptlist+soptlist, sargs)


main=setup

def filebase(o,
 splitext=os.path.splitext,
 split=os.path.split):
return splitext(split(o)[1])[0]



def simple(module,optlist,others):
tdef,tmak=templates()

pyhome=opt(optlist,'p')
pyhome=pyhome and pyhome[0] or '..\\..'
cfg=opt(optlist,'d') and 'Debug' or 'Release'
parms={'module': module, 'pyhome':pyhome, 'cfg': cfg}
parms['includes']=string.join(
map(lambda i: '/I "%s"' % i,
opt(optlist,'I')) +
map(lambda i: '/D "%s"' % i,
opt(optlist,'D'))
, ' ') 
parms['other_clean_release']=string.join(
map(lambda o:
'\n\t-@erase ".\\Release\\%s.obj"' % filebase(o),
others),'')
parms['other_clean_debug']=string.join(
map(lambda o:
'\n\t-@erase ".\\Debug\\%s.obj"' % filebase(o),
others),'')
parms['other_rule']=string.join(
map(lambda o:
'"$(INTDIR)\%s.obj" : .\%s $(DEP_CPP_MOD) "$(INTDIR)"\n'
'\t$(CPP) $(CPP_PROJ)  .\%s '
% (filebase(o), o, o),
others),'\n')
parms['other_link']=string.join(
map(lambda o:
'\n\t"$(INTDIR)\%s.obj" \\' % filebase(o),
others),'')

open(module+'.def','w').write(tdef % parms)
open(module+'.mak','w').write(tmak % parms)
cfg_=' CFG="%s - Win32 %s"' % (module,cfg)
os.system('nmake /nologo /f %s.mak%s' % (module,cfg_))
os.system('copy %s\%s.dll %s.pyd' % (cfg,module,module))
if opt(optlist,'c'):
os.system("nmake /f %s.mak%s CLEAN" % (module,cfg_))



def opt(optlist,name):
l=filter(lambda t, name='-'+name: t[0]==name, optlist)
return map(lambda t: t[1], l)

def templates():
tdef = '''EXPORTS
init%(module)s
'''

tmak = '''# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Dynamic-Link Library" 

Re: [Zope-dev] python 2.0, windows and zope

2000-12-13 Thread Andy McKay

I think thats just the fella I need! Thanks...
Will let you know progress
--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Brian Lloyd" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 11:14 AM
Subject: RE: [Zope-dev] python 2.0, windows and zope


  Waffling on to my own posts... but it would seem I have to build Zope
from
  source to get it to use another version of python since the use of
  python15.dll is entrenched in Zope... All the install scripts seem to be
  based on unix.
 
  Can DC give me a hand here on pointers to how they build it for Windows?

 Hi Andy -

 We have a little python script that creates NMAKE compatible
 makefiles out of the Setup files. I've attached it + the .bat
 file we use to run it. Hope this helps!


 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 )




[Zope-dev] Announcing ZODB-Corba code release

2000-12-13 Thread John D. Heintz

Here is the first release of code that exposes a ZODB database through
CORBA (omniORB).

The code is functioning, the docs are sparse, and it should work on your
machines.  ;-)

I am only going to be in town for the next two days, then I will be
unavailable until Jan 1.

See http://www.zope.org/Members/jheintz/ZODB_CORBA_Connection to
download the code.

It's not perfect, but it works for me.

Enjoy,
John


-- 
.. . . . . . . . . . . . . . . . . . . . . . . .

John D. Heintz | Senior Engineer

1016 La Posada Dr. | Suite 240 | Austin TX 78752
T 512.633.1198 | [EMAIL PROTECTED]

w w w . d a t a c h a n n e l . c o m


___
Bug reports, feature requests, etc. go in the ZEO Tracker:
http://www.zope.org/Products/ZEO/Tracker

Conversations etc. can take place in the Wiki:
http://www.zope.org/Products/ZEO/Wiki

Zope-ZEO maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-zeo





___
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] Adding and setting properties from a virtualSpecialist

2000-12-13 Thread Itai Tavor

Steve Spicklemire wrote:

Hi Itai,

  "Itai" == Itai Tavor [EMAIL PROTECTED] writes:

 Itai "OrderingEntities.getItem(some_id).current_order_id)" shows
 Itai me the value of current_order_id of the Employee object
 Itai some_id. But I can't figure out how to change the property
 Itai so it get changed in the Employee object. dtml-call
 Itai 
"OrderingEntities.getItem(some_id).manage_changeProperties(current_order_id='123')"
 Itai does nothing, it doesn't even trigger the WHEN OBJECT
 Itai CHANGED line (not that I really expected it to work... this
 Itai object is virtual, how can I call changeProperties on it?)

How about 
'OrderingEntities.getItem(some_id).propertysheets.TheRightPropertysheet.manage_changeProperties()

Gr now I'm really annoyed. Why didn't I try that? So obvious. Thanks.


 Itai Other than figuring out how to get the change to work, I two
 Itai more problems:

 Itai -Eventually the OrderingEntities Specialist will have
 Itai several Racks mapping to several other Specialists, so it
 Itai will end up returning different classes. Should I instead
 Itai create a new ZClass with just the current_order_id property
 Itai and use this class in all the virtual Racks?

This is what I do in most cases... each rack has different SkinScript
to map the attributes of different classes onto the common attribute
set of the single Storage class used by all the racks.

Sounds like a good plan, think I'll adopt it.


 Itai - How do I add a property to the original object from the
 Itai virtual object (assuming I did not add it manually to the
 Itai Employee class)? Do I call
 Itai self.original_object.manage_addProperty(...) from the
 Itai SkinScript?

I think this should work  but it will only add the propertysheet
to the instance.. not the class. If the property is completely missing
from the original class then it seems to me either there is really no
real need to save it there... or the class was incomplete somehow to
begin with... and it should be added at the ZClass level..

Say I got several Participants, and some of those need to be able to 
place orders. I create the Specialist OrderingEntities to implement 
the role of 'someone who places orders'. From what I understand about 
using Specialists to extend a class behavior, this Specialist should 
add the properties it needs to track orders with to the Participant 
classes - I should not have to go in to every Participant class and 
add the property to it, because those classes don't know and don't 
care that they might be used in this role. Am I wrong in this? 
Otherwise, the only other way to track properties for this role would 
be to physically store a new object on the OrderingEntities Rack for 
every Participant class accessed, but what's the point in that, if I 
can simply add the property to the original class?


Making small steps up the ZPatterns mountain (and too many of them backwards),

Itai
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[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] Adding and setting properties from a virtualSpecialist

2000-12-13 Thread Steve Spicklemire


Hi Itai,

 "Itai" == Itai Tavor [EMAIL PROTECTED] writes:

Itai Say I got several Participants, and some of those need to be
Itai able to place orders. I create the Specialist
Itai OrderingEntities to implement the role of 'someone who
Itai places orders'. From what I understand about using
Itai Specialists to extend a class behavior, this Specialist
Itai should add the properties it needs to track orders with to
Itai the Participant classes - I should not have to go in to
Itai every Participant class and add the property to it, because
Itai those classes don't know and don't care that they might be
Itai used in this role. Am I wrong in this?  Otherwise, the only
Itai other way to track properties for this role would be to
Itai physically store a new object on the OrderingEntities Rack
Itai for every Participant class accessed, but what's the point
Itai in that, if I can simply add the property to the original
Itai class?

No.. you're right here. I've never used property sheets in this way,
just because it's seemed too much trouble to check for existence, then
add if necessary... etc. If I need to have a property set in an
instance... I just set it, using an external method. (Or I add it at
the ZClass level.) It's important to be careful though... if there is
already a property with that name there could be a clash. 
Obviously application integration needs to be done with full
awareness of the different attributes used by each component.

Itai Making small steps up the ZPatterns mountain (and too many
Itai of them backwards),

Yup.. me too. ;-) But it's better than sticks and bones..

take care,
-steve

Itai Itai -- Itai Tavor "Je sautille, donc je suis."  C3Works
Itai [EMAIL PROTECTED] - Kermit the Frog

Itai "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] Validation

2000-12-13 Thread Michael Bernstein

Chris Withers wrote:
 
 Brad Clements wrote:
 
  I keep making this patch to each Zope release, but would like to talk
  about a more permanant and "correct" solution. What do others think?
 
 Validation as a whole could do with looking at, it's be great if there
 were hooks to catch validation problems rather than just raising
 exceptions...

 Along with the TTW ability to define new variable types to
be validated (and their validation methods), such as :email,
:12hTime, :24hTime, :URL, :fqURL (fully qualified URL), and
others.

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] ZPatterns: persistant objects hold DataSkin-Items - KeyError: _v_dm_

2000-12-13 Thread weblabs


 Not necessary.  If you retrieve your DataSkin as an attribute of its
 container, the DataSkin __of__ method will automatically find and bind the
 DataManager (assuming you're not using some class that overrides __of__).


ok i've gone all through the source searching for a method
to get an object of a meta-type with key ...

when I call FwCS.getOb(id) then i get back an object with ??meta-type??
if I have different Customizers all serving one meta-type ???

example:
I Have a Customizer for an EventClass and another for LocationClass

they're both stored in an database using an unique int as PrimaryKey

when i call getOb(1) how should my FwCS know which one it should
give back ??

 Just retrieve the objects from their containers in the normal Zope way.
 Ditto for creation - use the standard way of constructing objects in an
 ObjectManager.
 Just use the normal Zope "add list" to create one manually, or call the
 appropriate constructors (e.g. SomeZClass.createInObjectManager()).


Yes, if i create an object and call FwCS._setObject(id,ob) the FwCS can
choose the right place to store the object
e.g. if properly configured using a Customizer with SSMethod


 is there an example those newItem(meta_type,key) -
 getItem(meta_type,key) ??

 You want examples?  You forget, this is ZPatterns.  ;)  Seriously, look
for
 examples of how to create an object by meta_type in a Zope ObjectManager.


just the one snippet of code which how to serve the problem i described ..

thanks again for your appropriate help

Ulrich Eck


___
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] multiple selects are not allowed

2000-12-13 Thread Diny van Gool

Hi,

I want to execute multiple SQL statements in one SQL-Method. In the
mailinglist archives i found the answer but when i try it i get an error:

Error, exceptions.ValueError: multiple selects are not allowed

I used a simple Z SQL Method query (Zope 2.2.2) just to try:

select *
from GENEESM_DIER

dtml-var sql_delimiter

select *
from TOED_WIJZE

What am i doing wrong?

Diny


DIVA, Faculty of Veterinary Medicine
Utrecht University,  The Netherlands
http://www.vet.uu.nl 

___
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] Python Scripts and Versioning

2000-12-13 Thread Chris Withers

Michel Pelletier wrote:
 
 See, people used to post helpful little things like this in DTML.  What a
 nightmare.  Python Scripts rock!  We're gonna be seein' alot more of them
 fly by on the list once people get over the initial shock that they can do
 90% of what they've been doing in Python.

Yay! :-)

Now all Zope needs is a concurrent versioning system with an 'archive to
CVS' option for folders and there won't be a need for python products
;-)

cheers,

Chris

___
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] SiteAccess, SSL + SiteRootBASE

2000-12-13 Thread Chris Withers

emf wrote:
 
 I do this in the access rule.
 
 dtml-if "condition"
 dtml-call "REQUEST.set('SiteRootBASE','some-value')"
 /dtml-if

Shouldn't that access rule be a Python Script:

if condition:
REQUEST.set('SiteRootBASE','some-value')

*grinz*

Chris

___
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: Zope 2.3.0 alpha 1 released...

2000-12-13 Thread Chris Withers

Michel Pelletier wrote:
 
 On Tue, 12 Dec 2000, Chris Withers wrote:
 
 That being said, perhaps you can be the first person to get it to work
 using the various free ports of gcc to windows.

There a how-to on compiling with gcc anywhere?

cheers,

Chris

___
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] Dreamweaver and WebDav

2000-12-13 Thread Hans de Wit

Is anybody using the combination Dreamweaver 4 WebDAV Zope already?
A connection was easy to make. At the moment i want to put or get something "access to 
the desired resource is denied by the server". I checked my password, i have the 
correct 
rights, and it is working more or less fine on ftp. (i can not change a file name on 
the host: an ftp error occured, cannot rename hihi.htm to haha.htm. 500 RNFR command 
not 
understood)


Met vriendelijke groeten,

Hans de Wit

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




[Zope] Gopher from Zope

2000-12-13 Thread Dario Lopez-Kästen

I wanna serve gopher:// from Zope :-)

Is it possible?  Don't need answers like "but gopher is old, ugly, etc", "we
will loose all fomatting, etc", etc.

Thanks,

/dario :))

read all about it:
gopher://gopher.heatdeath.org/00/the%20gopher%20manifesto.txt

- 
Dario Lopez-Kästen Systems Developer  Chalmers Univ. of Technology
[EMAIL PROTECTED]  ICQ will yield no hitsIT Systems  Services


___
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] Gopher from Zope

2000-12-13 Thread Oleg Broytmann

On Wed, 13 Dec 2000, Dario Lopez-Kästen wrote:
 I wanna serve gopher:// from Zope :-)

 Is it possible?

   It is possible, but no so simple. How would you map gopher menues to
Zope objects?

   On the positive side - thanks Zope for your component-based
architecture. You just need to write GopherServer.py; see HTTPServer.py,
PCGIServer.py in ZServer subdirectory.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] multiple selects are not allowed

2000-12-13 Thread Jose Soares

from ZSQL Methods User's Guide, last row on pag. 22:

"Note that no more than one SQL select statement may be used in a single SQL
Database Method."



Diny van Gool wrote:

 Hi,

 I want to execute multiple SQL statements in one SQL-Method. In the
 mailinglist archives i found the answer but when i try it i get an error:

 Error, exceptions.ValueError: multiple selects are not allowed

 I used a simple Z SQL Method query (Zope 2.2.2) just to try:

 select *
 from GENEESM_DIER

 dtml-var sql_delimiter

 select *
 from TOED_WIJZE

 What am i doing wrong?

 Diny

 DIVA, Faculty of Veterinary Medicine
 Utrecht University,  The Netherlands
 http://www.vet.uu.nl

 ___
 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] multiple selects are not allowed

2000-12-13 Thread Dario Lopez-Kästen


- Original Message -
From: "Jose Soares" [EMAIL PROTECTED]
Subject: Re: [Zope] multiple selects are not allowed


 from ZSQL Methods User's Guide, last row on pag. 22:

 "Note that no more than one SQL select statement may be used in a single
SQL
 Database Method."

 Diny van Gool wrote:

  Hi,
 
  I want to execute multiple SQL statements in one SQL-Method. In the
  mailinglist archives i found the answer but when i try it i get an
error:


Diny, why do you need to execute multiple selects in one SQL-Method?

Maybe there is another way of doing it?

/dario

- 
Dario Lopez-Kästen Systems Developer  Chalmers Univ. of Technology
[EMAIL PROTECTED]  ICQ will yield no hitsIT Systems  Services


___
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] Advanced Transactions:

2000-12-13 Thread Paolo Quaglia



Hi 
All,
I'm building a high 
transaction traffic db application using Zope.
I used for this 
tests two DB: MSAccess 97 and SQL Server 7.0 with the ZODBCDA 
product

I havemade 
some tests and I have found this:

The test 
is:
I have two DTML 
document called Test1 and Test2
I have 2 ZSQL 
Queries called Select1 and Select2
I have an external 
method (which id is Wait) that call the time.sleep(10) #it sleeps 10 
seconds

Test1 calls Select1 
and then the Wait() 

Test2 calls Select2 


First transaction 
test:
Select1 and Select2 
queries are equal:= select * from Users where name='example'
I call test1 in 
abrowser and immediately after test2 in another 
Browser.
RESULT: Test2 wait 
the end of test1 before the page was displayed

Second Transaction 
test:

Select1 = select * 
from Users where name='example'
Select2 = select * 
fromProducts where id='example'
I call test1 in 
abrowser and immediately after test2 in another 
Browser.
RESULT: Test2 wait 
the end of test1 before the page was 
displayed!!


Third Transaction 
test:

Select1 = select * 
from Users where name='example' on the Access Connection
Select2 = select * 
fromProducts where id='example' on the SQL sever 
Connection
I call test1 in 
abrowser and immediately after test2 in another 
Browser.
RESULT: Test2 wait 
the end of test1 before the page was displayed!! :(

Now 
Summarizing:
I think the Zope 
transaction Server works in every Zope operation. This is good, but it 
seemsthat it uses a bad locking method. I mean when I read a DB (usually a 
select) I wouldn't to lock the entire DB and I would let the other DB session 
free to call select statements!!

Am I right?? Or I do 
some mistake?? 
Thanks Very much for 
your cooperation
Paolo QuagliaInformation Technology 
CoordinatorSitek S.p.A.[EMAIL PROTECTED] 



[Zope] default values in forms

2000-12-13 Thread Olaf Zanger

hi there,

i'd like to send default values for an data update with the link to the
form

like
a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name"c/a

unfortunately name may contain spaces.

i found out that spaces may be replaced by "+" in the link, 
but how do i get the "+" into the dtml-var ... statement?

thanks for help

olaf


-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Zanger Nusch
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com

begin:vcard 
n:Zanger;Olaf Marc
tel;cell:+41-76-572 9782
tel;work:+41-31-332 9782
x-mozilla-html:FALSE
url:www.soli-con.com
org:soli-con Engineering Zanger
adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland
version:2.1
email;internet:[EMAIL PROTECTED]
title:Dipl.-Ing.
note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A
x-mozilla-cpt:;-32176
fn:Olaf Zanger
end:vcard



Re: [Zope] Problems with adding tutorial

2000-12-13 Thread Aleksander Salwa


On Tue, 12 Dec 2000, Bob Sidebotham wrote:

 I did see the messages regarding creating a non-admin user and
 authenticating as that user (by first terminating the zope process). I
 did all that.

Terminating BROWSER, not Zope.

 Please note that I'm using the latest zope tarball:
 
   Linux Mandrake 6.0, zope2.3.0a1, Python 2.0, Communicator 4.6.

Keep in mind that the latest STABLE version is Zope 2.2.4.
Officially supported (by Zope) release of Python is still 1.5.2.


   Aleksander Salwa



___
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] Lost with navigation using objectValues

2000-12-13 Thread Stephane Bortzmeyer

I just try to automatically get a list of subfolders, following the
example in the ZopeBook
http://www.zope.org/Members/michel/ZB/SimpleExamples.html. Here is
my code, in a DTML method in the root folder:

ul
  dtml-in expr="objectValues('Folder')"
lia href="dtml-var absolute_url"
dtml-var title_or_id/a/li
  /dtml-in
/ul

If I call it from /index_html, it works fine. If I call it from any
other document anywhere, I just get ul/ul (so I'm sure the method
has been called) but nothing else as if objectValues sent nothing (no
need to say that I *have* subfolders an I also tried without the
'Folder' restriction, with the same result).

Any advice? Zope RPM 2.2.2 on RedHat 6.2.

 Zope version: Zope 2.2.2 (source release, python 1.5.2, linux2) 
 Python version: 1.5.2 (#1, Feb 1 2000, 16:32:16) [GCC
 egcs-2.91.66 19990314/Linux (egcs- 
 System Platform: linux-i386 
 Process ID: 17906 (4101) 
 Running for: 2 hours 55 min 45 sec 




___
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] More on DB Transactions

2000-12-13 Thread Paolo Quaglia



Reading the [EMAIL PROTECTED] archive I found one message with 
an interesting sentence:

[Message]
 I am currently considering and evaluating Zope 
as one of the options we have to build a really large, completely 
databasedriven "enterprise scale" web-platform. I am a bit worried about 
this "maximum of 7 threads per dbThis isn't a maximum. It's just 
the default. It's easy to increase thenumber of 
connections.
[/Message]


Where is this 
Default and How can I increase this counter??
Thanks very much in 
advance
Paolo QuagliaInformation Technology 
CoordinatorSitek S.p.A.[EMAIL PROTECTED] 



Re: [Zope] HTTPServer.py patch

2000-12-13 Thread Evan Simpson

From: Oleg Broytmann [EMAIL PROTECTED]
I've got the patch from the mailing list. I saw only one replacement
 HTTPServer.py here - 13979 bytes in size.

Looks like you've got the one that only works with Zope 2.0 - 2.1.6.  If
you're using Zope 2.2.0 or above, you need the other one.  See
http://www.zope.org/Members/4am/postbugfix

Cheers,

Evan @ digicool  4-am


___
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] HTTPServer.py patch

2000-12-13 Thread Oleg Broytmann

On Wed, 13 Dec 2000, Evan Simpson wrote:
 Looks like you've got the one that only works with Zope 2.0 - 2.1.6.  If
 you're using Zope 2.2.0 or above, you need the other one.  See
 http://www.zope.org/Members/4am/postbugfix

   Got it. Now it works. Thank you.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] HTML formatting from a text field

2000-12-13 Thread Lee Hunter

Hi Ausum,

Do you mean a text field that shows a row of formatting buttons at the top
for 'bold', 'italic' 'add link' etc.

There is an ActiveX control that is built in to IE Explorer 5.x - you just
have to call it from your page.

Here's the information from Microsoft:

http://msdn.microsoft.com/workshop/author/dhtml/edit/ref/cncpt.asp

If you get it working with Zope (which shouldn't be a problem) let us know.

The Manila/Frontier CMS uses it as a default and it works well. It's very
handy when you have users who have basic word processor knowledge (i.e. they
know enough to select text first then click a formatting button) but can't
be trusted with hand coding html.

Cheers

Lee Hunter



  - - - H U M  C O M M U N I C A T I O N S  L T D - - -
website design, content management and technical editing
   Ste. 147 99 Fifth Ave Ottawa ON Canada K1S 5P5
  1-819-459-2511


Ausum wrote:
 what I have in mind, wich is
 a sort of simple html editor within a text field. As I said before, the
 only place I've seen something like that is at Hotmail.



___
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] More on DB Transactions

2000-12-13 Thread Rik Hoekstra



 Paolo Quaglia wrote:
 
 Reading the [EMAIL PROTECTED] archive I found one message with an
 interesting sentence:
 
 [Message]
  I am currently considering and evaluating Zope as one of the options
 we have
  to build a really large, completely databasedriven "enterprise
 scale"
  web-platform. I am a bit worried about this "maximum of 7 threads
 per db
 
 This isn't a maximum.  It's just the default.  It's easy to increase
 the
 number of connections.
 [/Message]
 
 
 Where is this Default and How can I increase this counter??
 Thanks very much in advance
 

AFAIK the ZODBC adapter is still single threaded. See
http://www.zope.org/Members/petrilli/DARoadmap for more information,
though I'm not certain wether this page is still up to date. There are
rumours that for SQL Server you could use the mxODBC adapter, though I
know nothing more of it. Recently there were posts on this list about
using the ZSybase Adapter for SQL Server they're probably thread safe as
well (?). 
Do a search in the archives for more info

hth

Rik

___
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] HTML formatting from a text field

2000-12-13 Thread Rik Hoekstra



Lee Hunter wrote:
 
 Hi Ausum,
 
 Do you mean a text field that shows a row of formatting buttons at the top
 for 'bold', 'italic' 'add link' etc.
 
 There is an ActiveX control that is built in to IE Explorer 5.x - you just
 have to call it from your page.
 
 Here's the information from Microsoft:
 
 http://msdn.microsoft.com/workshop/author/dhtml/edit/ref/cncpt.asp
 
 If you get it working with Zope (which shouldn't be a problem) let us know.
 


There was a start at a product doing this (called ZIE) by Johan Carlsson
, but it looks like it was aborted quite some time ago. Dont know about
its status. You could try how far it would get you, tho
see:
http://www.zope.org/Members/johanc/ZIE

hth

Rik

___
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] ZWiki hierarchy seems to be broken

2000-12-13 Thread Simon Michael

do you see more than one page name in your url path - eg FrontPage/FrontPage ?

are you acquiring a different standard_wiki_header from somewhere ? 

are you failing to acquire it ? (does page source include 
"!-- end of default_wiki_header --" ?) are permissions ok ?

___
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] HTML formatting from a text field

2000-12-13 Thread David Spencer

Ausum,

I would suggest going to the website for Lotus Quickplace
(www.quickplace.com or www.lotus.com) and signing up for a demo account.
They've got a very simple word processor (bold, italics, a couple of fonts,
etc.) integrated into their project sites that, I think, does what you're
describing.  I'm pretty sure everything is accomplished using Javascript.
If you could port something like this over to zope and release it as a
product, so that WYSIWYG documents can be created through the web and still
incorporate standard headers and footers, I would be a very happy man.  I
dread trying to explain zwiki and structured text to clients.  You might
also want to look at standardbrains.editthispage.com.  He's got an
excellent, javascript-based approach to WYSIWYG editing, but you can't save
it back to the site as far as I can tell.

David


___
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] Last day of Month

2000-12-13 Thread Jose Soares

Use an External Method like this one.

# Perché non usare un metodo esterno?
from DateTime import Date
def lastDay(year,month):
try:
last = Date(year,month+1,1)-1
return last.day
except:
return 31


José

Eric Walstad wrote:

 Hi Paolo,
 I have a Python Metho... er  Python Script that I use that tells me the days
 in each month.  You pass in a Zope DateTime object as a parameter and it
 returns the days in that month:

 Parameters: ZopeDateTime
 Code:
 -8-- Start Snip --8-
 if ZopeDateTime.isLeapYear():
 intDaysInFebruary = 29
 else:
 intDaysInFebruary = 28

 strMonthName=ZopeDateTime.Month()

 dicDaysPerMonth =
 {'January':31,'February':intDaysInFebruary,'March':31,'April':30,'May':31,'J
 une':30,'July':31,'August':31,'September':30,'October':31,'November':30,'Dec
 ember':31}

 return dicDaysPerMonth.get(strMonthName, 0)
 -8-- End Snip --8-

 Hope that helps.

 Eric.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paolo
 Quaglia
 Sent: Tuesday, December 12, 2000 4:05 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Last day of Month

 Hi everibody
 Is there some tricky way to know the last day of the month of a DateTime
 object?
 for ex: if my DateTime object is 12/12/2000  is there a method or a
 function that return the last day of the month? (in this example 31)

 Thanks a lot
 Paolo Quaglia
 Information Technology Coordinator
 Sitek S.p.A.
 [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 )


___
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] turning off inheritance

2000-12-13 Thread Kyler B. Laird


I am working on generating a directory from Zope
objects.  There is a folder full of units (other
folders).  These units contain people (more
folders).

Units and people both have contact information
stored in their properties.  How do I detect if a
person has, for example, 'contact_email' set?

I've tried
dtml-if "_.hasattr(this(), 'contact_email')"
It succeeds if the person doesn't have
contact_email set but its unit does.  I've also
tried variations of dtml-with ... only, with no
success.

Any pointers?  Where could I have found the
answer to this on my own?

Thank you.

--kyler

___
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] turning off inheritance

2000-12-13 Thread Oleg Broytmann

On Wed, 13 Dec 2000, Kyler B. Laird wrote:
 Units and people both have contact information
 stored in their properties.  How do I detect if a
 person has, for example, 'contact_email' set?

 I've tried
   dtml-if "_.hasattr(this(), 'contact_email')"

   Something like
dtml-if "_.hasattr(aq_explicit, 'contact_email')"
   (untested, but I use this in External Methods)

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] default values in forms

2000-12-13 Thread Andy McKay

An ugly solution is a href="adr_change_frm?f_id=dtml-var
"_.string.replace(id, ' ', '+'"f_name=dtml-var "_.string.replace(name, '
', '+')""c/a

Be careful that other none url compliant characters dont slip into your
variables.

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Olaf Zanger" [EMAIL PROTECTED]
To: "Zope Mailinglist" [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 6:55 AM
Subject: [Zope] default values in forms


 hi there,

 i'd like to send default values for an data update with the link to the
 form

 like
 a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name"c/a

 unfortunately name may contain spaces.

 i found out that spaces may be replaced by "+" in the link,
 but how do i get the "+" into the dtml-var ... statement?

 thanks for help

 olaf


 --
 soli-con Engineering Zanger
 Dipl.-Ing. (FH) Olaf Zanger Nusch
 Lorrainestrasse 23
 3013 Bern / Switzerland
 Fon: +41-31-332 9782
 Mob: +41-76-572 9782
 mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 http://www.soli-con.com


___
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] turning off inheritance

2000-12-13 Thread Kyler B. Laird


On Wed, 13 Dec 2000 19:39:43 +0300 (MSK) you wrote:
On Wed, 13 Dec 2000, Kyler B. Laird wrote:
 Units and people both have contact information
 stored in their properties.  How do I detect if a
 person has, for example, 'contact_email' set?

 I've tried
  dtml-if "_.hasattr(this(), 'contact_email')"

   Something like
dtml-if "_.hasattr(aq_explicit, 'contact_email')"
   (untested, but I use this in External Methods)

Consider it tested.  It works great from DTML.

Now that I know what to seek, I found a couple of
old messages that reference this.  I'm still
honing my ability to get Zope clues.

Thanks for the quick and effective answer!

--kyler

___
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] Problem on running the ZOPE by using ZmySQLDA

2000-12-13 Thread Eric Walstad

Hi Angie.

First off, I think there are some users in the list that are unable to read
HTML formatted email.  I've seen a lot of requests for folks to send only
plain text messages to the list.

Well, I don't run Zope on a Windows machine, so maybe I'm wrong here, but
the output you've shown below looks normal to me.  It doesn't look like an
error.  Is there any error message that's displayed in your browser?  If so,
can you recreate it and send it to the list?

Also, can you include the SQL statement that is causing the problem?  Have
you tried making a ZSQL Method that issues a really simple query, like:
SELECT * FROM InsertYourTableNameHere

You can also try this simple test from your "Z MySQL Database Connection"
object.  Just browse to that object in the Zope management interface, click
the "Test" tab and then enter the SQL statement.  Then click the "Submit
Query" button to test it.  It should return all the records in the table you
specified.  If it doesn't, I would hope it simply returns a traceback and
not crash Zope.

Hope that helps.

Eric.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Angietel
Sent: Wednesday, December 13, 2000 12:42 AM
To: [EMAIL PROTECTED]
Subject: [Zope] Problem on running the ZOPE by using ZmySQLDA


Finally my ZOPE is connected to MySQL succesfully, i can insert, delete the
record,but i can not search and view my record in ZOPE. When i go to MySQL
it can shows all my database records after my modification in ZOPE. Every
time when i want to search or view my records it will promt out the illegal
operation message in ZOPE and my pyhon will be exactly look like this:-

iles\WebSite\z2.py" -D
--
2000-12-13T08:34:28 PROBLEM(100) ZServer Computing default hostname
--
2000-12-13T08:34:31 INFO(0) ZServer Medusa (V1.16.4.2) started at Wed Dec 13
16:
34:31 2000
Hostname: ANGIE
Port:8080

--
2000-12-13T08:34:31 INFO(0) ZServer FTP server started at Wed Dec 13
16:34:31 20
00
Authorizer:None
Hostname: angie
Port: 8021
--
2000-12-13T08:34:31 INFO(0) ZServer PCGI Server started at Wed Dec 13
16:34:31 2
000
Inet socket port: 8090
--
2000-12-13T08:34:31 INFO(0) ZServer Monitor Server (V1.8) started on port
8099

C:\Program Files\WebSite

P/s let me know me that whether this is regard to my MySQL or ZOPE or
Python, but i have tried to reinstall all of them, and the situation is
still remain the same. Thanks for your concern.


___
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] turning off inheritance

2000-12-13 Thread Oleg Broytmann

On Wed, 13 Dec 2000, Kyler B. Laird wrote:
 dtml-if "_.hasattr(aq_explicit, 'contact_email')"
(untested, but I use this in External Methods)

 Consider it tested.  It works great from DTML.

 Now that I know what to seek, I found a couple of
 old messages that reference this.  I'm still
 honing my ability to get Zope clues.

   I got it form exactly this mailing list. I just monitor the list form
the very beginning, I forward many important message to Russian Zope list,
discuss this information, etc. Nothing special. Often I ask questions here.
   Of course I do digging Zope sources from time to time :)

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] turning off inheritance

2000-12-13 Thread Rik Hoekstra



"Kyler B. Laird" wrote:
 
 I am working on generating a directory from Zope
 objects.  There is a folder full of units (other
 folders).  These units contain people (more
 folders).
 
 Units and people both have contact information
 stored in their properties.  How do I detect if a
 person has, for example, 'contact_email' set?
 
 I've tried
 dtml-if "_.hasattr(this(), 'contact_email')"
 It succeeds if the person doesn't have
 contact_email set but its unit does.  I've also
 tried variations of dtml-with ... only, with no
 success.
 
 Any pointers?  Where could I have found the
 answer to this on my own?
 

I don't claim to know the complete answer, but one approach could be to
do a comparison something like:

(warning code untested):

 dtml-if "_.hasattr(this(), 'contact_email') and contact_email
!= PARENT[0].contact_email"

another approach is to set contact_email by default and test for
emptiness 



dtml-if "contact_email==''"
dtml-let contact_email="PARENTS[0].contact_email"


hth

Rik

___
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] Response.redirect problem **sometimes** on netscape

2000-12-13 Thread Didier Georgieff

Hello,

I'm doing a form for deleting objects within our site design (no manage 
interface).

All goes well, with a FORM
FORM ACTION="dtml-var URL1" METHOD="POST"
. [ we create the ids:list here]
  INPUT TYPE="SUBMIT" NAME="myDelete:method" VALUE="Del"

myDelete method does also the redirect on the calling page.

dtml-if ids
  dtml-call "manage_delObjects(ids)"
/dtml-if
dtml-call "RESPONSE.redirect(URL1)"

In IE5 works fine, but NO REDIRECT on Netscape 4.51 (blank page and 
the post data still there), while the RESPONSE.redirect **works** on other 
occasions with N4.51.

Is it a known problem, or a problem calling manage_delObjects bfore 
redirection ?
If not, seems like a bug somewhere in the headers ?

Thanks in advance.
--
Didier Georgieff
DDAF du Bas-Rhin - Cellule SIG 
2, rue des Mineurs 67070 Strasbourg Cedex
tél : 03.88.25.20.33 - fax : 03.88.25.20.01
email : [EMAIL PROTECTED]
SIT du Bas-Rhin : http://www.bas-rhin.sit.gouv.fr
GéoWeb http://sertit10.u-strasbg.fr

___
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] default values in forms

2000-12-13 Thread Stefan H. Holek

On Wed, 13 Dec 2000, Olaf Zanger wrote:

 i found out that spaces may be replaced by "+" in the link, 
 but how do i get the "+" into the dtml-var ... statement?

what you want is dtml-var blah url_quote

see the DTML guide:
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.5.html

HTH
Stefan


___
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] Strange Win2000 Service behaviour

2000-12-13 Thread peter bengtson

I restarted the Zope server from the Control Panel inside Zope and it took a
long time untill it was back up again. About 20 seconds.
During these 20 seconds, I started to suspect that the service wasn't
working, so I manually pressed the "Start" on the Zope Server inside the
Control panel in windows. I couldn't. Below is the traceback I got.
I suspect that it means that the Zope server is already running and that I
can't start it again (see error and Fs.lock stuff).

It turned out that the server was actually running since people on the
intranet was using it at the same time as I was struggling with getting the
service running.
Now the server is running fine, but if I go into the Services in
Administrative Tools of the Control Panel, the service ZopeSite is "turned
off".
So from a quick look on the Win2000 server you can't tell whether the Zope
Server actually is running, unless you open a web browser.

Strange. It's not a production server and I guess the w2k needs a robust
restart with a little kick in the machines direction.

Here's the Traceback I got when I tried to start it because I thought it was
started:

C:\Program Files\Zopesitestart.bat

C:\Program Files\Zopesite"C:\Program Files\Zopesite\bin\python.exe"
"C:\Program
 Files\Zopesite\z2.py" -D
Traceback (innermost last):
  File "C:\Program Files\Zopesite\z2.py", line 554, in ?
exec "import "+MODULE in {}
  File "string", line 1, in ?
  File "C:\PROGRA~1\Zopesite\lib\python\Zope\__init__.py", line 110, in ?
DB=ZODB.FileStorage.FileStorage(Globals.BobobaseName)
  File "C:\PROGRA~1\Zopesite\lib\python\ZODB\FileStorage.py", line 262, in
__ini
t__
lock_file(f)
  File "C:\PROGRA~1\Zopesite\lib\python\ZODB\lock_file.py", line 115, in
lock_fi
le
raise error, (
ZODB.POSException.StorageSystemError: Could not lock the database file.
There m
ust be
another process that has opened the file.
p

C:\Program Files\Zopesite


___
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] default values in forms

2000-12-13 Thread Andy McKay

Oops forgot about that. Yep use that. That's it I'll stop answering
questions until at least 3 cups of tea in the morning.

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Stefan H. Holek" [EMAIL PROTECTED]
To: "Olaf Zanger" [EMAIL PROTECTED]
Cc: "Zope Mailinglist" [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 9:04 AM
Subject: Re: [Zope] default values in forms


 On Wed, 13 Dec 2000, Olaf Zanger wrote:

  i found out that spaces may be replaced by "+" in the link,
  but how do i get the "+" into the dtml-var ... statement?

 what you want is dtml-var blah url_quote

 see the DTML guide:
 http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.5.html

 HTH
 Stefan


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




[Zope] Squishdot with access restrictions

2000-12-13 Thread Ragnar Beer

Howdy Zopistas!

Has anyone installed a Squishdot site with access restrictions? I've 
got the problem that as soon as I take away the "view" and "access 
contents information" permission from the anonymous user in my 
Squishdot site I cannot use the search interface anymore but only get 
KeyErrors (icon or thread_path depending on which permission I take 
away). I'm using Squishdot 0.7.2 and Zope 2.2.2.

Any help appreciated!

Ragnar

___
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] XEmacs DTML Mode

2000-12-13 Thread Alastair Burt

I have made many changes to my DTML Mode Howto and the associated files,
which can be found here:

  http://www.zope.org/Members/alburt/dtml_mode.html

The Howto explains how to get the benefits of Lennart Staflin's PSGML mode
when editing DTML code.  PSGML is a wonderful package for structure-based
editing of SGML and XML code.  There are menus and commands for inserting
only contextually valid tags, it will identify structural errors and help
indent the code appropriately, and attribute values can be edited via popup
menus or in a separate window.  The Howto explains how to get all of this
for editing DTML.  The technique is based on using a DTD for HTML with DTML
tags added and with some Elisp code that extends the basic SGML/HTML mode.

Since I first put this on zope.org, I have made the following changes:

* Changed the DTDs so that they are now more consistent.

* Changed the Elisp code to allow you to specify the enclosing element
  for a chunk of DTML+HTML code, so that the editor always knows what
  the valid tags are.

* Added code to automatically add "-*-" mode declarations at the top of
  the file, so that on subsequent visits the file is always edited in
  dtml-mode. 

* Added commands to swap between HTTP and FTP access of the same
  objects.  In particular, when you are editing a DTML file via FTP
  with three keystrokes you can pop to the management screen for the
  object in Emacs' W3 web browser.

This functionality comes on top of the transparent FTP access explained in
another Howto by Zope member nemeth:

   http://www.zope.org/Members/nemeth/usingEmacsWithZope

--- Alastair


___
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] feedback on ZCatalog section of Zope Book

2000-12-13 Thread Josh Zeidner

I tried out the example in the Zope book and found that the ZCatalog aware
example only works if you create the "default" catalog as explained
elsewhere( must be named "Catalog" ).  Am I doing something wrong or is this
an error in the book?

 -keep up the good work!

  Josh Zeidner


___
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] Important Fix for Zope 2.2.x

2000-12-13 Thread The Doctor What

* Evan Simpson ([EMAIL PROTECTED]) [001210 10:27]:
 Thanks to Jeff Ragsdale, we've finally been able to kill a
 longstanding bug that allows POST requests to interfere with
 each other.  Symptoms include corrupted or aborted File and
 Image uploads, and stupid-log messages about
 "AttributeError: data" killing threads.
 
 The attached HTTPServer.py is valid for all Zope 2.2.x
 versions.  I am posting the patched file for earlier Zope
 versions separately.

Will these be released as Hotfixes?  Or just new versions? Or is
this it?

Ciao!

-- 
Little children, keep yourselves from idols
-- St John, Ist century

The Doctor What: Un-Humble   http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
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] SiteAccess and Roles

2000-12-13 Thread The Doctor What

I have site access running, but I apparently don't fully grok roles.

I have a directory layout like so:

/ZopeRoot
  /site1
  /site2
  /site3
 /user_acl(2)
  /user_acl(1)

My site access rule is at:
http://linuxasm.gerf.org:9673/siteid/view_source
All the site[123] directories are SiteRooted and work fine.

If I add user as manager to user_acl(1) they have essentially 'root'
access.  They can do everything.

What do I have to do to give site3 to a specific user without giving
them access to everyone else?

I tried both Owner and Manager roles in user_acl(2) but it doesn't
work!

What am I doing wrong?

Ciao!

-- 
"If only you'd listened to me, I could have saved you from all that yukkiness."
--Kryten (Red Dwarf)

The Doctor What: "What, Doctor What" http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
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't RENAME using ftp (was Re: [Zope] Dreamweaver and WebDav)

2000-12-13 Thread Paul Browning


On Wed, 13 Dec 2000 12:38:36 MET Hans de Wit [EMAIL PROTECTED] wrote:

 Is anybody using the combination Dreamweaver 4 WebDAV Zope already?

I'm waiting for the evaluation version to become available .

 A connection was easy to make. At the moment i want to put or get something 
 "access to the desired resource is denied by the server". I checked my 
 password, i have the correct rights, 

H. I've had mixed success with a range of WebDAV clients on a range
of operating systems - not all seem to handle renaming files/folders.

 and it is working more or less fine on 
 ftp. (i can not change a file name on the host: an ftp error occured, cannot 
 rename hihi.htm to haha.htm. 500 RNFR command not understood)

I've been meaning to ask the list about this for some time. This
is a real PITA. I infer it to be a ZServer issue (no ftp client
I've tried supports renaming).

With marvellous tools like HMTL-Kit, Homesite (Dreamweaver when
I get my hands on it), etc it really is a bit of a let down when
a well-integrated ftp tool is hobbled by the lack of ZServer
support for rename.

Is this something that is easy to fix? It would be a major
Quick Win in my book.

Paul

--
 The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK
 E-mail: [EMAIL PROTECTED]  URL: http://www.bris.ac.uk/



___
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] Lost with navigation using objectValues

2000-12-13 Thread Stephane Bortzmeyer

On Wed, Dec 13, 2000 at 11:31:34AM -0600, Tim Cook wrote:

 Are you sure you put it in a DTML Method and not a DTML Document?

Well, viewing the object through the management interface says so. To
be sure, I created a new object from scratch and changed the
standard_html_header to use it. Same problem.

Could it be an error in the calling code? I just say:

dtml-var navbar

[That's a problem I often have with Zope. Things which seems very
basic suddenly become blocking problems.]



___
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] default values in forms

2000-12-13 Thread Ivan Cornell

Olaf Zanger wrote:

 hi there,

 i'd like to send default values for an data update with the link to the
 form

 like
 a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name"c/a

 unfortunately name may contain spaces.

 i found out that spaces may be replaced by "+" in the link,
 but how do i get the "+" into the dtml-var ... statement?


Try
a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name
fmt=url_quote"c/a

Ivan


___
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] feedback on ZCatalog section of Zope Book

2000-12-13 Thread Andy McKay

That is true of CatalogAware objects, there must be a catalog called
"Catalog"... the book is right.
--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Josh Zeidner" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 9:36 AM
Subject: [Zope] feedback on ZCatalog section of Zope Book


 I tried out the example in the Zope book and found that the ZCatalog aware
 example only works if you create the "default" catalog as explained
 elsewhere( must be named "Catalog" ).  Am I doing something wrong or is
this
 an error in the book?

  -keep up the good work!

   Josh Zeidner


 ___
 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] Strange Win2000 Service behaviour

2000-12-13 Thread Andy McKay

Have you tried refreshing the Control Panel? If not just kick it (restart)
from the Control Panel. I have found that the Control Panel is normally in
sync with the service. Actually I got a little more nasty and wrote some
Perl scripts to restart/reboot Zope servers/machines...
--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "peter bengtson" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 9:23 AM
Subject: [Zope] Strange Win2000 Service behaviour


 I restarted the Zope server from the Control Panel inside Zope and it took
a
 long time untill it was back up again. About 20 seconds.
 During these 20 seconds, I started to suspect that the service wasn't
 working, so I manually pressed the "Start" on the Zope Server inside the
 Control panel in windows. I couldn't. Below is the traceback I got.
 I suspect that it means that the Zope server is already running and that I
 can't start it again (see error and Fs.lock stuff).

 It turned out that the server was actually running since people on the
 intranet was using it at the same time as I was struggling with getting
the
 service running.
 Now the server is running fine, but if I go into the Services in
 Administrative Tools of the Control Panel, the service ZopeSite is "turned
 off".
 So from a quick look on the Win2000 server you can't tell whether the Zope
 Server actually is running, unless you open a web browser.

 Strange. It's not a production server and I guess the w2k needs a robust
 restart with a little kick in the machines direction.

 Here's the Traceback I got when I tried to start it because I thought it
was
 started:

 C:\Program Files\Zopesitestart.bat

 C:\Program Files\Zopesite"C:\Program Files\Zopesite\bin\python.exe"
 "C:\Program
  Files\Zopesite\z2.py" -D
 Traceback (innermost last):
   File "C:\Program Files\Zopesite\z2.py", line 554, in ?
 exec "import "+MODULE in {}
   File "string", line 1, in ?
   File "C:\PROGRA~1\Zopesite\lib\python\Zope\__init__.py", line 110, in ?
 DB=ZODB.FileStorage.FileStorage(Globals.BobobaseName)
   File "C:\PROGRA~1\Zopesite\lib\python\ZODB\FileStorage.py", line 262, in
 __ini
 t__
 lock_file(f)
   File "C:\PROGRA~1\Zopesite\lib\python\ZODB\lock_file.py", line 115, in
 lock_fi
 le
 raise error, (
 ZODB.POSException.StorageSystemError: Could not lock the database file.
 There m
 ust be
 another process that has opened the file.
 p

 C:\Program Files\Zopesite


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




[Zope] dtml decimals

2000-12-13 Thread Andy McKay

dtml-var "3/2" fmt="%.2d" instead of getting 1.50 as I was expecting I get
1.00, I never seem to be getting decimals. Whats the obivous thing Im
missing here?

Cheers.

--
  Andy McKay, Developer.
  ActiveState.


___
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] default values in forms

2000-12-13 Thread peter bengtson

snip

 i found out that spaces may be replaced by "+" in the link,
 but how do i get the "+" into the dtml-var ... statement?


dtml-var something url_quote_plus
Can't honestly remember where the word "plus" is supposed to be, but search
the DTML Reference documentation.

 thanks for help

 olaf


 --
 soli-con Engineering Zanger
 Dipl.-Ing. (FH) Olaf Zanger Nusch
 Lorrainestrasse 23
 3013 Bern / Switzerland
 Fon: +41-31-332 9782
 Mob: +41-76-572 9782
 mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 http://www.soli-con.com


___
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] HTML formatting from a text field

2000-12-13 Thread sean . upton

I remember reading somewhere about messaging between Java applets and
JavaScript code in the browser, allowing JavaScript code from a web form to
manipulate the applet output; the example was typing something into a text
box, clicking a button in a form, and having that rendered in some obscure
font inside the applet.  Where I read this escapes me, and I've never tried
this, but I wonder if such a trick works conversely.  In other words, what
if the applet can pass values to a JavaScript variable associated with the
value of a form input element in the browser's HTML DOM?

I could imagine that something like this could be very effective for certain
situations where people want better through-the-web editing of code (imagine
if you could edit dtml in a web form color coding syntax with a feature to
collapse blocks of code, similar to Homesite 4.5, or editing python scripts
-- what were python methods -- with an outline-based editor that created
automatic indentation).

Or, better yet, imagine running JPython within the applet (I don't know
whether this is possible) to do all this.  

Anyway, I wonder if this type of thing could be an alternative to either
ActiveX components or a XUL/XPCOM based-interface.

Sean

-Original Message-
From: Rik Hoekstra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 8:17 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope] HTML formatting from a text field




Lee Hunter wrote:
 
 Hi Ausum,
 
 Do you mean a text field that shows a row of formatting buttons at the top
 for 'bold', 'italic' 'add link' etc.
 
 There is an ActiveX control that is built in to IE Explorer 5.x - you just
 have to call it from your page.
 
 Here's the information from Microsoft:
 
 http://msdn.microsoft.com/workshop/author/dhtml/edit/ref/cncpt.asp
 
 If you get it working with Zope (which shouldn't be a problem) let us
know.
 


There was a start at a product doing this (called ZIE) by Johan Carlsson
, but it looks like it was aborted quite some time ago. Dont know about
its status. You could try how far it would get you, tho
see:
http://www.zope.org/Members/johanc/ZIE

hth

Rik

___
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] dtml decimals

2000-12-13 Thread Andy McKay

Well for one thing that example should be dtml-var "3/2" fmt="%.2f"
--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Andy McKay" [EMAIL PROTECTED]
To: "zope-misc" [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 10:03 AM
Subject: [Zope] dtml decimals


 dtml-var "3/2" fmt="%.2d" instead of getting 1.50 as I was expecting I
get
 1.00, I never seem to be getting decimals. Whats the obivous thing Im
 missing here?

 Cheers.

 --
   Andy McKay, Developer.
   ActiveState.


 ___
 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] What version of Python Methods - no - Scripts for 2.2.4?

2000-12-13 Thread Evan Simpson

From: Ronald L. Roeber [EMAIL PROTECTED]
 Is the recommended install of Python Scripts for Zope 2.24 this?

 http://www.zope.org/Members/4am/PythonMethod

 even though it appears to be exactly one year old today (13-Dec)?

Wow, I didn't realize today was its anniversary :-)  No, this isn't the
recommended install of Python Scripts, but it is the closest thing currently
released.

 Can I just copy the PythonScripts  product from my 2.3_a1 Products
 directory to the appropriate location on a 2.24 server or should I use
 the PythonMethod from above? Are there implications for upgrades from
 Methods to Scripts? Am I missing something(s)? (probably) Please advise.

PythonMethod and PythonScripts are independent Products, providing objects
with different meta-types.  They can be installed side-by-side perfectly
safely, and both Python Methods and Python Scripts can be used at the same
time, and even together.

I haven't tried installing PythonScripts in a pre-2.3 Zope, but I have no
reason to expect that it would fail, except in one feature:  Since pre-2.3
Zopes don't support the __render_with_namespace__ protocol, you would always
have to pass parameters explicitly when calling from DTML, and wouldn't be
able to bind the caller's namespace.

If you want to give it a shot, the worst thing that I would expect it to do
is fail and produce error messages when you try to create or use Python
Scripts.  Want to write a Howto? ;-)

Cheers,

Evan @ digicool  4-am


___
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] DA Adapter for transactional DB

2000-12-13 Thread Andy McKay

ZODBC: http://www.zope.org/SiteIndex/search?text_content=ZODBC

--
  Andy McKay, Developer.
  ActiveState.

- Original Message - 
From: "Paolo Quaglia" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 10:08 AM
Subject: [Zope] DA Adapter for transactional DB


 What is the most reliable DA Adapter for the supported transactional DB:
 I mean for Postgres, MS SQL Server, for Interbase etc ...
 
 Are there some DA that work in multithreaded manner under WinNT?
 Thanks a lot
 Paolo Quaglia
 Information Technology Coordinator
 Sitek S.p.A.
 [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] Important Fix for Zope 2.2.x

2000-12-13 Thread Evan Simpson

From: The Doctor What [EMAIL PROTECTED]
 Will these be released as Hotfixes?  Or just new versions? Or is
 this it?

Hotfixes are pretty much reserved for critical security holes.  Zope 2.3
(and possibly an interim 2.2.5 release) and above will have the fix.
Fortunately, HTTPServer has had *very* few changes that would render newer
versions incompatible with older Zopes, so I didn't have to go with a
Windows-unfriendly patch file, and only needed two replacement files.

So, yes, this is it.

Cheers,

Evan @ digicool  4-am


___
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] SiteAccess and Roles

2000-12-13 Thread Evan Simpson

From: The Doctor What [EMAIL PROTECTED]
 I tried both Owner and Manager roles in user_acl(2) but it doesn't
 work!

Didn't work in what sense?  They couldn't log in, or didn't get the access
you expected?  More access or less, or just weird?

Cheers,

Evan @ digicool  4-am


___
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] Dreamweaver and WebDav

2000-12-13 Thread Todd Coram

 Is anybody using the combination Dreamweaver 4 WebDAV Zope already?
 A connection was easy to make. At the moment i want to put or get
 something "access to
 the desired resource is denied by the server". I checked my
 password, i have the correct
 rights, and it is working more or less fine on ftp.

There seems to be Dreamweaver 4 WebDAV issues in general (a quick look at
news:macromedia.dreamweaver suggests that).

I have not been able to get Dreamweaver 4 to PUT data into Zope via WebDAV.
GoLive works fine. Cadaver works fine, etc. I looked at the HTTP header (for
PUT) that Dreamweaver sends and it seems to lack a HTTP_AUTHORIZATION entry.
My username and password was entered in Dreamweaver's "Define site"/"Remote
info"/access:WebDAV" panel. But, Dreamweaver doesn't seem to want to send
it...

---
"Sardonic Slaughterer of Sacred Cows"
Todd Coram - mailto:[EMAIL PROTECTED]
Digital Creations, Inc - http://www.digicool.com
Publishers of Zope - http://www.zope.org

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Hans
 de Wit
 Sent: Wednesday, December 13, 2000 7:39 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Dreamweaver and WebDav


 Is anybody using the combination Dreamweaver 4 WebDAV Zope already?
 A connection was easy to make. At the moment i want to put or get
 something "access to
 the desired resource is denied by the server". I checked my
 password, i have the correct
 rights, and it is working more or less fine on ftp. (i can not
 change a file name on
 the host: an ftp error occured, cannot rename hihi.htm to
 haha.htm. 500 RNFR command not
 understood)


 Met vriendelijke groeten,

 Hans de Wit

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




___
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] SiteAccess and Roles

2000-12-13 Thread Evan Simpson

From: The Doctor What [EMAIL PROTECTED]
 I tried both Owner and Manager roles in user_acl(2) but it doesn't
 work!

Didn't work in what sense?  They couldn't log in, or didn't get the access
you expected?  More access or less, or just weird?

Cheers,

Evan @ digicool  4-am


___
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] Lost with navigation using objectValues

2000-12-13 Thread Stephane Bortzmeyer

On Wed, Dec 13, 2000 at 11:31:34AM -0600, Tim Cook wrote:

 Are you sure you put it in a DTML Method and not a DTML Document?

OK, I get you: my code is in a DTML method but it was ultimately
called by DTML documents, which produced the wrong result. If I create
a DTML method, it works. After reading the excellent "DTML documents
vs DTML methods" HOWTO, it makes sense but it is quite surprising.

Does it mean I have to turn all my DTML documents into DTML methods if
I want them to call DTML methods, even if they are only content?


___
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] charset from forms input

2000-12-13 Thread Matt

Hi, I seem to have come across the depressing fact that most browsers
will not return a charset parameter in the http header when a form is
submitted.  For example, the following from Netscape ... (it happens
with both IE and Netscape on many platforms I have tried ... Mac, all
Windows, and Linux).

POST /hi HTTP/1.0
Referer: http://localhost:8080/temp/test_form
Connection: Keep-Alive
User-Agent: Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0 i686)
Host: 172.16.21.165:50009
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8

Content-type: multipart/form-data;
boundary=---17670043309955870831526446972
Content-Length: 180


So much for a useful Content-type.I know this is NOT a zope issue,
but I was hoping someone had an easy answer.  There is such a myriad of
character encodings out there that is makes it quite difficult to
handle.  The example that most frustrates us are the two byte encodings
vs the one.  I.e. : two common defaults people set their browsers on in
windows are either Western (ISO) or Western (Windows) ... the former
being a two byte encoding set and the latter being a one byte(presumably
ISO-8859-1 + the unhelpful use of the control set  0x85 - 0x95(hex)).
People often copy and paste from word into form text inputs, and as a
quick hack we made up a byte conversion table for the "Microsoft"
range.  So Western(Windows) works, but of course Western(ISO) does not.
How does one detect these?  and more the point, how does one test easily
for any of the other encoding standards?

Surely this has bugged a lot of people?

regards
Matt



___
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] dtml decimals

2000-12-13 Thread Andy McKay

Yup, the implication there is that I am doing a 3/2, im not, that was an
example. Im using variables and hence its easiest to cast one of them as a
float is easier than adding .0 on to the end...

Cheers.
--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Dyon Balding" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]
Cc: "zope-misc" [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 12:38 PM
Subject: Re: [Zope] dtml decimals


 or even simpler:

 dtml-var "3.0/2" fmt="%.2f"

 the decimal point implies a floating point rather than an int.

 -d

 On Wed, Dec 13, 2000 at 12:23:19PM -0800, Andy McKay wrote:
  Well there you go:
 
  dtml-var "_.float(3)/_.float(2)" fmt="%.2f"
 
  Its a python thing, it sees 3 and casts it as an int, same with 2 and
  dividing ints results in an int. You learn something new every day.
 
  --
Andy McKay, Developer.
ActiveState.
 
  - Original Message -
  From: "Andy McKay" [EMAIL PROTECTED]
  To: "zope-misc" [EMAIL PROTECTED]
  Sent: Wednesday, December 13, 2000 10:11 AM
  Subject: Re: [Zope] dtml decimals
 
 
   Well for one thing that example should be dtml-var "3/2" fmt="%.2f"
   --
 Andy McKay, Developer.
 ActiveState.
  
   - Original Message -
   From: "Andy McKay" [EMAIL PROTECTED]
   To: "zope-misc" [EMAIL PROTECTED]
   Sent: Wednesday, December 13, 2000 10:03 AM
   Subject: [Zope] dtml decimals
  
  
dtml-var "3/2" fmt="%.2d" instead of getting 1.50 as I was
expecting I
   get
1.00, I never seem to be getting decimals. Whats the obivous thing
Im
missing here?
   
Cheers.
   
--
  Andy McKay, Developer.
  ActiveState.
   
   
___
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 )
  
 
 
  ___
  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 )

 --
 Dyon Balding [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 )



___
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] ZWiki hierarchy seems to be broken

2000-12-13 Thread Timothy Grant

On Wed, Dec 13, 2000 at 08:20:14AM -0800, Simon Michael wrote:
 do you see more than one page name in your url path - eg FrontPage/FrontPage ?

On the very first page, yes, as the folder and the WikiPage have the same
name. However, the header appears on this page.
 
 are you acquiring a different standard_wiki_header from somewhere ? 

Not that I know of. I only have one ZWiki object setup

 
 are you failing to acquire it ? (does page source include 
 "!-- end of default_wiki_header --" ?) are permissions ok ?

The page source includes this text:

!-- end of standard_wiki_header --

Aha!

I just went digging through all the properties of the pages that didn't have
headers, and compared them to the properties for the pages that did, and I
noticed that they were all parented wrong! I didn't think to look there. I
had changed the name of the FrontPage to something else, which broke all the
parent links.

Thanks for your very kind assistance!

-- 
Stand Fast,
tjg.

Timothy Grant [EMAIL PROTECTED]
Red Hat Certified Engineerwww.exceptionalminds.com
Avalon Technology Group, Inc.   (503) 246-3630
Linux, because rebooting is *NOT* normal
This machine was last rebooted:  15 days 1 hours ago

___
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] rss

2000-12-13 Thread Andy McKay

Ok, ive seen lots of products and ways of creating RSS files, but I havent
been able to spot one that reads other peoples (eg ZNN, Slashdot). Is there
such a product?
--
  Andy McKay, Developer.
  ActiveState.


___
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] dtml decimals

2000-12-13 Thread Dieter Maurer

Andy McKay writes:
  dtml-var "3/2" fmt="%.2d" instead of getting 1.50 as I was expecting I get
  1.00, I never seem to be getting decimals. Whats the obivous thing Im
  missing here?
This is a Python feature:

  If both arguments are integers, the division is performed
  as an integer division.

  Use "3.0/2" or "3/2.0" or "float(3)/2"  to get a floating point division.


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] Response.redirect problem **sometimes** on netscape

2000-12-13 Thread Dieter Maurer

Didier Georgieff writes:
  
  dtml-call "RESPONSE.redirect(URL1)"
  
  In IE5 works fine, but NO REDIRECT on Netscape 4.51 (blank page and 
  the post data still there), while the RESPONSE.redirect **works** on other 
  occasions with N4.51.
I use Shane's "tcpwatch" (-- zope.org) to analyse such problems.



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 )




[Zope] Re: PIL Problem

2000-12-13 Thread Max M

--- Luc Tonin [EMAIL PROTECTED] wrote:
 well
 i m still trying to insert some text in a gif image
 using PIL
 but what should i do??? using da PSDraw class??
 does anybody have an id ??
 thx by advance

Here is an example I got working under Windows.

PIL has very limited font/text support though.

I got this working pretty fast, as PIL is very well written, but I cannot
find a way to transfer my Windows truetype fonts to PIL's proprietary
format.

Bummer.

regard Max M

---

buttonList = {}
buttonList['02_home.gif']   = 'Ölwechselung'
buttonList['02_01_somewhere.gif']   = 'Klares Bekenntnis zur Umwelt'
buttonList['02_02_dude.gif']= 'Hey Dude'

import ImageDraw, ImageFont
import Image

# Set font
arial =
ImageFont.load('C:/root/pythonScripts/PILTest/phontz/Verdana_12_100.pil')

im = Image.open("C:/root/pythonScripts/PILTest/redButton.gif")

width, height = im.size
middle = width/2

for fileName, theText in buttonList.items():

aCopy = im.copy()

# render the text
draw = ImageDraw.Draw(aCopy)
draw.setfont(arial)
draw.setink(255)

textWidth, textHeight = draw.textsize(theText)
textMiddle = textWidth/2

fontPlacement = middle - textMiddle
print textWidth

draw.text((fontPlacement, -3), theText)
aCopy.save('C:/root/pythonScripts/PILTest/' + fileName)

---

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] Problems with adding tutorial

2000-12-13 Thread Bob Sidebotham

After much playing around I determined that the problem was Python 2.0.
I downgraded zope to 2.2.4 and still had the identical problem with
python 2.0. Then when I downgraded python to 1.5.2 the problem finally
went away.

Bob

--- Aleksander Salwa [EMAIL PROTECTED] wrote:

 Keep in mind that the latest STABLE version is Zope 2.2.4.
 Officially supported (by Zope) release of Python is still 1.5.2.


__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

___
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] rss

2000-12-13 Thread Kevin Teague

I'm setting up some rss feeds, and I've just used the Site Summary
product from here:
 
http://www.zope.org/Members/edmundd/SiteSummary

With Site Summary you can use the importRSS method to pull in a channel.
I use a modified version of this script running on a cron job to update
the rss channels:

http://www.zope.org/Members/phd/cron-zope/pack-db_fs

The script looks like this (it's still kind of hack-ish, but it works
:). My only problem now is to figure out how to have member preferences
handle a list of rss channels with the PTK.


#!/usr/bin/python

username="kteague"
password="**"
zope="http://www.evileggs.org/"

import sys, urllib, re

class NoGUIURLopener(urllib.FancyURLopener):
   def __init__(self, username, password, *args):
  apply(urllib.FancyURLopener.__init__, (self,) + args)

  self.username = username
  self.password = password
  self.asked = 0

   def prompt_user_passwd(self, host, realm):
  if self.asked:
 raise "Unauthorized"
  else:
 self.asked = 1
 return self.username, self.password


channel_id = ""
rss_url = ""

try:
f = open("channellist.txt")
except:
   print 'Could not open the channellist.txt file.'
lines = f.readlines()
f.close()

for line in lines:
if re.search('^\n$', line):
continue
m = re.search('(.*?)\s+(.*)', line)
try:
(channel_id, rss_url) = m.groups()
except:
print 'Can not properly parse line:\n%s' % (line)
continue
urllib._urlopener = NoGUIURLopener(username, password)
urllib.urlretrieve("%s/rss/%s/importRSS?url=%s" % (zope, channel_id,
rss_url))



==
And the 'channellist.txt' text file just has the Zope id's of the Site
Summary objects and the rss channel URLs, like so:


Advogato   http://www.advogato.com/rss/articles.xml
Linux.com   http://www.linux.com/mrn/front_page.rss


-- 
  Kevin Teague, Zopista
  http://www.stormix.com

___
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] rss

2000-12-13 Thread Andy McKay

So it does, thanks! I throught I read through Site Access and managed to
skip that. Yep a simple cron job and it will be updating nightly.

Cheers.

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Kevin Teague" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 3:20 PM
Subject: Re: [Zope] rss


 I'm setting up some rss feeds, and I've just used the Site Summary
 product from here:

 http://www.zope.org/Members/edmundd/SiteSummary

 With Site Summary you can use the importRSS method to pull in a channel.
 I use a modified version of this script running on a cron job to update
 the rss channels:

 http://www.zope.org/Members/phd/cron-zope/pack-db_fs

 The script looks like this (it's still kind of hack-ish, but it works
 :). My only problem now is to figure out how to have member preferences
 handle a list of rss channels with the PTK.


 #!/usr/bin/python

 username="kteague"
 password="**"
 zope="http://www.evileggs.org/"

 import sys, urllib, re

 class NoGUIURLopener(urllib.FancyURLopener):
def __init__(self, username, password, *args):
   apply(urllib.FancyURLopener.__init__, (self,) + args)

   self.username = username
   self.password = password
   self.asked = 0

def prompt_user_passwd(self, host, realm):
   if self.asked:
  raise "Unauthorized"
   else:
  self.asked = 1
  return self.username, self.password


 channel_id = ""
 rss_url = ""

 try:
 f = open("channellist.txt")
 except:
print 'Could not open the channellist.txt file.'
 lines = f.readlines()
 f.close()

 for line in lines:
 if re.search('^\n$', line):
 continue
 m = re.search('(.*?)\s+(.*)', line)
 try:
 (channel_id, rss_url) = m.groups()
 except:
 print 'Can not properly parse line:\n%s' % (line)
 continue
 urllib._urlopener = NoGUIURLopener(username, password)
 urllib.urlretrieve("%s/rss/%s/importRSS?url=%s" % (zope, channel_id,
 rss_url))



 ==
 And the 'channellist.txt' text file just has the Zope id's of the Site
 Summary objects and the rss channel URLs, like so:


 Advogato   http://www.advogato.com/rss/articles.xml
 Linux.com   http://www.linux.com/mrn/front_page.rss


 --
   Kevin Teague, Zopista
   http://www.stormix.com



___
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] Broken LoginManager - Can't get it to install

2000-12-13 Thread Bill Welch

The source for DynPersist is in a sub-directory of ZPatterns. You have to
go in and compile it.

On Wed, 13 Dec 2000, Mohan Baro wrote:

 I can seem to figure out what wrong here.
 
 I have ZPatterns installed already 0.4.3b2
 
 This is the latest LoginManager 0.8.8b1
 
 LoginManager Import Traceback
 Traceback (innermost last):
   File "/usr/share/zope/lib/python/OFS/Application.py", line 397, in
 import_products
 product=__import__(pname, global_dict, global_dict, silly)
   File "/usr/share/zope/lib/python/Products/LoginManager/__init__.py", line
 1, in ?
 import LoginManager, LoginMethods, UserSources
   File "/usr/share/zope/lib/python/Products/LoginManager/LoginManager.py",
 line 7, in ?
 from Products.ZPatterns.PlugIns import PlugInGroup
   File "/usr/share/zope/lib/python/Products/ZPatterns/__init__.py", line 1,
 in ?
 import Rack, Specialists, Customizers, AttributeProviders,
 SheetProviders
   File "/usr/share/zope/lib/python/Products/ZPatterns/Rack.py", line 9, in ?
 from DataSkins import DataSkin
   File "/usr/share/zope/lib/python/Products/ZPatterns/DataSkins.py", line 1,
 in ?
 from DynPersist import DynPersist
 ImportError: No module named DynPersist
 
 
 
 ___
 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 )




[Zope] Object adding strangeness

2000-12-13 Thread Geoffrey L. Wright


So I've created a simple little product to dynamically manage CSS.  It
consists of three ZClasses and the arrangement looks something like
this:
 
   STYLEn_containerClass
 \
  \-- STYLEn_styleClass
  \
   \-- STYLEn_stylePropertyClass
 
The STYLEn_containerClass can contain a variable number of styles
which can, in turn, contain a variable number of properties.

I've also hacked the add method for the STYLEn_containerClass so that
it creates a number of default styles.  So far, this has all worked
swimmingly, but I have run into one really strange issue that I can't
figure out for the life of me.  Basicly, the folder that contains the
STYLEn_containerClass somehow(?) manages to aquire the title of the
last instance of STYLEn_styleClass that gets created.  So in the
follow example, the title of the containing folder get renamed to
"Header style" from whatever it happened to be before.

Does anybody have an idea of why this might be happening?   TIA for 
any answers or leads.

My code is below:
 
 ---
 
dtml-commentCreate the "STYLEn" container./dtml-comment
 
dtml-with "STYLEn_containerClass.createInObjectManager('STYLEn',REQUEST)"

  dtml-call 
"propertysheets.STYLEn_containerClassPropertySheet.manage_editProperties(REQUEST)"
  dtml-call "manage_editProperties(REQUEST)"
 
 
  dtml-commentCreate header style/dtml-comment
 
  dtml-call "REQUEST.set('ts', ZopeTime())"
  dtml-call "REQUEST.set('id',_.str(_.int(ts)) + '-1')"
  dtml-call "REQUEST.set('title','Header style')"
  dtml-with "STYLEn_styleClass.createInObjectManager(REQUEST['id'], REQUEST)"
dtml-call "REQUEST.set('element','h1')"
dtml-call "REQUEST.set('style','header')"
dtml-call 
"propertysheets.STYLEn_styleClassPropertySheet.manage_editProperties(REQUEST)"
dtml-call "manage_editProperties(REQUEST)"
dtml-with "STYLEn_stylePropertyClass.createInObjectManager('font-family', 
REQUEST)"
  dtml-call "REQUEST.set('value','arial, sans-serif')"
  dtml-call 
"propertysheets.STYLEn_stylePropertyClassPropertySheet.manage_editProperties(REQUEST)"
  dtml-call "manage_editProperties(REQUEST)"
/dtml-with
dtml-with "STYLEn_stylePropertyClass.createInObjectManager('font-size', REQUEST)"
  dtml-call "REQUEST.set('value','16pt')"
  dtml-call 
"propertysheets.STYLEn_stylePropertyClassPropertySheet.manage_editProperties(REQUEST)"
  dtml-call "manage_editProperties(REQUEST)"
/dtml-with
dtml-with "STYLEn_stylePropertyClass.createInObjectManager('font-style', 
REQUEST)"
  dtml-call "REQUEST.set('value','normal')"
  dtml-call 
"propertysheets.STYLEn_stylePropertyClassPropertySheet.manage_editProperties(REQUEST)"
  dtml-call "manage_editProperties(REQUEST)"
/dtml-with
dtml-with "STYLEn_stylePropertyClass.createInObjectManager('font-weight', 
REQUEST)"
  dtml-call "REQUEST.set('value','bold')"
  dtml-call 
"propertysheets.STYLEn_stylePropertyClassPropertySheet.manage_editProperties(REQUEST)"
  dtml-call "manage_editProperties(REQUEST)"
/dtml-with
dtml-with "STYLEn_stylePropertyClass.createInObjectManager('color', REQUEST)"
  dtml-call "REQUEST.set('value','#00')"
  dtml-call 
"propertysheets.STYLEn_stylePropertyClassPropertySheet.manage_editProperties(REQUEST)"
  dtml-call "manage_editProperties(REQUEST)"
/dtml-with
  /dtml-with

/dtml-with

dtml-comment
  Now we need to return something.  We do this via a redirect so that the URL is 
correct.

  Unfortunately, the way we do this depends on whether we live in a product or in a 
class.  If we live in a 
  product, we need to use DestinationURL to decide where to go. If we live in a class, 
DestinationURL won't 
  be available, so we use URL2.
/dtml-comment

dtml-if DestinationURL

  dtml-call "RESPONSE.redirect(DestinationURL+'/manage_workspace')"

dtml-else

  dtml-call "RESPONSE.redirect(URL2+'/manage_workspace')"

/dtml-if

/body/html

 ---



-- 
Geoffrey L. Wright
Developer / Systems Administrator

(907) 563-2721 ex. 4900
http://www.integritysi.com


___
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] stupid file upload question

2000-12-13 Thread Joh Johannsen

OK, there is a How-To on that, which is helpful, by benno

But it says: "In you python external method you can now reference
REQUEST.form['attached_file'] as a normal file. You can
  perform things such as read() on the object. "

Now in my Python external method, I can reference things like:

REQUEST.form['attached_file'].filename

and that is fine.

But what is the syntax for actually reading the file?  From the above
quote I thought it was as simple as
x=REQUEST.form['attached_file'].read()  but that doesn't work...

Either that or some way to get at the name of the file on the server.
The above 'filename' is just giving me the name of the file on the
client side, I have no idea where it is on the server.

Thanks,

JJ


___
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] *Problem on running the ZOPE by using ZmySQLDA

2000-12-13 Thread Angietel



Files\WebSite\z2.py" 
-D--2000-12-13T08:34:28 PROBLEM(100) ZServer Computing default 
hostname--2000-12-13T08:34:31 INFO(0) ZServer Medusa (V1.16.4.2) 
started at Wed Dec 1316:34:31 
2000 Hostname: 
ANGIE 
Port:8080--2000-12-13T08:34:31 INFO(0) ZServer FTP server 
started at Wed Dec 1316:34:31 
2000 
Authorizer:None Hostname: 
angie Port: 
8021--2000-12-13T08:34:31 INFO(0) ZServer PCGI Server started at Wed 
Dec 1316:34:31 2000 Inet 
socket port: 8090--

2000-12-13T08:34:31 INFO(0) ZServer Monitor Server 
(V1.8) started on port8099C:\Program 
Files\WebSite


The word that i have been highlighted is the error 
msg that i want to mentioned. In the SQL statement it does'nt show any error 
msg. And what you have been suggested to me:-

*//making a ZSQL Method that issues a really simple 
query, like:SELECT * FROM InsertYourTableNameHeretry this 
simple test from your "Z MySQL Database Connection"object. Just browse 
to that object in the Zope management interface, clickthe "Test" tab and 
then enter the SQL statement. Then click the "SubmitQuery" button to 
test it.

When i clicked the "Submit Query" button the 
illegal operation error msg will come out.

In MySQL is no sense of the error msg.
This is a bit tricky problem that i 
dontunderstand.


TQ 


Re: [Zope] PIL problem

2000-12-13 Thread Jason Byron


--- Luc Tonin [EMAIL PROTECTED] wrote:
 thx for your help
 but i don t find the font files ( courR14.pil and
 courR14.bpm)
 !!!

Sorry for the late reply, I don't check this list
until after work.

If you have X windows and you have fonts in the bdf or
pcf format you can use the script that comes with PIL
called pilfont.py to create fonts.

Also, I took a few of my fonts, formatted them, zipped
em up, and put them in my zope.org member folder.

a
href="http://www.zope.org/Members/byron/fonts.tar.gz"http://www.zope.org/Members/byron/fonts.tar.gz/a

hope this helps. 

Jason

 
 - Message d'origine -
 De : Jason Byron [EMAIL PROTECTED]
 À : Luc Tonin [EMAIL PROTECTED]
 Cc : [EMAIL PROTECTED]
 Envoyé : mercredi 13 décembre 2000 07:10
 Objet : Re: [Zope] PIL problem
 
 
 
  --- Luc Tonin [EMAIL PROTECTED] wrote:
   well
   i m still trying to insert some text in a gif
 image
   using PIL
   but what should i do??? using da PSDraw class??
   does anybody have an id ??
   thx by advance
  
 
  I recently got that working for me by doing a few
  tricky things:
 
  created a directory in Extensions called "BDF" and
 put
  the font files (courR14.pil an courR14.pbm) in
 there.
  (make sure that dir is zope readable)
 
  then add ImageFont to your PIL init script. (kind
 of
  like the file replacement in ZPhoto does)
 
  then in your external method and the import
 statement
  for the fonts. (in mine I did "import
 PIL.ImageFont")
 
  and then I experimented around and got the
 following
  code to setup the font stuff:
 
 
  wd = os.environ['PYTHONHOME']
  wd_ext = wd + '/Extensions'
  wd_ext_bdf = wd_ext + '/BDF'
  sys.path[:0] = [wd_ext] # prepend the font path
  sys.path[:0] = [wd_ext_bdf]
  font = PIL.ImageFont.load_path("courR14.pil")
 
 
  I put this in the global part of the external
 method
  and the rest of the methods could use fonts.
 
  (for some reason I couldn't get any other font to
  work. courR14 is the default in the PIL library. 
 to
  change
  fonts you can simply save another font as the
 courR14
  name)
 
  After that you can use fonts in your methods with:
 
  draw = PIL.ImageDraw.Draw(image)
  draw.text((x,y),"text to print")
 
 
 
  Hope this helps.
 
  I will *hopefully* be releasing a zope product in
 the
  near future that uses PIL fonts so you can use it
 as
  an example.  Right now I'm ironing it out a
 little,
  but keep an eye out for it.  I think I'm going to
 call
  it "NetMap"
 
 
  Jason
 
 
 
 
 
 
 
 
 
  __
  Do You Yahoo!?
  Yahoo! Shopping - Thousands of Stores. Millions of
 Products.
  http://shopping.yahoo.com/
 


__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

___
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] What version of Python Methods - no - Scripts for 2.2.4?

2000-12-13 Thread Ron Bickers

I got PythonScripts running on 2.2.4 after doing the following:

1) Install PythonScripts from CVS just like any other Product.

2) Add these lines to lib/python/AccessControl/__init__.py:

from SecurityInfo import ClassSecurityInfo, ModuleSecurityInfo
from SecurityInfo import ACCESS_PRIVATE
from SecurityInfo import ACCESS_PUBLIC
from SecurityInfo import ACCESS_NONE
from SecurityInfo import secureModule

3) Add the CVS version of SecurityInfo.py to lib/python/AccessControl/

It works in my limited testing, but I have no idea if something is badly
broken that just hasn't shown itself yet.

___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Evan
 Simpson
 Sent: Wednesday, December 13, 2000 2:52 PM
 To: Ronald L. Roeber; [EMAIL PROTECTED]
 Subject: Re: [Zope] What version of Python Methods - no - Scripts for
 2.2.4?


 From: Evan Simpson [EMAIL PROTECTED]
  After a little experimentation, I was able to get it to run with Zope
 2.0.0.
  It required small changes to __init__.py and Guarded.py, which are
 available
  through cvs.zope.org.

 P.P.S.

 That's "2.2.0", not "2.0.0", and as of three hours ago you would also need
 to backport (or stub out) OFS.Cache :-(

 Sorry,

 Evan @ digicool  4-am


 ___
 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] SiteAccess and Roles

2000-12-13 Thread Michael Bernstein

The Doctor What wrote:
 
 I have site access running, but I apparently don't fully grok roles.
 
 I have a directory layout like so:
 
 /ZopeRoot
   /site1
   /site2
   /site3
  /user_acl(2)
   /user_acl(1)
 
 My site access rule is at:
 http://linuxasm.gerf.org:9673/siteid/view_source
 All the site[123] directories are SiteRooted and work fine.
 

I read your access rule, and it seems like you've got it set
up to ignore the gTLD, so that www.gerf.org and www.gerf.com
etc. get routed to the same object automatically. Is that
correct?

Michael.

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