Re: API for setting/getting values on Dexterity content

Thomas Massmann <thomas.massmann-15SDrZ/[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
Hi Andreas,

Andreas Jung wrote:
> 
>> So setting/getting a schema value could be (based on Andreas'
>> suggestion): plone.api.content.set_value(obj, fieldname,  value, 
>> behavior='behavior_name') value = plone.api.content.get_value(obj,
>> fieldname, behavior='behavior_name')
> 
>> Same for Dexterity base classes: obj.set_value(fieldname, value,
>> behavior='behavior_name') value = obj.get_value(fieldname,
>> behavior='behavior_name')
> 
> 
> 
> Why do you want the behavior name as explicit part of the API?
> My position is that this should be handled under the hood.

How do you want to handle conflicts? I can think of a direct access for
default behaviors (this can be handled by the api) and an indirect
access for 3rd party behaviors. Just an idea ;)

Thomas


> 
> Andreas

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
signature.asc (application/pgp-signature, 945 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJUR58DAAoJEI51/d0jlpyM+sYP/2fjQSZNgFXAYJaOLLhCkW6d
kPfDDS/sOPs8Oq4trPf5Xt6/82gHvjEfE6DCwDr3GsOVG88WwOM6oV9LfHEWV/f6
jF6dJ1JItw2eRz8zMW3INcv0NgDu+qZxQYhEmNQ8t6br2TP3U9bukmJfcm188nTO
Jqoymm6nScdtiGJh8snyHsHhjuFO3UukhRLmnEQmbtXcA1OkQGidesmWofnKuaTJ
7sP9e7FvEzf2rp5sqdxo6uFvlNx3B9qVhCJuvEfrB+c3U9//l24nmk6NipF2PDZX
KaY74IOPS/hDaq4SbpLhRPkWPr0YmiEcJIeAoh7399l8iFH88o/4m0qnCSLaNcr3
REA89h+ocPxP8mMkDtmO/vDYKrCl203lvLcMPPNO9R0KW+EKVQIjdJ1b1bdw3jnl
MUook6fxsdTTkOqJ6wfJAvqX8HaqbAAOk3OUCTeF6rYP+pz58CQJtnpe8pU95+HL
Rum+vVHBi8WFdjk6qZkJwQJPQ5Q6mOr00YtfBY0ZYPSeBKdljhkP7aYoni7zw9Fa
YGkL925t1IzN01MZ9CfgjuKrw3r12tYOJiPWRI3O4Jcl7mVbdQJ5xorUPtkMdW6V
5GiryI6gpesm4pLfi6fkKRXBRqzSvl1UBQUTUxy/BWIq0bI4iP2x8Zd15f9yWRMD
Llyd+XXhxFFX3V4RRs16
=KgsR
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.