[flexcoders] Re: Custom preloader bug

2008-04-15 Thread maximecowez
Yepee! I finally nailed it! Took me three hours.
And I now really think this might be a Flex bug or at least an
inconsistency.

What I did wrong:
I created my main controller (that sets up all event listeners and more)
on INIT_COMPLETE
And now I create it on CREATION_COMPLETE and everything is ok.

Now here's the weird part: CREATION_COMPLETE is dispatched before
INIT_COMPLETE
And anyway one may expect that the Flex framework and everything needed
is completely loaded on init_complete.

That said: my problem is solved. But is this a Flex bug or am I looking
at it the wrong way?

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 There's nothing wrong with using that event, it is what is in your
 preloader that matters.  Not sure what you're doing in your preloader,
 but I can't imagine how you can get radiobuttons to show up as
buttons.



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of maximecowez
 Sent: Monday, April 14, 2008 9:33 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Custom preloader bug



 Well I supposed the FlexEvent.INIT_COMPLETE event got dispatched when
 the framework had finished loading. Is there another event I have to
 listen for then?
 Plus the bug only seems to apply to children of the Button class.

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  The preloader runs while the framework is loading, so you can't have
 any
  framework dependencies
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ]
 On
  Behalf Of maximecowez
  Sent: Monday, April 14, 2008 3:29 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Custom preloader bug
 
 
 
  I wonder if this is a Flex bug or if I'm doing something wrong: I'm
  using a custom preloader to first fetch all the data and only then
  display the application.
 
  It does exactly what it's supposed to do, BUT when I open a
 TitleWindow
  that has it's 'showCloseButton' attribute set to 'true', the close
  button doesn't show. Furthermore, all radio buttons in the window
are
  displayed as regular buttons. If I load the data on
'CreationComplete'
  without the custom preloader everything is fine.
 
  At first I used the method described in Ted Patrick's tutorial
  http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php
 http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php  .
 Then
  I wrote my own version implementing IPreloaderDisplay instead of
  extending DownloadProgressBar. Although the latter is more
efficient,
  keep getting that same bug.
 
  Here's what I do on FlexEvent.INIT_COMPLETE (VMain is the view, Main
 is
  the model, CMain is the controller:
 
  var view:VMain = Application.application as VMain;
  var data:Main = new Main(view.parameters);
 
  data.addEventListener(Event.COMPLETE,
  function(event:Event):void {
  dispatchEvent(new Event(Event.COMPLETE));
  });
 
  new CMain(view, data);
 
  Any ideas? To me it looks like part of the Flex framework isn't
loaded
  yet. Am I dispatching the event to early?
  Thanks
 




[flexcoders] Re: Custom preloader bug

2008-04-15 Thread maximecowez
Yepee! I finally nailed it! Took me three hours.
And I now really think this might be a Flex bug or at least an
inconsistency.

What I did wrong:
I created my main controller (that sets up all event listeners and more)
on INIT_COMPLETE
And now I create it on CREATION_COMPLETE and everything is ok.

Now here's the weird part: CREATION_COMPLETE is dispatched before
INIT_COMPLETE
And anyway one may expect that the Flex framework and everything needed
is completely loaded on init_complete.

That said: my problem is solved. But is this a Flex bug or am I looking
at it the wrong way?

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 There's nothing wrong with using that event, it is what is in your
 preloader that matters.  Not sure what you're doing in your preloader,
 but I can't imagine how you can get radiobuttons to show up as
buttons.



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of maximecowez
 Sent: Monday, April 14, 2008 9:33 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Custom preloader bug



 Well I supposed the FlexEvent.INIT_COMPLETE event got dispatched when
 the framework had finished loading. Is there another event I have to
 listen for then?
 Plus the bug only seems to apply to children of the Button class.

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  The preloader runs while the framework is loading, so you can't have
 any
  framework dependencies
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ]
 On
  Behalf Of maximecowez
  Sent: Monday, April 14, 2008 3:29 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Custom preloader bug
 
 
 
  I wonder if this is a Flex bug or if I'm doing something wrong: I'm
  using a custom preloader to first fetch all the data and only then
  display the application.
 
  It does exactly what it's supposed to do, BUT when I open a
 TitleWindow
  that has it's 'showCloseButton' attribute set to 'true', the close
  button doesn't show. Furthermore, all radio buttons in the window
