Page 1 of 1
Maybe related to skinning - Solved
Posted: Mon Aug 07, 2017 7:06 pm
by DR White
What do I need to do to be able to activate the code within a field that has a graphic covering the field?
Attached a very simple stack to better describe the challenge.
Thanks,
David
Re: Maybe related to skinning
Posted: Mon Aug 07, 2017 7:15 pm
by jmburnod
Hi David,
I disabled graphic which cover field and it works
Best regards
Jean-Marc
Re: Maybe related to skinning
Posted: Mon Aug 07, 2017 8:21 pm
by DR White
Jean-Marc,
Sorry to bother you on something so simple,
but I had beat my for a couple hours and was not making any headway.
Thank goodness for this forum!
Disabling the graphic took care of it.
Thanks so much,
David
Re: Maybe related to skinning - Solved
Posted: Mon Aug 07, 2017 10:31 pm
by jmburnod
Hi David
Sorry to bother you on something so simple,
I hope it is not too simple
You also may use loop to know which field is under the mouseloc.
Something like that:
graphic script
Code: Select all
on mouseup
get getMyControlML()
send "mouseup" to fld it
end mouseup
card script
Code: Select all
on mouseup
put the short name of the target into tNameTarget
if "fMyField" is in the short name of the target then
get getMyFldML()
put fld it into fld "Display"
end if
end mouseup
function getMyFldML
repeat with i = 1 to 3
put "fMyField" & i into tFld
if the mouseloc is within the rect of fld tFld then
return tFld
exît repeat
end if
end repeat
end getMyFldML
Jean-Marc
Re: Maybe related to skinning - Solved
Posted: Tue Aug 08, 2017 3:36 pm
by jacque
Jean-Marc's script works but now we have controlAtLoc() which is easier:
put controlAtLoc(the mouseloc)
Re: Maybe related to skinning - Solved
Posted: Tue Aug 08, 2017 4:02 pm
by jmburnod
Hi Jacqueline,
Two times i forget controlAtLoc.
In this case it doesn't work because there is a grc on top
Lucky day for me with 825 as result on Klondike

Re: Maybe related to skinning - Solved
Posted: Tue Aug 08, 2017 4:17 pm
by jacque
Yes, you're right. I forgot about the stacked controls, so we both have memory problems.
It's nice to hear my old Klondike stack is still in use and is working after all the engine revisions. I wrote it in MetaCard! The LC team has done a great job with backward compatibility.