Morph default position

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

Morph default position

KenDickey
My panels lost their titles.

This was because the WindowTitleMorphs were created and added to the window without setting the morphPosition to 0@0, so they were at 50@50, way outside the viewport of the windows.

Not difficult to fix, but there is a tension between being required to set morphPosition when/before/during addMorph* method sends and only setting morphPosition when the default is not desired.

FYI,
-KenD

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

Re: Morph default position

Phil B
On Thu, 2015-07-23 at 20:39 -0700, Ken.Dickey wrote:
> My panels lost their titles.
>
> This was because the WindowTitleMorphs were created and added to the window without setting the morphPosition to 0@0, so they were at 50@50, way outside the viewport of the windows.
>
> Not difficult to fix, but there is a tension between being required to set morphPosition when/before/during addMorph* method sends and only setting morphPosition when the default is not desired.
>

Insetting Morphs seemed like such a harmless suggestion...

> FYI,
> -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: Morph default position

Juan Vuletich-4
Hi Folks,

On 7/24/2015 7:23 AM, Phil (list) wrote:
> On Thu, 2015-07-23 at 20:39 -0700, Ken.Dickey wrote:
>> My panels lost their titles.
>>
>> This was because the WindowTitleMorphs were created and added to the window without setting the morphPosition to 0@0, so they were at 50@50, way outside the viewport of the windows.
>>
>> Not difficult to fix, but there is a tension between being required to set morphPosition when/before/during addMorph* method sends and only setting morphPosition when the default is not desired.
>>
> Insetting Morphs seemed like such a harmless suggestion...

Uh, apologies. I also thought it would harmless. I'll take back that
change, and set an offset only when adding to World.

Regards,
Juan Vuletich

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

Re: Morph default position

KenDickey
On Fri, 24 Jul 2015 09:00:12 -0300
Juan Vuletich <[hidden email]> wrote:

> Uh, apologies. I also thought it would harmless. I'll take back that
> change, and set an offset only when adding to World.

Or just add
 Morph>>defaultPosition
        ^ 50@50

And let subclasses override when it makes a difference..

$0.02
-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD