Re: [Zope-dev] DTML tag creation.

2000-05-25 Thread Itamar Shtull-Trauring

Bill Anderson wrote:

 I am about to dive into a custom tag, it will be a 'container' tag.
 I have seen the HowTo, and it really isn't that clear when you get to
 the container tag info.
 
 Can anyone provide a better rundown?  Anyone have a custom tag they
 would mind sharing for perusal?
 Just trying to save myself sometime.

Not a container tag, but check out
http://www.zope.org/Members/noa/SpellChecker - me and Noa wrote this a while
back.  A spellchecker interface written in DTML is not a pretty sight, but
you do learn DTML really quickly :)

-- 
Itamar S.T.  [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] ZCVS Mixin class... feedback sought.

2000-05-25 Thread Steve Spicklemire


Hi Jonothan,

Thanks for the thoughts

 "Jonothan" == Jonothan Farr [EMAIL PROTECTED] writes:

 Good questions!
 
 You can just go to the 'admin' tab and type 'diff'.  The admin
 tab lets you execute just about any cvs command with
 arguments stat, rtag etc etc.

Jonothan Doing a diff on a zexp file isn't going to be very
Jonothan helpful, though. Any thoughts on integrating some sort
Jonothan of xml diff tool?

Not as bad as you might think...

http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopeObjs/testCVS/foobie.xml.diff?r1=texttr1=1.1r2=texttr2=1.2diff_format=h

having said that  and xml diff tool would be cool as well. I
know little/nothing about what's out there. The other problem
is that Zope appears to choose id values for pickles embedded
in these xml files that are essentially random. I don't know
enough about the implementation (time to look?) to know why
they choose the ids they choose... but it would be nice for
this reason if they were always, (usually), consistent. You
also get things like this:

http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopeObjs/testCVS/foo.xml.diff?r1=texttr1=1.4r2=texttr2=1.5diff_format=h

  Conflicts.. uh... bad news. ;-) I think it's essentially
 impossible to 'merge' two different versions of a zope
 object... so my plan would be to pick one version, or the
 other.
 

I forgot to mention that you have all the power of CVS to handle
the notion of 'watching' and 'editing'. I'm not a cvs expert..
but I think there are some cvs features that can help here...

 Login and logout are handled when you set up the directory on
 the filesystem. Basically you need to 'checkout' a module
 (maybe an empty module) into a directory on the filesystem
 before you can use it to keep the xml representations of your
 Zope objects. That checkout, might, or might not, require a
 login, depending on your CVSROOT. You must 'be' the zope user
 (the same user that the zope process runs as) when you checkout
 the module, so that zope can manage the contents.

Jonothan So essentially all checkins are by the same cvs user, so
Jonothan you lose the ability to track accountability? I'd like
Jonothan to see something that was on a per-user basis, maybe
Jonothan tied to the zope user, maybe not.

No.. that's not quite right. CVS has several ways to handle
the concept of 'ownership'. If you are using pserver authentication
for example, you can be user x, but authenticate with cvs as 
user y. So, to make this work Joe would have his branch and
mary could have her branch in different ZCVSMixin folders within
the same zope instance. However, for development I think it's
probably not uncommon that individual zope developers might have
their own zope instance. With a ZCVS Mixin folder they could
work on completely seprarate instances and still stay 'synced',
much the same way developers use cvs to stay synced with 'c'
code now.

Jonothan There's been a ton of talk about a zope cvs
Jonothan product. I've been thinking about giving it a shot for a
Jonothan while now. I'm excited to see someone actually doing
Jonothan something about it. I'd be glad to help out however I
Jonothan can. Especially since now you've taken the killer
Jonothan name. ;)

I haven't heard much of the talk, since I have been too busy
to keep up with the list, but I am interested in ideas. Also..
I'm 72% sure that someone else can come up with a much better
name! ;-)

thanks,
-steve

Jonothan --jfarr



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




Re: [Zope-dev] FWIW, ZCVSMixin now at 0.0.2... and rising. ;-)

2000-05-25 Thread Steve Spicklemire


Hi Michael,

I need to put some verbage in the README about setting
up the workspace on the filesystem to work with ZCVSMixin. No
time like the present! ;-)

