[Zope-dev] catalog and versions

2001-05-04 Thread Stefane Fermigier

It seems to me that when I create a CatalogAware objet in a version,
it doesn't get into the catalog after the version is committed (in fact,
it doesn't event get into the catalog inside the version). 

Am I right? Is this considered normal behavio(u)r? Any idea for a workaround?

Regards,

S.

-- 
Stéfane Fermigier, Tel: +33 (0)6 63 04 12 77 (mobile).
http://nuxeo.com/  http://portalux.com/  http://aful.org/
Amazon: we patent the dot in .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] ANN: Proposal ContentNegotiation

2001-05-04 Thread Toby Dickenson



 -Original Message-
 From: Andreas Jung [mailto:[EMAIL PROTECTED]]
 Sent: 03 May 2001 20:23
 To: Toby Dickenson
 Cc: zope-dev
 Subject: Re: [Zope-dev] ANN: Proposal ContentNegotiation
 
 
 
 From: Toby Dickenson [EMAIL PROTECTED]
 To: 'Andreas Jung' [EMAIL PROTECTED]
 Sent: Thursday, May 03, 2001 1:04 PM
 Subject: RE: [Zope-dev] ANN: Proposal ContentNegotiation
 
 
  Your proposal suggests that published objects should 
 generally return
  pre-encoded objects in 8-bit strings. This is the one 
 detail which in my
  experience looks *wrong* and is very much dependant on my proposal.
 
 Not really - I only say that the internal character set is currently
 ascii/iso-8859-1.
 I did not mention that this will be the default character set 
 in the future.

Its not a question of the 'default' encoding if (as in your proposal) the
published object explicity specifies the character encoding of a pre-encoded
object.

Im referring to the section where you say:

: If the object creates a RESPONSE in another character set
: than the internal character set it must indicate this by
: setting an attribute of the RESPONSE object to the used
: character set e.g.:

:   RESPONSE.charset = 'utf-8'(either as attribute or by a method
call)

I think we are mixing up 'character set' and 'character encoding' here.
The character set of html (and xml) is the Unicode set.
utf-8 is a character encoding, not a character set.
Given the semantic of this proposed attribute, the name 'character_encoding'
would be more appropriate.

In my experience, forcing published methods to deal with character encoding
is a bad idea (I know because I tried that in my first iteration). Your
proposal suggests that methods return 8-bit strings, specifying the
character encoding of that string in the RESPONSE. This makes it hard to
combine methods from two different components that happen use different
character encodings.

Note that since many components already use latin-1, the usefulness of this
aspect proposal is low.

If they need a wider character set then using Unicode is the only practical
approach.

Ill write up a full proposal for how this would fit together on the wiki.

(On a different subject, I think the default encoding will always have to
stay as latin1 in order to support pre-existing object databases )







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

2001-05-04 Thread Magnus Heino (Rivermen)


Hi.

In my Zope product, I've got this;

 manage_options = SimpleItem.manage_options+(
{'label':'Edit', 'action':'manage_main'},
)

If I view the management sceen of this product, I get four tabs (Undo,
Ownership, Security and Edit).

But If I click on Edit, all tabs but the edit tab is removed. Why?

My Edit dtml looks like this;

dtml-var manage_page_header
dtml-var manage_tabs
 
p class=form-help
This is the edit form.
/p
 
dtml-var manage_page_footer

Thanks,

/Magnus

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

2001-05-04 Thread Adrian Hungate
Title: RE: [Zope-dev] manage_tabs





Could this be an Internet Explorer failing to pass the AUTH info problem?


It sounds as though you are getting access to the edit tab via Anonymous permissions (Have you restricted access to the manage_main method using the __permissions__ settings)? In that case, Zope will not show you the other tabs because the Anonymous User is not allow to see them.

(Does it show that this one got me too???)


What version of which browser are you using?


Adrian...
--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited



-Original Message-
From: Magnus Heino (Rivermen) [mailto:[EMAIL PROTECTED]]
Sent: Friday, 04 May 2001 13:09
To: '[EMAIL PROTECTED]'
Subject: [Zope-dev] manage_tabs




Hi.


In my Zope product, I've got this;


manage_options = SimpleItem.manage_options+(
 {'label':'Edit', 'action':'manage_main'},
 )


If I view the management sceen of this product, I get four tabs (Undo,
Ownership, Security and Edit).


But If I click on Edit, all tabs but the edit tab is removed. Why?


My Edit dtml looks like this;


dtml-var manage_page_header
dtml-var manage_tabs

p class=form-help
This is the edit form.
/p

dtml-var manage_page_footer


Thanks,


/Magnus


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





