[Pharo-project] Styler?
Hi guys what do we do with shout? Squeak introduced it directly in the system. Now I was thinking that what could be a solution is to have a default API/null pattern class that could be in the core and that when Shout gets loaded the shout class is used instead. Now we could add Shout to the TextEditor package but I would like to understand how we can do it without. And also it is interesting to see if one day we will need selector namespace or something like that to deal well with extensions. Stef in PharoCore-1.1 11367 Fails as CodeMorph#stylerClass is not initialized. And no *Styler* class exists on PharoCore To make test passes on Pharo I've written CodeMorph#defaultStylerClass ^ SHTextStylerST80 CodeMorph#stylerClass ^ stylerClass ifNil: [stylerClass := self defaultStylerClass]. the solution proposed by laurent only works when shout is loaded and this is not always the case. ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] Styler?
On Sat, May 22, 2010 at 10:09 AM, stephane ducasse stephane.duca...@free.fr wrote: Hi guys what do we do with shout? Squeak introduced it directly in the system. Now I was thinking that what could be a solution is to have a default API/null pattern class that could be in the core and that when Shout gets loaded the shout class is used instead. Wasn't this the idea of ToolSet ? but sucks...(as we said few threads ago) Now we could add Shout to the TextEditor package but I would like to understand how we can do it without. This is an excellent question and idea. Using some kind of Strategy pattern or similar may help. But I 99^999 not to put Shout neither Style in Core ;) I haven't look anything about the code. I have no idea. But cannot CodeMorph or whatever have a class variable that holds the Styler? Then we create, as you said, a NullStyler for core. Shout implements its own Styler and when loaded, it does: CodeMorph styler: ShoutStyler or similar. I guess the NullStyler is better than having to do everywhere codeMorph styler isNil ifFalse: [ Cheers Mariano And also it is interesting to see if one day we will need selector namespace or something like that to deal well with extensions. Stef in PharoCore-1.1 11367 Fails as CodeMorph#stylerClass is not initialized. And no *Styler* class exists on PharoCore To make test passes on Pharo I've written CodeMorph#defaultStylerClass ^ SHTextStylerST80 CodeMorph#stylerClass ^ stylerClass ifNil: [stylerClass := self defaultStylerClass]. the solution proposed by laurent only works when shout is loaded and this is not always the case. ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] Styler?
Why is a NullStyler necessary when Shout can load without overriding any code? Lukas 2010/5/22 Mariano Martinez Peck marianop...@gmail.com: On Sat, May 22, 2010 at 10:09 AM, stephane ducasse stephane.duca...@free.fr wrote: Hi guys what do we do with shout? Squeak introduced it directly in the system. Now I was thinking that what could be a solution is to have a default API/null pattern class that could be in the core and that when Shout gets loaded the shout class is used instead. Wasn't this the idea of ToolSet ? but sucks...(as we said few threads ago) Now we could add Shout to the TextEditor package but I would like to understand how we can do it without. This is an excellent question and idea. Using some kind of Strategy pattern or similar may help. But I 99^999 not to put Shout neither Style in Core ;) I haven't look anything about the code. I have no idea. But cannot CodeMorph or whatever have a class variable that holds the Styler? Then we create, as you said, a NullStyler for core. Shout implements its own Styler and when loaded, it does: CodeMorph styler: ShoutStyler or similar. I guess the NullStyler is better than having to do everywhere codeMorph styler isNil ifFalse: [ Cheers Mariano And also it is interesting to see if one day we will need selector namespace or something like that to deal well with extensions. Stef in PharoCore-1.1 11367 Fails as CodeMorph#stylerClass is not initialized. And no *Styler* class exists on PharoCore To make test passes on Pharo I've written CodeMorph#defaultStylerClass ^ SHTextStylerST80 CodeMorph#stylerClass ^ stylerClass ifNil: [stylerClass := self defaultStylerClass]. the solution proposed by laurent only works when shout is loaded and this is not always the case. ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- Lukas Renggli www.lukas-renggli.ch ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project