Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!emmayche From: emmayche@dhw68k.cts.com (Mark Hartman) Newsgroups: comp.sys.mac.programmer Subject: Re: 4D question Message-ID: <1990Dec21.191146.4756@dhw68k.cts.com> Date: 21 Dec 90 19:11:46 GMT References: <1523@tharr.UUCP> Organization: Wolfskill & Dowling residence; Anaheim, CA (USA) Lines: 38 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