Threads - GetList anomaly using VALID

This forum is for eXpress++ general support.
Post Reply
Message
Author
Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

Threads - GetList anomaly using VALID

#1 Post by Maxz »

using a thread to open a new DCDialog window, I encounter a problem using GETs with the VALID clause
valid_issue.jpg
valid_issue.jpg (82.12 KiB) Viewed 2744 times

when I have 2 windows running, and I position myself on the GET field that contains a VALID, I can not continue on the other window
if I click on the second window, the cursor returns me to the GET of the first window that has the VALID that returns .F. (for example empty field)

I used the DCREAD badly in every prg ?

from xbase manual:
Multithreading issues All events are stored in a so-called event queue and AppEvent() retrieves events from this queue. If a program uses multiple threads, it is important to know that event queues have thread-local scope. When Xbase Parts are created in different threads, they are retrieved from different event queues by AppEvent() (3rd parameter oXbp ). As a result, each thread that creates an Xbase Part must call AppEvent() so that events for this Xbase Part can be processed.

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

Re: Threads - GetList anomaly using VALID

#2 Post by rdonnay »

If you can produce a small test program, I will help
The eXpress train is coming - and it has more cars.

Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

Re: Threads - GetList anomaly using VALID

#3 Post by Maxz »

testwin.zip
(7.25 KiB) Downloaded 218 times
I tried to isolate only the function that create windows above the main screen
if you open 2 windows and try to activate the edit button on the first, you will see that you can not click on the second window because the VALID of the first wins.
however, if you enter something on the first, the VALID allows you to click on the second window

Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

Re: Threads - GetList anomaly using VALID

#4 Post by Maxz »

I changed the way I build the window:

DCGETOPTIONS NOBUSY CONFIRM NOMINBUTTON NOMAXBUTTON NOTASKLIST NOESCAPEKEY ;
ROWSPACE (FONT_ROWSPACE) SAYFONT (FONT_SAY) GETFONT (FONT_GET) ;
MINSIZE aSize[1],aSize[2] MAXSIZE aSize[1],aSize[2] ;
TITLE TITOLO_PRG ;
BORDER XBPDLG_DLGBORDER;
CLOSEQUERY MSG {||.F.} ;
HIDE


DCREAD GUI TO lStatus OPTIONS GetOptions PARENT @oDialog OWNER oMainWindow ;
SETFOCUS @oFirstButton FIT EVAL {|| oDialog:setPos( { aPos[1], aPos[2] }), oDialog:show() }

and it seems to work the transition from one window to another without the VALID blocking the selection focus
it is likely that I have created the MDI dialog box incorrectly
screenshot2.jpg
screenshot2.jpg (99.82 KiB) Viewed 2661 times
aesthetically it is not very beautiful mainly because of the right margin larger than the left one
even the edges are not so beautiful because they are too thick

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

Re: Threads - GetList anomaly using VALID

#5 Post by rdonnay »

I looked at your test program and your coding method is much more complex than how eXpress++ was designed to be used.

Unfortunately, I have been very busy lately, working long days so I haven't had time for this.

I will completely rewrite it for you soon to show you how you should be using eXpress++.
The eXpress train is coming - and it has more cars.

Post Reply