Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
e9bead95
Commit
e9bead95
authored
Jun 19, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged in getPropertyType support.
parent
bb9c7193
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
lib/python/OFS/PropertySheets.py
lib/python/OFS/PropertySheets.py
+11
-1
No files found.
lib/python/OFS/PropertySheets.py
View file @
e9bead95
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Property sheets"""
__version__
=
'$Revision: 1.
49
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
50
$'
[
11
:
-
2
]
import
time
,
string
,
App
.
Management
,
Globals
from
ZPublisher.Converters
import
type_converters
...
...
@@ -204,6 +204,16 @@ class PropertySheet(Traversable, Persistent, Implicit):
raise
ValueError
,
'Invalid property value: wrapped object'
return
def
getPropertyType
(
self
,
id
):
"""Get the type of property 'id', returning None if no
such property exists"""
pself
=
self
.
p_self
()
self
=
self
.
v_self
()
for
md
in
pself
.
_properties
:
if
md
[
'id'
]
==
id
:
return
md
.
get
(
'type'
,
'string'
)
return
None
def
_setProperty
(
self
,
id
,
value
,
type
=
'string'
,
meta
=
None
):
# Set a new property with the given id, value and optional type.
# Note that different property sets may support different typing
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment