mouseDoubleUp issues

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Jun 20 17:06:04 EDT 2011


Hi Andrew,

Probably, the answer is that the datagrid has the hcBehavior set to true. I'm not sure that you can turn this off without breaking the datagrid. The solution is to put check the target, but maybe you figured that out yourself already :-)

Btw, I would write

  if pMouseBtnNum is 1 then
     editPayment
     send "PopulatePaymentGrid" to this stack in 2 milliseconds
  else if pMouseBtnNum is 3 then
     deletePayment
  end if


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 20 jun 2011, at 20:22, Andrew Kluthe wrote:

> Hello :),
> 
> Using RevEnterprise 4.0, I have a mouseDoubleUp handler that I ended up
> placing into a data grid table.
> 
> on mouseDoubleUp pMouseBtnNum
>   if pMouseBtnNum is 1 then
>      editPayment
>      send "PopulatePaymentGrid" to this stack in 2 milliseconds
>   end if
>   if pMouseBtnNum is 3 then
>      deletePayment
>   end if
> 
>   pass mouseDoubleUp
> end mouseDoubleUp
> 
> Simply put, if a row is left double clicked it will bring up a modal edit
> screen for that payment. If it is double-right clicked it will delete the
> payment from a database.
> 
> The strange thing is that it tries to run these statements regardless of
> where you click on the card. Any object being double clicked calls this up.
> 
> I am sure that the only place these statements are called are from this
> handler.
> 
> Why can any control on the card and the card itself be the target of this
> handler?
> 
> Thanks,
> 
> Andrew





More information about the Use-livecode mailing list