I haven't looked at your example yet. The intent is that when the paint handler is called the isigraph with the event is automatically set as the target for gl commands in the paint handler. The only time you need glsel is for code not under a paint handler or when you want to gl stuff to a control other than the one the handler was called for. Do you observe otherwise?

Ah, just read your message more carefully and see the magic word capture. This is a capture problem, not a glsel problem. Until capture is released all mouse events go to the isigraph that did the capture (no matter where the mouse is). My guess/hope is that this is a bug in the grid J code that is just not doing the capture release in some case. We'll try to reproduce the problem and see what if going on.

----- Original Message ----- From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
To: "Beta forum" <beta@jsoftware.com>
Sent: Wednesday, August 16, 2006 12:26 PM
Subject: [Jbeta] Grid fails on "default gl control" issue


To reproduce
* run the script below
* click inside second grid
* drag the thumb of scrollbar on first grid

As a result, the first grid is locked
together with any other J windows and controls,
except the second grid. Capture was invoked
on behalf of the other grid, because on the
mouse down event, there wasn't a "glsel" for it.

There is a simple solution to simplify and
foolproof all gl2 code: to issue glsel on
any isigraph event, implicitly inside WD.

The only exception is when you control painting
of one isigraph from external events.
That's the only case when explicit glsel
will be needed.

The "default gl control" issue is described at
http://www.jsoftware.com/jwiki/System/Library/Bugs


NB. =========================================================
F=: 0 : 0
pc f;
xywh 6 6 80 80;cc g1 isigraph rightscale bottommove;
xywh 94 6 80 80;cc g2 isigraph leftscale rightmove bottommove;
pas 6 6;pcenter;
rem form end;
)

f_run=: 3 : 0
 wd F

 g1=: '' conew 'jzgrid'
 GRIDID__g1=: 'g1'
 CELLDATA__g1=: i.100 100
 show__g1''

 g2=: '' conew 'jzgrid'
 GRIDID__g2=: 'g2'
 CELLDATA__g2=: i.100 100
 show__g2''

 wd 'pshow;'
)

f_close=: 3 : 0
 wd'pclose'
)

f_run''

NB. =========================================================



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to