Before you begin, you need to set up a cvs repository 
somewhere. This is described pretty well in the cvs
reference: http://www.loria.fr/cgi-bin/molli/wilma.cgi/doc.847210383.html
After that is done and you set your CVSROOT environment
variable to match that repository, you can setup your
module for zope objects...

Basically you must first become the same user that runs
as the zope process. If this is a totally new project you
will need to create a module in cvs. I usually do this
with 'cvs import'..  like this:

--
mkdir foo
cd foo

cvs import -m "start new project" zopeObjs/foo steve start

No conflicts created by this import

--

Now, go to the place on your filesystem where you want
to keep your 'live' zope objects. This might be called
your active workspace.

I might do it like this:

mkdir workspace
cd workspace
cvs co zopeObjs/foo
cvs checkout: Updating zopeObjs/foo

cd zopeObjs/foo
pwd
/usr/home/steve/workspace/zopeObjs/foo

this is the path you would enter in the ZCVS Folder as the
'fsdir' parameter.

Now you can manage the contents of this folder in Zope,
or on the command line. The Zope stuff doesn't handle
subdirectories at the moment.. we can add that as soon
as we have a sane way of making that work! ;-)

Good Luck!
-steve

 "Michael" == Michael Bernstein [EMAIL PROTECTED] writes:

Michael Steve Spicklemire wrote:

 I've not heard any comments about the usefulness of this
 concept...  am I barking up the wrong tree to get version
 control of zope objects?  Does someone know of a better way?

Michael Steve, this has been my fondest hope for about three
Michael months now. Now, if I could also get it to do
Michael through-the-web XML (DocBook) editing and rendering, I'd
Michael have a complete end-to-end document management
Michael system. Particularly if it preserved accountability, like
Michael Jonothan was mentioning.

Michael I'll be testing this tommorow, and doing my best to get
Michael this to do unnatural things with XMLWidgets and
Michael DocBookDocument.

Michael Many thanks,

Michael 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: rackmountables must be of-wrapped

2000-05-25 Thread Phillip J. Eby

At 01:56 PM 5/25/00 +0400, Jephte CLAIN wrote:

When I don't wrap items like this, I get strange unauthorized errors.
Only the super user can use the items. All the other users (Managers or
not) can't.

In normal usage, one only accesses a rack from or in a Specialist.
Specialists wrap the objects in the context of the specialist for you.

I've just checked the code, however, and notice that
Specialist.__bobo_traverse__ does this wrapping, not Specialist.getItem, so
I will fix this in the next release.  That way, calling getItem on the
Specialist will ensure you have proper context.  Patch follows...


Index: Specialists.py
===
RCS file: /u/idsuser/REPOSITORY/ZProducts/ZPatterns/Specialists.py,v
retrieving revision 1.7
diff -u -r1.7 Specialists.py
--- Specialists.py  2000/05/18 05:24:49 1.7
+++ Specialists.py  2000/05/25 12:57:35
@@ -1,7 +1,6 @@
 from PlugIns import PlugInGroup
 from DataManagers import DataManager
 from Globals import HTMLFile, default__class_init__
-
 _marker = []
 
 
@@ -23,7 +22,7 @@
 if ob is _marker:
 ob = self.getItem(name)
 if ob is not None:
-return getattr(ob,'aq_base',ob).__of__(self)
+return ob
 raise 'NotFound'
 return ob
 
@@ -32,7 +31,8 @@
 return self.retrieveItem(key) # XXX need DTML check?
 for rack in self.rackList:
 item = rack.__of__(self).getItem(key)
-if item is not None: return item
+if item is not None:
+return getattr(item,'aq_base',item).__of__(self)
 
 def newItem(self, key=None):
 """Create a new item"""




___
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] Observer / Notification Interface Proposal

2000-05-25 Thread Phillip J. Eby

At 12:45 AM 5/25/00 -0400, Tres Seaver wrote:

Ah, ok -- I was planning simply to leverage the ZODB's facilities for
maintaining persistent references in the DefaultObservable mix-in; more
elaborate schemes would be possible (for instance to support
rack-mounted observers?)

Actually, just using a plain reference might cause you some problems.  If
you don't strip off the acquisition wrapper, you'll pickle the entire
acquisition tree for the subscriber, including the REQUEST and RESPONSE
objects.  But if you *do* strip off the wrapper, you'll call the observer
without its acquisition context, causing security and possibly other
problems.  I would suggest using object paths, ala ZCatalog, since this
fixes these problems as well as cross-database and outside-the-ZODB
references.  Also, it takes care of being able to pass Python-level methods
as observers, since you can't pickle a direct reference to a method.