are
  displayed as regular buttons. If I load the data on
'CreationComplete'
  without the custom preloader everything is fine.
 
  At first I used the method described in Ted Patrick's tutorial
  http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php
 http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php  .
 Then
  I wrote my own version implementing IPreloaderDisplay instead of
  extending DownloadProgressBar. Although the latter is more
efficient,
  keep getting that same bug.
 
  Here's what I do on FlexEvent.INIT_COMPLETE (VMain is the view, Main
 is
  the model, CMain is the controller:
 
  var view:VMain = Application.application as VMain;
  var data:Main = new Main(view.parameters);
 
  data.addEventListener(Event.COMPLETE,
  function(event:Event):void {
  dispatchEvent(new Event(Event.COMPLETE));
  });
 
  new CMain(view, data);
 
  Any ideas? To me it looks like part of the Flex framework isn't
loaded
  yet. Am I dispatching the event to early?
  Thanks
 




RE: [flexcoders] Re: Custom preloader bug

2008-04-15 Thread Alex Harui
CREATION_COMPLETE is passed to each UIComponent before INIT_COMPLETE
tells the preloader to go away.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of maximecowez
Sent: Tuesday, April 15, 2008 5:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom preloader bug

 

Yepee! I finally nailed it! Took me three hours.
And I now really think this might be a Flex bug or at least an
inconsistency.

What I did wrong:
I created my main controller (that sets up all event listeners and more)
on INIT_COMPLETE
And now I create it on CREATION_COMPLETE and everything is ok.

Now here's the weird part: CREATION_COMPLETE is dispatched before
INIT_COMPLETE
And anyway one may expect that the Flex framework and everything needed
is completely loaded on init_complete.

That said: my problem is solved. But is this a Flex bug or am I looking
at it the wrong way?

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 There's nothing wrong with using that event, it is what is in your
 preloader that matters. Not sure what you're doing in your preloader,
 but I can't imagine how you can get radiobuttons to show up as
buttons.
 
 
g! t; 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of maximecowez
 Sent: Monday, April 14, 2008 9:33 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Custom preloader bug
 
 
 
 Well I supposed the FlexEvent.INIT_COMPLETE event got dispatched when
 the framework had finished loading. Is there another event I have to
 listen for then?
 Plus the bug only seems to apply to children of the Button class.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  The preloader runs while the framework is loading, so you can't have
 any
  framework dependencies
 
 
 
  ___! _
 
  From: fl! excoders @yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ]
 On
  Behalf Of maximecowez
  Sent: Monday, April 14, 2008 3:29 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

  Subject: [flexcoders] Custom preloader bug
 
 
 
  I wonder if this is a Flex bug or if I'm doing something wrong: I'm
  using a custom preloader to first fetch all the data and only then
  display the application.
 
  It does exactly what it's supposed to do, BUT when I open a
 TitleWindow
  that has it's 'showCloseButton' attribute set to 'true', the close
  button doesn't show. Furthermore, all radio buttons in the window
are
  displayed as regular! buttons. If I load the data on
'CreationComplete'
  without the custom preloader everything is fine.
 
  At first I used the method described in Ted Patrick's tutorial
  http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php
 http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php  .
 Then
  I wrote my own version implementing IPreloaderDisplay instead of
  extending DownloadProgressBar. Although the latter is more
efficient,
  keep getting that same bug.
 
  Here's what I do on FlexEvent.INIT_COMPLETE (VMain is the view, Main
 is
  the model, CMain is the controller:
 
  var view:VMain = Application.application as VMain;
  var data:Main = new Main(view.parameters);
 
  data.addEventListener(Even! t.COMPLETE,
  function(event:Event):void ! {
 ;  dispatchEvent(new Event(Event.COMPLETE));
  });
 
  new CMain(view, data);
 
  Any ideas? To me it looks like part of the Flex framework isn't
loaded
  yet. Am I dispatching the event to early?
  Thanks
 


 



[flexcoders] Re: Custom preloader bug

