Maybe related to skinning - Solved

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Maybe related to skinning - Solved

Post by DR White » Mon Aug 07, 2017 7:06 pm

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
Attachments
Test_1.livecode.zip
(1.35 KiB) Downloaded 196 times
Last edited by DR White on Mon Aug 07, 2017 8:22 pm, edited 1 time in total.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Maybe related to skinning

Post by jmburnod » Mon Aug 07, 2017 7:15 pm

Hi David,
I disabled graphic which cover field and it works
Best regards
Jean-Marc
https://alternatic.ch

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Maybe related to skinning

Post by DR White » Mon Aug 07, 2017 8:21 pm

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Maybe related to skinning - Solved

Post by jmburnod » Mon Aug 07, 2017 10:31 pm

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
https://alternatic.ch

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Maybe related to skinning - Solved

Post by jacque » Tue Aug 08, 2017 3:36 pm

Jean-Marc's script works but now we have controlAtLoc() which is easier:

put controlAtLoc(the mouseloc)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Maybe related to skinning - Solved

Post by jmburnod » Tue Aug 08, 2017 4:02 pm

Hi Jacqueline,
Two times i forget controlAtLoc. :oops:
In this case it doesn't work because there is a grc on top
Lucky day for me with 825 as result on Klondike :D
https://alternatic.ch

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Maybe related to skinning - Solved

Post by jacque » Tue Aug 08, 2017 4:17 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply