Okay! Thanks! Alexandre
On Dec 23, 2015, at 7:26 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
The problem with instance-side examples is that you need an instance to work with (otherwise there is not much point of having it on the instance-side), unless there would be pragma for it...
e.g.
MyObject>>myInstanceSideExample <rtExample: 'self new myInstanceSideExample open'> |v| v := RTView new. ... ^ v
The architecture for Nautilus icons is very easy to change or extend, look at AbstractMethodIconAction and it's subclasses. You could even easily add your own class specifically for Roassal examples (and bundle it with Roassal)
e.g. something like this (this is just an idea; I haven't tried running the code...)
RTMethodIsRoassalExample>>isActionHandled ^ method methodClass className beginsWith: 'RT' and: [ method selector includesSubstring: 'example' caseSensitive: false ].
RTMethodIsRoassalExample>>privateActionIcon ^ IconicButton actionSelector: #runExample; etc...
RTMethodIsRoassalExample>>runExample ^ (method methodClass new perform: method) open "assuming the method returns RTView instance..."
Peter
On Wed, Dec 23, 2015 at 10:33 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Having examples on the class sides imply that examples are not apparent when I do not select the class side of a class. And this is a pityâ¦
Maybe a particular icon can designate classes with examples? Or what about making the <script> pragma works also for instance methods and not only class methods?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.