Re: [flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-28 Thread Ralf Bokelberg
I would pass a ui component reference to the command and directly
manipulate it in the result handler. You can use an interface instead
of the concrete type to make it loosely coupled.

Cheers
Ralf.

On Mon, Apr 28, 2008 at 4:12 PM, Ralf Bokelberg
<[EMAIL PROTECTED]> wrote:
> Repeated UIComponents can be accessed using Array notation.
>
> 
> 
> 
>
>
> 
> 
>  click="traceButtons()"/>
> 
>
> 
>
>
>  Cheers
>  Ralf.
>
>
>
>  On Mon, Apr 28, 2008 at 3:52 PM, valdhor <[EMAIL PROTECTED]> wrote:
>  >
>  >
>  >
>  >
>  >
>  >
>  > I am afraid that I don't use Cairngorm.
>  >
>  >  Could it be a Cairngorm bug? Unlikely but still a possibility. Does it
>  >  work without the Cairngorm framework?
>  >
>  >
>  >  --- In flexcoders@yahoogroups.com, Jon Santos <[EMAIL PROTECTED]> wrote:
>  >  >
>  >  > For sure the function loaderCompleteHandler exists.
>  >  > Any other suggestions?
>  >  > I have one similar example.and i get the result succesfully.
>  >  > Here is the soruce.
>  >  >   >  > creationComplete="doInit()" width="
>  >  > height="xmlns:mx="http://www.adobe.com/2006/mxml"; 100%"438"
>  >
>  >  backgroundAlpha="1.0"
>  >
>  > 
> borderStyle="solid"> this.coverImg.source = event.currentTarget.content asBitmap;
>  >>
>  >  dataTipField="synopsis" click="detailMovie()"
>  >  dataProvider="{model.listMovies}" top="231" left="10" width="95%">
>  > >  headerText="Title" dataField="title"/>
>  >>  labelFunction="showDirectorName"
>  >  sortCompareFunction="ordenarPorDirector"/>
>  >>  labelFunction="showActorName"/>
>  >  
>  >   privatefunctionshowCover():void{
>  >  this.coverImg.source = null; vargetCoverEvent:GetCoverEvent =
>  >  newGetCoverEvent(this.myMovieId); this.myMovieId =
>  >  this.grdMovies.selectedItem.movieId;
>  >  > In this examplei display the image...when i selected one row in
>  >  the datagrid.
>  >  >
>  >  > The event, command and other class are the same as in the other example.
>  >  > And teh unique thing diferent thing in the ViewModelLocator.as
>  >  > import
>  >  > {
>  >  > loader.loadBytes(
>  >
>  >  > loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
>  >  Application.application.adminmovies.loaderCompleteHandler);
>  >  > }
>  >  > }
>  >  > I hope someone can help me. Thanks in
>  >  advanceflash.display.Loader;publicfunctiondisplayImage():void{
>  >  if(this.movieCover != null&& this.movieCover.length > 0)
>  >  varloader:Loader = newLoader();this.movieCover);
>  >
>  >
>  >  > - Original Message 
>  >  > From: valdhor <[EMAIL PROTECTED]>
>  >  > To: flexcoders@yahoogroups.com
>  >  > Sent: Saturday, April 26, 2008 3:26:28 AM
>  >  > Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
>  >  listener must not be NULL + Cairngorm
>  >  >
>  >  >
>  >  > Instead of adding an event listener, just try to call the function -
>  >  > does it work? Does the function exist?
>  >  >
>  >  > --- In [EMAIL PROTECTED] ups.com, Jon Santos  wrote:
>  >  > >
>  >  > > But i don´t understand.. ..i have debug my application. ...i have
>  >  > traced.. ..but i donñt understand why always this errorfrom
>  >  > where is generated... .
>  >  > > please...can you check my source...
>  >  > > Thanks in advance.
>  >  > >
>  >  > >
>  >  > >
>  >  > > - Original Message 
>  >  > > From: valdhor 
>  >  > > To: [EMAIL PROTECTED] ups.com
>  >  > > Sent: Thursday, April 24, 2008 8:19:27 PM
>  >  > > Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
>  >  > listener must not be NULL + Cairngorm
>  >  > >
>  >  > >
>  >  > > Check the value of your listener function:
>  >  > >
>  >  > > Application. application. repeatermovies. detailmovie.
>  >  > loaderCompleteHa ndler
>  >  > >
>  >  > > The error says that this is null.
>  >  > >
>  >  > >
>  >  > >
>  >  > >
>  >  > >
>  >  >  _ _ _ _ _ _
>  >  > > Be a better friend, newshound, and
>  >  > > know-it-all with Yahoo! Mobile. Try it now.
>  >  > http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
>  >  > >
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >
>  >  __
>  >  > Be a better friend, newshound, and
>  >  > know-it-all with Yahoo! Mobile. Try it now.
>  >
>  > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>  >  >
>  >
>  >  
>
>
>
>  --
>  Ralf Bokelberg <[EMAIL PROTECTED]>
>  Flex & Flash Consultant based in Cologne/Germany
>



-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany


Re: [flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-28 Thread Ralf Bokelberg
Repeated UIComponents can be accessed using Array notation.









  




Cheers
Ralf.

On Mon, Apr 28, 2008 at 3:52 PM, valdhor <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> I am afraid that I don't use Cairngorm.
>
>  Could it be a Cairngorm bug? Unlikely but still a possibility. Does it
>  work without the Cairngorm framework?
>
>
>  --- In flexcoders@yahoogroups.com, Jon Santos <[EMAIL PROTECTED]> wrote:
>  >
>  > For sure the function loaderCompleteHandler exists.
>  > Any other suggestions?
>  > I have one similar example.and i get the result succesfully.
>  > Here is the soruce.
>  >   > creationComplete="doInit()" width="
>  > height="xmlns:mx="http://www.adobe.com/2006/mxml"; 100%"438"
>
>  backgroundAlpha="1.0"
>
> borderStyle="solid"> this.coverImg.source = event.currentTarget.content asBitmap;
>  
>  dataTipField="synopsis" click="detailMovie()"
>  dataProvider="{model.listMovies}" top="231" left="10" width="95%">
> headerText="Title" dataField="title"/>
>labelFunction="showDirectorName"
>  sortCompareFunction="ordenarPorDirector"/>
>labelFunction="showActorName"/>
>  
>   privatefunctionshowCover():void{
>  this.coverImg.source = null; vargetCoverEvent:GetCoverEvent =
>  newGetCoverEvent(this.myMovieId); this.myMovieId =
>  this.grdMovies.selectedItem.movieId;
>  > In this examplei display the image...when i selected one row in
>  the datagrid.
>  >
>  > The event, command and other class are the same as in the other example.
>  > And teh unique thing diferent thing in the ViewModelLocator.as
>  > import
>  > {
>  > loader.loadBytes(
>
>  > loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
>  Application.application.adminmovies.loaderCompleteHandler);
>  > }
>  > }
>  > I hope someone can help me. Thanks in
>  advanceflash.display.Loader;publicfunctiondisplayImage():void{
>  if(this.movieCover != null&& this.movieCover.length > 0)
>  varloader:Loader = newLoader();this.movieCover);
>
>
>  > - Original Message 
>  > From: valdhor <[EMAIL PROTECTED]>
>  > To: flexcoders@yahoogroups.com
>  > Sent: Saturday, April 26, 2008 3:26:28 AM
>  > Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
>  listener must not be NULL + Cairngorm
>  >
>  >
>  > Instead of adding an event listener, just try to call the function -
>  > does it work? Does the function exist?
>  >
>  > --- In [EMAIL PROTECTED] ups.com, Jon Santos  wrote:
>  > >
>  > > But i don´t understand.. ..i have debug my application. ...i have
>  > traced.. ..but i donñt understand why always this errorfrom
>  > where is generated... .
>  > > please...can you check my source...
>  > > Thanks in advance.
>  > >
>  > >
>  > >
>  > > - Original Message 
>  > > From: valdhor 
>  > > To: [EMAIL PROTECTED] ups.com
>  > > Sent: Thursday, April 24, 2008 8:19:27 PM
>  > > Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
>  > listener must not be NULL + Cairngorm
>  > >
>  > >
>  > > Check the value of your listener function:
>  > >
>  > > Application. application. repeatermovies. detailmovie.
>  > loaderCompleteHa ndler
>  > >
>  > > The error says that this is null.
>  > >
>  > >
>  > >
>  > >
>  > >
>  >  _ _ _ _ _ _
>  > > Be a better friend, newshound, and
>  > > know-it-all with Yahoo! Mobile. Try it now.
>  > http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
>  > >
>  >
>  >
>  >
>  >
>  >
>  __
>  > Be a better friend, newshound, and
>  > know-it-all with Yahoo! Mobile. Try it now.
>
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>  >
>
>  



-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany


[flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-28 Thread valdhor
I am afraid that I don't use Cairngorm.

Could it be a Cairngorm bug? Unlikely but still a possibility. Does it
work without the Cairngorm framework?


--- In flexcoders@yahoogroups.com, Jon Santos <[EMAIL PROTECTED]> wrote:
>
> For sure the function loaderCompleteHandler exists.
> Any other suggestions?
> I have one similar example.and i get the result succesfully.
> Here is the soruce.
>  creationComplete="doInit()" width="
> height="xmlns:mx="http://www.adobe.com/2006/mxml"; 100%"438"
backgroundAlpha="1.0"
borderStyle="solid">  this.coverImg.source = event.currentTarget.content asBitmap;
   
 
   
   
   
 privatefunctionshowCover():void{ 
this.coverImg.source = null;   vargetCoverEvent:GetCoverEvent =
newGetCoverEvent(this.myMovieId);  this.myMovieId =
this.grdMovies.selectedItem.movieId; 
> In this examplei display the image...when i selected one row in
the datagrid.
>  
> The event, command and other class are the same as in the other example.
> And teh unique thing diferent thing in the ViewModelLocator.as
> import
>   { 
>  loader.loadBytes(
>  loader.contentLoaderInfo.addEventListener(Event.COMPLETE,  
Application.application.adminmovies.loaderCompleteHandler);
>} 
> }
> I hope someone can help me. Thanks in
advanceflash.display.Loader;publicfunctiondisplayImage():void{  
if(this.movieCover != null&& this.movieCover.length > 0) 
varloader:Loader = newLoader();this.movieCover);
> - Original Message ----
> From: valdhor <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Saturday, April 26, 2008 3:26:28 AM
> Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
listener must not be NULL + Cairngorm
> 
> 
> Instead of adding an event listener, just try to call the function -
> does it work? Does the function exist? 
> 
> --- In [EMAIL PROTECTED] ups.com, Jon Santos  wrote:
> >
> > But i don´t understand.. ..i have debug my application. ...i have
> traced.. ..but i donñt understand why always this errorfrom
> where is generated... .
> > please...can you check my source...
> > Thanks in advance.
> > 
> > 
> > 
> > ----- Original Message 
> > From: valdhor 
> > To: [EMAIL PROTECTED] ups.com
> > Sent: Thursday, April 24, 2008 8:19:27 PM
> > Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
> listener must not be NULL + Cairngorm
> > 
> > 
> > Check the value of your listener function:
> > 
> > Application. application. repeatermovies. detailmovie.
> loaderCompleteHa ndler
> > 
> > The error says that this is null.
> > 
> > 
> > 
> > 
> > 
>  _ _ _ _ _ _
> > Be a better friend, newshound, and 
> > know-it-all with Yahoo! Mobile. Try it now. 
> http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
> >
> 
>  
> 
> 
>  

> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>




Re: [flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-27 Thread Jon Santos
For sure the function loaderCompleteHandler exists.
Any other suggestions?
I have one similar example.and i get the result succesfully.
Here is the soruce.
http://www.adobe.com/2006/mxml"; 100%"438" 
backgroundAlpha="1.0" 
borderStyle="solid">  this.coverImg.source = event.currentTarget.content asBitmap; 
      
    
        
 privatefunctionshowCover():void{  
this.coverImg.source = null;   vargetCoverEvent:GetCoverEvent = 
newGetCoverEvent(this.myMovieId);  this.myMovieId = 
this.grdMovies.selectedItem.movieId; 
In this examplei display the image...when i selected one row in the 
datagrid.
 
The event, command and other class are the same as in the other example.
And teh unique thing diferent thing in the ViewModelLocator.as
import
  { 
 loader.loadBytes(
 loader.contentLoaderInfo.addEventListener(Event.COMPLETE,   
Application.application.adminmovies.loaderCompleteHandler);
   } 
}
I hope someone can help me. Thanks in 
advanceflash.display.Loader;publicfunctiondisplayImage():void{   
if(this.movieCover != null&& this.movieCover.length > 0)  varloader:Loader 
= newLoader();this.movieCover);
- Original Message 
From: valdhor <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Saturday, April 26, 2008 3:26:28 AM
Subject: [flexcoders] Re: TypeError: Error #2007: The parameter listener must 
not be NULL + Cairngorm


Instead of adding an event listener, just try to call the function -
does it work? Does the function exist? 

--- In [EMAIL PROTECTED] ups.com, Jon Santos <[EMAIL PROTECTED]> wrote:
>
> But i don´t understand.. ..i have debug my application. ...i have
traced.. ..but i donñt understand why always this errorfrom
where is generated... .
> please...can you check my source...
> Thanks in advance.
> 
> 
> 
> - Original Message 
> From: valdhor <[EMAIL PROTECTED] ..>
> To: [EMAIL PROTECTED] ups.com
> Sent: Thursday, April 24, 2008 8:19:27 PM
> Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
listener must not be NULL + Cairngorm
> 
> 
> Check the value of your listener function:
> 
> Application. application. repeatermovies. detailmovie.
loaderCompleteHa ndler
> 
> The error says that this is null.
> 
> 
> 
> 
> 
 _ _ _ _ _ _
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile. Try it now. 
http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
>

 


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

[flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-25 Thread valdhor
Instead of adding an event listener, just try to call the function -
does it work? Does the function exist? 


--- In flexcoders@yahoogroups.com, Jon Santos <[EMAIL PROTECTED]> wrote:
>
> But i don´t understandi have debug my applicationi have
tracedbut i donñt understand why always this errorfrom
where is generated
> please...can you check my source...
> Thanks in advance.
> 
> 
> 
> - Original Message 
> From: valdhor <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Thursday, April 24, 2008 8:19:27 PM
> Subject: [flexcoders] Re: TypeError: Error #2007: The parameter
listener must not be NULL + Cairngorm
> 
> 
> Check the value of your listener function:
> 
> Application. application. repeatermovies. detailmovie.
loaderCompleteHa ndler
> 
> The error says that this is null.
> 
>  
> 
> 
>  

> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>




Re: [flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-25 Thread Jon Santos
But i don´t understandi have debug my applicationi have 
tracedbut i donñt understand why always this errorfrom where is 
generated
please...can you check my source...
Thanks in advance.



- Original Message 
From: valdhor <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, April 24, 2008 8:19:27 PM
Subject: [flexcoders] Re: TypeError: Error #2007: The parameter listener must 
not be NULL + Cairngorm


Check the value of your listener function:

Application. application. repeatermovies. detailmovie. loaderCompleteHa ndler

The error says that this is null.

 


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

[flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-24 Thread valdhor
Check the value of your listener function:

Application.application.repeatermovies.detailmovie.loaderCompleteHandler

The error says that this is null.



RE: [flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-23 Thread Alex Harui
You should use a debug build and post the full stack trace.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of txakin
Sent: Wednesday, April 23, 2008 12:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: TypeError: Error #2007: The parameter listener must 
not be NULL + Cairngorm

 

Nobody can help me?

I have more than 2 days trying to fix itbut i can not
Maybe i have explained in wrong way my problem.

Thanks in advance.

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , 
"txakin" <[EMAIL PROTECTED]> wrote:
>
> 
> Hi all
> 
> I´m trying to display an image from database in my application 
using
> Cairngorm framework.
> 
> I always get the same error :
> 
> TypeError: Error #2007: The parameter listener must not be NULL
> 
> at flash.events::EventDispatcher/addEventListener
()
> 
> and I don´t know if is because my source is incorrect or because
> i´m forgetting some step.
> 
> Here I will send u my sourceand my classes.
> 
> 
> 
> I´m going to try to explain my source step by step.
> 
> 1. First of alli have one repeater it calls other component:
> 
>  horizontalCenter="0" bottom="0">
> 
> 
> 
>  myMovie="{grdMovies.currentItem}"/>
> 
> 
> 
> 
> 
> 
> 
> 1. My component detailMovie calls my event to get my image.
> 
> 
> 
> http://www.adobe.com/2006/mxml 
> <http://www.adobe.com/2006/mxml> " width="548"
> height="142"
> 
> backgroundColor="#FF" backgroundAlpha="0.0"
> creationComplete="loadData();">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 1. SampleController :
> 
> 
> 
> package com.cairngorm.control {
> 
> 
> 
> import com.adobe.cairngorm.control.FrontController;
> 
> import com.cairngorm.commands.*;
> 
> import com.cairngorm.commands.movieimage.repeater.*;
> 
> import com.cairngorm.events.movieimage.repeater.*;
> 
> 
> 
> public class SampleController extends FrontController {
> 
> 
> 
> public function SampleController() {
> 
> this.initialize();
> 
> }
> 
> 
> 
> public function initialize():void {
> 
> 
> 
> // ADD COMMANDS
> 
> this.addCommand(
> GetCoverRepeaterEvent.GET_COVER_REPEATER, GetCoverRepeaterCommand);
> 
> 
> 
> ..other commands
> 
> 
> }
> 
> 
> 
> }
> 
> }
> 
> 
> 
> 1. MovieImageDelegate : Here i call the java classand is
> correctbut i have taken it out my java classbecause i 
think is
> not very important
> 
> 
> 
> package com.cairngorm.business.movieimage
> 
> {
> 
> import com.adobe.cairngorm.business.ServiceLocator;
> 
> 
> 
> import mx.rpc.IResponder;
> 
> 
> 
> public class MovieImageDelegate
> 
> {
> 
> private var responder : IResponder;
> 
> private var service : Object;
> 
> 
> 
> public function MovieImageDelegate(responder : 
IResponder)
> 
> {
> 
> this.responder = responder;
> 
> this.service =
> ServiceLocator.getInstance().getRemoteObject("movieImageObject");
> 
> }
> 
> 
> 
> public function getCover(pMovieImageId:String):void
> 
> {
> 
> var call:Object = service.getCover
(pMovieImageId);
> 
> call.addResponder(responder);
> 
> }
> 
> }
> 
> }
> 
> 
> 
> 1. GetCoverRepeaterEvent :
> 
> 
> 
> package com.cairngorm.events.movieimage.repeater
> 
> {
> 
> import com.adobe.cairngorm.control.CairngormEvent;
> 
> 
> 
> import flash.events.Event;
> 
> 
> 
> public class GetCoverRepeaterEvent extends CairngormEvent {
> 
> 
> 
> public static const GET_COVER_REPEATER:String =
> "GetCoverRepeater";
> 
> 
> 
> public var movieImageId:String;
> 
> 
> 
> public function
> GetCoverRepeaterEvent(submittedMovieImageId:String) {
> 
> movieImageId = submittedMovieImageId;
> 
> super(GET_COVER_REPEATER);
> 
> }
> 
> 
> 
> override public function clone():Event {
> 
> return new GetCoverRepeaterEvent(movieImageId);
> 
> }
> 
> 
> 
> }
> 
> }
> 
> 
> 
> 1. GetCoverRepeaterCommand : Here I get correctly my image
> 
> 
> 
> package com.cairngorm.commands.movieimage.repeater
> 
> {
> 
> import com.adobe.cairngorm.commands.ICommand;
> 
> import com.adobe.cairngorm.control.CairngormEvent;
> 
> import com.cairng

[flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-23 Thread txakin
Nobody can help me?

I have more than 2 days trying to fix itbut i can not
Maybe i have explained in wrong way my problem.

Thanks in advance.

--- In flexcoders@yahoogroups.com, "txakin" <[EMAIL PROTECTED]> wrote:
>
> 
> Hi all
> 
> I´m trying to display an image from database in my application 
using
> Cairngorm framework.
> 
> I always get the same error :
> 
> TypeError: Error #2007: The parameter listener must not be NULL
> 
>  at flash.events::EventDispatcher/addEventListener
()
> 
> and I don´t know if is because my source is incorrect or because
> i´m forgetting some step.
> 
> Here I will send u my source….and my classes.
> 
> 
> 
> I´m going to try to explain my source step by step.
> 
> 1.  First of all….i have one repeater it calls other component:
> 
>  horizontalCenter="0" bottom="0">
> 
> 
> 
>   myMovie="{grdMovies.currentItem}"/>
> 
>  
> 
>
> 
> 
> 
> 1. My component detailMovie calls my event to get my image.
> 
> 
> 
> http://www.adobe.com/2006/mxml"; width="548"
> height="142"
> 
> backgroundColor="#FF" backgroundAlpha="0.0"
> creationComplete="loadData();">
> 
> 
> 
>  
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 1. SampleController :
> 
> 
> 
> package com.cairngorm.control {
> 
> 
> 
>import com.adobe.cairngorm.control.FrontController;
> 
>import com.cairngorm.commands.*;
> 
>import com.cairngorm.commands.movieimage.repeater.*;
> 
>import com.cairngorm.events.movieimage.repeater.*;
> 
> 
> 
>public class SampleController extends FrontController {
> 
> 
> 
>  public function SampleController() {
> 
>this.initialize();
> 
>  }
> 
> 
> 
>  public function initialize():void {
> 
> 
> 
>// ADD COMMANDS
> 
>this.addCommand(
> GetCoverRepeaterEvent.GET_COVER_REPEATER, GetCoverRepeaterCommand);
> 
> 
> 
>……other commands
> ….
> 
>  }
> 
> 
> 
>}
> 
> }
> 
> 
> 
> 1. MovieImageDelegate : Here i call the java classand is
> correctbut i have taken it out my java classbecause i 
think is
> not very important
> 
> 
> 
> package com.cairngorm.business.movieimage
> 
> {
> 
>import com.adobe.cairngorm.business.ServiceLocator;
> 
> 
> 
>import mx.rpc.IResponder;
> 
> 
> 
>public class MovieImageDelegate
> 
>{
> 
>  private var responder : IResponder;
> 
>  private var service : Object;
> 
> 
> 
>  public function MovieImageDelegate(responder : 
IResponder)
> 
>  {
> 
>this.responder = responder;
> 
>this.service =
> ServiceLocator.getInstance().getRemoteObject("movieImageObject");
> 
>  }
> 
> 
> 
>  public function getCover(pMovieImageId:String):void
> 
>  {
> 
>var call:Object = service.getCover
(pMovieImageId);
> 
>call.addResponder(responder);
> 
>  }
> 
>}
> 
> }
> 
> 
> 
> 1. GetCoverRepeaterEvent :
> 
> 
> 
> package com.cairngorm.events.movieimage.repeater
> 
> {
> 
>import com.adobe.cairngorm.control.CairngormEvent;
> 
> 
> 
>import flash.events.Event;
> 
> 
> 
>public class GetCoverRepeaterEvent extends CairngormEvent  {
> 
> 
> 
>  public static const GET_COVER_REPEATER:String =
> "GetCoverRepeater";
> 
> 
> 
>  public var movieImageId:String;
> 
> 
> 
>  public function
> GetCoverRepeaterEvent(submittedMovieImageId:String) {
> 
>movieImageId = submittedMovieImageId;
> 
>super(GET_COVER_REPEATER);
> 
>  }
> 
> 
> 
>  override public function clone():Event {
> 
>return new GetCoverRepeaterEvent(movieImageId);
> 
>  }
> 
> 
> 
>}
> 
> }
> 
> 
> 
> 1. GetCoverRepeaterCommand : Here I get correctly my image
> 
> 
> 
> package com.cairngorm.commands.movieimage.repeater
> 
> {
> 
>import com.adobe.cairngorm.commands.ICommand;
> 
>import com.adobe.cairngorm.control.CairngormEvent;
> 
>import com.cairngorm.business.movieimage.MovieImageDelegate;
> 
>import
> com.cairngorm.events.movieimage.repeater.GetCoverRepeaterEvent;
> 
>import com.cairngorm.model.ViewModelLocator;
> 
>import com.cairngorm.vo.MovieImage;
> 
> 
> 
>import mx.controls.Alert;
> 
>import mx.rpc.IResponder;
> 
> 
> 
>public class GetCoverRepeaterCommand implements ICommand,
> IResponder
> 
>{
> 
>  public var modelLocator:ViewModelLocator =
> ViewModelLocator.getInstance();
> 
> 
> 
>  public function GetCoverRepeaterCommand() {
> 
> 
> 
>  }
> 
> 
> 
>  public function execute(event:C