2008-04-14 Thread maximecowez
Well I supposed the FlexEvent.INIT_COMPLETE event got dispatched when
the framework had finished loading. Is there another event I have to
listen for then?
Plus the bug only seems to apply to children of the Button class.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 The preloader runs while the framework is loading, so you can't have
any
 framework dependencies



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of maximecowez
 Sent: Monday, April 14, 2008 3:29 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Custom preloader bug



 I wonder if this is a Flex bug or if I'm doing something wrong: I'm
 using a custom preloader to first fetch all the data and only then
 display the application.

 It does exactly what it's supposed to do, BUT when I open a
TitleWindow
 that has it's 'showCloseButton' attribute set to 'true', the close
 button doesn't show. Furthermore, all radio buttons in the window are
 displayed as regular buttons. If I load the data on 'CreationComplete'
 without the custom preloader everything is fine.

 At first I used the method described in Ted Patrick's tutorial
 http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php .
Then
 I wrote my own version implementing IPreloaderDisplay instead of
 extending  DownloadProgressBar. Although the latter is more efficient,
 keep getting that same bug.

 Here's what I do on FlexEvent.INIT_COMPLETE (VMain is the view, Main
is
 the model, CMain is the controller:

 var view:VMain = Application.application as VMain;
 var data:Main = new Main(view.parameters);

 data.addEventListener(Event.COMPLETE,
 function(event:Event):void {
 dispatchEvent(new Event(Event.COMPLETE));
 });

 new CMain(view, data);

 Any ideas? To me it looks like part of the Flex framework isn't loaded
 yet. Am I dispatching the event to early?
 Thanks





RE: [flexcoders] Re: Custom preloader bug

2008-04-14 Thread Alex Harui
There's nothing wrong with using that event, it is what is in your
preloader that matters.  Not sure what you're doing in your preloader,
but I can't imagine how you can get radiobuttons to show up as buttons.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of maximecowez
Sent: Monday, April 14, 2008 9:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom preloader bug

 

Well I supposed the FlexEvent.INIT_COMPLETE event got dispatched when
the framework had finished loading. Is there another event I have to
listen for then?
Plus the bug only seems to apply to children of the Button class.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 The preloader runs while the framework is loading, so you can't have
any
 framework dependencies



 

 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
]
On
 Behalf Of maximecowez
 Sent: Monday, April 14, 2008 3:29 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Custom preloader bug



 I wonder if this is a Flex bug or if I'm doing something wrong: I'm
 using a custom preloader to first fetch all the data and only then
 display the application.

 It does exactly what it's supposed to do, BUT when I open a
TitleWindow
 that has it's 'showCloseButton' attribute set to 'true', the close
 button doesn't show. Furthermore, all radio buttons in the window are
 displayed as regular buttons. If I load the data on 'CreationComplete'
 without the custom preloader everything is fine.

 At first I used the method described in Ted Patrick's tutorial
 http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php
http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php  .
Then
 I wrote my own version implementing IPreloaderDisplay instead of
 extending DownloadProgressBar. Although the latter is more efficient,
 keep getting that same bug.

 Here's what I do on FlexEvent.INIT_COMPLETE (VMain is the view, Main
is
 the model, CMain is the controller:

 var view:VMain = Application.application as VMain;
 var data:Main = new Main(view.parameters);

 data.addEventListener(Event.COMPLETE,
 function(event:Event):void {
 dispatchEvent(new Event(Event.COMPLETE));
 });

 new CMain(view, data);

 Any ideas? To me it looks like part of the Flex framework isn't loaded
 yet. Am I dispatching the event to early?
 Thanks


 



[flexcoders] Re: custom preloader

2005-09-28 Thread Jeremy Rottman
I guess I should have been more specific I have a
preloader that I have made in flash. That I would like
to use in my test app. 

It calls the functions qiAgentView, qiAgentFaq,
qiAgentDownloads, and qiAgentMarketing.

the functions are called from a cfc that I have
written.




 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: custom preloader

2005-09-28 Thread Scott Barnes



Heya,

