Class.st
changeset 14929 7eccf58ccfab
parent 14837 a3ae2a20224b
child 15032 5fbddc5403d3
child 18037 4cf874da38c9
equal deleted inserted replaced
14928:2a29a6ee1a41 14929:7eccf58ccfab
   612 	   category:(self defaultCategoryForSTVorVAGEClasses)
   612 	   category:(self defaultCategoryForSTVorVAGEClasses)
   613 ! !
   613 ! !
   614 
   614 
   615 !Class methodsFor:'Compatibility-ST80'!
   615 !Class methodsFor:'Compatibility-ST80'!
   616 
   616 
       
   617 classPool
       
   618     "return something which allows access to my classVariables via
       
   619      #at: and #at:put: messages."
       
   620 
       
   621     ^ SimulatedClassPool new setClass:self
       
   622 
       
   623     "
       
   624      Button classPool
       
   625     "
       
   626 
       
   627     "Modified: 17.10.1997 / 12:12:14 / cg"
       
   628 !
       
   629 
   617 fileOutSourceOn:aStream
   630 fileOutSourceOn:aStream
   618     self fileOutOn:aStream withTimeStamp:false
   631     self fileOutOn:aStream withTimeStamp:false
   619 
   632 
   620     "Created: 20.6.1997 / 17:18:14 / cg"
   633     "Created: 20.6.1997 / 17:18:14 / cg"
   621     "Modified: 20.6.1997 / 17:18:26 / cg"
   634     "Modified: 20.6.1997 / 17:18:26 / cg"
   629 
   642 
   630     "Created: / 18.6.1998 / 22:08:45 / cg"
   643     "Created: / 18.6.1998 / 22:08:45 / cg"
   631 ! !
   644 ! !
   632 
   645 
   633 !Class methodsFor:'accessing'!
   646 !Class methodsFor:'accessing'!
   634 
       
   635 addChangeRecordForClass:aClass andNotifyChangeOf:aspect
       
   636     "writes a change record and notifies dependents."
       
   637 
       
   638     |namespace|
       
   639 
       
   640     self addChangeRecordForClass:aClass.
       
   641 
       
   642     aClass changed:#definition.
       
   643 
       
   644     namespace := aClass nameSpace.
       
   645     namespace changed:#classDefinition with:aClass.
       
   646     namespace ~~ Smalltalk ifTrue:[
       
   647 	Smalltalk changed:#classDefinition with:aClass.
       
   648     ].
       
   649     namespace changed:aspect with:aClass.
       
   650     namespace ~~ Smalltalk ifTrue:[
       
   651 	Smalltalk changed:aspect with:aClass.
       
   652     ].
       
   653 !
       
   654 
   647 
   655 addClassVarName:aString
   648 addClassVarName:aString
   656     "add a class variable if not already there and initialize it with nil.
   649     "add a class variable if not already there and initialize it with nil.
   657      Also writes a change record and notifies dependents."
   650      Also writes a change record and notifies dependents."
   658 
   651 
   773      SVN::Repository classFilename
   766      SVN::Repository classFilename
   774      Array classFilename
   767      Array classFilename
   775     "
   768     "
   776 
   769 
   777     "Modified: / 22-10-2008 / 20:58:21 / cg"
   770     "Modified: / 22-10-2008 / 20:58:21 / cg"
   778 !
       
   779 
       
   780 classPool
       
   781     "return something which allows access to my classVariables via
       
   782      #at: and #at:put: messages."
       
   783 
       
   784     ^ SimulatedClassPool new setClass:self
       
   785 
       
   786     "
       
   787      Button classPool
       
   788     "
       
   789 
       
   790     "Modified: 17.10.1997 / 12:12:14 / cg"
       
   791 !
   771 !
   792 
   772 
   793 classVarAt:aSymbol
   773 classVarAt:aSymbol
   794     "return the value of a class variable.
   774     "return the value of a class variable.
   795      Currently, this returns nil if there is no such classvar -
   775      Currently, this returns nil if there is no such classvar -
  1611     "Created: / 18-01-2011 / 17:55:48 / cg"
  1591     "Created: / 18-01-2011 / 17:55:48 / cg"
  1612     "Modified: / 18-01-2011 / 20:41:17 / cg"
  1592     "Modified: / 18-01-2011 / 20:41:17 / cg"
  1613 !
  1593 !
  1614 
  1594 
  1615 sharedPools
  1595 sharedPools
  1616     "this returns a collection of the real pools (i.e. the PoolDictionaries)"
  1596     "this returns a collection of the real pools (i.e. the PoolDictionaries),
       
  1597      not their names (see sharedPoolNames)"
  1617 
  1598 
  1618     |ns ns2 pools|
  1599     |ns ns2 pools|
  1619 
  1600 
  1620     ns := self nameSpace.
  1601     ns := self nameSpace.
  1621     ns2 := self topNameSpace.
  1602     ns2 := self topNameSpace.
  1622     pools :=
  1603     pools :=
  1623 	 self sharedPoolNames
  1604          self sharedPoolNames
  1624 	    collect:[:eachName |
  1605             collect:[:eachName |
  1625 		    |pool|
  1606                     |pool|
  1626 
  1607 
  1627 		    ns ~= Smalltalk ifTrue:[
  1608                     ns ~= Smalltalk ifTrue:[
  1628 			ns isNameSpace ifTrue:[
  1609                         ns isNameSpace ifTrue:[
  1629 			    pool := ns at:eachName asSymbol.
  1610                             pool := ns at:eachName asSymbol.
  1630 			] ifFalse:[
  1611                         ] ifFalse:[
  1631 			    pool := ns privateClassesAt:eachName asSymbol.
  1612                             pool := ns privateClassesAt:eachName asSymbol.
  1632 			]
  1613                         ]
  1633 		    ].
  1614                     ].
  1634 		    pool isNil ifTrue:[
  1615                     pool isNil ifTrue:[
  1635 			ns2 ~= Smalltalk ifTrue:[
  1616                         ns2 ~= Smalltalk ifTrue:[
  1636 			    pool := ns2 at:eachName asSymbol.
  1617                             pool := ns2 at:eachName asSymbol.
  1637 			].
  1618                         ].
  1638 		    ].
  1619                     ].
  1639 		    pool isNil ifTrue:[
  1620                     pool isNil ifTrue:[
  1640 			pool := Smalltalk at:eachName asSymbol.
  1621                         pool := Smalltalk at:eachName asSymbol.
  1641 			pool isNil ifTrue:[
  1622                         pool isNil ifTrue:[
  1642 			    Transcript showCR:('Warning: no such pool: ',eachName).
  1623                             Transcript showCR:('Warning: no such pool: ',eachName).
  1643 			]
  1624                         ]
  1644 		    ].
  1625                     ].
  1645 		    pool
  1626                     pool
  1646 		]
  1627                 ]
  1647 	    as:OrderedCollection.
  1628             as:OrderedCollection.
  1648 
  1629 
  1649     ^ pools select:[:pool | pool notNil ]
  1630     ^ pools select:[:pool | pool notNil ]
  1650 
  1631 
  1651     "
  1632     "
  1652      Croquet::OpenGL sharedPools
  1633      Croquet::OpenGL sharedPools
  1941 	]
  1922 	]
  1942     ]
  1923     ]
  1943 
  1924 
  1944     "Modified: / 24.1.1997 / 19:09:41 / cg"
  1925     "Modified: / 24.1.1997 / 19:09:41 / cg"
  1945     "Modified: / 18.3.1999 / 18:14:04 / stefan"
  1926     "Modified: / 18.3.1999 / 18:14:04 / stefan"
       
  1927 !
       
  1928 
       
  1929 addChangeRecordForClass:aClass andNotifyChangeOf:aspect
       
  1930     "writes a change record and notifies dependents."
       
  1931 
       
  1932     |namespace|
       
  1933 
       
  1934     self addChangeRecordForClass:aClass.
       
  1935 
       
  1936     aClass changed:#definition.
       
  1937 
       
  1938     namespace := aClass nameSpace.
       
  1939     namespace changed:#classDefinition with:aClass.
       
  1940     namespace ~~ Smalltalk ifTrue:[
       
  1941 	Smalltalk changed:#classDefinition with:aClass.
       
  1942     ].
       
  1943     namespace changed:aspect with:aClass.
       
  1944     namespace ~~ Smalltalk ifTrue:[
       
  1945 	Smalltalk changed:aspect with:aClass.
       
  1946     ].
  1946 !
  1947 !
  1947 
  1948 
  1948 addChangeRecordForClassCheckIn:aClass
  1949 addChangeRecordForClassCheckIn:aClass
  1949     "{ Pragma: +optSpace }"
  1950     "{ Pragma: +optSpace }"
  1950 
  1951 
  3260 	withDefinition:true
  3261 	withDefinition:true
  3261 	methodFilter:nil
  3262 	methodFilter:nil
  3262     "
  3263     "
  3263 ! !
  3264 ! !
  3264 
  3265 
       
  3266 
  3265 !Class methodsFor:'printOut'!
  3267 !Class methodsFor:'printOut'!
  3266 
  3268 
  3267 htmlDocumentation
  3269 htmlDocumentation
  3268     <resource: #obsolete>
  3270     <resource: #obsolete>
  3269     self obsoleteMethodWarning:'use HTMLDocGenerator htmlDocOf:'.
  3271     self obsoleteMethodWarning:'use HTMLDocGenerator htmlDocOf:'.
  5515 ! !
  5517 ! !
  5516 
  5518 
  5517 !Class class methodsFor:'documentation'!
  5519 !Class class methodsFor:'documentation'!
  5518 
  5520 
  5519 version
  5521 version
  5520     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.617 2013-03-07 09:41:33 cg Exp $'
  5522     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.618 2013-03-21 10:51:15 cg Exp $'
  5521 !
  5523 !
  5522 
  5524 
  5523 version_CVS
  5525 version_CVS
  5524     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.617 2013-03-07 09:41:33 cg Exp $'
  5526     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.618 2013-03-21 10:51:15 cg Exp $'
  5525 !
  5527 !
  5526 
  5528 
  5527 version_SVN
  5529 version_SVN
  5528     ^ '§ Id: Class.st 10643 2011-06-08 21:53:07Z vranyj1  §'
  5530     ^ '§ Id: Class.st 10643 2011-06-08 21:53:07Z vranyj1  §'
  5529 ! !
  5531 ! !
       
  5532