How layout works in Cuis morphic (Re: More...morphic)

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

How layout works in Cuis morphic (Re: More...morphic)

Hannes Hirzel
Hi Nacho

On 4/25/14, nacho <[hidden email]> wrote:
> Hi!
> In trying to understand how morphic is implemented in Cuis, several
> questions arise:

Maybe this is helpful as well

https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st
According to my notes https://github.com/hhzl/Cuis-Add-Ons
it should work fine in the current Cuis.

It contains Cuis Morphic Layout Demos of increasingly difficutly to
show how the layouts are done in Cuis.

HTH

--Hannes

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

nacho
Hannes,
Yes it was very useful. Browsing GitHub -especially yours and Ken's repositories- I've discovered a lot of stuff that help me to understand a little more about Morphic in Cuis.
The package that you mention was very helpful in seeing how LayoutMorph actually works.
Thanks for doing it.
My idea is to have a very good understanding of how Morphic works in Cuis, and after that try to document an make examples. Usually, I agree with Juan that Smalltalk is self documenting. The power to see how a method from the Class Library is implemented is invaluable. However, Morphic is kind of tricky and as Cuis has a very stable core, for me it makes sense to have it documented.

I usually take a look at how morphic works on Squeak and then try to figure out how the same code can be rewritten to run on Cuis. However, the implementations are quiet different in general. Also, Pharo seems to be moving away from Morphic. Not in the sense that is taking it out, but in the sense that it has applied a new Framework on top of it -Spec-. Morphic still works but it seems it will not be the defacto framework for UI building.
But I rather learn Morphic and I also like the fact that in Cuis Morphic has been simplified. One has to figure out how to build, for instance, a SimpleSwitchMorph just to run some Squeak code, but that's ok. I guess that if one gets the knowledge of how Morphic works on Cuis, it can be re-implemented as a package and not as a core feature.

Thanks again for posting your examples and your work in progress in GitHub.
I hope one day I can repay the Cuis community with some nice intro to Morphic on Cuis.
Best
Nacho

Nacho Smalltalker apprentice. Buenos Aires, Argentina.
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

KenDickey
In reply to this post by Hannes Hirzel
On Sat, 26 Apr 2014 11:08:16 +0000
"H. Hirzel" <[hidden email]> wrote:
...
> https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st
...
> It contains Cuis Morphic Layout Demos of increasingly difficulty to
> show how the layouts are done in Cuis.

Nacho,

You can try things out directly with the simple Layout editor in my Morphic-Misc1 package.

Just open Hannes' examples, left-click to get construction halos around a Morph of interest, and select 'edit my LayoutSpec' from the menu halo.

If the morph is a LayoutMorph, you can also select 'edit me (a LayoutMorph)'

You can make changes in the editors and see how the layout IVar settings correspond to what happens on the screen.

-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

Juan Vuletich-4
In reply to this post by nacho
On 4/26/2014 10:06 AM, nacho wrote:
> Hannes,
> Yes it was very useful. Browsing GitHub -especially yours and Ken's
> repositories- I've discovered a lot of stuff that help me to understand a
> little more about Morphic in Cuis.
> The package that you mention was very helpful in seeing how LayoutMorph
> actually works.
> Thanks for doing it.

I concur. Thanks folks for your cool stuff!

> My idea is to have a very good understanding of how Morphic works in Cuis,
> and after that try to document an make examples. Usually, I agree with Juan
> that Smalltalk is self documenting. The power to see how a method from the
> Class Library is implemented is invaluable. However, Morphic is kind of
> tricky and as Cuis has a very stable core, for me it makes sense to have it
> documented.

Agreed. Some documentation would be very welcome. In any case, class
comments, method comments, example methods (usually class side) and
tests can also be considered documentation, as they illustrate some
interesting detail.

> I usually take a look at how morphic works on Squeak and then try to figure
> out how the same code can be rewritten to run on Cuis.

This is most useful if you are porting code. If you're writing new code
for Cuis, just figuring out Cuis is simpler and enough.

> However, the
> implementations are quiet different in general. Also, Pharo seems to be
> moving away from Morphic. Not in the sense that is taking it out, but in the
> sense that it has applied a new Framework on top of it -Spec-. Morphic still
> works but it seems it will not be the defacto framework for UI building.
> But I rather learn Morphic and I also like the fact that in Cuis Morphic has
> been simplified. One has to figure out how to build, for instance, a
> SimpleSwitchMorph just to run some Squeak code, but that's ok. I guess that
> if one gets the knowledge of how Morphic works on Cuis, it can be
> re-implemented as a package and not as a core feature.

In the case of aSwitch, maybe 'PluggableButtonMorph example openInWorld'
is useful. I just found it by looking for Switch... Maybe the menus for
setting font size in a Text Editor are relevant too...