I thought i would reply in here vs to your private email about my Preloader on Mossyblog.com (hope you don't mind).

You can use your own home-grown preloader for the initial application
asset loading via mx:Application (ie simply slot in your own
preloader.swc into the 'preloader' slot. You'll have to make it act
like mx.preloaders.DownloadProgressBar (see documentation).

That's ok, for asset loading. Yet, for application initialization you kind of need to grow your own custom routine.

In my example: http://www.spidaweb.com/mossyblogfiles/ITWDemo.htm i
basically created a Splash screen approach. I needed to kind of fire
off a bunch of server-side events (initGateway, initSecurity,
Authenticate, Log Details, Get Data for the next screen etc) and these
needed to be fired before i let the user interact with the form. 

How I did that was simple. Using the ModelLocator within the Cairngorm
framework, i had a static property which kept wf_initState:Number .
Then inside my SplashHelper i essentially broadcasted various commands
to be fired, and as one came back with a result, i updated the
wf_initState, which essentially then triggered a method within the
SplashHelper to then fire off a bunch of other commands etc until the
life cycle died of natural causes. Then once the last command fired and
I received a success result, I'd simply show the user the appropriate
screen.

I did this for two reasons:

1) I wanted to show off, that and I wanted to prevent users from acting
like crying children the moment their precious data isn't on screen
(heh). As sometimes the Network can kind of Stall, in that I've
noticed that CFMX can sometimes just seem like it gave up. It could
be network related.

2) I need to know what didn't fail. Nothing worse then getting a call
about a bug, you going around to the workstation and asking that person
to replicate it again and without a screen like this its hard to
isolate whats going on. An example for me was initGateway. On my
Coldfusion side of things i had a method which simply put, initializes
the CFC with some defaults and return a boolean on success. If this
method fails, then straight away i know its something on coldfusions
end (server down, cfc has errors etc). Then if say initSecurity fails,
then ok again coldfusion dropped the ball as its not highlighted as
tick, yes complete. 

So yeah, that's how i did the preloader. Its more of a prelude-loader heh.


On 9/29/05, Jeremy Rottman [EMAIL PROTECTED] wrote:
I guess I should have been more specific I have apreloader that I have made in flash. That I would liketo use in my test app.It calls the functions qiAgentView, qiAgentFaq,qiAgentDownloads, and qiAgentMarketing.
the functions are called from a cfc that I havewritten. Yahoo! Groups Sponsor ~--Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM~---
Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to:[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/-- Regards,Scott Barneshttp://www.mossyblog.com







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Re: Custom preloader question

2005-06-01 Thread pilby1
Lol, it was in one of the handful of chapters I haven't read. But I 
did check the book index, looking for custom and preloader, and I 
didn't find any references.

The example in your book required using Flash. I was looking for a 
preloader that's reliant on only an Actionscript class, i.e,. no 
Flash SWC or SWF files, simply because I'm not well-versed in it. :)

I was hoping to find a sample that demonstrated a progress bar being 
created/instantiated as well as a demonstration of a background image 
being loaded in the preloader class' constructor function, but I 
simply could not find any.

Is what I'm looking for even possible, i.e., creating a custom 
preloader SOLELY from an Actionscript class and that would load a 
background image and utilize a progress bar? 

It would help immensely to get an answer to this question so I can 
decide whether or not to end my search.

Any further feedback would be greatly appreciated.

--- In flexcoders@yahoogroups.com, Steven Webster [EMAIL PROTECTED] 
wrote:
  
  Flex has been out for a while now, and I wonder why there's 
  only one book out (by Stephen Webster and Alistair McLeod), 
  and it doesn't even discuss preloaders.
 
 Apart from pages 648 - 650 ? :-)
 
  somebody please be kind enough to alleviate my frustration on 
  this by providing me a simple code snippet?
 
 ...we created a simple Flash component with some static heading
 text, a horizontal bar to act as our progress bar, and a piece of
 dynamic text for some textual update for the user.  We exported 
 this as preloader.swc.  This component and the source preloader.fla
 can be downloaded on the website accompanying this book. (p648).
 
 The source is in the directory:
 
 flexbook/Chapters22-25/flex
 
 ...in the All Source zip file at http://flexbook.iterationtwo.com/
 
 Hope that helps,
 
 Steven
 
 --
 Steven Webster
 Technical Director
 iteration::two





 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/