MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Two Window Application

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125505] Two Window Application
  • From: Don <donabc at comcast.net>
  • Date: Fri, 16 Mar 2012 06:31:35 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

I am writing an application that requires one function (masterForm,
defined below)  to run in one window and another function 
(linear, defined below) to run in a second window.

Specifically ... 

Window #1 - The masterForm function (defined below) presents to the
user in Window #1 a list of function names with a separate Button in front
of each function name.  When the user clicks on a Button, the associated
function outputs a form in a second window  (Window #2) (for e.g. the
linear function defined below).  When the user  fills in the form
with data and hits Shift + Enter, the function takes that data and
produces an output report right below the form.


The user then goes back to Window #1 and clicks on the same or a different
Button to start another function in the list of functions
 which results in an input data form
appropriate for that function  in Window
#2.  The user fills in the form and hits Shift + Enter, 
whereupon another report is produced right below the 
input data form for that function  in Window #2.

  And so on .... until
the user decides to exit from the system.

In other words, the user is bouncing back and forth 
between Window #1 (initially) and Window #2 that
has the input data forms for particular functions and
the output reports from those functions.

The content of Window #2 should be

Input Data Form #1
Output Report #1
Input Data Form #2
Output Report #2

etc.   

NOTE:  The first time a function is chosen from the list of functons
presented to the user by masterForm in Window #1, a second window
(Window #2) is created  to receive the data input form
for that function and eventually the output report
for that function.    All subsequent function choices from the list
in Window #1, use Window #2 for the input data form for that function
and the resulting output report.  In short, there are only two separate
windows for this application.

Below are simplified masterForm and linear function defintions.
How would I modify these functions so that there will be
a Window #2 (separate from the Window #1 that has the list of functions)
to receive the input data forms and output reports of this
list of functions?

Thank you in advance.

Don

(* ***  linear function definition *** *)

Remove[linear, masterForm];

linear[] := Module[{},

   
   Interpretation[
    
    indexAsset1 = Null;
    backgrndClr$FE = ColorData["Aquamarine", 0.15];
    
    Panel[Grid[
      {
       {
        Style["Type Input:  ", Bold, 22], 
        InputField[Dynamic[indexAsset1], 
         FieldSize -> {{4, 4}, {1, Infinity}}]
        }
       },
      
      ItemStyle -> Directive[FontSize -> 26, Bold],
      Alignment -> 
       Table[Flatten[
         Join[{Right, Right, Left, Left, Table[Automatic, {2}], 
           Left}]], {3}],
      Spacings -> {2, Automatic}
      
      ], ImageSize -> {475, 150}, Background -> backgrndClr$FE],
    
    Print["linear input = ", indexAsset1]
     
     ](* Interpretation *)
   ];(* End Module linear *)



(* *** masterForm definition *** *)



masterForm[] := Module[{},
  Interpretation[{ };
   
   backgrndClr = ColorData["Aquamarine", 0.15];
   Panel[Grid[
     
     {
      {Style["Button - Function List FrontEnd", 30, Bold], SpanFromLeft
       },
      
      {
       "   ",
       
       
       Button[Graphics[{LightBlue, Rectangle[]}, ImageSize -> 12],
        CellPrint[ExpressionCell[linear[], "Input"]]],
       
       Style[" linear", Bold, 24]
       
       },
      
      {
       "      ",
       
       Button[Graphics[{LightBlue, Rectangle[]}, ImageSize -> 12],
        nonLinear$FE[]],
       
       Style[" nonLinear", Bold, 24]
       
       }
      
      },
     ItemStyle -> Directive[FontSize -> 26, Bold],
     Spacings -> {2, 2},
     Dividers -> {None, {2 -> 
         Directive[Black, AbsoluteThickness[Large]]}},
     Alignment -> {Left, Left, Left}
     ], ImageSize -> {800, 150}, Background -> backgrndClr],
   
   
   
   Print["777"]; 
    ](* Interpretation *)
  
  ](* End Module masterForm *)



  • Prev by Date: Re: Using Mathematica to typeset books
  • Next by Date: Cool example with ContourPlot+EvaluationMonitor
  • Previous by thread: Running Mathematica via ssh connection.... Very strange results
  • Next by thread: Cool example with ContourPlot+EvaluationMonitor