Re: [Zope-dev] Soft links again

2000-09-29 Thread Ibañez Palomar Juan David



Hi Shane,

and thanks for Symlink, it's a big step towards solve the problem,
but remains an issue...

It would be great if the symbolic link could have a different id than
the object referenced. But with the __of__ based solution "link.id" is
always "referenced_object.id".

How this could be done?


 
 Okay, I've posted a proof of concept.  Please keep in mind that this
 could be dangerous in terms of security, although I've done a couple of
 things to make it safer.  Also, there's currently a buglet in
 acquisition that makes it so that you can only perform the actions on
 the symlink which "anonymous" is allowed to do.
 
 http://www.zope.org/Members/hathawsh/Symlink/index_html
 
 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] Soft links again

2000-09-29 Thread Ibañez Palomar Juan David

 
 On Fri, 29 Sep 2000, Ibañez Palomar Juan David wrote:
 
  It would be great if the symbolic link could have a different id than
  the object referenced. But with the __of__ based solution "link.id" is
  always "referenced_object.id".
  
  How this could be done?
 
 I think you'd need a special kind of wrapper.  It would have the
 ability to act as if it were the object itself while transparently
 overriding specific attributes.  I've pondered creating such
 a wrapper before, but it crashed so much that I eventually moved on to
 easier stuff. :-)
 
 I think the ability is all there in ExtensionClass, but the details are
 quite difficult.
 
 Shane
 

If I've understanded it right it means I must go to C risking my mental
sanity (1), other possibility would be to redesign/reimplement my app (2).
Ummhh... I think I'll try 1, it seems more entertaining :), so wish me luck.

thanks,
david


___
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] Soft links again

2000-09-26 Thread Ibañez Palomar Juan David



Hi all,


First, I'm using Zope 2.2.1 (Debian package).

I've been trying to implement zope objects that behave like unix soft
links. The message

  http://lists.zope.org/pipermail/zope-dev/2000-July/005963.html

by Shane proposes an implementation based in the __of__ method:

class SoftLink (SimpleItem):
  def __init__(self, path):
self.path = path

  def __of__(self, parent):
ob = self.restrictedTraverse(self.path)
return getattr(ob, 'aq_base', ob).__of__(parent)


but it fails when I try to create an instance:

Traceback (innermost last):
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_addImportedSubject)
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: manage_addImportedSubject)
  File /var/lib/zope/Products/LLEU/subjects.py, line 1129, in manage_addImportedSubject
(Object: Traversable)
  File /usr/lib/zope/lib/python/OFS/ObjectManager.py, line 250, in _setObject
(Object: Traversable)
  File /usr/lib/zope/lib/python/OFS/ObjectManager.py, line 236, in _getOb
(Object: Traversable)
AttributeError: A00


A little of debug shows that the object has been added (line 249, see below),
the exception raises when it tries to get the object (line 250). The hasattr
function (line 234) returns false but the object has been added (it's in the
__dict__) attribute and its __off__ method is called when the hasattr function
is called.


What I'm doing wrong?

Thanks,
david



ObjectManager.py:

class ObjectManager(

...

def _setOb(self, id, object): setattr(self, id, object)
def _delOb(self, id): delattr(self, id)
def _getOb(self, id, default=_marker):
234 if not hasattr(aq_base(self), id):
if default is _marker:
236 raise AttributeError, id
return default
return getattr(self, id)

def _setObject(self,id,object,roles=None,user=None, set_owner=1):
v=self._checkId(id)
if v is not None: id=v
try:t=object.meta_type
except: t=None
self._objects=self._objects+({'id':id,'meta_type':t},)
# Prepare the _p_jar attribute immediately. _getCopy() may need it.
if hasattr(object, '_p_jar'):
object._p_jar = self._p_jar
249 self._setOb(id,object)
250 object=self._getOb(id)


___
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] Calendar tag 0.9.22 released

2000-09-18 Thread Ibañez Palomar Juan David


Hi all,

There's a new version of the calendar tag, I need feedback about
it, specially from those who use the "setCalendar('url_', ...)"
hook or the "linkDate(...)" function.


thanks,
david

___
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] Calendar Tag 0.9.21 released

2000-09-09 Thread Ibañez Palomar Juan David



Hi all,

The version 0.9.21 of the calendar tag has been released, it can be
downloaded from "http://www.zope.org/Members/jdavid/Calendar".

This is a beta version, pre-1.0. If you're aware of any bug or want
a *small* change to be done in 1.0 tell me now (hope to release 1.0
and start 1.1.x soon).


regards,
david

