Using mfnp.i with event-driven program

Chris Kelleher

Administrator
Staff member
Dear Peg,

I need a push in the right direction. I have written a simple
event driven program (only my second), a table maintenance program.
It works fine and I am satisfied with it except for one thing: I
would like to include mfnp.i (include for next/prev logic)
functionality so that the user can down-arrow to a given record. I
use mfnp.i in all my procedural programs and the users like it (and I
like it when I'm the user).

I have two frames--one for the table keys and one for the rest of the
table fields; I wish to include mfnp.i in the table keys frame only.
I tried using the same kind of code that I would use in an editing
phrase (see below) but I get strange results.

1. Every other keystroke seems to be ignored.

2. Arrowing down will not show me all the records in the table.

3. My custom status line is being replaced with a standard Mfg/Pro
status line.

I've tried several changes to my program but nothing I do helps.
Looking at mfnp.i, I see that there is a lot going on in there and
maybe it just isn't compatible with event-driven programming.

Can anyone tell me how to get mfnp.i to work in an event-driven
program or how to achieve the same functionality in another way?

Thanks much in advance.

Progress 8.2C CHUI
Mfg/Pro 8.5F

Jack Kaufman

Sr. Programmer/Analyst
Systems Department
Ingersoll-Rand Corporation
101 North Main Street
Athens, PA 18810

Phone: 570-882-0366
Fax: 570-882-0452
Email: Jack_Kaufman@ingerrand.com

----------------------------------------------

<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
on any-key of frame frm-ftpm-keys anywhere do:
{mfnp.i ftpm_mst
loc-code ftpm_loc_code
appl-code ftpm_appl_code
ftpm_loc_appl}
if recno <> ? then do:
loc-code = ftpm_loc_code.
appl-code = ftpm_appl_code.
display
loc-code
appl-code
with frame frm-ftpm-keys.
recno = ?.
end.
else do:
status input.
readkey.
apply lastkey.
end.
end.
[/code]
 

Chris Kelleher

Administrator
Staff member
Jack

You cannot mix mfnp.i or any of the variants with an event driven
environment. They are based on the EDITING phrase which is a procedural
paradigm.

You have two options:

1 Use triggers to mimic the mfnp behaviour

2 See what QAD do in their GUI source and copy that.

A bit depends on what source access you have.

Cheers
 

Chris Kelleher

Administrator
Staff member
Guy, Jack,

You really don't want to go this route. QAD doesn't write code for GUI or
ChUI. AFAIK, all code is written in character with the procedurial model
and it's then converted using the GUI converter. This is the QAD-approved
way of programming for GUI. If you don't follow this path you'll pretty
much find yourself on your own because all the include files are for the
procedure driven module.

HTH,

Carlos

--
=======================================================
Carlos Colmenares http://www.protech.com
Senior Programmer ccolmenares@protech.com
Protech Systems Inc. (609) 714 0700 - Ext. 50
PEG Member 1999061404
I'm the only one to praise/blame for whatever I do/write/say
=======================================================
"Quick to judge, quick to anger - slow to understand
Ignorance & prejudice & fear walk hand in hand" RUSH - Witch Hunt.
 

Chris Kelleher

Administrator
Staff member
True enough .

It all depends whether you have access to the GUI converter.

There are advantages & disadvantage to being on your own!
 

Chris Kelleher

Administrator
Staff member
Just a note...

Anyone who is current on support has access to the GUI converter. You
simply request it from your account manager.

Scott
===============================================================
Scott M. Dulecki /* 1998061901 */ +1 616 975 6322
Product Manager scott_dulecki@qad.com
QAD, Inc. http://www.qad.com
1188 East Paris SE Grand Rapids, MI 49546 USA

Next Michigan Progress Users Group: 19 January 2000

All opinions are my own, and don't necessarily reflect those of
any other living being.
===============================================================
 
Top