Detect the name control/object name by clicking on it
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Detect the name control/object name by clicking on it
Hi readers,
Is it possible to detect the name of the object/control name in group when the user click on it? (Not a button, but such as images, field and etc.)
Can I use the result as a variable?
Any idea?
Is it possible to detect the name of the object/control name in group when the user click on it? (Not a button, but such as images, field and etc.)
Can I use the result as a variable?
Any idea?
Re: Detect the name control/object name by clicking on it
Cheong.
Yes.
You are asking questions which a new user by rights ought to ask himself. The questions themselves are sound, but they are ones that should be asked along the path of learning LiveCode. This takes time effort and a bit of dedication. Start with the user guide and:
http://www.hyperactivesw.com/revscriptc ... rences.htm
Continue asking here, but at the same time experiment as much as possible with any task you can think of. Even a trivial stack will require considerable coding effort, especially when you try to increase or change functionality.
And oh yes, think about this: "answer the name of the target" Does it make sense to you that you would put this in either the group or card script?
Craig Newman
Yes.
You are asking questions which a new user by rights ought to ask himself. The questions themselves are sound, but they are ones that should be asked along the path of learning LiveCode. This takes time effort and a bit of dedication. Start with the user guide and:
http://www.hyperactivesw.com/revscriptc ... rences.htm
Continue asking here, but at the same time experiment as much as possible with any task you can think of. Even a trivial stack will require considerable coding effort, especially when you try to increase or change functionality.
And oh yes, think about this: "answer the name of the target" Does it make sense to you that you would put this in either the group or card script?
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Detect the name control/object name by clicking on it
Spoiler: target
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Detect the name control/object name by clicking on it
Thanks Craig Newman and FourthWorld,
Target works perfectly.
Target works perfectly.
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Detect the name control/object name by clicking on it
I prefer to use
tooltips
for finding out names of objects, then you
don't have any problems if you want to use
mouseUp or mouseDown to execute scripts.
tooltips
for finding out names of objects, then you
don't have any problems if you want to use
mouseUp or mouseDown to execute scripts.
Re: Detect the name control/object name by clicking on it
How would a tooltip help a handler determine the name of the target, and how does "target" interfere with mouse events? Also, do you turn off tooltips to avoid the constant visual interference during use?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Detect the name control/object name by clicking on it
Jacque.
Too bad the toolTip field cannot evaluate strings: 'the name of me".
Remember the power that HC's report utility had, where you could load a custom function?
Craig
Too bad the toolTip field cannot evaluate strings: 'the name of me".
Remember the power that HC's report utility had, where you could load a custom function?
Craig
Re: Detect the name control/object name by clicking on it
The tooltip contents can't evaluate "the name of me" but you can set the tooltip dynamically by script at a suitable moment, such as
Code: Select all
on mouseEnter
set the tooltip of me to the name of me
end mouseEnter