O$: "Queue set current field" in complex grid

MARTINK2 at nationwide.com MARTINK2 at nationwide.com
Fri May 16 10:40:23 EDT 2008


Joe,

Thanks for the code sample.  From what I see, this code snippet is setup 
to allow a user to only tab to the next row as long as a the target 
character field you have identified is not empty.  Does this still work if 
the user selects another row using the mouse?  For example, I'm in row 4 
of the grid, I haven't yet completed the target field, but I discovered 
there was something in row 1 that I mistyped.  So, now I click away from 
row 4, in the middle of the row, and select a cell in row 1.  Does the 
While loop also prevent this behavior?  If it does, then that will work 
for me; if it doesn't, it won't since I need to be able to validate 
whether the user uses the keyboard and the mouse.

Kevin J. Martin
ID-Ten-Tee Software




"Joe Brower" <joebrower3 at comcast.net>
 
Sent by: omnisdev-en-bounces at lists.omnis-dev.com




05/15/2008 10:32 AM
Please respond to OmnisDev List - English 
<omnisdev-en at lists.omnis-dev.com>

From
"Joe Brower" <joebrower3 at comcast.net>
To
"'OmnisDev List - English'" <omnisdev-en at lists.omnis-dev.com>
cc

Subject
RE: O$: "Queue set current field" in complex grid






Kevin,

Here is what I am doing (and what I now have working). This code does
correctly move the line location:

Do iMainList.$first()
While iMainList.$line
  If not(len(iMainList.tCharField))
     OK message  {"Char field is empty. Please re-enter".}
     Queue set current field {efCharField}  ;; "efCharField" = 
$obj().$name
     Quit event handler (Discard event)
  End If
  ;
  ; etc...
  ;
  Do iMainList.$next()
End While

I'm using Studio 3.3 on WinXP SP2, by the way.

HTH,

Joe B.

-----Original Message-----

From: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of
MARTINK2 at nationwide.com
Sent: Thursday, May 15, 2008 12:19 PM
To: OmnisDev List - English
Subject: Re: O$: "Queue set current field" in complex grid

Doug,

I have tried this numerous times in a complex grid that is associated with 

a list.  I have never been able to get the cursor to change line location 
by changing the current line in the list (Do 
ilstListName.$line.$assign(2), for example).  I just tried it again in a 
simple test form in Studio 4.2 and got the same results:  the grid cursor 
does not change rows, although the current field is changed by the "Queue 
set current field."  What am I missing?

As a result, I wrote my own method set to navigate a complex grid.  I use 
it with row validation to return the grid cursor to the offending row and 
cell that failed validation.  I'd welcome a much simpler navigation 
method, but I haven't found it yet.

Thanks!

Kevin J. Martin
ID-Ten-Tee Software



_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list