Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Positioning in display array

 
   Database Help (Home) -> Informix RSS
Next:  Restore (Backup Pending)  
Author Message
loc

External


Since: Dec 07, 2008
Posts: 10



(Msg. 1) Posted: Wed Sep 29, 2010 8:32 am
Post subject: Positioning in display array
Archived from groups: comp>databases>informix (more info?)

I'm making a menu program with Informix 4GL 7.32.UC4. I'm loading all
the menu items into an array and then using a 'display array' so the
user can arrow through the items in the screen form. I would also
like the user to be able to jump to an item in the array by keying in
the associated item number which is displayed in it's own field next
the the item description.

display array mv_arr to sa_menu.* attribute(current row
display="reverse")
on key(return)
# So we can jump to an item number, need to use variables the
1,1 was just for testing
# call fgl_setcurrline(1,1)
exit display
end display

let lv_ac = arr_curr()
return lv_ac


The menu works if the user arrows to the item and presses return, the
calling function then knows what array item the user selected. I'd
like to somehow use fgl_setcurrline(), fgl_getkey(), fgl_lastkey(),
fgl_keyval, but since the last key pressed will be "return" I don't
see how I can get the item number the user keyed. Also while in the
'display array' if any number keys are pressed it beeps so I don't
think 4GL keeps track of those keys. Is there anyway to do this?

 >> Stay informed about: Positioning in display array 
Back to top
Login to vote
loc

External


Since: Dec 07, 2008
Posts: 10



