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  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 / 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

3  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
4  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 :-\
5  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
6  Announcements and General Discussion / Getting Started / Weborb Login Sample using AMFPHP instead on: September 09, 2008, 12:46:03
Hi everyone, i really need some help figuring out why i am getting an error with my app. i am trying to rebuild the Login weborb sample, but this time using AMFPHP. all the logic for the remote object has been set up for working with AMFPHP. But when i try to log in, i get this error

Argument 1 passed to LoginService::getUser() must be an instance of LoginVO, array given

its driving me nuts, because a LoginVO type is what is sent to the _loginService remoteobject when the getUser is called

public function getUser( vo : LoginVO ):void
{
   _loginService.getUser( vo );  <-- HERE   
   CursorManager.setBusyCursor();
}

but i still get the above error ???

i am also suspecting that my php VO and my actionscript VO paths dont match. cant this really be a problem?

my login service has a source of

_loginService.source = "BuiPower.LoginService";

within my Services folder, i have the BuiPower folder then the LoginService.php file. it looks like this (i have removed code so this post isnt too chunky)

<?php

class LoginService
{
   public function __construct()
   {
      //code to connect to db etc
   }
   
   function getUser(LoginVO $loginVO)
   {
      include_once("../vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php");

    ....(more code to authenticate credentials)
    }
}

?>

finally my actionscript VO and php VO look like this

package net.scriptoninteractive.flex.weborb.buipower.model.vo
{
   [RemoteClass(alias="BuiPower.LoginVO")]   <--notice as VO path isnt same as php
      [Bindable]
   public class LoginVO
   {
      public var username: String;
      public var password: String;
      public var loginDate: Date;
   }   
}
and the php VO which is located in the services folder as
vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php is

<?php
class LoginVO
{
   var $username;
      var $password;
   var $loginDate;
   
   //explicit actionscript package
   var $_explicitType = "net.scriptoninteractive.flex.weborb.buipower.model.vo.LoginVO";
}
?>

does anyone have any idea...or can share how they have done it with AMFPHP. thanks a bunch!

Sincerely,
Kofi Addaquay
7  Announcements and General Discussion / Getting Started / Best to implement ViewStack or ViewStates or Both on: September 01, 2008, 07:42:49
Hi, i am building my first puremvc project and i have tons of questions  :o ... just so i can keep everything short...my question is this..

in my application so far, the only way i am changing states is with the viewstack...but all of a sudden i am having the urge to have different viewstates within my components and changing the currentState instead of just creating a new component as the new state. creating a new component might be longer...but i really dont care. i just want to make sure i am building it with the right architecture. Can you please comment on which might be best. am i better off  using a viewstack?? rather than mixing viewstacks and viewstates ?
8  Announcements and General Discussion / Getting Started / respository on: March 20, 2008, 09:56:34
hi Cliff, hope all is well :). cant seem to find a link to the repository so i can download the sample applications. i see the browser, but i dont see what urls to put in eclipse to download the file/files. also, is there a new courseware. i cant seem to locate that as well. Thanks for your time.
9  Announcements and General Discussion / Getting Started / Courseware on: February 17, 2008, 11:28:34
Hi Cliff, i have been wondering when the next version of the courseware is going to be available. been dying to get started and feel i am being held back because the courseware has been removed from the site. Cant i get a copy of the old version to get started with. I feel stuck and dont know how to proceed. Thanks for your time concerning this

K
Pages: [1]