--- a/GDBObject.st Sun Sep 07 08:20:01 2014 +0100
+++ b/GDBObject.st Sun Sep 07 14:42:02 2014 +0100
@@ -38,9 +38,10 @@
getProperty: nm of: object
- | names index properties |
+ | nmXlated names index properties |
- index := (names := object class allInstVarNames) indexOf: nm.
+ nmXlated := (nm includes: $-) ifTrue:[ nm copyReplaceAll: $- with: $_] ifFalse:[ nm ].
+ index := (names := object class allInstVarNames) indexOf: nmXlated.
index ~~ 0 ifTrue:[
^ object instVarAt: index.
].
@@ -54,16 +55,17 @@
^ nil
"Created: / 20-06-2014 / 08:59:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 06-09-2014 / 02:05:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
setProperty: nm of: object to: value
- | names index properties |
+ | nmXlated names index properties |
- index := (names := object class allInstVarNames) indexOf: nm.
+ nmXlated := (nm includes: $-) ifTrue:[ nm copyReplaceAll: $- with: $_] ifFalse:[ nm ].
+ index := (names := object class allInstVarNames) indexOf: nmXlated.
index ~~ 0 ifTrue:[
object instVarAt: index put: value.
-
] ifFalse:[
index := names indexOf: #properties.
index ~~ 0 ifTrue:[
@@ -77,28 +79,29 @@
].
"Created: / 20-06-2014 / 09:01:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 06-09-2014 / 02:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBObject methodsFor:'accessing-properties'!
properties
- ^ GDBObject getPropertiesOf: self.
+ ^ self class getPropertiesOf: self.
- "Modified: / 20-06-2014 / 09:04:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 06-09-2014 / 01:49:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
propertyAt: name
- ^ GDBObject getProperty: name of: self
+ ^ self class getProperty: name of: self
"Created: / 31-05-2014 / 00:00:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 20-06-2014 / 09:05:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 06-09-2014 / 01:49:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
propertyAt: name put: value
- ^ GDBObject setProperty: name of: self to: value
+ ^ self class setProperty: name of: self to: value
"Created: / 31-05-2014 / 00:01:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 20-06-2014 / 09:05:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 06-09-2014 / 01:49:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBObject methodsFor:'attributes access'!