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

Show Posts

* | |

  Show Posts
Pages: [1]
1  PureMVC Manifold / Standard Version / Re: showEffect in CafeTownsend demo on: January 21, 2009, 07:09:48
Really? You are pursuing medicine? I spent 5 years in an emergency room, finishing pre-med requirements and mostly being an adrenaline junky. Here's some unsolicited advice: with your mind, go for something that requires the really smart men and women: infectious disease (try holding the entire inflammatory cascade in your mind), pathology (used to be the brightest of the bright), neurology. I got married, and knew I couldn't do both well, be a family man and med school student and resident and all that, just don't have those chops. More power to you, Cliff. You will make an excellent diagnostician, and that is all too rare. One of the best diagnosticians I met was a nurse who woefully undervalued her gifts. She made this intuitive leaps that made you double take. Anyway, I wish you the best, and I am thankful for your hard and thorough work, creating Pure MVC and providing guidance in the forums.
2  PureMVC Manifold / Standard Version / Re: showEffect in CafeTownsend demo on: January 19, 2009, 04:04:00
cliff,

Thanks for your reply. Removing the facade.startup() call, and the initialization of the facade variable didn't cause the showEffect fade in to play. That looks like a Flex bug. I suspect I can capture the event that causes the display of the first view child and force an effect, but I don't know that for sure. I see that the view child is not created in any of the pure mvc initialization or subsequent method calls, but rather as a part of the flex start up. But it looks like the first view child is called into view, I mean, asked to display itself, in the first run of notifyObservers(). But this happens by default without the pure mvc intitialization because ViewStacks display the first view child (selectedIndex=0) by default. Any further thought or insights are very welcome. Thanks.

As an aside, I think if you were a physician, you would be one of those surgeons who is really good at performing procedures remotely, for example, having your hands on controls in Kansas City for a patient in Vancouver (not a comment on Canadian medicine), and doing a fine gall bladder removal without having to hassle the sterile environment. You could be smoking a cigar and listening to Hendrix. What I mean is that the ability to abstract all of the pieces, decouple an applicaton so effectively, calls for the ability to intuitively hold the pieces in your mind. At least it looks that way from here. I am carrying on because this is my first exposure to a formal approach to this sort of framework, and I am fascinated by how it all works together. After a couple of applications, I know I will have a better understanding of why it is better to be so strict with all of the Singletons, and delegate the work to commands, proxies and mediators (and delegates and observers). What will be the next improvement on this sort of thinking?
3  PureMVC Manifold / Standard Version / Re: showEffect in CafeTownsend demo on: January 19, 2009, 11:29:48
Oops. Posted before finishing. Meant to add

1) The first view child is called into view as a part of the facade.startup(), the creationComplete event for the main mxml file. This I know. But when the view children are created as a part of the Flex app starting up, isn't the showEffect taken into consideration as an attribute of the first view child? What is it about the way the first view child is called into view that doesn't allow the user to see the fade in effect? Does it fade in before it is displayed, if that is possible?

2) Thanks in advance for any help or insight. PureMVC is a nifty puzzle for goofballs like myself who have eschewed frameworks of any sort. Until now. I am starting to get it, and realize I am standing on the shoulders of giants. All of the decoupling takes discipline, but is well worth it when adding views down the line.
4  PureMVC Manifold / Standard Version / showEffect in CafeTownsend demo on: January 19, 2009, 11:15:57
In the CafeTownsend demo, in CafeTownsend.mxml, I have added showEffect and hideEffect attributes to the view children of the main ViewStack, fadeIn and fadeOut effects defined in the same mxml file. These all work, except for the initial showEffect of the first child, the login page. Why is that? Code below.



    <mx:Style source="assets/main.css" />
    <mx:Fade id="fadeOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
<mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>

   <mx:Image id="img" source="@Embed('assets/header.jpg')" width="700" showEffect="{fadeIn}" hideEffect="{fadeOut}" />
   <mx:HBox paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" backgroundColor="#ffffff" width="700">
      <mx:VBox width="100%" verticalScrollPolicy="off" paddingRight="10">
         <mx:ViewStack id="vwStack" width="100%" paddingBottom="10" paddingTop="10" resizeToContent="true" creationPolicy="all">
            <view:EmployeeLogin id="employeeLogin" showEffect="{fadeIn}" hideEffect="{fadeOut}" />
            <view:EmployeeList id="employeeList" showEffect="{fadeIn}" hideEffect="{fadeOut}" />
            <view:EmployeeDetail id="employeeDetail" showEffect="{fadeIn}" hideEffect="{fadeOut}" />
         </mx:ViewStack>
      </mx:VBox>
   </mx:HBox>
Pages: [1]