Re: [Zope] Tiny tables

2000-10-19 Thread Graham Chiu

On Fri, 13 Oct 2000 19:40:08 -0400
 [EMAIL PROTECTED] wrote:

 The problem with the TinyTable and TinyTablePlus products
 is that they use
 the tokenize.py module which treats any field value as a
 possible Python expression.
 Since ":" is a special token in Python, it gets
 interpreted as such. One
 quick way to get around this is to quote your field value
 -
 
 "criteria:tokens"

Hi,

I tried this, and the tinytables just discarded the column.

As a temporary fix, I've just created a ZClass to hold the
tokens.

What I would like to do now is feed the tokens into a
sqlmethod, which then populates a tinytable with new values.
My zclass has a string attribute called p_tinytable which
holds the name of the tinytable to be changed.

However, if I call the function as follows:

dtml-with MyZClass
  dtml-call "p_tinytable.manage_editData(newData)"
/dtml-with

I get:

Error Type: AttributeError
Error Value: 'string' object has no attribute
'manage_editData'

or

dtml-with MyZClass
  dtml-call "_[p_tinytable].manage_editData(newData)"
/dtml-with

I get:

Error Type: AttributeError
Error Value: manage_editData

--
Graham Chiu

___
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] Tiny tables

2000-10-13 Thread Dieter Maurer

Graham Chiu writes:
  I tried storing these in tiny tables, but it doesn't seem
  that tiny tables allow one to store tokens.  If I specify
  the value as say, criteria:tokens, it gets changed to just
  criteria.
Probably, This is a ZPublisher feature. It interpretes
":type" suffixes of form variable and parameter names
to call for a type conversion of the value.

As far as I know, there is not escape possibility.
Can you change the ':' into a different character?


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] Tiny tables

2000-10-13 Thread andres

The problem with the TinyTable and TinyTablePlus products is that they use
the tokenize.py module which treats any field value as a possible Python expression.
Since ":" is a special token in Python, it gets interpreted as such. One
quick way to get around this is to quote your field value -

"criteria:tokens"

You may have to deal with the quotes later on, although I think they get
stripped after the value survives the tokenize.py module.

On Fri, Oct 13, 2000 at 08:08:34AM +1300, Graham Chiu wrote:
 
 I would like to run some regular reports based upon
 sqlmethods.  The input to these are a mixture of normal
 values, and some tokenised values.
 
 I tried storing these in tiny tables, but it doesn't seem
 that tiny tables allow one to store tokens.  If I specify
 the value as say, criteria:tokens, it gets changed to just
 criteria.
 
 Any suggestions as to how to store the input as tokens for
 my reports?
 
 --
 Graham Chiu
 
 ___
 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 )
 
 

-- 
--
Andres Corrada-Emmanuel   Email: [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] Tiny tables

2000-10-12 Thread Graham Chiu


I would like to run some regular reports based upon
sqlmethods.  The input to these are a mixture of normal
values, and some tokenised values.

I tried storing these in tiny tables, but it doesn't seem
that tiny tables allow one to store tokens.  If I specify
the value as say, criteria:tokens, it gets changed to just
criteria.

Any suggestions as to how to store the input as tokens for
my reports?

--
Graham Chiu

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