2015-06-25 15:32 GMT+02:00 Mark Rizun <mri...@gmail.com>:

> you can compose by putting your morphs into AlignmentMorph instances
>> (order them by rows or columns), and you add the AlignmentMorph instances
>> to your top level morph. You'll have to play with the #spaceFill or
>> #shrinkWrap layout resizing options for your morphs to handle filling the
>> available space.
>>
>
> I'll try this approach first.
>

I forgot that I used the SmaCC GUI code as a reference to remember, because
I find the API confusing. So, have a look at those methods:

https://github.com/ThierryGoubier/SmaCC/blob/master/SmaCC-Development-UI.package/SmaCCDevelopmentUI.class/instance/createDefinitionPage.st

https://github.com/ThierryGoubier/SmaCC/blob/master/SmaCC-Development-UI.package/SmaCCDevelopmentUI.class/instance/addClassSelectorsToCompilePage..st

Any of the addXXX methods in there does some stuff: you have a tabbed GUI,
mix of buttons and labels, multiple text areas... Things missing are a menu
bar and drop down menus :)


>
>
>> This answer applies to bare, good old Morphic. Spec is something else if
>> this is what you are using, Bloc as well.
>>
>
> Yes, I'm working with bare Morphic. At least for now :)
>

Once you get the hang of it, it clearly works. But, at the same time, the
API seems very painfull to use, full of strange symbols and very long
methods. And additionnally you get into layout bugs if you spend time
resizing too many times :(

I'd dream of being able to write something like:

[button1]-12-[button2][1]

But even if the tech is Smalltalk-originated[2], it seems we won't see it
anytime soon.

[1]
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/AutoLayoutinCode/AutoLayoutinCode.html#//apple_ref/doc/uid/TP40010853-CH11-SW1

[2] https://constraints.cs.washington.edu/cassowary/


>
> Thanks a lot!
>

You're welcome,

Thierry

Reply via email to