The references don't have to be de-referenced unless an event actually
occurs, although the high cost of de-referencing objects (even without
using a path) does suggest to me that observers should at least register
some kind of channel name or list of names, to prevent needless
reactivations.  Unless, of course, the idea is for "subjects" to not
subclass Observable directly, but rather to have various "event" subobjects
which are callable observables.  Calling an "event" object could fire it,
relaying the event to the subscribers, who would subscribe to the
individual event sub-object, rather than to the main "subject" object.

An interesting side-effect of this approach is that it allows one to create
a subclass of "event" that can be added to any ObjectManager subclass.  One
could also create another subclass of event as a methoid for use in
class/ZClass definitions.  This subclass would store its subscription data
in its parent object, allowing the event object itself to be shared across
instances of the class.

Still another interesting possibility is the idea that event objects could
define their own calling parameters, and optionally relay those to the
observers, which would allow a more interesting dataflow.

In the work I've been doing on my SWARM project, workflow Plan objects have
a collection of Event objects which were planned to work similarly to this,
but a bit more complex.  Event objects were going to have Properties, and
Plans also had "Roles" (relationships to a workflow instance) which
effectively were the subscribers of the events.  Role objects receive all
event firings, and selectively forward or transform them for their
"audience" (the objects in that relationship to the workflow instance).
Plans and Phases could also have Forms which were effectively input forms
for the properties of an Event.  Last, but not least, calling the Event
object with property data would create an "event instance" object which
would have methods for such things as "don't process this event further",
and which would contain all the data for that firing.

All that is probably overkill for this interface, but the basic idea of
callable "event" sub-objects which are subscribed to by observers is I
think a useful pattern to apply here.


___
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] Observer / Notification Interface Proposal

2000-05-25 Thread Tres Seaver

Michel Pelletier [EMAIL PROTECTED] wrote:
 
 I'll do both, this is absolutely a desperately needed feature in the
 ZCatalog.  Currently, Cataloged items must take responsibility for
 notifying a catalog of their changes instead of the ZCatalog observing
 them.
 
 Amos and I talked about this over Pizza a couple weeks ago but we were
 thinking from a pretty Catalogcentric view; or at least I was.  I was
 considering an interface like the new Security API that could be
 imported in python and used to discover and notify catalogs of object
 changes.  But this now seems to me to be some kind of pattern where
 objects need to discover an appropriate or canonical resource, like a
 catalog.  This interface should be defined also, so that newly-born
 objects can notify a resources of their existence.  I've added this to
 the InterfacesWiki
 
 http://www.zope.org/Members/michel/Projects/Interfaces/Discovery
 
 Thoughts on how they relate?  Are they the same thing?

I think this pattern is orthagonal to the ObserverAndNotification
pattern, but is crucial to making things like 
TheClassFormerlyKnownAsCatalogAware and Ken's new WikiRelationship
object work.  CORBA solves this by mandating that the ORB provide a
lookup method::

   def resolve_initial_references( resource_type ):

where resource_type is a well-known string like 'NamingService', etc.

In our case, perhaps it needs to be::

   def findNearestResource( meta_type ):

which causes a walk up the containment hierarchy, searching for objects
of the given meta_type.

Tres.
-- 
=
Tres Seaver  [EMAIL PROTECTED]
Digital Creations   "Zope Dealers"   http://www.zope.org

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




[Zope-dev] zpatterns: win32 dll for DynPersist?

2000-05-25 Thread Jephte CLAIN

Hello,

Has someone compiled the DynPersist dll for win32?
if someone has done so, it would be glad to send me a copy by tomorrow.
it will help me greatly.

TIA,
jephte clain
[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] Observer / Notification Interface Proposal

2000-05-25 Thread Chris Withers

Evan Simpson wrote:
 This exists! (sort of).  ObjectManager.superValues accepts a list of
 meta_types, and returns a list of all objects of those meta_types which can
 be found in any ObjectManager in the current one's acquisition context.

and has done for ages... the original Squishdot code uses this to find
appropriate mailhosts and I'd be suprised if ZSQL methods didn't do the
same to find databse connections...

cheers,

Chris

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




Re: [Zope-dev] Re: ZCatalog and Unique IDs

2000-05-25 Thread Michel Pelletier

Evan Simpson wrote:
 
 
 In the case of Catalogs, much of the time we're probably not interested in
 cataloging "whatever lives at this path address"; 

At the moment this is true, but Jim and I have discussed the possibility
of ZCatalog being treating the paths less atomically and more as a
sequence of nodes from root to the target, this way, you could ask the
catalog for all objects below a certain point that match search
criteria, etc.

 we want information about
 a specific object.  Fortunately, the cut/copy/paste and rename
 implementations make the path approach workable.  As a matter of fact, the
 new mountable database code required changing the clipboard operations to
 use paths instead of object monikers.

And it looks like the event stuff is favoring paths also, I strongly
suggest we make sure any of these needs is captured in the proposed
traversal interface:

http://www.zope.org/Members/michel/Projects/Interfaces/Traversal

-- 

-Michel Pelletier

http://www.zope.org/Members/michel/MyWiki

Visit WikiCentral for the latest Zen:

http://www.zope.org/Members/WikiCentral

___
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] Observer / Notification Interface Proposal

2000-05-25 Thread Chris Withers

Michel Pelletier wrote:
 There allready exists such a thing, superValues([meta_type]).  But I
 think this is too weak to use as a discovery protocol.  An observable
 may not know or care what type of observer it wants to discover.  Also,
 when it finds a number of various resources, catalogs lets say, does it
 just notify them all?  Is there a concept of a default?  Can they
 negotiate?

Can this be limited by security? Take our Free Zope server, we don't
want something to discover everyone else's ZCatalog's

What about non-security related? There may be similar instances where
you don't want to discover anything other than a specific catalog...

Also, can an observer that gets notified during discovery just turn
around and so 'no, I don't want to do anything with your notification'?

cheers,

Chris

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




Re: [Zope-dev] Re: ZCatalog and Unique IDs

2000-05-25 Thread Chris Withers

Michel Pelletier wrote:
 At the moment this is true, but Jim and I have discussed the possibility
 of ZCatalog being treating the paths less atomically and more as a
 sequence of nodes from root to the target, this way, you could ask the
 catalog for all objects below a certain point that match search
 criteria, etc.

Okay, now it starts to make sense...

And I agree that the traversal stuff needs to handle this properly...

My take on it is this:

The URL is not the same as the path to the object. 

The path to the object should be unique, and always rooted at Zope's
root, I don't think the Traversal Interface is strong enough on this
point yet...

Mapped to this path could be any number of ways of accessing/exposing
objects which don't necessarily start at Zope's root.

Take HTTP access through apache virtual hosting for example.

Or exposing a sub-tree as files through FTP or WebDAV.

Is this true or am I missing something?

cheers,

Chris

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




Re: [Zope-dev] Re: ZCatalog and Unique IDs

2000-05-25 Thread Evan Simpson

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
 who's the CTO?

Jim Fulton, Chief Technology Officer.

  use paths instead of object monikers.

 Why not do both?

 Have an POID (CORBA style) to actually identify an object and then use
 paths of POIDS to identify stuff in a cotnext *when you need to*...

 comments?

A man with one watch knows what time it is;  A man with two is never sure.
That may not be a problem in this case, but I have a sneaking suspicion it
would be.  Still, if you can demonstrate that can be valuable and coherent,
it could probably be done.

Cheers,

Evan @ digicool  4-am


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




[Zope-dev] Proposed change in the authentication

2000-05-25 Thread Jim Fulton

I propose to change the order which a vacation in URL traversal or performed. See
and comment at:

http://www.zope.org/Members/jim/ZopeSecurity/ProposalToAuthenticateDuringURLTraversal

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]
Technical Director   (888) 344-4332  Python Powered!
Digital Creationshttp://www.digicool.com http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
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] another validation problem

2000-05-25 Thread Brian Lloyd

  The latest CVS version is giving autorization demands (and 
 failures) with this DTMLmethod.
  This kind of construct used to work fine.
  
  dtml-var standard_html_header
  h2dtml-var title_or_id dtml-var document_title/h2
  p
  dtml-with "_.namespace(SUB=[1,2])"
  dtml-if "_.len(SUB)0"non-emptydtml-elseempty/dtml-if
  /dtml-with
  /p
  dtml-var standard_html_footer
 
 Perhaps newly created names in the _ namespace do not get 
 understood by
 the new security guts.