> Thanks again for posting your examples and your work in progress in GitHub.
> I hope one day I can repay the Cuis community with some nice intro to
> Morphic on Cuis.
> Best
> Nacho

:)

BTW, we could organize a (very informal) event for those in Buenos Aires
or very close... Just some beers and laptops. What do you think?

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

Juan Vuletich-4
In reply to this post by Hannes Hirzel
Hannes,

On 4/26/2014 8:08 AM, H. Hirzel wrote:

> Hi Nacho
>
> On 4/25/14, nacho<[hidden email]>  wrote:
>> Hi!
>> In trying to understand how morphic is implemented in Cuis, several
>> questions arise:
> Maybe this is helpful as well
>
> https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st
> According to my notes https://github.com/hhzl/Cuis-Add-Ons
> it should work fine in the current Cuis.
>
> It contains Cuis Morphic Layout Demos of increasingly difficutly to
> show how the layouts are done in Cuis.
>
> HTH
>
> --Hannes

This is just great. Would you consider writing some class or method
comment to be included to base Cuis with references to this work? This
would make it easier to find.

Besides, this is the kind of thing we need as a central part of any
documentation effort!

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

Juan Vuletich-4
In reply to this post by KenDickey
Hannes, Ken,

I'd like to host more of your stuff at
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev . Or maybe a new
repo at https://github.com/Cuis-Smalltalk .

I believe that having stuff that is not ready for prime time in separate
repos makes a lot of sense, but suff that is already in useful state
(and is currently maintained as needed) could be much easier to find if
accessible directly from Cuis-Smalltalk. What do you think?

Same goes for anybody having cool code to share.

Cheers,
Juan Vuletich


On 4/26/2014 11:54 AM, Ken Dickey wrote:

> On Sat, 26 Apr 2014 11:08:16 +0000
> "H. Hirzel"<[hidden email]>  wrote:
> ...
>> https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st
> ...
>> It contains Cuis Morphic Layout Demos of increasingly difficulty to
>> show how the layouts are done in Cuis.
> Nacho,
>
> You can try things out directly with the simple Layout editor in my Morphic-Misc1 package.
>
> Just open Hannes' examples, left-click to get construction halos around a Morph of interest, and select 'edit my LayoutSpec' from the menu halo.
>
> If the morph is a LayoutMorph, you can also select 'edit me (a LayoutMorph)'
>
> You can make changes in the editors and see how the layout IVar settings correspond to what happens on the screen.
>
> -KenD
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

Hannes Hirzel
Juan

I think at the moment just notes and links in the README or another
markdown file is fine.
An instant solution of 10 minutes which works fine.

But  please ask this very same question later again (2 months)

--Hannes

P.S. I agree that cleaning up / deleting the many Cuis repositories on
github will make life easier for everybody. Then we just fork the main
Cuis-Dev repository, do the work in the fork  and issue pull requests.
It will be necessary to indicate which directories are curated by you
and which other directories are curated by other people.



On 4/26/14, Juan Vuletich <[hidden email]> wrote:

> Hannes, Ken,
>
> I'd like to host more of your stuff at
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev . Or maybe a new
> repo at https://github.com/Cuis-Smalltalk .
>
> I believe that having stuff that is not ready for prime time in separate
> repos makes a lot of sense, but suff that is already in useful state
> (and is currently maintained as needed) could be much easier to find if
> accessible directly from Cuis-Smalltalk. What do you think?
>
> Same goes for anybody having cool code to share.
>
> Cheers,
> Juan Vuletich
>
>
> On 4/26/2014 11:54 AM, Ken Dickey wrote:
>> On Sat, 26 Apr 2014 11:08:16 +0000
>> "H. Hirzel"<[hidden email]>  wrote:
>> ...
>>> https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st
>> ...
>>> It contains Cuis Morphic Layout Demos of increasingly difficulty to
>>> show how the layouts are done in Cuis.
>> Nacho,
>>
>> You can try things out directly with the simple Layout editor in my
>> Morphic-Misc1 package.
>>
>> Just open Hannes' examples, left-click to get construction halos around a
>> Morph of interest, and select 'edit my LayoutSpec' from the menu halo.
>>
>> If the morph is a LayoutMorph, you can also select 'edit me (a
>> LayoutMorph)'
>>
>> You can make changes in the editors and see how the layout IVar settings
>> correspond to what happens on the screen.
>>
>> -KenD
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

KenDickey
In reply to this post by Juan Vuletich-4
On Sat, 26 Apr 2014 16:56:13 -0300
Juan Vuletich <[hidden email]> wrote:

> Hannes, Ken,
>
> I'd like to host more of your stuff at
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev . Or maybe a new
> repo at https://github.com/Cuis-Smalltalk .

Juan,

Cuis is your baby.  All the stuff I am putting out is open source.

