Futurescale, Inc.
PureMVC Home
The PureMVC Framework
Code at the Speed of Thought
Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
New discussions should be taken up in issues on the appropriate projects at
https://github.com/PureMVC
PureMVC Architects Lounge
Announcements and General Discussion
General Discussion
DesktopCitizen and Main Window's visibilty
Pages: [
1
]
« previous
next »
Author
Topic: DesktopCitizen and Main Window's visibilty (Read 16956 times)
janberc
Newbie
Posts: 4
DesktopCitizen and Main Window's visibilty
«
on:
March 30, 2009, 02:15:29 »
Hi,
I am creating an AIR application which has a splash screen which opens from the main MXML file. The splash screen is a window object which opens from the main app mediator and I keep the visibility of the main MXML to false till the splash is played completely. But when I use DesktopCitizen, the main MXML shows up for sometime (fraction of a second), then disappear, shows the splash screen. Any help will be much appreciated.
-JB
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: DesktopCitizen and Main Window's visibilty
«
Reply #1 on:
March 30, 2009, 03:45:17 »
Are you able to build and run the CodePeek AIR app? Does it do this on your machine? What you describe should not happen.
Is the base tag of your AIR app Application or WindowedApplication? If the latter, try using the former. I have had bizarre things happen when using WindowedApplication. I reported this in person to Mike Chambers many moons ago, but never filed an official bug report. Mike indicated at the time that there was no real benefit to using one over the other. So far I've found that to be true and have continued to use the Application tag.
To see what I'm talking about, get the CodePeek app and run it normally to see the behavior it should display, then change the main tag to WindowedApplication and run it again.
-=Cliff>
Logged
janberc
Newbie
Posts: 4
Re: DesktopCitizen and Main Window's visibilty
«
Reply #2 on:
March 30, 2009, 03:54:16 »
Hi Cliff,
I will take a look at Code Peek. I was under the impression that WindowedApplication tag has more functionality built in for a desktop application. I will check and try your suggestions and get back. Thanks for the quick reply.
-JB
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: DesktopCitizen and Main Window's visibilty
«
Reply #3 on:
March 30, 2009, 04:01:49 »
If you figure out what that 'extra functionality' actually is, by all means, post it here, but I've not yet found a good reason to use it. I get by just fine with Application. I'm sure that there is some stuff there, but until I need it, it's like super-sizing your medium drink to a barrel-o-coke for just a quarter more. If you're not that thirsty, then why do it?
-=Cliff>
Logged
Ondina
Sr. Member
Posts: 86
Re: DesktopCitizen and Main Window's visibilty
«
Reply #4 on:
March 31, 2009, 02:36:06 »
Even the simplest WindowedApplication behaves like this.
If in your descriptor file ( DesktopCitizenTest-app.xml) you have
<visible>true</visible>
<systemChrome>none</systemChrome>
you'll see something (the rectangle of the window without any chrome) before the WindowedApplication builds the window with the FlexChrome.
Solution:
set visible explicitly to false
<visible>false</visible>
The default is false, but it seems not to work.
Maybe that was your problem.
Ondina
«
Last Edit: March 31, 2009, 02:40:00 by Ondina
»
Logged
~ Ondina ~
janberc
Newbie
Posts: 4
Re: DesktopCitizen and Main Window's visibilty
«
Reply #5 on:
April 16, 2009, 08:34:17 »
I can't use <mx:Application instead of WindowedApplication. Immediate problem was I dont have activate() method of WindowedApplication class.
I tried setting the visible to false and transparent to true in the ApplicationDescriptor.xml file. This also doesnt work for me. May be there is something we need to check in the DesktopCitizen class?
-JB
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: DesktopCitizen and Main Window's visibilty
«
Reply #6 on:
April 16, 2009, 11:50:19 »
So far we've not been able to determine why the WindowedApplication class behaves differently from Application with regard to DesktopCitizen's implementation. When I spoke with him on the AIR Bus Tour, Mike Chambers wasn't able to explain it either. feel free to have a look, and please do report any good findings, but so far I'm stumped.
-=Cliff>
Logged
Ondina
Sr. Member
Posts: 86
Re: DesktopCitizen and Main Window's visibilty
«
Reply #7 on:
April 16, 2009, 11:51:09 »
Now that I'm reading your first post again, I see your “real” problem, or so I think.
You set WindowedApplication visible=false.
Then on applicationComplete you initialized the PureMVC apparatus:
Facade, ApplicationMediator, DesktopCitizenMediator
Your additional window is created and opened in the ApplicationMediator and you expect the WindowedApplication to not be visible until the added window has finished its work.
But the DesktopCitizenMediator has already set the
stage.nativeWindow.visible = true; when handling the notification WINDOW_SHOW
and that happened before you created your additional window.
That's why you see the WindowedApplication for a short while.
You have to put
sendNotification( DesktopCitizenConstants.WINDOW_OPEN, app.stage );
there where you consider that your additional window has finished its work or where you wanted your WindowedApplication to be visible again.
It will work!
Ondina
Logged
~ Ondina ~
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: DesktopCitizen and Main Window's visibilty
«
Reply #8 on:
April 17, 2009, 05:15:23 »
Thanks for catching this one Ondina, you rock!
-=Cliff>
Logged
Pages: [
1
]
« previous
next »
Stack Overflow
GitHub
Linked In
Google Plus
Twitter
Powered by SMF 2.0.15
|
SMF © 2006-2007, Simple Machines LLC
|
Content © 2006-2018, Futurescale, Inc.
Loading...