Hi guys - 
 
I _just_ checked in a fix for this. A piece of the namespace
machinery was not updated in the required way to play nice 
with the new infrastructure. I've included the reply I made
to the bug report:


Thanks for the report - I've tracked this down to a bit of 
the DTML rendering machinery that didn't get updated to 
play nice with the new security infrastructure. Any DTML 
that tried to use subobjects of an object associated with 
a name via a namespace would fail validation. The manage_tabs happened
to do this.

I've fixed this for 2.2. In the meantime, if you want to 
patch your current installation, you can make a one-line
change to DocumentTemplate/DT_Util.py. At line 254, change:

class namespace_: pass

to:

class namespace_:
__allow_access_to_unprotected_subobjects__=1


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



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




Re: [Zope-dev] Proposed change in the authentication

2000-05-25 Thread Chris Withers

Jim Fulton wrote:
 http://www.zope.org/Members/jim/ZopeSecurity/ProposalToAuthenticateDuringURLTraversal

I wonder whether this would fix the following problem:

http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/82AE22A20C7E88AE

What I reckon is happening is that HTTP is being dumb and presenting the
authentication information for the image 'black'. Black knows nothing
about this user (because it's defined in a subfolder) and so throws an
authentication exception, ignoring the fact that _anyone_ should be able
to view this image...

Ideas anyone?

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] Ending up with a wrapped object through the web?

2000-05-25 Thread Kevin Dangoor

I'm trying to import KM|Net News into the latest Zope CVS. I am unable to
import the .zexp or XML files into the latest (tracebacks at the end).

When importing the .zexp, I get an "Attempt to store a wrapped persistent
object" error. This is really puzzling, because I'm not sure how a
completely through-the-web Product would have a wrapped object stored in it.
I tried removing the PythonMethods to see if they were stored in an unusual
way, and this did not change the behavior...

Does anyone have any ideas about this? It's very odd and could be a major
nuisance for people who are trying to move things between 2.1.x and 2.2...

Kevin

The .zexp gives this error:

  STRONGError Type: InvalidObjectReference/STRONGBR
  STRONGError Value: Attempt to store a wrapped persistent
object/STRONGBR
Traceback (innermost last):
  File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 224, in
publish_module
  File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 189, in
publish
  File /home/kid/Zope2/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 179, in
publish
  File /home/kid/Zope2/lib/python/ZODB/Transaction.py, line 237, in commit
  File /home/kid/Zope2/lib/python/ZODB/Connection.py, line 347, in commit
(Info: (('OFS.Application', 'Application'),
'\000\000\000\000\000\000\000\002', ''))
InvalidObjectReference: (see above)


The XML generated by 2.1.6 gives this error:
  STRONGError Type: TypeError/STRONGBR
  STRONGError Value: ('not enough arguments; expected 2, got 1',
extension class ZClasses.Method.MW at 834bc68, ())/STRONGBR
Traceback (innermost last):
  File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 224, in
publish_module
  File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 189, in
publish
  File /home/kid/Zope2/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 175, in
publish
  File /home/kid/Zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_importObject)
  File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: manage_importObject)
  File /home/kid/Zope2/lib/python/OFS/ObjectManager.py, line 506, in
manage_importObject
(Object: ElementWithAttributes)
  File /home/kid/Zope2/lib/python/ZODB/ExportImport.py, line 216, in
importFile
  File /home/kid/Zope2/lib/python/ZODB/ExportImport.py, line 318, in
importXML
  File /home/kid/Zope2/lib/python/ZODB/ExportImport.py, line 283, in
importFile
TypeError: (see above)

http://www.byproducts.com - Humor and Novelties


___
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: Proposed change in the authentication

2000-05-25 Thread Jim Fulton



Jim Fulton wrote:
 
 I propose to change the order which a vacation in URL traversal or performed. See

Sorry, I meant "authentication", not "a vacation". :)

 and comment at:
 
 http://www.zope.org/Members/jim/ZopeSecurity/ProposalToAuthenticateDuringURLTraversal

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]
Technical Director   (888) 344-4332  Python Powered!
Digital Creationshttp://www.digicool.com http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
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] ZSQL Methods

