How can I close all the Thread

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

How can I close all the Thread

#1 Post by digitsoft »

Hello Roger
How can I close all the Thread that are created to the windows that are open
Nolberto Paulino
Regards

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

Re: How can I close all the Thread

#2 Post by rdonnay »

Code: Select all

FUNCTION CloseAllWindows()

LOCAL aChildList, i

aChildList := MainWindow():drawingArea:childList()

FOR i := 1 TO Len(aChildList)
  PostAppEvent(xbeP_Close,,,aChildList[i])
  Sleep(50)
NEXT

RETURN nil
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How can I close all the Thread

#3 Post by digitsoft »

Roger this function MainWindow () does not exist


rdonnay wrote:

Code: Select all

FUNCTION CloseAllWindows()

LOCAL aChildList, i

aChildList := MainWindow():drawingArea:childList()

FOR i := 1 TO Len(aChildList)
  PostAppEvent(xbeP_Close,,,aChildList[i])
  Sleep(50)
NEXT

RETURN nil
Nolberto Paulino
Regards

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

Re: How can I close all the Thread

#4 Post by rdonnay »

function MainWindow () does not exist
Do you have a Get-Set function that points to your main dialog window?
Do you know what I mean by this?

Code: Select all

// Main dialog window
DCREAD GUI EVAL {|oDlg|MainWindow(oDlg)}


FUNCTION MainWindow( oDlg )

STATIC soDlg

IF Valtype(oDlg) == 'O'
  soDlg := oDlg
ENDIF

RETURN soDlg
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How can I close all the Thread

#5 Post by digitsoft »

Thanks Roger

rdonnay wrote:
function MainWindow () does not exist
Do you have a Get-Set function that points to your main dialog window?
Do you know what I mean by this?

Code: Select all

// Main dialog window
DCREAD GUI EVAL {|oDlg|MainWindow(oDlg)}


FUNCTION MainWindow( oDlg )

STATIC soDlg

IF Valtype(oDlg) == 'O'
  soDlg := oDlg
ENDIF

RETURN soDlg
Nolberto Paulino
Regards

Post Reply