Structure.st
changeset 1131 82b645876f08
parent 1130 daa5e54c1a7d
child 1243 b05df2fb4d9c
--- a/Structure.st	Sun Dec 10 14:18:18 2000 +0100
+++ b/Structure.st	Sun Dec 10 14:53:18 2000 +0100
@@ -306,6 +306,40 @@
     "
      Structure with:#foo->'foo' with:#bar->'bar' with:#baz->'baz' with:#hello->'hello' with:#world->'world'
     "
+!
+
+with:assoc1 with:assoc2 with:assoc3 with:assoc4 with:assoc5 with:assoc6
+    "return a new structure with five fields, named as defined by the arguments'
+     keys, and and initialized with the assocs' values."
+
+     ^ self newWith:(Array with:assoc1 key with:assoc2 key 
+                           with:assoc3 key with:assoc4 key      
+                           with:assoc5 key with:assoc6 key) 
+             values:(Array with:assoc1 value with:assoc2 value 
+                           with:assoc3 value with:assoc4 value 
+                           with:assoc5 value with:assoc6 value)
+
+    "
+     Structure with:#foo->'foo' with:#bar->'bar' with:#baz->'baz' with:#hello->'hello' with:#world->'world'
+    "
+!
+
+with:assoc1 with:assoc2 with:assoc3 with:assoc4 with:assoc5 with:assoc6 with:assoc7
+    "return a new structure with five fields, named as defined by the arguments'
+     keys, and and initialized with the assocs' values."
+
+     ^ self newWith:(Array with:assoc1 key with:assoc2 key 
+                           with:assoc3 key with:assoc4 key      
+                           with:assoc5 key with:assoc6 key
+                           with:assoc7 key) 
+             values:(Array with:assoc1 value with:assoc2 value 
+                           with:assoc3 value with:assoc4 value 
+                           with:assoc5 value with:assoc6 value
+                           with:assoc7 value)
+
+    "
+     Structure with:#foo->'foo' with:#bar->'bar' with:#baz->'baz' with:#hello->'hello' with:#world->'world'
+    "
 ! !
 
 !Structure class methodsFor:'special'!
@@ -1379,6 +1413,6 @@
 !Structure class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Structure.st,v 1.13 2000-12-10 13:18:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Structure.st,v 1.14 2000-12-10 13:53:18 cg Exp $'
 ! !
 Structure initialize!