PDA

View Full Version : Mask whilst App Loading (Architect)



localrus
21 Nov 2012, 1:13 AM
Hi got what is probably a simple thing if you know how.

I am starting to use Architect to write applications with and one of the things I did previous to this was a loading screen that was removed by ExtJS once it was ready. This was done by some simple HTML, CSS and simple Javascript code to fade out the mask.

How can I do this through Architect since it rewrites the html file?

Is there another way to do it in Architect i've missed? Do I just have to manually re-add the HTML to the app.html file after every save?

Thanks in advance

nothing
21 Nov 2012, 5:46 AM
You can set a loading mask by calling this method on a view:


myView.setLoading( true );

After your loading or on demand call this remove it:


myView.setLoading( false );

localrus
21 Nov 2012, 6:39 AM
Thanks for the reply "nothing" but I'm look to give user feedback instead of the white page (that looks like its doing nothing) whilst ExtJS itself loads (files downloaded, initialized etc).

The mask you describe would only display after the files have been downloaded and the app is ready.

As there are parts before ExtJS is loaded I doubt there is a built in way when using Architect. Would be a nice feature for architect to have since would just need to insert some HTML into the app.html file it creates and add the javascript to fade it out once the app is loaded.

Sorry I missed the Architect forum, this topic might be better there, if admin/mods agree could it be moved please?