Re: What a datagrid "sees"
As a workaround, you could try a slightly different method.. local sLooping on mouseleave put false into sLooping -- stop the loop when outside the dg end mouseleave on mouseEnter if sLooping is empty then put false into sLooping if not sLooping then send "startloop" to me in 10 millisec put true into sLooping end if end mouseenter command startloop if slooping then -- do whatever stuff is needed when pointing at a control here -- this just updates the msg box depending on what is being pointed at -- since it looks like you're messing with tooltips, you'd probably --want to check to see if it has already been set and keep a list of "set" tooltips -- so that you don't reset the same tip every 100 millisec -- then in mouseleave one could "unset" based on the list. if the mousecontrol is not empty then put the long id of the mousecontrol /* check to see if the mousecontrol is empty in case the mouseleaves while a loop is still queued. Avoids a potential error. would probably need to filter any controls NOT part of the grid for the same reason. wouldn't want to change things for a non-grid control due to a fast mouse movement. */ send "startloop" to me in 100 millisec end if end startloop Another potential issue I can see happening would be a quick out and in mouse movement causing dual loops (maybe more?) to run. So judicious use of the pendingmessages would likely help. On Wed, Dec 6, 2017 at 4:25 PM, Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > Posted http://quality.livecode.com/show_bug.cgi?id=20747. This may be a > regression from way back in the 2.9 days. > > Bob S > > > > On Dec 6, 2017, at 15:04 , Bob Sneidar via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > Okay I have figured out what this is. the mouseControl is sometimes > returning the LAST object that was being pointed to, and NOT the CURRENT > object being pointed to. I think this is a bug. I will try to come up with > a sample stack and post it on QC. > > > > Bob S > > > ___ > use-livecode mailing list > use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: What a datagrid "sees"
Posted http://quality.livecode.com/show_bug.cgi?id=20747. This may be a regression from way back in the 2.9 days. Bob S > On Dec 6, 2017, at 15:04 , Bob Sneidar via use-livecode >wrote: > > Okay I have figured out what this is. the mouseControl is sometimes returning > the LAST object that was being pointed to, and NOT the CURRENT object being > pointed to. I think this is a bug. I will try to come up with a sample stack > and post it on QC. > > Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: What a datagrid "sees"
Okay I have figured out what this is. the mouseControl is sometimes returning the LAST object that was being pointed to, and NOT the CURRENT object being pointed to. I think this is a bug. I will try to come up with a sample stack and post it on QC. Bob S > On Dec 6, 2017, at 13:12 , Bob Sneidar via use-livecode >wrote: > > Hi all. I have a mouseEnter handler in a table datagrid which is supposed to > get the mouseControl. When I point at one of the populated table fields I > trigger the mouseEnter, but then nothing else. I can point at another field > and this time it might work. Or not. I am not sure why that is happening. > It's as though the mouseControl is not getting updated properly. Here is the > handler: > > on mouseEnter > put "saw mouseEnter" > > -- lock messages > wait 1 second > -- unlock messages > > put the mouseControl into tMouseControl > > put space & tMouseControl after msg > put word 2 of tMouseControl into tControlNum > if tControlNum is not a number then exit mouseEnter > put the name of control tControlNum into tControlName > > put space & tControlName after msg > > if word 1 of tControlName is not "field" then exit mouseEnter > put the long id of me into tMyID > put wordOffset("card", tMyID) into tFirstWord > put word tFirstWord to -1 of tMyID into tThisCard > put the long id of control tControlNum of tThisCard into tTarget > put > "servicetype,techname,problemdescription,servicedate,starttime,endtime,partstotal,labortotal" > into tKeyList > dgToolTip tTarget, tKeyList > end mouseEnter > > I always get "saw mouseEnter" but often times nothing else. Any idea why the > mouseControl would not ALWAYS be the object being pointed to? > > Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
What a datagrid "sees"
Hi all. I have a mouseEnter handler in a table datagrid which is supposed to get the mouseControl. When I point at one of the populated table fields I trigger the mouseEnter, but then nothing else. I can point at another field and this time it might work. Or not. I am not sure why that is happening. It's as though the mouseControl is not getting updated properly. Here is the handler: on mouseEnter put "saw mouseEnter" -- lock messages wait 1 second -- unlock messages put the mouseControl into tMouseControl put space & tMouseControl after msg put word 2 of tMouseControl into tControlNum if tControlNum is not a number then exit mouseEnter put the name of control tControlNum into tControlName put space & tControlName after msg if word 1 of tControlName is not "field" then exit mouseEnter put the long id of me into tMyID put wordOffset("card", tMyID) into tFirstWord put word tFirstWord to -1 of tMyID into tThisCard put the long id of control tControlNum of tThisCard into tTarget put "servicetype,techname,problemdescription,servicedate,starttime,endtime,partstotal,labortotal" into tKeyList dgToolTip tTarget, tKeyList end mouseEnter I always get "saw mouseEnter" but often times nothing else. Any idea why the mouseControl would not ALWAYS be the object being pointed to? Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode