[comp.sys.mac.programmer] 4D question

tmhoff@uokmax.ecn.uoknor.edu (Thomas Milton Hoff) (06/27/90)

I have a question for all you 4d programmers out there, but you'll have
to bear with me because my editor woke up kind of flaky this morning.

I have a really long layout.  Now, before anyone tells me this, I know that's
a bad idea.  But, it's from a project I sorta inherited from someone and
would rather just finish it than rebuild it from the ground up.  My problem
is, when I print a record using my output layout, I get 2 copies.  For
the life of me I can't figure out why.  Can anyone tell me how to get 
rid of it?  The output form prints in 10 pages that are stacked one on
top of the other, sorta like pancakes.  Does that have anything to do
with it?  Please, someone help.  I don't really LIKE banging my head against
the wall.

Please respond to 
KMILLER@aardvark.ucs.uoknor.edu as this is a friend's account.  
Thanks everyone.

zobbo@tharr.UUCP (Ian Cottee) (12/19/90)

I did ask a month or so back where the best place for 4D questions was and
somebody suggested Compuserve. Alas, I haven't a clue how to get the news
from that (and I certainly can't afford any money!). So this is a quick
4D question and maybe any 4D people out there who could help me in the 
future would like to drop me a line (I shall try not to bother you too much honest!)

In the database IO am creating I often need to show a list of all current 
supplier names (or customer names) and display them in a popup menu. What
I would like to do is let them select via the pop up menu and then just have the
menu showing the selection they have made and writing the supplier number
back to the file. 

I have written some routines to do this but they seem a little buggy ...
they work sometimes - and I can not get the popup menu to stick on the
item they have selected the next time they go into it. an anyone help (or
point me in the right direction in the manual) - many thanks

Thanks to one and all

Ian
.

-- 
//////////////////////////////////////////////////////////////////////
/ zobbo@tharr.uucp                  | Disclaimer - give me a break   /
/ !ukc!axion!tharr!zobbo            |              I don't even      /
/ axion!tharr!zobbo@uk.ac.ukc       |              believe this junk /
/<-- tharr *free* public access to Usenet in the UK 0234 261804 -->  /
//////////////////////////////////////////////////////////////////////

emmayche@dhw68k.cts.com (Mark Hartman) (12/22/90)

Ian:
 
To solve your problem, you first need to get the current selection in your
customer or supplier file to the records you'd like to have appear in the
pop-up menu.
 
Now, something to remember: arrays, scrolling areas and pop-up menus are
treated as one and the same by 4D.  Therefore, you can do all sorts of
array-oriented tricks for pop-up menus.
 
Convert the current selection to an array by using SELECTION TO ARRAY, and
make sure that the pop-up menu area on the screen has the same name as the
array (or use COPY ARRAY).
 
Something to remember about arrays: they have a special property, which is
the "current item" (just like a file).  To get at this item, use the name
of the array standing by itself; it's treated as an integer.  You can use
it to find the currently-selected item (via pop-up or scrolling area), or
assign an integer to it to force the pop-up or scrolling area to select a
given item.
 
If your suppliers/customers change frequently such that you could have 
different items in the menu from session to session, remember to come up
with a way of determining which item your should set the array's "current
item" to which is independent of the ordinal within the array.
 
Note: I'll be happy to answer 4D questions e-mailed to me, or posted to
the net; if the answer is (IMHO) of sufficient interest to 4D people, I'll
post the answer, otherwise I'll mail it.
--
==========================================================================
Have a Merry Christmas; if you don't celebrate Christmas, have one anyway.
==========================================================================
-- 
Mark Hartman, N6BMO           "What are you just standing there for?  Where
Applelink: N1083 or BINARY.TREE      do you think you are, DIS-ney World??"
Internet: emmayche@dhw68k.cts.com                -- General Knowledge, from
uucp: ...{spsd,zardoz,felix}!dhw68k!emmayche                CRANIUM COMMAND