2000-05-25 Thread David Cooper


Using ZSQLMethods against an ORACLE 8.0.6 Database.

I have two tables, each with a NUMBER(6) key field.

If I create a method which selects against each of the tables
then method returns an integer (e.g. 5040), as expected.

select index_number
from names
where name = 'name'

or 

select index_number
from aliases 
where alias = 'name'

If I attempt to get the combined list

select index_number
from names
where name = 'name'
union 
select index_number
from aliases 
where alias = 'name'

I get a float back (e.g. 5040.0).

Is this expected/correct? If so how do I force it to return the integer. 

David Cooper
[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] Proposed change in the authentication

2000-05-25 Thread Ty Sarna

In article [EMAIL PROTECTED],
Jim Fulton  [EMAIL PROTECTED] wrote:

 I propose to change the order which a vacation in URL traversal or

Good idea, we could all use a vacation :-)

 performed.  See and comment at:
 http://www.zope.org/Members/jim/ZopeSecurity/ProposalToAuthenticateDuringURLTraversal

To clarify, do you mean that authentication will be done at *every* user
folder found along the way, or at the first one found, or attempted at
each one until one succeeds, so long as anonymous still has permission
to continue walking down, or what? 

___
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] another validation problem

2000-05-25 Thread Robin Becker

In article [EMAIL PROTECTED], Michel Pelletier
[EMAIL PROTECTED] writes
...

Does it work if you:

dtml-with "_(SUB=[1,2])"
 ...
/dtml-with

and call the namespace directly?  The two are supposed to be synonymous
but your method is depricated so perhaps it works the other way, if not,
I'd suggest putting this in the collector for us to fix before the next
release.
...
nope this fails as well.
-- 
Robin Becker

___
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] Resource Discovery (was Observer / Notification Interface Proposal) Proposal)

2000-05-25 Thread Phillip J. Eby

At 10:03 AM 5/26/00 +1000, Anthony Baxter wrote:
 "Phillip J. Eby" wrote

 I would suggest that it ask for an interface, rather than a meta_type.
 Otherwise, you've hardwired yourself into a single object type with no
 extensibility.  For example, an SQL method wants the nearest SQL
 connection, but shouldn't have to explicitly ask for each kind of SQL
 connection (Sybase, Oracle, etc.)

In that case, would you have a matching call in the observer objects 
where they can specify what it is that they offer? Rather than basing it
on type, you'd say 'find the nearest resource that wants to know about
blah'. 

I would say that resource discovery is orthogonal to event subscription,
and that if you were discovering resources for the purpose of sending them
events, you should search for an interface that lets you query whether that
object wants to receive events.  :)

In practice, however, doing resource discovery for event subscriptions is
backwards.  If you have a Catalog or some other thing that wants to
subscribe to events below it, it should subscribe to events from containers
to know when things are added, (including sub-containers, which it could
also subscribe itself to) then subscribe to the objects themselves whenever
it's notified of an add.  Having "catalog aware" objects look for a catalog
doesn't make sense in the context of an event-driven system.  Objects need
only generate change events, and containers need only generate add/delete
events.  The rest can be done by the Catalog or other observer.

Notice, by the way, that a Catalog that worked this way would be extremely
flexible; you could specify persistent rules for what kinds of objects
would be "found into" the Catalog, and you could dynamically add/remove the
catalog's hooks from various folders, "pruning" its "search" scope.  The
catalog itself would hold no references to the objects which send it
events, but could wander far and wide over the database.

At this point it's really tempting to take a whack at adding an event
system to ZPatterns based on the models discussed so far, except for the
fact that I'm rather behind on getting its more modest event management
system finished, *and* the fact that Zope doesn't really have a robust
traversal interface at the moment.  If 2.2 ends up with a solid traversal
system, I will certainly be willing to take a look at it.

One interesting interplay between ZPatterns events and Zope events, is that
ZPatterns triggers (aka RuleAgents) could be used to set up rules which
fire events on managed objects.  This would allow one to wrap custom events
and subscriptions around any DataSkin-based object instance, without the
skin's class having to have been designed to send those events.  An
interesting idea, indeed.


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