___
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] CalendarTag, year mode image

2000-09-07 Thread Ibañez Palomar Juan David



Please, look at "http://estce.act.uji.es/calendar.html", there
are several proposed images.

The only problem I see is when the year mode is selected, since
there's more white than black it's not clear which mode is
selected.


opinions? votes? more suggestions?


 
 The calendar mode icons on the Palm are based on the visible 
 structure of the diffent screens (one day, one row of days, 
 a matrix of days). On the newer palms, there is another view
 (current day and TODO items; a single dot above some lines). 
 
 To keep in the same "language", I would use a big, black block 
 or circle to show "too many days" to view at once.
 
 
 
 -- 
 Jens Quade * [EMAIL PROTECTED] * Bonn
 
 


___
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] CalendarTag, year mode image

2000-09-07 Thread Ibañez Palomar Juan David



I've updated the page (http://estce.act.uji.es/calendar.html)
following your suggestions, if nobody disagrees I'll release
the CalendarTag 0.9.21 with that new look.


 
 [EMAIL PROTECTED] (Ibañez Palomar Juan David) writes:
 
  Please, look at "http://estce.act.uji.es/calendar.html", there
  are several proposed images.
  
  The only problem I see is when the year mode is selected, since
  there's more white than black it's not clear which mode is
  selected.
 
 You are right, it's dificult to decide wether an icon is selected or not.
 
 Of the given proposals, i'd prefer proposal 0, because the other do not
 have enough "structure".
 
 Maybe you could use color, as my Palm does :).
 (black on white) changes to (white on blue) on selection. 
 
 jens
 
 
 
 
 -- 
 Jens Quade * [EMAIL PROTECTED] * Bonn
 
 


___
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] CalendarTag, year mode image

2000-09-06 Thread Ibañez Palomar Juan David


Hi all,

I'd like to release the 0.9.21 version of the CalendarTag soon, but
first I want to change the year mode image, currently it's an "Y" which
is not very international, I'd like to see a language neutral image.

The interface of the CalendarTag is based in the Palm Pilot, but the
Palm III I've here lacks the year mode, I think the Palm VII has.

Could somebody send me an international image for the CalendarTag
year mode?


Thanks in advance,
david

___
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] CalendarTag fix for Zope 2.2

2000-07-17 Thread Ibañez Palomar Juan David


Shane already told me about this bug, the latest release (0.9.17) is fixed.

 
 Here is a small patch to make the lovely calendar tag play nice with
 DT_Util.namespace() in Zope 2.2:
 
  $ diff -c lib/python/Products/Calendar/CalendarTag.py \
 lib/python/Products/Calendar/CalendarTag.py.org
 *** lib/python/Products/Calendar/CalendarTag.py  Sun Jul 16 21:39:27 2000
 --- lib/python/Products/Calendar/CalendarTag.py.org  Sun Jul 16 21:41:40 2000
 ***
 *** 248,254 
   __call__ = render
 
   def render_day_(self, md, date, firstday):
 ! ns = namespace(md,
   date = date,
   mode = self.mode,
   firstday = firstday,
 --- 248,254 
   __call__ = render
 
   def render_day_(self, md, date, firstday):
 ! ns = namespace(self,
   date = date,
   mode = self.mode,
   firstday = firstday,
 
 namespace() now insists that its self argument be an InstanceDict,
 which caused it to barf.
  
 -- 
 =
 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 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] Re: [Zope-dev] CalendarTag fix for Zope 2.2

2000-07-17 Thread Ibañez Palomar Juan David


Shane already told me about this bug, the latest release (0.9.17) is fixed.

 
 Here is a small patch to make the lovely calendar tag play nice with
 DT_Util.namespace() in Zope 2.2:
 
  $ diff -c lib/python/Products/Calendar/CalendarTag.py \
 lib/python/Products/Calendar/CalendarTag.py.org
 *** lib/python/Products/Calendar/CalendarTag.py  Sun Jul 16 21:39:27 2000
 --- lib/python/Products/Calendar/CalendarTag.py.org  Sun Jul 16 21:41:40 2000
 ***
 *** 248,254 
   __call__ = render
 
   def render_day_(self, md, date, firstday):
 ! ns = namespace(md,
   date = date,
   mode = self.mode,
   firstday = firstday,
 --- 248,254 
   __call__ = render
 
   def render_day_(self, md, date, firstday):
 ! ns = namespace(self,
   date = date,
   mode = self.mode,
   firstday = firstday,
 
 namespace() now insists that its self argument be an InstanceDict,
 which caused it to barf.
  
 -- 
 =
 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 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 )