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] 2 3
1  Announcements and General Discussion / General Discussion / Puremvc book on: October 23, 2009, 02:06:41
Hi Cliff...this only occurred to me when i noticed a cairngorm book is about to get released. is there any chance we might see such a thing for puremvc??? that would be l.o.v.e.l.y :):):)
2  Announcements and General Discussion / Getting Started / Re: Courseware on: November 26, 2008, 08:16:35
woof !
3  Announcements and General Discussion / Getting Started / Nested View Components in PureMVC on: November 11, 2008, 08:50:26
For anyone who has had problems with nested view components in puremvc like i did...this post might help you

http://www.nutrixinteractive.com/blog/?p=226

4  Announcements and General Discussion / Getting Started / Re: Registering Mediators within your application mediator on: November 01, 2008, 07:01:44
Hi Cliff :) , i have yet another question. writing the following logic doesn't seem to work

facade.registerMediator( videoPublisherForm.vidContainer );

thing is this. vidContainer is not an MXML it is a class. so i am getting. implicit coercion of a value of type ... to an unrelated type org.puremvc.as3.interfaces:IMediator

i totally understand why this is happening. question is how do we register a view component that is entirely based on a class. i tried to extend and implement Mediator and IMediator to VideoContainer class, but i was getting all sorts of errors, because my view component also extends UIComponent :(

the above (facade.registerMediator) does make perfect sense since the Mediator is videoPublisherForm being casted in the class. but vidContainer is a Class UIComponent. how would i register this?? :( thanks for your time

Kofi
5  Announcements and General Discussion / Getting Started / Re: Retrieving a mediator in a proxy on: October 28, 2008, 07:52:11
thank you sir...got it!

Kofi
6  Announcements and General Discussion / Getting Started / Retrieving a mediator in a proxy on: October 27, 2008, 12:00:17
I have a question about the above topic. is it ok to retrieve a mediator in a proxy class and perform some kind of action on it?? here is what is going on. i have a connection proxy class, which makes connection to fms server. when the connection is made, i attempt to grab the camera by using

Camera.getCamera( _camera );

now if a camera exists.. i want to do something like this

if (_camera)
{
      localVideo.video.attachCamera(_camera);
}

but localVideo is the id of an mxml component for the mediator whose proxy i am trying to construct. thats why i want to know...can i do this instead in the proxy

eg

_myMed = facade.retrieveMediator ( VideoPublisherMediator.NAME ) as VideoPublisherMediator;


that way the above if statement will look like this
if (_camera)
{
      _myMed.localVideo.video.attachCamera(_camera); <- retrieved mediator to use in proxy
}

can i do that? or is it bad practice? OR! can i dispatch/sendnotification that from the proxy and pass in the camera object in the body so the view can take over from there? :'( please help.
thanks
7  Announcements and General Discussion / Getting Started / Re: Registering Mediators within your application mediator on: October 23, 2008, 08:52:18
Thank you thank you Cliff

K
8  Announcements and General Discussion / Getting Started / Re: Registering Mediators within your application mediator on: October 22, 2008, 11:34:11
Another question Cliff  :P [ i  hope this post isnt too confusing :'( ]

When your mediator is registering for the direct children of their view components, does it use the syntax

facade.registerMediator ?? OR would it just be something like this.registerMediator ?? where 'this' is the component name or the class.

i am confused because most of the examples have an application mediator where the main mxml file has a view stack with each view having an id. so registering is like this (for e.g)
facade.registerMediator( new ComponentClass(app.viewId) );
the app.viewId is passed to the class.

but what do i do in my case :-\ ? i have a video container class as a view component (sub component of VideoPublisherForm). within VideoPublisherFormMediator...do i just simply do

facade.registerMediator( new VideoContainer() );  // <-- not passing anything in
this.registerMediator( new VideoContainer() );  // <-- not passing anything in
OR
facade.registerMediator( videoPublisherForm.vidContainer );   
this.registerMediator( videoPublisherForm.vidContainer  ); 


i noticed ALSO my sub components use sharedobjects :'( which is a proxy...but where would i register such proxy. I was thinking in the ModelPrepCommand. is that right? can i register the proxy somewhere else or would that be bad practice?
9  Announcements and General Discussion / Getting Started / Re: Registering Mediators within your application mediator on: October 21, 2008, 08:05:30
Makes perfect sense.. ;D

Thanks Cliff
10  Announcements and General Discussion / Getting Started / Registering Mediators within your application mediator on: October 19, 2008, 11:55:45
I have a question about registering mediators. I am pretty sure how to register mediators with

facade.registerMediator( ... );

but what if the component i am registering has other nested view components??  ???

suppose i have this

facade.registerMediator( new VideoConferenceRoom(app.videoConferenceRoom) );

now VideoConferenceRoom.mxml is composed on other custom mxml components... TextChat.mxml and VideoPublisherForm.mxml. Do i have to register these as well? if yes, how? or registering it like i have done above will include the 2 other components.  ??? ???

thanks :-\
11  Announcements and General Discussion / Getting Started / Re: Casting the View Component Implicitly on: September 18, 2008, 08:04:22
as always... thanks for your time

Kofi
12  Announcements and General Discussion / Getting Started / Re: Casting the View Component Implicitly on: September 18, 2008, 10:44:40
Hmm, makes sense. Thanks Cliff...one other question based on what you said in your post

"As for the subclass constructor, if you specify the viewComponent parameter type, then you ensure your mediator cannot be constructed with just any component."

wouldnt you in any case want ensure that your mediator cannot be constructed with just any component? I mean, if your LoginPanel mxml Component whose Mediator is LoginPanelMediator ...setting the constructor as

public function LoginPanelMediator ( viewComponent : LoginPanel ) : void
{
     super(NAME, viewComponent);
     ...
}

would ensure your statement above and not setting the viewComponent type as object. right? would i be better of always doing this?

13  Announcements and General Discussion / Getting Started / Casting the View Component Implicitly on: September 17, 2008, 10:15:45
Hi...:) I have a question about the above subject. i am a little confused and need a little clarification

best practices documentation mentions this

"Your concrete Mediator’s constructor will pass its View Component to the superclass and it will be made immediately available internally as a protected property called viewComponent, generically typed as Object."

so for instance, IF i have an mxml component called LoginPanel and its mediator LoginPanelMediator, the constructor for the mediator should like this

...
public function LoginPanelMediator ( viewComponent : Object ) : void
{
     super(NAME, viewComponent);
     ...
}

then the documentation goes on to say

"However it was set, you will frequently need to cast this Object to its actual type, in order to access whatever API it exposes, which can be a cumbersome and repetitive practice."

so like this

protected function get loginPanel() : LoginPanel
{
     return viewComponent as LoginPanel;
}


this makes sense...until i start seeing mediator constructors in some of the sample applications like this

public function LoginPanelMediator ( viewComponent : LoginPanel ) : void
{
     super(NAME, viewComponent);
     ...
}

then casted this same old way

protected function get loginPanel() : LoginPanel
{
     return viewComponent as LoginPanel;
}

notice the type for the viewComponent in the contructor. this time its not type Object BUT LoginPanel. does it really matter.?? are both implementations right? :-\ :-\

Thanks
Kofi
14  Announcements and General Discussion / Getting Started / Re: Courseware on: September 15, 2008, 08:06:01
really looking forward. thanks Cliff

K
15  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 11, 2008, 08:19:11
i have done that..but still getting the error

correlationId (String):
faultCode (String): AMFPHP_FILE_NOT_FOUND
faultDetail (String): /Users/kofiaddaquay/Sites/amfphp2/core/shared/app/BasicActions.php on line 33
faultString (String): The class {Amf3Broker} could not be found under the class path {/Users/kofiaddaquay/Sites/amfphp2/services/amfphp/Amf3Broker.php}


BUT!..i did switch over to weborb, and my login works fine against the database! this makes me happy but at the same time i am not sure if i want to use weborb. do you use it? i was under the impression that amfphp has a larger community and i can get help when i need it than when i use weborb. please advice. i dont know if i want to waste anymore time debugging amfphp when the main focus should be on the main application.

i will still spend sometime and make sure all my paths are right for amfphp to see if i can continue there...but in the mean time i will continue with weborb so i can make progress. let me know your thoughts on the above. thanks for your time Daniel..i really appreciate it.

Kofi
Pages: [1] 2 3