Data Entry field control
George Ziemann
gzieman54 at gmail.com
Thu Dec 11 12:21:07 EST 2014
I changed my notation to this:
Clear main file
Redraw
Set reference rField to $cinst.$objs.JobCust
Do $ctarget.$assign(rField)
Enter data
As I step through in the debugger, the rField reference is getting set. But
the JobCust field does not become the active field. I tried rearranging the
steps as:
Clear main file
Set reference rField to $cinst.$objs.JobCust
Do $ctarget.$assign(rField)
Redraw
Enter data
...but that didn't make any difference.
JobCust is currently the first field in the tab order. My entry fields
(which includes JobCust) are set to be disabled, and are enabled in a
reversible block at the beginning of the Insert method (before it gets to
the Clear main file command that I show here as a starting point).
It occurs to me that if I have a list field in the window which is always
enabled and first in the tab order, it gets the focus when all the entry
fields are disabled (no matter what field I was previously in). So when I
go into Enter data, hitting tab once gets me into the field I want to be
in. This is an acceptable workaround to me. I think this is how I used to
solve this problem in the past.
I appreciate everyone's responses, but this is just not that big of a deal,
so I won't waste any more of your time.
On Thu, Dec 11, 2014 at 9:32 AM, Will Adkin <will.adkin at lineal.co.uk> wrote:
>
> Hi George
>
> Try putting it in quotes: i.e:
>
> > Set reference rField to $cinst.$objs.$findname(‘JobCust')
>
> If that fails then make sure that the location of this code is the window
> that contains the field (i.e. $cinst=containing window)
>
> if you still can’t set a reference to your entry field then perhaps your
> filed is contained inside some other object? i.e. a tab pane or a group
> box… the notation must be exact - if $cinst is your window and the field is
> in a tab pane called MyTabPane then you would use the following to get a
> reference
>
> > Set reference rField to $cinst.$objs.MyTabPane.$objs.$findname(‘JobCust’)
>
> Kind regards
>
> Will
>
> Will Adkin, Software Development Manager, Lineal Software Solutions Ltd
> Apple Reseller, Microsoft Partner, SQLWorks Business Partner
> office phone: 01271 375999 | web: lineal.co.uk <http://www.lineal.co.uk/>
> | email: will at lineal.co.uk <mailto:will.adkin at lineal.co.uk>
>
>
>
> > On 11 Dec 2014, at 16:22, George Ziemann <gzieman54 at gmail.com> wrote:
> >
> >>> Set reference rField to $cinst.$objs.$findname(fJob.JobCust)
> >>
> >>
> >> In this bit, just use JobCust if that is the field name, drop the
> 'fJob.'
> >>> Set reference rField to $cinst.$objs.$findname(JobCust)
> >>
> >>
> >> Mike Matthews,
> >
> >
> > Tried that. Omnis automatically converts JobCust to fJob.JobCust.
> >
> > I even tried changing the field name to Customer (which doesn't match any
> > of the data names). This results in an error message which says
> > "Unrecognized variable name, item name or attribute."
> >
> > --
> > George Ziemann
> > (480) 278-9746
> > _____________________________________________________________
> > Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
--
George Ziemann
(480) 278-9746
More information about the omnisdev-en
mailing list