Cheers Steven,

I thought a bug was to blame, but have pasted some code for a quick 
browse:

My command class has this result method:

public function onResult( event : Object ) : Void{
var getInboxViewHelper = ViewLocator.getInstance().getViewHelper
( "ControlView" );
getInboxViewHelper.fillInbox(event.result);
}
//-----------The result is an Array of VO's

My Viewhelper code to deal with this is:

public function fillInbox(inboxVOArray:Object):Void
        {
                view.inboxGrid.dataProvider = inboxVOArray;
                view.retreivalStatus.text = "Update Complete";
        }


Having looked at this out of eclipse, I have a sneeky feeling it may 
have something to do with event.result or event : Object?

Either way, the component mxml file looks like this:

<mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml";
          xmlns:demoView="com.iterationtwo.demo.view.*"
          title="Control Assets" themeColor="#FF0000" 
headerColors="[0xFFCC55,0xFF0000]" width="50%" 
horizontalAlign="center" creationComplete="initControl();" >

   <demoView:InboxViewHelper name="ControlView" view="{ this }" />

   <mx:Script>
        <![CDATA[
        import uk.co.vianet.InboxVO;
        import com.iterationtwo.cairngorm.control.EventBroadcaster;
        var call;
        var interval: Number=30000;
                public function initControl(){
                call=setInterval(this, "doGetInbox", interval);
                EventBroadcaster.getInstance().broadcastEvent
( "startApp" );
                }
        public function doGetInbox(){
            EventBroadcaster.getInstance().broadcastEvent
( "getInbox" );
        }
        ]]>
    </mx:Script>
        <mx:Form label="Inbox for Last Hour">
                <mx:DataGrid id="inboxGrid" width="100%" 
height="175">
                <mx:columns>
                    <mx:Array>
                        <mx:DataGridColumn columnName="dateReceived" 
headerText="Date / Time Received" />
                        <mx:DataGridColumn columnName="origin" 
headerText="Originating Number" />
                        <mx:DataGridColumn columnName="message" 
headerText="Message" />
                    </mx:Array> 
                </mx:columns>
                </mx:DataGrid>
                <mx:ControlBar width="100%">
                        <mx:Text id="retreivalStatus" 
text="Initializing Database"/>
                </mx:ControlBar>
        </mx:Form>
        <mx:ControlBar width="100%">
                <mx:Text id="statusBar" text="Application Stopped"/>
        </mx:ControlBar>
</mx:Panel>

I know, its a mess!

Cheers,

Iain


--- In flexcoders@yahoogroups.com, "Steven Webster" <[EMAIL PROTECTED]> 
wrote:
> Iain,
> 
> You may want to consider not using the CairngormApplication
> tag so you can debug in Flexbuilder...
> 
> In the meantime, can you post your onResult method in your
> command class, post the method on your view helper that
> you are calling, and show us how and where you are
> instantiating your DataGrid ?  
> 
> You're not doing anything fundamentally wrong, so there
> must be a bug sneaked into your code.
> 
> The imminent release of Cairngorm 0.99 will give you
> another way of handling the data grid update from the
> Command class, without needing to use the View Helper
> in this instance .... more shortly ....
> 
> Best,
> 
> Steven
> 
> --
> Steven Webster
> Technical Director
> iteration::two
>  
> This e-mail and any associated attachments transmitted with it may 
contain
> confidential information and must not be copied, or disclosed, or 
used by
> anyone other than the intended recipient(s). If you are not the 
intended
> recipient(s) please destroy this e-mail, and any copies of it, 
immediately.
>  
> Please also note that while software systems have been used to try 
to ensure
> that this e-mail has been swept for viruses, iteration::two do not 
accept
> responsibility for any damage or loss caused in respect of any 
viruses
> transmitted by the e-mail. Please ensure your own checks are 
carried out
> before any attachments are opened.
>  
> 
> > -----Original Message-----
> > From: flexcoders@yahoogroups.com 
> > [mailto:[EMAIL PROTECTED] On Behalf Of digital_eyezed
> > Sent: 05 May 2005 20:24
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Cairngorm Result Question
> > 
> > I have an application which upon initialisation triggered a 
> > remote object request which returned an Array of VO objects 
> > as a result. I assigned this result as the dataProvider to a 
> > dataGrid. No problem. 
> > Now I am redesigning into Cairngorm and am a bit stuck on how 
> > to deal with the result.
> > 
> > I followed the architecture and try to pass the result (VO 
> > Array) into a viewhelper method but the datGrid does not show 
> > the result.
> > 
> > It's really difficult to debug this, as flex builder wont 
> > even load the mxml due to the cairgormApplication root.
> > 
> > Any help or suggestions would be appreciated.
> > 
> > Thanks
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > --
> > No virus found in this incoming message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.308 / Virus Database: 266.11.5 - Release Date: 
04/05/2005
> >  
> > 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.11.5 - Release Date: 
04/05/2005




 
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/
 


Reply via email to