Special Run to update Title

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Special Run to update Title

#1 Post by omni »

Roger,

we did this 12 years ago so i know you will remember vividly. (kidding)

The user wants a constant notification that a process is running, so we added it to the Title on our app so the users would always see the last date /time run. Related to EDI running on one of our EXE's. Sometimes it just errors out and they are now aware it stops.

Tried to activate without each user needing to activate but failed. Had to put it on the menu. Otherwise it gives a message the the dlg does not exist (yet).

Here is what we did.
This works..
for the title we use:
Title {||qqtittle }

Standard mdiblock (removed my special codes as not relevant)

STATIC PROCEDURE MDIBlock( bAction, ctitle )

LOCAL oThread, aChildList := oMainDialog:drawingArea:childList()

setappfocus(odlg)
oThread := Thread():new()
close all
RETURN

//this is the procedure
Static Function edix(getlist)


do while .t.

use edilog
goto bott
store date to xxxxdate
store time to xxxxtime
use
qqedidate='(Last EDI Update: '+ dtoc(xxxxdate)+' '+substr(xxxxtime,1,5)+")"
qqTitle= 'MAIN MENU'+' '+alltrim(QCOMPNAME)+' '+qqedidate

dc_getrefresh(getlist)
oDlg:SetTitle(qqtitle)
keyin=inkey(500)


enddo


Is the any other method to start automatically when the app is first opened by each user as part of the DCREAD GUI, other than them doing the menu option

Fred
OMNi

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Special Run to update Title

#2 Post by rdonnay »

Call it from the EVAL bBlock clause of DCREAD GUI.

DCREAD GUI .. EVAL {||EditX(GetList)}
The eXpress train is coming - and it has more cars.

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Special Run to update Title

#3 Post by omni »

Got that to work, but then the exit option on the menu will not work. Guess its due to the one item running, but if I add it to the menu that is not an issue.
We use the exit to move to another company (changes default directory) and it will not close. Using the menu works properly.
Do I need to add something else?

DCREAD GUI ;
TITLE {||QQTITLE } ;
PARENT @oDlg ;
Nodestroy ;
To mStatus ;
OPTIONS GetOptions ;
EVAL {|o|SetAppWindow(o),M->oMainDialog := o, ;
o:setFrameState(XBPDLG_FRAMESTAT_MAXIMIZED ), ;
bitmapConfig(odlg),odlg:show(),EdiX(GetList) } ;

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Special Run to update Title

#4 Post by rdonnay »

I need to see more of your code to understand why this doesn't work.
The eXpress train is coming - and it has more cars.

Post Reply