I am happy to delete my copies of any package you care to adopt.

I would suggest (stable):

Things which could migrate into Core -- or a Basic Use package
    Cuis-Smalltalk-Morphic-Misc1
    Cuis-Smalltalk-NamedColors
    Cuis-Smalltalk-ColorEditor

Useful for some
    Cuis-Smalltalk-Ropes
    Cuis-Smalltalk-Crypto-NaCl

Playtime
    Cuis-Smalltalk-Solitaire
    Cuis-Smalltalk-Ia-En

-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

Hannes Hirzel
Juan,
Yes, the same applies to me. In case you adopt something, e.g. the
LayoutDemos I will delete my repo happily. It is easier for people to
get access to it.

And I suggest that you create a 'doc' or 'notes' subfolder where
people can put in documents. In their fork and then through a pull
request. A separate doc project seems to be too much effort currently
but there still should be an easy way to contribute documentation
pages, notes and code snippets.

..Hannes



On 4/26/14, Ken Dickey <[hidden email]> wrote:

> On Sat, 26 Apr 2014 16:56:13 -0300
> Juan Vuletich <[hidden email]> wrote:
>
>> Hannes, Ken,
>>
>> I'd like to host more of your stuff at
>> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev . Or maybe a new
>> repo at https://github.com/Cuis-Smalltalk .
>
> Juan,
>
> Cuis is your baby.  All the stuff I am putting out is open source.
>
> I am happy to delete my copies of any package you care to adopt.
>
> I would suggest (stable):
>
> Things which could migrate into Core -- or a Basic Use package
>     Cuis-Smalltalk-Morphic-Misc1
>     Cuis-Smalltalk-NamedColors
>     Cuis-Smalltalk-ColorEditor
>
> Useful for some
>     Cuis-Smalltalk-Ropes
>     Cuis-Smalltalk-Crypto-NaCl
>
> Playtime
>     Cuis-Smalltalk-Solitaire
>     Cuis-Smalltalk-Ia-En
>
> -KenD
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

nacho
In reply to this post by Juan Vuletich-4


Lic. Ignacio Sniechowski, MBA







On Sat, Apr 26, 2014 at 4:13 PM, Juan Vuletich <[hidden email]> wrote:
On 4/26/2014 10:06 AM, nacho wrote:
Hannes,
Yes it was very useful. Browsing GitHub -especially yours and Ken's
repositories- I've discovered a lot of stuff that help me to understand a
little more about Morphic in Cuis.
The package that you mention was very helpful in seeing how LayoutMorph
actually works.
Thanks for doing it.

I concur. Thanks folks for your cool stuff!

My idea is to have a very good understanding of how Morphic works in Cuis,
and after that try to document an make examples. Usually, I agree with Juan
that Smalltalk is self documenting. The power to see how a method from the
Class Library is implemented is invaluable. However, Morphic is kind of
tricky and as Cuis has a very stable core, for me it makes sense to have it
documented.

Agreed. Some documentation would be very welcome. In any case, class comments, method comments, example methods (usually class side) and tests can also be considered documentation, as they illustrate some interesting detail.

I usually take a look at how morphic works on Squeak and then try to figure
out how the same code can be rewritten to run on Cuis.

This is most useful if you are porting code. If you're writing new code for Cuis, just figuring out Cuis is simpler and enough.

However, the
implementations are quiet different in general. Also, Pharo seems to be
moving away from Morphic. Not in the sense that is taking it out, but in the
sense that it has applied a new Framework on top of it -Spec-. Morphic still
works but it seems it will not be the defacto framework for UI building.
But I rather learn Morphic and I also like the fact that in Cuis Morphic has
been simplified. One has to figure out how to build, for instance, a
SimpleSwitchMorph just to run some Squeak code, but that's ok. I guess that
if one gets the knowledge of how Morphic works on Cuis, it can be
re-implemented as a package and not as a core feature.

In the case of aSwitch, maybe 'PluggableButtonMorph example openInWorld' is useful. I just found it by looking for Switch... Maybe the menus for setting font size in a Text Editor are relevant too...


Thanks again for posting your examples and your work in progress in GitHub.
I hope one day I can repay the Cuis community with some nice intro to
Morphic on Cuis.
Best
Nacho

:)

BTW, we could organize a (very informal) event for those in Buenos Aires or very close... Just some beers and laptops. What do you think?


That would be great! How about next weekend which has four days in a row ?
Best
Nacho





 
Cheers,
Juan Vuletich


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Nacho Smalltalker apprentice. Buenos Aires, Argentina.
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

garduino



2014-04-27 19:44 GMT-03:00 Ignacio Sniechowski <[hidden email]>:


BTW, we could organize a (very informal) event for those in Buenos Aires or very close... Just some beers and laptops. What do you think?