(Msg. 2) Posted: Thu Sep 30, 2010 5:13 am
Post subject: Re: Positioning in display array [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 29, 11:32 am, loc wrote:
> I'm making a menu program with Informix 4GL 7.32.UC4.  I'm loading all
> the menu items into an array and then using a 'display array' so the
> user can arrow through the items in the screen form.  I would also
> like the user to be able to jump to an item in the array by keying in
> the associated item number which is displayed in it's own field next
> the the item description.
>
> display array mv_arr to sa_menu.* attribute(current row
> display="reverse")
>     on key(return)
>       # So we can jump to an item number, need to use variables the
> 1,1 was just for testing
>       # call fgl_setcurrline(1,1)
>       exit display
> end display
>
> let lv_ac = arr_curr()
> return lv_ac
>
> The menu works if the user arrows to the item and presses return, the
> calling function then knows what array item the user selected.  I'd
> like to somehow use fgl_setcurrline(), fgl_getkey(), fgl_lastkey(),
> fgl_keyval, but since the last key pressed will be "return" I don't
> see how I can get the item number the user keyed.  Also while in the
> 'display array' if any number keys are pressed it beeps so I don't
> think 4GL keeps track of those keys.  Is there anyway to do this?

I assume what I was asking can't be done, my next question then is
would a menu program like this typically have a single row for the
array? Here is what
my screen form looks like:

database formonly
screen
{ Menu Screen


[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]
[a1][a2 ] [a1][a2 ]

attributes
a1 = formonly.num;
a2 = formonly.name;

instructions
screen record sa[24] (
num,
name)

delimiters " "
end


What I don't like about have two columns in the array is when the user
arrows through, the cursor moves left to right, which doesn't seem
very intuitive. Should I use just one column for the screen array? Is
there any point in leaving the numbers in to number the menu items
since the user can't jump to a menu item that way.

 >> Stay informed about: Positioning in display array 
Back to top
Login to vote
Marty

External


Since: Sep 30, 2010
Posts: 1



(Msg. 3) Posted: Thu Sep 30, 2010 12:19 pm
Post subject: Re: Positioning in display array [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <3af87491-16fe-47b2-9750-
77aa68470b8b.RemoveThis@k10g2000yqa.googlegroups.com>, says...
>
> On Sep 29, 11:32 am, loc wrote:
> > I'm making a menu program with Informix 4GL 7.32.UC4.  I'm loading all
> > the menu items into an array and then using a 'display array' so the
> > user can arrow through the items in the screen form.  I would also
> > like the user to be able to jump to an item in the array by keying in
> > the associated item number which is displayed in it's own field next
> > the the item description.
> >
> > display array mv_arr to sa_menu.* attribute(current row
> > display="reverse")
> >     on key(return)
> >       # So we can jump to an item number, need to use variables the
> > 1,1 was just for testing
> >       # call fgl_setcurrline(1,1)
> >       exit display
> > end display
> >
> > let lv_ac = arr_curr()
> > return lv_ac
> >
> > The menu works if the user arrows to the item and presses return, the
> > calling function then knows what array item the user selected.  I'd
> > like to somehow use fgl_setcurrline(), fgl_getkey(), fgl_lastkey(),
> > fgl_keyval, but since the last key pressed will be "return" I don't
> > see how I can get the item number the user keyed.  Also while in the
> > 'display array' if any number keys are pressed it beeps so I don't
> > think 4GL keeps track of those keys.  Is there anyway to do this?
>
> I assume what I was asking can't be done, my next question then is
> would a menu program like this typically have a single row for the
> array? Here is what
> my screen form looks like:
>
> database formonly
> screen
> { Menu Screen
>
>
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]
> [a1][a2 ] [a1][a2 ]

That is close to what we have. We use 2 forms depending on how many
items will show (1 column or 2 columns). The forms look like this:

DATABASE formonly
SCREEN
{

[c]

[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
[a][a1 ]
}
ATTRIBUTES
a1=formonly.col1 TYPE CHAR;
a=formonly.choic1 TYPE CHAR;
c=formonly.sc_answer TYPE CHAR, AUTONEXT, UPSHIFT, INVISIBLE;
INSTRUCTIONS
DELIMITERS " "
SCREEN RECORD sc_menu1[13] (choic1, col1)

and the 2 column form:

DATABASE formonly
SCREEN
{

[c]

[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
[a][a1 ] [b][b1 ]
}
ATTRIBUTES
a1=formonly.col1 TYPE CHAR;
a=formonly.choic1 TYPE CHAR;
b1=formonly.col2 TYPE CHAR;
b=formonly.choic2 TYPE CHAR;
c=formonly.sc_answer TYPE CHAR, AUTONEXT, UPSHIFT, INVISIBLE;
INSTRUCTIONS
DELIMITERS " "
SCREEN RECORD sc_menu1[13] (choic1, col1)
SCREEN RECORD sc_menu2[13] (choic2, col2)

In production it looks like this:

SMS9000 pts007-20 Main Menu 11:52

A Comm Customer N Reports
B Email Message O Returns/Customer Service
C Estimates P Security Cashier
D Flash Sales Q Store Inventory Process
E Forecast Change R System Administration
F Forecast Exceptions S Utilities
G Forecast Sales X Exit
H Inquiry
I Installed Sales
J Labor Management
K OSH Credit Card
L Office
M Receiving

or

SMS9020 pts007-20 Inquiry 11:57

A All Store On Hands
B Other Store Onhand
C PO Inquiry
D POs By Vendor
E SKU By Vendor
F SKU Inquiry
G SKU Lookup
H Vendor Lookup
I Vendor Menu
X Exit

The cursor is sitting right after the SMSxxxx display text but the user
does not realize this because we reverse video the current line (by
default the first line). If they use the arrow keys we un-reverse video
the line and reverse video the line they move to. Pressing enter acts
like "do" or they can just chosse the letter. We also remember the last
line selected by user and if they come back to that menu that choice is
reversed. HTH.

Marty
 >> Stay informed about: Positioning in display array 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Display servicename/port no. of listner or user thread - Version: Informix 10 How do I display which listner or user thread is listening to which port. I am looking for something that tells me which thread is using ports/service names listed in sqlhosts. I tried onstat -g ath and onstat -g glo.

Sun 3510FC array long checkpoints resolved - I am posting a FYI incase anyone else has strange performance issues with Sun's 3510 disk arrays. About twice a month I was experiencing very long checkpoints (100+ seconds) for about 3-4 hours. Normally our checkpoints are 0. The arrays are hardware..

Cannot find message file. Check INFORMIXDIR and DBLANG. - im trying to run the oninit -i in the command prompt when the message appear... we installed... IBM Informix Dynamic Server 9.40 IBM INFORMIX-4GL Rapid Development System Version 7.32.UC2 IBM INFORMIX-4GL Version 7.32.UC2 set up sqlhosts, services,..

LOAD In 4GL Problems - Art and all , I tried to load rows into a temp table in a 4GL program ,where I am passing the filename as an argument . So I used the following syntax. DEFINE g_filename CHAR(10) ...... LOAD FROM g_filename INSERT INTO t_sp ,where g_filename is a cha...

Parameterized SQL &quot;WHERE IN&quot; clause? - Hello, I'm trying to come up with a way to pass a variable from Visual FoxPro to Informix via the current ODBC driver that looks something like this: SELECT * FROM MyTable WHERE MyField IN (?MyListOfValues) ?MyListOfValues is a variable holding my..
   Database Help (Home) -> Informix All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]