UIPainterView.st
changeset 1225 0aa39cc5f0a3
parent 1201 c88c6cee0cca
child 1230 23e5d0c133e8
equal deleted inserted replaced
1224:825e6e9fc37f 1225:0aa39cc5f0a3
    54         Claus Gittinger
    54         Claus Gittinger
    55         Claus Atzkern
    55         Claus Atzkern
    56 "
    56 "
    57 ! !
    57 ! !
    58 
    58 
       
    59 !UIPainterView class methodsFor:'initialization'!
       
    60 
       
    61 initialize
       
    62 
       
    63     AspectsAsInstances := false.
       
    64     RedefineAspectMethods := false.
       
    65 
       
    66     "Created: / 22.9.1999 / 12:32:31 / stefan"
       
    67 ! !
       
    68 
    59 !UIPainterView class methodsFor:'code generation mode'!
    69 !UIPainterView class methodsFor:'code generation mode'!
    60 
    70 
    61 generateAspectsAsInstanceVariables
    71 generateAspectsAsInstanceVariables
    62     "if on, aspects are held as instance variables;
    72     "if on, aspects are held as instance variables;
    63      if off (the default), they are kept in the bindings dictionary.
    73      if off (the default), they are kept in the bindings dictionary.
    80 
    90 
    81 redefineAspectMethods
    91 redefineAspectMethods
    82     "redefine methods yes or no. If a method is defined in super class
    92     "redefine methods yes or no. If a method is defined in super class
    83      should the message be reinstalled ?
    93      should the message be reinstalled ?
    84     "
    94     "
    85     ^ RedefineAspectMethods ? false
    95     ^ RedefineAspectMethods
    86 
    96 
       
    97     "Modified: / 22.9.1999 / 12:33:03 / stefan"
    87 !
    98 !
    88 
    99 
    89 redefineAspectMethods:aBoolean
   100 redefineAspectMethods:aBoolean
    90     "redefine methods yes or no. If a method is defined in super class
   101     "redefine methods yes or no. If a method is defined in super class
    91      should the message be reinstalled ?
   102      should the message be reinstalled ?
   668     code := '!!' , targetClass name , ' methodsFor:''aspects''!!\\' ,
   679     code := '!!' , targetClass name , ' methodsFor:''aspects''!!\\' ,
   669       aspect , '\' ,
   680       aspect , '\' ,
   670       '    "automatically generated by UIPainter ..."\\' ,
   681       '    "automatically generated by UIPainter ..."\\' ,
   671       '    "*** the code below creates a default model when invoked."\' ,
   682       '    "*** the code below creates a default model when invoked."\' ,
   672       '    "*** (which may not be the one you wanted)"\' ,
   683       '    "*** (which may not be the one you wanted)"\' ,
   673       '    "*** Please change as required and accept in the browser."\'.
   684       '    "*** Please change as required and accept it in the browser."\'.
   674 
   685 
   675     AspectsAsInstances ifTrue:[
   686     AspectsAsInstances ifTrue:[
   676         code := (code , '\' ,
   687         code := (code , '\' ,
   677           '    ' , aspect , ' isNil ifTrue:[\' ,
   688           '    ' , aspect , ' isNil ifTrue:[\' ,
   678           '        ' , aspect , ' := ' , ' ' , modelGen , '.\' ,
   689           '        ' , aspect , ' := ' , ' ' , modelGen , '.\' ,
   682     ] ifFalse:[
   693     ] ifFalse:[
   683         code := (code , '\' ,
   694         code := (code , '\' ,
   684           '    |holder|\' ,
   695           '    |holder|\' ,
   685           '\' ,
   696           '\' ,
   686           '    (holder := builder bindingAt:#' , aspect , ') isNil ifTrue:[\' ,
   697           '    (holder := builder bindingAt:#' , aspect , ') isNil ifTrue:[\' ,
   687           '        builder aspectAt:#' , aspect , ' put:(holder := ' , ' ' , modelGen , ').\' ,
   698           '        holder := ', modelGen, '.\',
       
   699           '        builder aspectAt:#' , aspect , ' put:holder.\',
   688           '    ].\' ,
   700           '    ].\' ,
   689           '    ^ holder.\' ,
   701           '    ^ holder.\' ,
   690           '!! !!\\') 
   702           '!! !!\\') 
   691     ].
   703     ].
   692     ^ code withCRs
   704     ^ code withCRs
   693 
   705 
   694     "Modified: / 29.7.1998 / 11:29:16 / cg"
   706     "Modified: / 29.7.1998 / 11:29:16 / cg"
       
   707     "Modified: / 22.9.1999 / 12:33:47 / stefan"
   695 !
   708 !
   696 
   709 
   697 generateAspectMethods
   710 generateAspectMethods
   698     "generate aspect, action & menu methods
   711     "generate aspect, action & menu methods
   699      - but do not overwrite existing ones.
   712      - but do not overwrite existing ones.
  2019 !UIPainterView class methodsFor:'documentation'!
  2032 !UIPainterView class methodsFor:'documentation'!
  2020 
  2033 
  2021 version
  2034 version
  2022     ^ '$Header$'
  2035     ^ '$Header$'
  2023 ! !
  2036 ! !
       
  2037 UIPainterView initialize!