G'day Mike,

Sorry for the length of the email but there was a bit to report.

1. Current thread.
2. Short form solution.
3. Long form actual code blocks.
4. Prior posts on the subject.
5. Actual background to menus form and table structure (available on request).

1.
At 22:39 29/05/01 -0700, you wrote:
>I tried this a couple of years ago and ran into similar problems.  It did
>not work well then and I do not have time to see if it works well now.  I
>ask the list server similar questions and it appeared that the general
>consensus was the same.
>If you get it to work effectively, I would love to hear about your findings.
>Manuel
>
>MJS wrote:
> > Is there anybody out there using the MDI option or SET FOCUS command?
> > If so,  I would be ever so greatful to have your input on how and when
> > to use MDI and SET FOCUS.  Are they any examples in the CONCOMP sample
> > files????
> > Mike Sinclair

2.
The simplicity of it is this:

EDIT USING BckGrndMenu +
   MDI +
   AT 0,0,798,580 +
   AS BGMAlias +
   CAPTION 'Menu Background'
CHOOSE vMMPick1 +
   FROM menu1_fp +
   IN MoneyMgr.apx +
   AT 7,45 +
   TITLE 'Money Manager Main Menu' +
   CAPTION 'Money Manager Module' +
   LINES 12
CLOSEWINDOW BGMAlias

3.
The code blocks below are what I wound up with after extensive modification 
and testing in order to get different alias names for windows being a 
background to successive levels of menus.

$COMMAND
BGMOff
-- Turns off background to menu form
-- Called by code after displaying CHOOSE cmd

-- Created by Tom Grimshaw 10-09-1998
-- Modification history
-- 12-09-1998   Added nostatus cmd
-- 02-01-1999   Added background menu alias numbering
--

IF vBGM = 'Y' THEN
   IF vAABGM = 'N' THEN
     CLOSEWINDOW &vbgmalias
     SET VAR vbgmno INTEGER = (.vbgmno - 1)
     SET VAR vbgmnouse INTEGER = .vbgmno
     SET VAR vbgmnouse TEXT
     SET VAR vbgmalias TEXT = ('BGM' + .vbgmnouse)
     CLEAR VAR MICRORIM_NOSTATUS,vbgmnouse
   ENDIF
ENDIF
RETURN


$COMMAND
BGMOn
-- Turns on background to menu form
-- Called by code prior to displaying CHOOSE cmd

-- Created by Tom Grimshaw 10-09-1998
-- Modification history
-- 02-01-1999   Added background menu alias numbering
--

IF vBGM = 'Y' THEN
   IF vAABGM = 'N' THEN
     SET VAR vbgmnotest INTEGER = .vbgmno
     IF vbgmnotest IS NULL OR vbgmnotest = 0 THEN
       SET VAR vbgmno INTEGER = 1
     ELSE
       SET VAR vbgmno INTEGER = (.vbgmno + 1)
     ENDIF
     SET VAR vbgmnouse INTEGER = .vbgmno
     SET VAR vbgmnouse TEXT
     SET VAR vbgmalias TEXT = ('BGM' + .vbgmnouse)
     SET VAR MICRORIM_NOSTATUS INTEGER
     EDIT USING &vBGMForm +
       MDI +
       AT 0,0,798,580 +
       AS &vbgmalias +
       CAPTION .vModuleName
   ENDIF
ENDIF
CLEAR VAR vbgmnouse,vbgmnotest,MICRORIM_NOSTATUS
RETURN


-- This calls the block to display the background form
RUN BGMOn IN GlobBlok.apx
-- This displays the CHOOSE menu
CHOOSE vMMPick1 +
   FROM menu1_fp +
   IN MoneyMgr.apx +
   AT 7,45 +
   TITLE 'Money Manager Main Menu' +
   CAPTION .vModuleName +
   LINES 12
-- This calls the block to close the background form window
RUN BGMOff IN GlobBlok.apx


4.
Here is a clip from an email posting some time ago when the issue was last 
discussed.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SETFOCUS alias WAIT is no longer valid syntax. While the option WAIT is
discussed in the text of the 6.0 new features addendum, it is not included
in the sytnax diagram nor in the online help (most current information).
The WAIT option was invalidated with the change in forms from 5.5 to 6.0
that included the ability to size modal forms. The WAIT option simulated a
modal form when used on an MDI form, it would not give you the ability to
switch between the forms in the way you are looking for.
I have recommended in previous postings that MDI forms not be used in
applications because there is no way to halt the application while the user
works on the forms.
Anne (Gillihan)