SV: [Zope-dev] manage_tabs

2001-05-04 Thread Magnus Heino (Rivermen)
Title: RE: [Zope-dev] manage_tabs



Well, 
right now I'm doing it like this...

security = 
ClassSecurityInfo()

security.declarePublic('manage_editForm')manage_editForm = 
DTMLFile('dtml/editForm', 
globals())security.declarePublic('manage_main')manage_main = 
manage_editForm



Browser doesn't change anything.

/Magnus



  Could this be an "Internet Explorer failing to pass the AUTH 
  info" problem? 
  It sounds as though you are getting access to the edit tab via 
  Anonymous permissions (Have you restricted access to the manage_main method 
  using the __permissions__ settings)? In that case, Zope will not show you the 
  other tabs because the Anonymous User is not allow to see them.
  (Does it show that this one got me too???) 
  What version of which browser are you using? 
  Adrian... -- Adrian Hungate Manager, European I.S. 
  Acucorp UK Limited 
  -Original Message- From: 
  Magnus Heino (Rivermen) [mailto:[EMAIL PROTECTED]] 
  Sent: Friday, 04 May 2001 13:09 To: 
  '[EMAIL PROTECTED]' Subject: [Zope-dev] 
  manage_tabs 
  Hi. 
  In my Zope product, I've got this; 
  manage_options = SimpleItem.manage_options+( 
   {'label':'Edit', 
  'action':'manage_main'},  ) 
  
  If I view the management sceen of this product, I get four 
  tabs (Undo, Ownership, Security and Edit). 
  But If I click on "Edit", all tabs but the edit tab is 
  removed. Why? 
  My "Edit" dtml looks like this; 
  dtml-var manage_page_header dtml-var manage_tabs  
  p class="form-help" This is 
  the edit form. /p  dtml-var 
  manage_page_footer 
  Thanks, 
  /Magnus 
  ___ 
  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] Threads...

2001-05-04 Thread Magnus Heino (Rivermen)


Hi.

I want to start a thread from my product.

I'm doing it in the same way as the code below.

Label is set to 'a' as default. If I change this to 'b' and save, Label is
changed to contain 'b'.

But, it seems as if Label is loaded with the saved value at some later point
than the last row below, because Label always contains 'a' at that point.

So the question is; Where should I start the thread? When are the saved
properties loaded?


class FooBar(SimpleItem, PropertyManager):
 
 
meta_type = 'FooBar'
 
_properties = (
{'id':'Label', 'type':'selection', 'mode':'w',
'select_variable':'values'}
)
 
values = ('a', 'b', 'c')
 
Label = values[0]
 
manage_options = (
{'label':'Edit', 'action':'manage_main'},
)+PropertyManager.manage_options+\
SimpleItem.manage_options
 
# Create a SecurityInfo to define security
# assertions later on
security = ClassSecurityInfo()
 
_v_fooThread = FooThread.FooThread(Label)
_v_fooThread.start()

/Magnus

___
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] determining database manager type from z database connection?

2001-05-04 Thread Kent Polk

On 3 May 2001 21:15:01 -0500, Andreas Heckel wrote:
 Kent Polk wrote:
 
 Is there a generic way to determine what 'brand' of database manager
 a Zope database connection is connected to by interrogating the
 connection object?
 
 dtml-in SQLConnectionIDs
 bID:/bdtml-var sequence-key 
 btitle:/bdtml-var _.getitem(_['sequence-item']).title 
 btype:/bdtml-var _.getitem(_['sequence-item']).database_type
 br
 /dtml-in
 
 database_type is the 'brand' of the Zope DA. If you are connectet to a 
 PostgreSQL DB using ZPyGreSQLDA you get 'PyGreSQL'. Using ZPoPyDA it
 returns 'PoPy'. That's not exactly what you are looking for but I hope
 it helps.

Actually, that is exactly what I was looking for.

Thanks Much!


___
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] catalog and versions

2001-05-04 Thread Dieter Maurer

Stefane Fermigier writes:
  It seems to me that when I create a CatalogAware objet in a version,
  it doesn't get into the catalog after the version is committed (in fact,
  it doesn't event get into the catalog inside the version).=20
  
  Am I right? Is this considered normal behavio(u)r? Any idea for a workaro=
  und?
I do not know, but I would be happy if it is this way...

   Otherwise, any change in a version would look the catalog into this
   version. No two versions could work in parallel, as
   all would need the catalog.

But I fear, that precisely that will happen


In my applications, I make heavy use of versions but not
yet essential use of CatalogAware. This starts to
change with the CMF as it uses corresponding methods
to keep the catalog updated.


Dieter

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