Roassal - view shape rectangle - view shape line - returned class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Roassal - view shape rectangle - view shape line - returned class

Ben Coman
In experimenting to understand ROMondrianExample>>attachPointOn:
I broke into the execution as follows:  "forEach: [:cls | self haltOnce."
now if I highlight and inspect 'view shape line' I get a ROLine.
but if I highlight and inspect 'view shape rectangle' I  get a
ROMondrianViewBuilder rather than the expected something like ROBox.
This seems wrong that these are not consistent.

cheers, -ben
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal - view shape rectangle - view shape line - returned class

abergel
Good point. However, I do not have an easy way to fix this.

The problem is the following:
- The Mondrian DSL allows you to write "view shape line width: 5". In Roassal, the method #width: is defined in the class ROLine. In that case, it is reasonable to have "view shape line" that returns an ROLine.

- Mondrian allows "view shape rectangle withText:". I do not want to have the method withText: in the class ROBox, so "view shape rectangle" cannot return a ROBox.

Cheers,
Alexandre


On Aug 4, 2012, at 1:32 AM, Ben Coman <[hidden email]> wrote:

> In experimenting to understand ROMondrianExample>>attachPointOn:
> I broke into the execution as follows:  "forEach: [:cls | self haltOnce."
> now if I highlight and inspect 'view shape line' I get a ROLine.
> but if I highlight and inspect 'view shape rectangle' I  get a ROMondrianViewBuilder rather than the expected something like ROBox.
> This seems wrong that these are not consistent.
>
> cheers, -ben
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal - view shape rectangle - view shape line - returned class

Ben Coman
Alexandre Bergel wrote:
Good point. However, I do not have an easy way to fix this.

The problem is the following:
- The Mondrian DSL allows you to write "view shape line width: 5". In Roassal, the method #width: is defined in the class ROLine. In that case, it is reasonable to have "view shape line" that returns an ROLine.
  

Reasonable but not consistent.  I'd vote for consistency, but I don't know what other considerations are important.

 Just brainstorming an alternative... "view shape line" might return ROMondrianViewBuilder, which would need to understand "width:" - but perhaps then you could also use "view shape line rawShape width: 5"  where rawShape returned ROLine in this instance.  I am assuming that the Mondrian compatibility only needs to be one way.

- Mondrian allows "view shape rectangle withText:". I do not want to have the method withText: in the class ROBox, so "view shape rectangle" cannot return a ROBox. 

Cheers,
Alexandre


On Aug 4, 2012, at 1:32 AM, Ben Coman [hidden email] wrote:

  
In experimenting to understand ROMondrianExample>>attachPointOn:
I broke into the execution as follows:  "forEach: [:cls | self haltOnce."
now if I highlight and inspect 'view shape line' I get a ROLine.
but if I highlight and inspect 'view shape rectangle' I  get a ROMondrianViewBuilder rather than the expected something like ROBox.
This seems wrong that these are not consistent.

cheers, -ben
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
    

  


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal - view shape rectangle - view shape line - returned class

abergel
On some point, we will introduce a ShapeSelector that will be returned by "view shape"

But indeed, you are making a good point.

Alexandre

On Aug 6, 2012, at 9:59 AM, Ben Coman <[hidden email]> wrote:

> Alexandre Bergel wrote:
>> Good point. However, I do not have an easy way to fix this.
>>
>> The problem is the following:
>> - The Mondrian DSL allows you to write "view shape line width: 5". In Roassal, the method #width: is defined in the class ROLine. In that case, it is reasonable to have "view shape line" that returns an ROLine.
>>  
>>
>
> Reasonable but not consistent.  I'd vote for consistency, but I don't know what other considerations are important.
>
>  Just brainstorming an alternative... "view shape line" might return ROMondrianViewBuilder, which would need to understand "width:" - but perhaps then you could also use "view shape line rawShape width: 5"  where rawShape returned ROLine in this instance.  I am assuming that the Mondrian compatibility only needs to be one way.
>
>> - Mondrian allows "view shape rectangle withText:". I do not want to have the method withText: in the class ROBox, so "view shape rectangle" cannot return a ROBox.
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Aug 4, 2012, at 1:32 AM, Ben Coman
>> <[hidden email]>
>>  wrote:
>>
>>  
>>
>>> In experimenting to understand ROMondrianExample>>attachPointOn:
>>> I broke into the execution as follows:  "forEach: [:cls | self haltOnce."
>>> now if I highlight and inspect 'view shape line' I get a ROLine.
>>> but if I highlight and inspect 'view shape rectangle' I  get a ROMondrianViewBuilder rather than the expected something like ROBox.
>>> This seems wrong that these are not consistent.
>>>
>>> cheers, -ben
>>> _______________________________________________
>>> Moose-dev mailing list
>>>
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>    
>>>
>>
>>  
>>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev