[Zope-dev] Patch to allow rearranging properties via "First"
Jeff K. Hoffman
jeff@goingv.com
Mon, 14 Feb 2000 12:50:37 -0500 (EST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---1463796726-1046330613-950550637=:2441
Content-Type: TEXT/PLAIN; charset=US-ASCII
Here is a patch I just finished to allow one to rearrange the properties
of an object via the "First" mechanism present elsewhere in Zope. I have
tested this, somewhat, and found no problems thus far. I would appreciate
some of you trying it out and let me know if you find any issues. If not,
I'll submit it to the collector and let DC decide its fate.
To apply it, go to your zope directory and type 'patch -p0 < the_patch'.
Enjoy!
--Jeff
---
Jeff K. Hoffman 704.849.0731 x108
Chief Technology Officer mailto:jeff@goingv.com
Going Virtual, L.L.C. http://www.goingv.com/
---1463796726-1046330613-950550637=:2441
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="move_properties.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.10002141250370.2441@jeff.goingv.com>
Content-Description:
Content-Disposition: attachment; filename="move_properties.patch"
ZGlmZiAtQyA1IGxpYi9weXRob24vT0ZTL1Byb3BlcnR5TWFuYWdlci5weSBs
aWIudG1wL3B5dGhvbi9PRlMvUHJvcGVydHlNYW5hZ2VyLnB5DQoqKiogbGli
L3B5dGhvbi9PRlMvUHJvcGVydHlNYW5hZ2VyLnB5CU1vbiBEZWMgMTMgMTM6
MzI6MDQgMTk5OQ0KLS0tIGxpYi50bXAvcHl0aG9uL09GUy9Qcm9wZXJ0eU1h
bmFnZXIucHkJTW9uIEZlYiAxNCAxMjoyOTo1MCAyMDAwDQoqKioqKioqKioq
KioqKioNCioqKiAzNTMsMzYwICoqKioNCi0tLSAzNTMsMzgzIC0tLS0NCiAg
DQogICAgICAgICAgaWYgUkVRVUVTVCBpcyBub3QgTm9uZToNCiAgICAgICAg
ICAgICAgcmV0dXJuIHNlbGYubWFuYWdlX3Byb3BlcnRpZXNGb3JtKH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dGhlIHRvcCBvZiB0aGUgY29sbGVjdGlvbi4iIiIN
CisgICAgICAgICBpZiBpZHMgaXMgTm9uZToNCisgICAgICAgICAgICAgbWVz
c2FnZSA9ICdObyBwcm9wZXJ0aWVzIHdlcmUgc2VsZWN0ZWQgdG8gYmUgbWFk
ZSBmaXJzdC4nDQorICAgICAgICAgZWxpZiBsZW4oaWRzKSA9PSBsZW4oc2Vs
Zi5fcHJvcGVydGllcyk6DQorICAgICAgICAgICAgIG1lc3NhZ2UgPSAnTWFr
aW5nIGFsbCBwcm9wZXJ0aWVzIGZpcnN0IGhhcyBubyBlZmZlY3QuJw0KKyAg
ICAgICAgIGVsc2U6DQorICAgICAgICAgICAgIHNlbGYuX3Byb3BlcnRpZXMg
PSB0dXBsZSgNCisgICAgICAgICAgICAgICAgIGZpbHRlcihsYW1iZGEgcHJv
cGVydHksIGlkcyA9IGlkczoNCisgICAgICAgICAgICAgICAgICAgICAgICBw
cm9wZXJ0eVsnaWQnXSBpbiBpZHMsDQorICAgICAgICAgICAgICAgICAgICAg
ICAgc2VsZi5fcHJvcGVydGllcykNCisgICAgICAgICAgICAgICAgICsNCisg
ICAgICAgICAgICAgICAgIGZpbHRlcihsYW1iZGEgcHJvcGVydHksIGlkcyA9
IGlkczoNCisgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eVsnaWQn
XSBub3QgaW4gaWRzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYu
X3Byb3BlcnRpZXMpDQorICAgICAgICAgICAgICAgICApDQorICAgICAgICAg
ICAgIG1lc3NhZ2UgPSAnUHJvcGVydGllcyByZWFycmFuZ2VkIGFzIHJlcXVl
c3RlZC4nDQorICAgICAgICAgDQorICAgICAgICAgaWYgUkVRVUVTVCBpcyBu
b3QgTm9uZToNCisgICAgICAgICAgICAgcmV0dXJuIHNlbGYubWFuYWdlKHNl
bGYsIFJFUVVFU1QsIG1hbmFnZV90YWJzX21lc3NhZ2UgPSBtZXNzYWdlKQ0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