[self-interest] drawable and childResponsibility (specific question)
mail at russell-allen.com
Sat Jul 7 04:22:10 UTC 2018
Hi AlwaysGreg :)
Where a method is just a send to ‘childResponsibility’ it means that the object is incomplete - there should be a complete object which is a child.
For graphics, have you read: http://handbook.selflanguage.org/2017.1/morphic.html <http://handbook.selflanguage.org/2017.1/morphic.html>
The ‘desktop’ has multiple ‘worlds’ which can have one or more canvases.
If you do in a shell ‘desktop worlds first winCanvases first’ you should get the active canvas for the OS window you’re looking for.
‘traits canvas’ should show the general methods available to you and they should mostly work without having to worry about drawable, eg:
desktop worlds first winCanvases first circleCenteredAt: 200 at 200 Diameter: 100 Color: paint named: 'red'
drawable should mostly just work behind the scenes and will be specific to x11 or quartz
What I have found helpful is to get my object (ie the canvas) and do, eg,
halt. circleCenteredAt: 200 at 200 Diameter: 100 Color: paint named: ‘red'
This will bring up a debugger and I can step through seeing the messages being sent to specific concrete objects, rather than trying to work it out in my head from the traits,
Hope this helps!
> On 6 Jul 2018, at 9:22 pm, itsnotgregg at gmail.com [self-interest] <self-interest at yahoogroups.com> wrote:
> Itsnotgregg is becoming more and more ironic. I should change it to itsalwaysgregg.
> I'm exploring the graphics controls and it seems the geometry messages like arc etc. are eventually being sent to "drawable" which is then diverted to "childResponsibility" which is hard-wired as an error. I thought perhaps childResponsibility gets overwritten to somethjing else before the geometry messages get used but a "methods containing" search found nothing containing " childResponsibilty: ". what is the chain fo events when a graphics statement is used in "baseDrawOn"?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Self-interest