disabled buttons

Thomas McGrath III 3mcgrath at adelphia.net
Thu Feb 26 14:47:06 EST 2004


Ken,

That is a great use of available storage for icons. I like it.

Now, Does anyone know why I can't move a button in a group by name??? I 
can move it by ID.
the group is called "Button 1"
the button I want to move is called "Button 1a" - placeholder button 
for icon over other buttons
me is the group
another button is called "Button 1" - available button
another button is called "Button 1b" - unavailable button

-------- works ------
put the id of button (the short name of me & "a") into myTempButton
move button id myTempButton relative 5,5
-------- does not work ------------
move button (the short name of me & "a") relative 5,5
-------- does not work -----------
move button (quote & the short name of me & "a" & quote") relative 5,5
------- does not work ------------
put (the short name of me & "a") into myTempButton
move button myTempButton relative 5,5
------- does not work -----------
put (quote & the short name of me & "a" & quote) into myTempButton
move button myTempButton relative 5,5

I am a little thrown by this. Remember this button is one of three in a 
group. I only want to move the one button in the group.

Tom

On Feb 26, 2004, at 12:25 PM, Ken Ray wrote:

> Tom,
>
> One approach might be to *use* the disabledIcon as a storage option, 
> but
> not *set* the button to be disabled (so a non-available button would 
> use
> the disabledIcon, but would still be able to be clicked). Use a custom
> property to hold the "normal" icon so you can re-establish it. 
> Something
> like this:
>
>   -- Assumes that each button contains a custom property called
>   -- "uAvailIcon" that holds the ID number of the image that is to
>   -- be displayed for available buttons.
>
>   on MakeUnavailable pBtnDescriptor
>     set the icon of pBtnDescriptor to (the disabledIcon of
> pBtnDescriptor)
>   end MakeUnavailable
>
>   on MakeAvailable pBtnDescriptor
>     set the icon of pBtnDescriptor to (the uAvailIcon of 
> pBtnDescriptor)
>   end MakeUnavailable
>
>   on mouseUp
>     if the icon of me = the disabledIcon of me then
>       -- run "clicked on unavailable button" code
>     else
>       -- run "clicked on available button" code
>     end if
>   end mouseUp
>
> Now if you need to have a hilite state for both available and
> unavailable buttons, you could swap out the hiliteIcon of the button 
> the
> same way...
>
> Just a thought,
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
>> -----Original Message-----
>> From: use-revolution-bounces at lists.runrev.com
>> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
>> Thomas McGrath III
>> Sent: Thursday, February 26, 2004 7:32 AM
>> To: How to use Revolution
>> Subject: Re: disabled buttons
>>
>>
>> Ken yeah that's what I did last time in SC. So I will do it again.
>>
>> But for this project a disabled button does not do what a
>> non-disabled
>> button would do BUT if a user hits a disabled button it 'resets' the
>> system of which buttons are available. I should use the term
>> available
>> and non-available (since disabled in rev means dead) whereas my
>> non-available buttons still have life in them ie. they reset the
>> system.
>>
>> You see it is the nature of sequenced buttons that on a third
>> hit of a
>> sequence you decided to back out of the sequence you can just hit a
>> non-available button to reset the system to be ready for a first hit
>> again.
>>
>> Since I am combining two buttons in a group to get the look
>> and feel I
>> need I am thinking of adding a third invisible image to the
>> group that
>> when the icon is unavailable the image will trap the message.
>>
>> Did you look at my buttons example?
>> put this in the message box:
>>
>> go URL "http://users.adelphia.net/~3mcgrath/Buttons.rev"
>>
>> This shows the button without a disabled state/ unavailable
>> state. Each
>> will be  built via script and would show different icons.
>>
>> Thanks
>> Tom
>>
>> On Feb 26, 2004, at 2:30 AM, Ken Norris wrote:
>>
>>> I'm having difficulty making any sense of why a user would expect a
>>> disabled
>>> button to do anything, but you could put a mouseUp handler
>> in the card
>>> instead of the button and spec it thus:
>>
>> Thomas J. McGrath III
>> SCS
>> 1000 Killarney Dr.
>> Pittsburgh, PA 15234
>> 412-885-8541
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-> revolution
>>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541



More information about the use-livecode mailing list