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
|
Pages: [1] 2
|
3
|
PureMVC Manifold / Demos and Utils / Re: Startup as Ordered - A PureMVC AS3 / Flex Demo
|
on: September 16, 2008, 04:11:32
|
Hi.
I have a Flex/Air project that runs perfectly when run from Flex Builder 3 in either debug or standard mode. However, when I package the application as an Air installer and install and run it, the application mediator doesn't get called. I took away the proxy registers from the StartupCommand files and the application mediator was now called, so I added the proxies back one by one, but it seems that it's a random problem not related to the actual proxies that I add back.
My gut feeling is that I need to implement the startupmanager. The model doesn't neccessarily need to be loaded in a specific order, but it may get rid of this problem.
Just to clarify, this only happens when the application is packaged, it doesn't happen when ruuning directly from Flex builder.
Anyone have any ideas?
|
|
|
5
|
Announcements and General Discussion / Getting Started / Re: Doubt about views
|
on: August 08, 2008, 06:16:29
|
Hi Cliff. Thanks for the reply, but how do I pass the argument from the ClientList side of things to the ClientForm side of things. Where is the point where this would be passed?
I've looked at EmployeeAdmin, where the USER_SELECTED notification is sent to ApplicationFacade and then it appears that it's picked up by the RolePanelMediator, but when I try this, it doesn't seem to get passed through.
Is the notification like in EmployeeAdmin the right way to do this? (If I can get it working)?
Cheers,
Neil
|
|
|
6
|
Announcements and General Discussion / Getting Started / Re: Doubt about views
|
on: August 08, 2008, 04:54:08
|
How on earth do I pass arguments to a pop up?
I have a ClientList which has it's own Proxy and Mediator. When you click on an item, it opens a pop up with further details, called ClientForm. ClientForm also has it's own Proxy and Mediator.
ClientForm then should run a query to bring in data depending on the selected client.
How do I pass the selected client to the pop up.
I've seen the EmployeeAdmin demo and how it populates the form, but that is using the data already loaded in the ClientList.
I've also tried dynamically creating a textinput and then writing a vlaue to it, but I get errors as the textinput doesn't exist until the pop up is created.
Please help, it's driving me mad!!
Cheers,
Neil
|
|
|
8
|
Announcements and General Discussion / Architecture / Re: ViewStacks, Mediators and Deferred Instantiation
|
on: August 07, 2008, 07:45:29
|
Hi Cliff.
Thanks for that, it got it working.
Now I have something else...
I have a pop up that is created when a record is clicked on the ClientList, using the pop up manager elsewhere on this forum. The pop up view is called ClientForm. Where do I register the mediator for ClientForm?
Do I need to add a creationComplete notifier on the ClientForm, so that when the ClientForm is created it triggers the registeration of the ClientFormMediator. If so, how do I pass the viewComponent? From an event listener, I can't pass an arugument (viewComponenet) to the target function.
Is the pop up considered a child of ClientView or ClientList, or is it a seprate entity?
Thanks,
Neil
|
|
|
9
|
Announcements and General Discussion / Architecture / Re: ViewStacks, Mediators and Deferred Instantiation
|
on: August 06, 2008, 07:17:36
|
I've figured out my problem above, but now have something else.
I have a viewstack that triggers the relevant mediator for a view. However, that view contains other componenets that have their own mediator. Where and how do I call the mediator for this component within a view?
I have tried adding it to the MainDisplyMediator so that when the parent view is called and it's mediator registered, it try's top register the mediator for the component, but how do I pass in the viewComponent?
I have:
case MainDisplay.CLIENTS: if ( facade.retrieveMediator( ClientViewMediator.NAME ) == null ) facade.registerMediator(new ClientViewMediator( child )); facade.registerMediator(new ClientListMediator( child ));
The child argument refers to ClientView, which is the parent view, but I assume child would need to be ClientList for the second registration.
I hope that makes sense and that someone can help!!
Thanks,
Neil
|
|
|
10
|
Announcements and General Discussion / Architecture / Re: ViewStacks, Mediators and Deferred Instantiation
|
on: August 05, 2008, 06:40:46
|
Hi.
I am trying to work my way through this, using Cliff's example code, but I am getting the following error:
1118: Implicit coercion of a value with static type Object to a possibly unrelated type org.puremvc.as3.demos.flex.employeeadmin.view.components:EditorView
The error is pointing to the checkForMediator function:
protected function checkForMediator( childSelector:int, child:Object ):void { switch (childSelector) { case MainDisplay.PROFILE: if ( facade.retrieveMediator( ProfileViewMediator.NAME ) == null ) facade.registerMediator(new ProfileViewMediator( child )); break; case MainDisplay.GALLERY: if ( facade.retrieveMediator( GalleryViewMediator.NAME ) == null ) facade.registerMediator(new GalleryViewMediator( child )); break; case MainDisplay.EDITOR: if ( facade.retrieveMediator( EditorViewMediator.NAME ) == null ) facade.registerMediator(new EditorViewMediator( child )); break; } }
I can see that it's to do with the 'child' argument that is passed in, which is taken from mainDisplay.activeView.
Anybody got any ideas?
Thanks,
Neil
|
|
|
13
|
Announcements and General Discussion / Architecture / Re: AIR - Sqlite Proxy object
|
on: August 01, 2008, 02:08:41
|
Hi Thomas.
Okay, I'm getting somewhere. The query is executing, but how do I set the responder?
I can see that LocalDBDelegate gets passed by responder:IDelegateResponder = null
public function LocalDBDelegate( query:String, mode:String = MODE_SYNC, responder:IDelegateResponder = null, serviceid:String = "" ) { super( serviceid, responder ); m_query = query; m_mode = mode; }
and that in IDelegateResponder.as we have:
public interface IDelegateResponder { function onDelegateResult( serviceid:String, data:Object ):void; function onDelegateFault( serviceid:String, data:Object ):void; }
but it's not getting to IDelegateResponder.as
I really appreciate your help!
Cheers,
Neil
|
|
|
15
|
Announcements and General Discussion / Architecture / Re: AIR - Sqlite Proxy object
|
on: July 31, 2008, 08:29:35
|
Hi Thomas.
Thanks for your reply. Forgive my me sounding stupid, but... Where do the files in your zip file go in relation to the proxy? I'm using the EmployeeAdmin demo and I want to be able to pull in the user data from SQLite.
I've put them in the model directory (I don't know if this is right) and I've tried adding:
public class UserProxy extends Proxy implements IProxy, IDelegateResponder
to my proxy as per your example, but I get error: 1044: Interface method onDelegateFault in namespace org.puremvc.as3.demos.flex.employeeadmin.model:IDelegateResponder not implemented by class org.puremvc.as3.demos.flex.employeeadmin.model:UserProxy
I've not come accross delegates before so don't know how they work.
Any nudges in the right direction you could give wuold be appreciated!
Cheers,
Neil
|
|
|
|
|
|