Welcome! Log In Create A New Profile

Advanced

WD Splash Screen?

Posted by SteveSitas 
WD Splash Screen?
January 07, 2022 12:52PM
Hi,
I need to "create" a splash screen for a WD 26 app.
I cannot use the built-in splash because it closes as soon as WD loads its internal libraries.
My main and first project window has a dashboard and sometimes (depending on the customer's data) it takes a long time before this window is shown. The dashboard is embedded in a dynamic TAB.

Any Ideas?

Regards
Steven Sitas
pao
Re: WD Splash Screen?
January 07, 2022 01:40PM
Have you tried using OpenChild at the beginning of the main windows init code?

Regards

Paulo Oliveira
Re: WD Splash Screen?
January 07, 2022 02:27PM
Hi Paulo,
yes, I have tried OpenChild in various embed areas in the main window - but at least in the development environment it "freezes" the app for a minute or so.
Makes the user experience worse ...
Even a simple ToastDisplay makes things a lot slower !!

Regards
Steven Sitas
Re: WD Splash Screen?
January 07, 2022 05:19PM
Hi Steve,

just an idea: open a window (always on top) in the project code and let the user click it off later on.

There is even a function to automatically close the window after a defined period of time.

Kind regards,
Guenter Predl
office@windev.at



Edited 1 time(s). Last edit at 01/07/2022 05:36PM by gpredl.
Re: WD Splash Screen?
January 08, 2022 08:24AM
Hi Steve,

In my project, I created a Window wich is opened from Initialization code of the project.
At the End of Initialization code of splash window is use ParallelTaskExecute function to run all the required job in the background.
After all of the above I call ParallelTaskExecuteAfterAll like this:

ParallelTaskExecuteAfterAll(PTaskArray, ReadCompleted, (), ptoMainThread)

The ReadCompleted is an Internal Procedure to determine when all done, and close the current Window.
It works like a charm!

Below is the example

PTaskDecription is Description of ParallelTask
PTaskArray 		is array of ParallelTasks

	MyWindow..MouseCursor		= curWait
	// Makes the requried job...
	PTaskDecription..Option		= ptoFullCopyHFSQLContext
	PTaskDecription..Procedure	= ReadTaskListData
	PTaskArray.Add(ParallelTaskExecute(PTaskDecription))
	PTaskDecription..Option		= ptoFullCopyHFSQLContext
	PTaskDecription..Procedure	= EmployeesVariablesUpdate
	PTaskArray.Add(ParallelTaskExecute(PTaskDecription))
	ParallelTaskExecuteAfterAll(PTaskArray, ReadCompleted, (), ptoMainThread)


INTERNAL PROCEDURE ReadCompleted()
	FOR EACH PTask OF PTaskArray
		IF PTask..ReturnedValue = False THEN
			Warning("some warning message.")
			BREAK
		END
	END
	Close()
END


Regards

Vassilis Boutsikas



Edited 2 time(s). Last edit at 01/08/2022 08:31AM by Vassilis.
Re: WD Splash Screen?
January 08, 2022 11:16AM
Hi Guenter and Vasilis,
thanks for the info.

Regards
Steven Sitas
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: