[Newbies] A morph for doing 2D plots

Herbert König herbertkoenig at gmx.net
Sat Dec 7 19:15:18 UTC 2013


aahh, now I saw the code in the class comment.

I copied it into a workspace like this:

|mgRelation|
mgRelation := MGRelationOnLeftToRightBlock new.
     mgRelation block: [:x|x squared].
     mgPlotMorph addRelation: mgRelation.

and it raises a debugger.

First it should be possible to run it from the browser. My example 
methods usually have "self example1" in the method comment.
Secondly the example should work after just loading the code :-))

At least now I understand that you had a function plotter in mind. Now 
MGRelation starts to make some sense.

Ok, reading the whole comment I did:

|mgRelation mgPlotMorph|
mgPlotMorph := MGPlotMorph new.
     mgPlotMorph openInWorld.
mgRelation := MGRelationOnLeftToRightBlock new.
     mgRelation block: [:x|x squared].
     mgPlotMorph addRelation: mgRelation.

See how stupid your users are :-))



Cheers

Herbert

Am 07.12.2013 19:59, schrieb Herbert König:
> Hi Mateusz,
>
> it will be helpful for a user if you had some class side methods to 
> create some examples.
>
> I wanted to try your code and didn't know where to start.  I rolled my 
> own in 2007 (for plotting frequency responses), didn't use it since 
> then and when the need arose this May I could use it by just starting 
> from those examples. I assume you had something different in mind and 
> for your plotting purposes your class and method names are perfectly 
> natural :-)
>
> This is no criticism, its just to show you how a person interested in 
> your code may be completely confused because his view is clouded by 
> his own preconceptions which are different from yours.
>
>
> Cheers
>
> Herbert
>
> Am 06.12.2013 23:14, schrieb Mateusz Grotek:
>> I have created a morph for doing 2D plots.
>> It is still in the pre-alpha stage, but might be useful for someone.
>> It is my first public smalltalk project. :-)
>> No tests and no documentation yet.
>> If anyone has any useful advice, please share it with me.
>> Thank you!
>> _______________________________________________
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



More information about the Beginners mailing list