slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] A question regarding "import"


Ok, I am re-writing several key functions and programs in my SLAG system.

I am also adding several new ones, such as the "Quick Menu" module, which
will be triggered by a function key/mouse event. All of these are C programs.

The "Quick Menu" is a limited (up to 30 items) pop-up menu that allows
only "Application" programs and/or shell programs to be called up from
within a "Menu" or in a "Application" program itself. The module name
is "slagquickm". I am in the process of finishing it up.

You use a intrinsic, AddMenuItem("name","type",int passwordlevel) to build
the QuickMenu list.

The concept is to have for each application, a Main Menu system that
calls the other necessary programs, Maint Screens, reports, shell scripts,
and the like. The Applications need to have the ability to have access to
a Quick menu. This is generally in the case where an operator is entering
a long order in an order entry system, but then gets a call to check a price
from a customer. A Quick Menu sub-system allows you to "Pop Up" a quick
menu system to select such things as "Price Check", and in the middle of
your data entry check the price of an item, but come back to where you left
off.

Now in a "Main Menu" sl file, I have:
import("slagmenu", "Global") ;
import("slagquickm", "Global");

The Main Menu program can then run a SLAG application (such as an input screen)
via the "RunScript ("slang program name") which is a C intrinsic in the
"slagmenu" module that saves the screen view than issues a "SLang_load_file"
using the "slang program name".

In the screen program I have the following 2 imports:
import("slagmaint", "Global") ;
import("slagquickm", "Global");

Since I have called the "Maint" program using the C Menu program and in BOTH
the Menu and the Maint, the "slagquickm" is imported, is there 2 distinct
(do not know how to phrase this quit right) copies of the slagquickm, one for
the "menu" and another for the Maint, or is there just one shared copy of
slagquickm.

The behavior I am after (and hoping for), is that there will be 2 distinct
copies, since the "Maint" needs to load it's own Quick list and not
overwrite the one used by Menu.

As Always,
Thanks ...

--
Ben Duncan   - VersAccounting Software LLC 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
       - Hanlon's Razor


_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]