That would be great! How about next weekend which has four days in a row ?
Best
Nacho


Very good idea! Unfortunately I can't go (I'm at 600 km of BA) but I would join if at some point you decides some sort of virtual meetings.

Cheers and good luck! 

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

Juan Vuletich-4
In reply to this post by nacho
On 4/27/2014 7:44 PM, Ignacio Sniechowski wrote:


Lic. Ignacio Sniechowski, MBA


...


BTW, we could organize a (very informal) event for those in Buenos Aires or very close... Just some beers and laptops. What do you think?


That would be great! How about next weekend which has four days in a row ?
Best
Nacho

Well, I'm answering too late for that. Apologies.

In any case, what about Wednesday, May 7, 19hs, around Belgrano?

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

Juan Vuletich-4
In reply to this post by garduino
Hi Germán,

On 4/27/2014 8:26 PM, Germán Arduino wrote:



2014-04-27 19:44 GMT-03:00 Ignacio Sniechowski <[hidden email]>:


BTW, we could organize a (very informal) event for those in Buenos Aires or very close... Just some beers and laptops. What do you think?


That would be great! How about next weekend which has four days in a row ?
Best
Nacho


Very good idea! Unfortunately I can't go (I'm at 600 km of BA) but I would join if at some point you decides some sort of virtual meetings.

Cheers and good luck! 

Thanks for the interest. I'm not sure how well would that go... It will not be an organized talk with a host and a script, just a few around a table, everybody talking at the same time,,, Do you know about some software that could work?

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Hosting community packages and docs at our central repo (Re: How layout works in Cuis morphic (Re: More...morphic))

Juan Vuletich-4
In reply to this post by Hannes Hirzel
Hi folks,

Thanks for your positive answers. I will start adding your stuff to
github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev soon (next time I have a
few hours in a row for Cuis). I also want to do the same with
documentation (in markdown format).

Most important, I would like to make clear for any visitor that
https://github.com/Cuis-Smalltalk is not a personal but a community
project. Right now I'm the only member there. All of you should be
members. And all contributions should be fairly attributed to the
author, etc.

I mean, it is not that  "I will adopt your work", but that
github.com/Cuis-Smalltalk should be the central hosting for all Cuis
stuff meant to be shared with others.

Cheers,
Juan Vuletich

On 4/26/2014 8:06 PM, H. Hirzel wrote:

> Juan,
> Yes, the same applies to me. In case you adopt something, e.g. the
> LayoutDemos I will delete my repo happily. It is easier for people to
> get access to it.
>
> And I suggest that you create a 'doc' or 'notes' subfolder where
> people can put in documents. In their fork and then through a pull
> request. A separate doc project seems to be too much effort currently
> but there still should be an easy way to contribute documentation
> pages, notes and code snippets.
>
> ..Hannes
>
>
>
> On 4/26/14, Ken Dickey<[hidden email]>  wrote:
>> On Sat, 26 Apr 2014 16:56:13 -0300
>> Juan Vuletich<[hidden email]>  wrote:
>>
>>> Hannes, Ken,
>>>
>>> I'd like to host more of your stuff at
>>> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev . Or maybe a new
>>> repo at https://github.com/Cuis-Smalltalk .
>> Juan,
>>
>> Cuis is your baby.  All the stuff I am putting out is open source.
>>
>> I am happy to delete my copies of any package you care to adopt.
>>
>> I would suggest (stable):
>>
>> Things which could migrate into Core -- or a Basic Use package
>>      Cuis-Smalltalk-Morphic-Misc1
>>      Cuis-Smalltalk-NamedColors
>>      Cuis-Smalltalk-ColorEditor
>>
>> Useful for some
>>      Cuis-Smalltalk-Ropes
>>      Cuis-Smalltalk-Crypto-NaCl
>>
>> Playtime
>>      Cuis-Smalltalk-Solitaire
>>      Cuis-Smalltalk-Ia-En
>>
>> -KenD
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: How layout works in Cuis morphic (Re: More...morphic)

nacho
In reply to this post by Juan Vuletich-4
Sounds great Juan!!
Do you have some place in mind?
Best
Nacho


Lic. Ignacio Sniechowski, MBA







On Sun, May 4, 2014 at 10:51 AM, Juan Vuletich <[hidden email]> wrote:
On 4/27/2014 7:44 PM, Ignacio Sniechowski wrote:


Lic. Ignacio Sniechowski, MBA


...


BTW, we could organize a (very informal) event for those in Buenos Aires or very close... Just some beers and laptops. What do you think?


That would be great! How about next weekend which has four days in a row ?
Best
Nacho

Well, I'm answering too late for that. Apologies.

In any case, what about Wednesday, May 7, 19hs, around Belgrano?

Cheers,
Juan Vuletich


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Nacho Smalltalker apprentice. Buenos Aires, Argentina.