--- a/PropertyListDictionary.st Mon Jan 23 21:10:21 2006 +0100
+++ b/PropertyListDictionary.st Tue Jan 24 11:34:04 2006 +0100
@@ -53,14 +53,14 @@
!PropertyListDictionary methodsFor:'accessing'!
at:aKey
- "returns the value stored under the key or nil
- "
+ "returns the value stored under the key or nil"
+
^ self at:aKey ifAbsent:nil
!
dropSourceFor:aReceiver
- "returns the DropSource for a receiver or nil
- "
+ "returns the DropSource for a receiver or nil"
+
|source|
self canDrag ifTrue:[
@@ -78,8 +78,8 @@
!
dropTargetFor:aReceiver
- "returns the DropTarget for a receiver or nil
- "
+ "returns the DropTarget for a receiver or nil"
+
|target|
self canDrop ifTrue:[
@@ -92,7 +92,7 @@
target enterSelector:(self at:#enterSelector:).
target overSelector:(self at:#overSelector:).
target leaveSelector:(self at:#leaveSelector:).
- ^ target
+ ^ target
].
^ nil
! !
@@ -100,8 +100,8 @@
!PropertyListDictionary methodsFor:'building'!
actionSelectors
- "returns the list of action selectors
- "
+ "returns the list of action selectors"
+
|list|
list := OrderedCollection new.
@@ -115,16 +115,16 @@
!
aspectSelectors
- "returns the list of aspect selectors or nil
- "
+ "returns the list of aspect selectors or nil"
+
^ nil
! !
!PropertyListDictionary methodsFor:'converting'!
fromLiteralArrayEncoding:aLiteralEncodedArray
- "read my values from an encoding
- "
+ "read my values from an encoding"
+
|key val|
2 to:aLiteralEncodedArray size-1 by:2 do:[:i |
@@ -133,13 +133,12 @@
self at:key put:val
]
-
!
literalArrayEncoding
"encode myself as an array, from which a copy of the receiver
- can be reconstructed with #decodeAsLiteralArray.
- "
+ can be reconstructed with #decodeAsLiteralArray."
+
|coll|
coll := OrderedCollection new.
@@ -149,26 +148,25 @@
coll add:aKey; add:(aVal literalArrayEncoding)
].
^ coll asArray
-
! !
!PropertyListDictionary methodsFor:'queries'!
canDrag
- "returns true if the receiver of the property list is draggable
- "
+ "returns true if the receiver of the property list is draggable"
+
^ self includesKey:#dropObjectSelector:
!
canDrop
- "returns true if the receiver of the property list is droppable
- "
+ "returns true if the receiver of the property list is droppable"
+
^ self includesKey:#dropSelector:
!
isActionSelector:aKey
- "returns true if the key is an action selector
- "
+ "returns true if the key is an action selector"
+
^ ( aKey ~~ #dragArgument:
and:[aKey ~~ #dropArgument:]
)
@@ -177,5 +175,5 @@
!PropertyListDictionary class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/PropertyListDictionary.st,v 1.5 2003-09-09 09:43:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/PropertyListDictionary.st,v 1.6 2006-01-24 10:34:04 cg Exp $'
! !