Re: [Zope-dev] Allowing secure 'import' access in zope folder hosting

2001-04-21 Thread Zopista

 Just a random, related thought that came up: Wouldn't it be nice
 if people could devellop locally on their own zope (under windows
 or unix) and hit the 'Sync' button on their "SyncedFolder" to
 transparently upload their work to the zope server where it becomes
 live immediately? (ok, this wouldn't work for external databases)

 Just a thought. I know it doesn't cover all situations and there are
 other ways to do this (next to just developping remotely using versions).

I have a system that does that now using xml-rpc. Im trying to turn it into
a product so I can get release it. It can be a big security headache

--
  Andy McKay



___
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 AttributeProvider question

2001-04-21 Thread Steve Alexander

Christian Scholz wrote:

 Good evening everybody!
 
 I have some question regarding attribute and agent programming for ZPatterns.
 
 I have some provider which is registered for the "handlers" and "attributes"
 methods and some attributes.
 
 My problem is when trying to create a new object and directly editing it, e.g.
 
 obj=newItem()
 obj.propertysheets.data.manage_changeProperties(foobar=13)
 
 the propertysheet is defined and my provider is also registered for
 handling the property "foobar". Unfortunately my SetAttributeFor() method
 is never called.


Have you defined a namesForRegistration method in your provider?

See Components.py for an example:


   lib/python/Products/ZPatterns/SkinScript/Components.py

--
Steve Alexander
Software Engineer
Cat-Box limited


___
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 AttributeProvider question

2001-04-21 Thread Christian Scholz

Hi!

  Good evening everybody!
  
  I have some question regarding attribute and agent programming for ZPatterns.
  
  I have some provider which is registered for the "handlers" and "attributes"
  methods and some attributes.
  
  My problem is when trying to create a new object and directly editing it, e.g.
  
  obj=newItem()
  obj.propertysheets.data.manage_changeProperties(foobar=13)
  
  the propertysheet is defined and my provider is also registered for
  handling the property "foobar". Unfortunately my SetAttributeFor() method
  is never called.
 
 
 Have you defined a namesForRegistration method in your provider?

Yes, as said above it registers for handlers and attributes. Also
_objectChanged and _SetAttributeFor() etc. are called. They're just not called 
directly after creating the object (when being in the same request that is).

cheers,
  Christian


-- 
COM.lounge  http://comlounge.net/
communication  design [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] ZPatterns AttributeProvider question

2001-04-21 Thread Phillip J. Eby

At 08:18 PM 4/21/01 +0200, Christian Scholz wrote:
Hi!

  Good evening everybody!
  
  I have some question regarding attribute and agent programming for
ZPatterns.
  
  I have some provider which is registered for the "handlers" and
"attributes"
  methods and some attributes.
  
  My problem is when trying to create a new object and directly editing
it, e.g.
  
  obj=newItem()
  obj.propertysheets.data.manage_changeProperties(foobar=13)
  
  the propertysheet is defined and my provider is also registered for
  handling the property "foobar". Unfortunately my SetAttributeFor() method
  is never called.
 
 
 Have you defined a namesForRegistration method in your provider?

Yes, as said above it registers for handlers and attributes. Also
_objectChanged and _SetAttributeFor() etc. are called. They're just not
called 
directly after creating the object (when being in the same request that is).

_objectChanged() is a transaction-commit message.  You'll only get it when
the (sub)transaction commits.  You'll receive _objectChanging() just
*before* the object changes.

As for _SetAttributeFor(), it should be called at the time
manage_changeProperties executes, not at object creation.  Are you sure
that you have it properly named and that it isn't still being defined by
one of your ancestor classes instead?  The "AttributeProvider" and
"GTMixin" base classes in ZPatterns implement _SetAttributeFor() by simply
noting the change for later.  If you don't override this behavior, your
class won't see _SetAttributFor() itself.


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