At 11:38 AM 12/11/98 -0800, you wrote:
 >Thank you Lawrence for your timely response but the basic question is not
 >yet address. One thing is to stay away from RBase's MDI forms an another
 >is whether the existing command work or not.
 >I am trying to determine whether the documented MDI feature of RBase for
 >Windows work, specifically: SETFOCUS alias WAIT
 >
 >If the above documented command does not work then, MDI cannot be used and
 >it should be removed from the documentation.
 >
 > I have read other request in this medium about MDI forms that have
 >generated very little responses. I can only assume that developers like
 >myself have not been using this documented feature of the product.
 >In the 6.1 new feature addendum (RB6XNFA020) it clearly show on page 31 the
 >new format when using MDI forms that replaces the obsolete format EDIT MDI
 >.......:
 >EDIT USING ..... WHERE ...... ORDER BY..... MDI... AT ... AS alias
 >
 >on page 51 it expands on the "Enhanced MDI Forms" and the improvements
 >incorporated into 6.X
 >
 >On the reference manual Page 446 it talks about the SETFOCUS alias command
 >but no mention of the WAIT. Of course without the WAIT MDI forms are not
 >usable since the code execution will continue leaving the forms on the
 >screen. In the 6.0 addendum (RB60NFA010) it mentions the addition of the
 >WAIT and specifically states that "this option stops the application until
 >the user either closed the form, or clicks in the application window". If
 >this works then MDI forms can be usable.
 >
 >IF you run two MDI forms and place a SETFOCUS form1 WAIT, afterward the
 >forms will display and the code will stop until the operator completes the
 >task he/she needs to accomplish through the forms and, then, the
 >application will continue. If anyone can try this code using two window
 >forms in your application, it will let us all know if SETFOCUS alias WAIT
 >works or not. If it does not work, then Razzak can have some concrete
 >field beta testing and fix it in the next version of RBase.
 >-------------------------------------------------------
 >MINIMIZE
 >EDIT USING firstform MDI AS alias1
 >EDIT USING secondform MDI AS alias2
 >SETFOCUS alias1 WAIT
 >NORMALIZE
 >WRITE " You should only see this message ONLY AFTER both forms have been
 >closed"
 >RETURN
 >--------------------------------------------------------------------
 >I have stayed away from MDI because the times I have tried, never behaved
 >properly. Now I have a customer that I convinced into staying with RBase
 >and upgrading to RBase for Windows. This is a typical customer that uses
 >windows extensively, (Excell, Word, ACT, Netscape) and likes it. He likes
 >the ability to move from one window to another and work VERY EFFICIENTLY.
 >He wants a customized contact manager program in RBase so as to take
 >advantage of the database that he has. His request for an MDI interface in
 >RBase is not unreasonable. He wants to be able to have a customer form
 >open at the same time as a conversation log or any other form that will
 >yield the information he wants quickly and efficiently. MDI is the ticket,
 >if it works! As the years pass more and more, customer will be expecting
 >this type of functionality from RBase. Again, their request is not
 >unreasonable and we, as developers, must fulfill it.
 >TIA
 >Manuel de Aguiar
 >http://www.mdenterprise.net
 >http://www.databasedeveloper.com
 >
 >
 >Lawrence Lustig wrote:
 >
 >> > Does MDI forms work or am I doing something wrong?
 >>
 >> No they don't work and yes you are doing something wrong. First
 >> off, Ann Gilihan has recommended staying away from MDI forms
 >> as they are not fully supported by R:Base. Secondly, the
 >> documentation shows that for MDI you should use EDIT MDI in
 >> place of EDIT USING (this is 6.0 documentation).
 >>
 >> Also, let me say that in using the term "MDI" Microrim was
 >> confounding two different terms -- Modal and MDI. MDI is a very
 >> specific application framework built into Windows in which you can
 >> open multiple copies of the identical form against different data (like
 >> opening 37 different documents in functionally identical windows in
 >> a word processor). Where Microrim used the term MDI I think they
 >> meant "Non-Modal" meaning that the form could remain open while
 >> other forms where also active.
 >>
 >> > EDIT USING ContactInf WHERE Client# EQ .f1fClient# MDI +
 >> > AT 25,95,570,425 AS Form1 CAPTION 'EDIT CONTACT'
 >>
 >> --
 >> Lawrence Lustig
 >> R:Base programmer
 >> Author of R:Code -- The R:Base Programmer's Editor
 >> http://www.pipeline.com/~llustig/rbase/rcode.htm

Warmest regards,


Tom Grimshaw
coy:    Just For You Software
tel:    61 (0)2 9552 3311
fax:    61 (0)2 9566 2164
mobile: 0414 675 903

post:   PO Box 470  Glebe  NSW  2037  Australia
street: 3/66 Wentworth Park Rd  Glebe  NSW  2037

email:  [EMAIL PROTECTED]
web: www.just4usoftware.com.au

Reply via email to