Enrique
Consider these snipits of code based on the Main MDI window. In this code I allow a different user to login to my application and I have to update SET MESSAGE in the BuildMenu() part of the code. xMessage is defined as Public because Set Message is not defined prior to the main MDI and it can not be passed to BuildMenu() because xMessage is still NIL at the top of the program.
The changes to SET MESSAGE are defined with the BuildMenu() code .. again these are just snipits of code within my Main() code :
Public xMessage
//
//
xMESSAGE := 聽"User 聽"+xLOGIN+" 聽 聽Rights 聽"+cRIGHTS+ 聽 聽 聽 聽;
聽 聽 聽 " 聽 聽 Default= "+cDEFA+" 聽 聽 聽Rdd= "+cRDD+ 聽 聽 聽 聽 聽 聽;
聽 聽 聽 " 聽 聽 Revision 聽"+DTOC(dEXE)+;
聽 聽 聽 " 聽-r"+str(nSCR1,4)+" x "+STR(nSCR2,4)
DEFINE WINDOW oWndMain TITLE cTitle ;
聽 聽 聽 聽MENU BuildMenu(dExe,cRdd,nSCR1,nSCR2);
聽 聽 聽 聽ICON oIco ;
聽 聽 聽 聽MDI
聽 聽 聽 SET MESSAGE OF oWndMain 聽 聽 ;
聽 聽 聽 聽to xMessage DATE CLOCK 2010
Activate Window oWndMain MAXIMIZED 聽 聽
// in BuildMenu()
MENUITEM "&Login Diff User" ;
聽 聽 聽ACTION( _Log_in( "M" ), ;
聽 聽 聽 聽 cRIGHTS := _Rights(), 聽 聽 聽 聽 聽 聽 ;
聽 聽 聽 聽 xMESSAGE := 聽( "User 聽"+xLOGIN+" 聽 聽Rights 聽"+cRIGHTS+ 聽 聽 聽 聽;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 聽 Default= "+cDEFA+" 聽 聽 聽Rdd= "+cRDD+ 聽;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽 聽 Revision 聽"+DTOC(dEXE)+;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 " 聽-r"+str(nSCR1,4)+" x "+STR(nSCR2,4)),;
聽 聽 聽 聽 oMenu:End(),; 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// end the current menu
聽 聽 聽 聽 oWndMain:oMsgBar:cMsgDef := xMessage,oWndMain:oMsgBar:ReFresh(),; 聽//redefine set message
聽 聽 聽 聽 oWndMain:SetMenu( BuildMenu( dEXE,cRDD,nSCR1,nSCR2 )),; 聽 聽 聽 聽 聽 聽// redefine buildmenu()
聽 聽 聽 聽 MsgInfo( "Current User is now 聽 "+xLOGIN ))
Rick Lipkin