UIPainterView.st
changeset 1441 36916e4ce9ab
parent 1429 0fb6421a93e9
child 1445 d2654a3b1e3a
equal deleted inserted replaced
1440:f3eda2f72399 1441:36916e4ce9ab
   731     code := '!!' , targetClass name , ' methodsFor:''aspects''!!\\' ,
   731     code := '!!' , targetClass name , ' methodsFor:''aspects''!!\\' ,
   732       aspect , '\' ,
   732       aspect , '\' ,
   733       '    "automatically generated by UIPainter ..."\\' ,
   733       '    "automatically generated by UIPainter ..."\\' ,
   734       '    "*** the code below creates a default model when invoked."\' ,
   734       '    "*** the code below creates a default model when invoked."\' ,
   735       '    "*** (which may not be the one you wanted)"\' ,
   735       '    "*** (which may not be the one you wanted)"\' ,
   736       '    "*** Please change as required and accept it in the browser."\'.
   736       '    "*** Please change as required and accept it in the browser."\' ,
       
   737       '    "*** (and replace this comment by something more useful ;-)"\' .
   737 
   738 
   738     AspectsAsInstances ifTrue:[
   739     AspectsAsInstances ifTrue:[
   739         code := (code , '\' ,
   740         code := (code , '\' ,
   740           '    ' , aspect , ' isNil ifTrue:[\' ,
   741           '    ' , aspect , ' isNil ifTrue:[\' ,
   741           '       ' , aspect , ' := ' , ' ' , modelGen , '.\' ,
   742           '       ' , aspect , ' := ' , ' ' , modelGen , '.\' ,
       
   743           '"/ if your app needs to be notified of changes, uncomment one of the lines below:\' ,
   742           '"/       ' , aspect , ' addDependent:self.\' ,
   744           '"/       ' , aspect , ' addDependent:self.\' ,
       
   745           '"/       ' , aspect , ' onChangeSend:#', aspect ,'Changed to:self.\' ,
   743           '    ].\' ,
   746           '    ].\' ,
   744           '    ^ ' , aspect ,'.\' ,
   747           '    ^ ' , aspect ,'.\' ,
   745           '!! !!\\') 
   748           '!! !!\\') 
   746     ] ifFalse:[
   749     ] ifFalse:[
   747         code := (code , '\' ,
   750         code := (code , '\' ,
   748           '    |holder|\' ,
   751           '    |holder|\' ,
   749           '\' ,
   752           '\' ,
   750           '    (holder := builder bindingAt:#' , aspect , ') isNil ifTrue:[\' ,
   753           '    (holder := builder bindingAt:#' , aspect , ') isNil ifTrue:[\' ,
   751           '        holder := ', modelGen, '.\',
   754           '        holder := ', modelGen, '.\',
   752           '        builder aspectAt:#' , aspect , ' put:holder.\',
   755           '        builder aspectAt:#' , aspect , ' put:holder.\',
       
   756           '"/ if your app needs to be notified of changes, uncomment one of the lines below:\' ,
   753           '"/        holder addDependent:self.\' ,
   757           '"/        holder addDependent:self.\' ,
       
   758           '"/        holder onChangeSend:#', aspect ,'Changed to:self.\' ,
   754           '    ].\' ,
   759           '    ].\' ,
   755           '    ^ holder.\' ,
   760           '    ^ holder.\' ,
   756           '!! !!\\') 
   761           '!! !!\\') 
   757     ].
   762     ].
   758 
   763