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

MARTINK2 at nationwide.com MARTINK2 at nationwide.com
Fri May 16 13:49:37 EDT 2008


I did a little more testing and I believe I found the solution to the 
issue I have been having.  In looking at your code I saw that you are 
using the $first() and $next() list commands.  I had mentioned that I have 
been using specific list line setting using $line.$assign().

I have a test form where I had tried the $line.$assign() in a very simple 
button construct on the test form (button assigns the list line pointer to 
a specific line, and then queues the current field).  Even in this form, I 
could not get the line assignment to change the row in the grid; all I was 
getting was the "Queue set current field" portion to work.

After reading your posts and Doug's posts, I decided to try just issuing a 
$next() based on the current line of the list/grid to see if I could get 
that work.  No dice...until I added a window redraw between the line 
change method of the list and the Queue set current field command!  With 
that in place, I can now manipulate movement of the row within the grid at 

So, a "nutshell" view of my test code in the button looks like this:
On evClick
Do ilstTest.$line.$assign(2)
Do $cinst.$objs.repTest.$redraw(kTrue,kTrue)  ;;repTest is my test 
"repeater", or complex grid in Studio terminology
Queue set current field {fldName}
Quit event handler

The $redraw() is the key!  Without it in between the other two items, the 
visible row pointer within the grid never changes.  However, it is highly 
likely that it has changed within the list itself and, therefore, any 
change made in the cell will actually be made to a list row other than the 
one currently displayed within the grid control!

Just an expression of my frustration with some of the internal workings of 
Studio, but it seems that if we go to the effort of "binding" a list to a 
complex grid, then simple things related to cell pointer movement should 
not require us to request a redraw of the object or window.  I understand 
the thoughts behind selectively redrawing objects or entire windows and 
performance issues, as well as the ability to suppress superfluous changes 
in a display.  However, it seems that having the ability to at least have 
an autoredraw property that can be turned on or off selectively would be a 
nice improvement.  I don't recall seeing this ability anywhere.

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>

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

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


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" = 
     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.


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


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.


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