735 ' "*** the code below creates a default model when invoked."\' , |
735 ' "*** the code below creates a default model when invoked."\' , |
736 ' "*** (which may not be the one you wanted)"\' , |
736 ' "*** (which may not be the one you wanted)"\' , |
737 ' "*** Please change as required and accept it in the browser."\' , |
737 ' "*** Please change as required and accept it in the browser."\' , |
738 ' "*** (and replace this comment by something more useful ;-)"\' . |
738 ' "*** (and replace this comment by something more useful ;-)"\' . |
739 |
739 |
|
740 |
740 AspectsAsInstances ifTrue:[ |
741 AspectsAsInstances ifTrue:[ |
741 code := (code , '\' , |
742 code := code , '\' , |
742 ' ' , aspect , ' isNil ifTrue:[\' , |
743 ' ' , aspect , ' isNil ifTrue:[\' , |
743 ' ' , aspect , ' := ' , ' ' , modelGen , '.\' , |
744 ' ' , aspect , ' := ' , ' ' , modelGen , '.\'. |
744 '"/ if your app needs to be notified of changes, uncomment one of the lines below:\' , |
745 modelClass ~~ TriggerValue ifTrue:[ |
745 '"/ ' , aspect , ' addDependent:self.\' , |
746 code := code , |
746 '"/ ' , aspect , ' onChangeSend:#', aspect ,'Changed to:self.\' , |
747 '"/ if your app needs to be notified of changes, uncomment one of the lines below:\' , |
|
748 '"/ ' , aspect , ' addDependent:self.\' , |
|
749 '"/ ' , aspect , ' onChangeSend:#', aspect ,'Changed to:self.\'. |
|
750 ]. |
|
751 code := code , |
747 ' ].\' , |
752 ' ].\' , |
748 ' ^ ' , aspect ,'.\' , |
753 ' ^ ' , aspect ,'.\' , |
749 '!! !!\\') |
754 '!! !!\\' |
750 ] ifFalse:[ |
755 ] ifFalse:[ |
751 code := (code , '\' , |
756 code := code , '\' , |
752 ' |holder|\' , |
757 ' |holder|\' , |
753 '\' , |
758 '\' , |
754 ' (holder := builder bindingAt:#' , aspect , ') isNil ifTrue:[\' , |
759 ' (holder := builder bindingAt:#' , aspect , ') isNil ifTrue:[\' , |
755 ' holder := ', modelGen, '.\', |
760 ' holder := ', modelGen, '.\', |
756 ' builder aspectAt:#' , aspect , ' put:holder.\', |
761 ' builder aspectAt:#' , aspect , ' put:holder.\'. |
757 '"/ if your app needs to be notified of changes, uncomment one of the lines below:\' , |
762 modelClass ~~ TriggerValue ifTrue:[ |
758 '"/ holder addDependent:self.\' , |
763 code := code , |
759 '"/ holder onChangeSend:#', aspect ,'Changed to:self.\' , |
764 '"/ if your app needs to be notified of changes, uncomment one of the lines below:\' , |
|
765 '"/ holder addDependent:self.\' , |
|
766 '"/ holder onChangeSend:#', aspect ,'Changed to:self.\'. |
|
767 ]. |
|
768 code := code , |
760 ' ].\' , |
769 ' ].\' , |
761 ' ^ holder.\' , |
770 ' ^ holder.\' , |
762 '!! !!\\') |
771 '!! !!\\' |
763 ]. |
772 ]. |
764 |
773 |
765 ^ code withCRs |
774 ^ code withCRs |
766 |
775 |
767 "Modified: / 29.7.1998 / 11:29:16 / cg" |
776 "Modified: / 29.7.1998 / 11:29:16 / cg" |