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

Doug Kuyvenhoven omnisdev at vencor.ca
Fri May 16 11:14:23 EDT 2008


Hi Kevin:

I found that if I wrote code that was too restrictive on the user's  
movements it would make them angry at me and somewhere along the line  
I'd put the window into a series of conflicting events that would lock  
up the window. (I could never fully guess all the possible things the  
user might do.)

My tendency in GUI design is to let the user do what they like in the  
window in whatever order they choose, then when they go to save the  
data I do all the data verification and let them know of any data  
entry errors or problems.

WIth auto-extend complex grids I would check for empty rows the user  
accidentally added and delete them automatically.

Using the $smartlist feature works great for finding out which rows  
the user has inserted, deleted, or updated.

Do List.$includelines(kRowAll)
Do List.$includelines(kRowDeleted)
Do List.$includelines(kRowUnchanged)
Do List.$includelines(kRowInserted)
Do List.$includelines(kRowInserted+kRowUnchanged+kRowInserted)

For more info see:	http://www.studiotips.net/docs/tips_sql/smartlists/smartlists.html

HTH


Doug Kuyvenhoven
Vencor Software - www.vencor.ca

On 16-May-08, at 10:40 AM, MARTINK2 at nationwide.com wrote:

> 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




More information about the omnisdev-en mailing list