[Cuis-dev] PluggableButton

Juan Vuletich JuanVuletich at zoho.com
Thu Apr 7 10:06:33 PDT 2022


Hi Hilaire,

On 4/6/2022 9:33 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi Juan,
>
> The color scheme does not work for me. I instantiate the button as:
>
>     ^ PluggableButtonMorph
>         model: presenter
>         stateGetter: (array at: 5 ifAbsent: [ #isTool: ]) "Then 
> optional argument"
>         action: array third ::
>         stateGetterArgument: (array size = 5 ifTrue:[nil] ifFalse: 
> [array second]);
>         icon: (DrGIcons for: array second);
>         setBalloonText: array fourth;
>         color: self buttonColor ;
>         mouseOverColor: self buttonSelectedColor ;
>         borderColor: self buttonColor muchDarker;
>         borderWidth: 2;
>         morphExtent: (DrGeoSystem toolbarIconSize + 4) asPoint;
>         adoptWidgetsColor: self buttonColor;
>         yourself
>

I sent examples as workspace doits, that are easy to try. The code you 
pasted above, I can't run it unless you also send me an image.

> When the mouse is over a button or the button state is true, I want 
> the mouse over color as background
>

I tried to do that. I the workspace examples I sent, both ButtonMorph 
and the modified PluggableButtonMorph become tan when mouse over or 
pressed. What am I missing?

> Regarding, the selector and variable names, I suggest keeping it small 
> to stateArgument (instead of stateGetterArgument), there is no 
> confusion regarding its meaning.
>

Ok. Will change it.

> I also suggest adding an optional argument for the action, actionArgument.
>

Ok, Will add it.

> It does not matter if the color scheme does not work, my need may be a 
> bit special. But it is good to have the optional stateArgument and 
> actionArgument.
>
> Hilaire
>

Help me understand the color scheme issue. Only after I understand, and 
try an implementation, I can tell if there is any reason for not 
including it in base Cuis.

> Le 04/04/2022 à 22:10, Juan Vuletich a écrit :
>>
>> Please try #5097 attached. This cs breaks your ButtonMorph, for it to 
>> work again, use attached unsavedChanges...
>>
>> I slightly changed some of your selectors. I tried like this.
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220407/0e7077b0/attachment.htm>


More information about the Cuis-dev mailing list