How to select image object instead of group
Jonathan Lynch
jonathandlynch at gmail.com
Sat Dec 11 06:59:08 EST 2010
Scott,
There are good reasons to use background groups.
Add the following line to your script, and it will work:
on mouseup
answer file "Select your file:"
if it is empty exit to top
set the filename of image "image" to it
end mouseup
The group script is as follows ( just to prove to me this what was
happening:
on mouseup
if the short name of the target = "The name of my field" then
send mouseup to field "the name of my field" of me
end if
end mouseup
On Fri, Dec 10, 2010 at 11:28 PM, Scott Pepperdine <spepper at byu.net> wrote:
> The image script is:
> on mouseup
> answer file "Select your file:"
> if it is empty exit to top
> set the filename of image "image" to it
> end mouseup
>
> The group script is as follows ( just to prove to me this what was
> happening:
> on mouseup
> answer "1033"
> end mouseup
>
> Thanks all for your efforts. I think I;ll just ungroup the controls and
> create my new cards with 'clone' or some such think, instead of relying on
> the background group behavior.
> Thanks again
>
>
> On 12/10/2010 6:19 PM, Scott Rossi wrote:
>
>> What's being triggered in the group: a mouseDown or mouseUp handler, or
>> something similar? It must be something common to both the image and the
>> fields.
>>
>> If I understand what you're trying to do, you should be able to 1) place
>> the handler in the script of the image, or 2) in the group's mouseDown/Up
>> handler, use something like:
>> on mouseUp
>> if word 1 of name of the the target = "image" then
>> do image-related stuff here...
>> else
>> do default field-related stuff here...
>> end if
>> end mouseUp
>>
>> Regards,
>>
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX Design
>>
>> On Dec 10, 2010, at 4:53 PM, Scott Pepperdine<spepper at byu.net> wrote:
>>
>> I have scripts associated with the other fields in the group, so it would
>>> be best if the script can be associated with the image.
>>>
>>> Thanks for the reply.
>>>
>>> On 12/10/2010 5:51 PM, jonathandlynch at gmail.com wrote:
>>>
>>>> I have had this happen, and I just put the script in the group. Does it
>>>> need to be in the image?
>>>>
>>>> ------Original Message------
>>>> From: Scott Pepperdine
>>>> Sender: use-livecode-bounces at lists.runrev.com
>>>> To: How to use Revolution
>>>> ReplyTo: How to use LiveCode
>>>> Subject: How to select image object instead of group
>>>> Sent: Dec 10, 2010 6:36 PM
>>>>
>>>> I have an image object that is part of a background group, so when I
>>>> create a new card, there it is along with a number of other fields.
>>>> But when I click the image object, its script is not activated, but
>>>> rather the script of the group it belongs to.
>>>> What do I need to study to make the image selectable?
>>>>
>>>> Thanks very much,
>>>> --Scott
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>>> Sent from my Verizon Wireless BlackBerry
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
--
Do all things with love
More information about the use-livecode
mailing list