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

Pages: [1]
Print
Author Topic: Fabrication and Adobe Air?  (Read 8372 times)
marks416
Sr. Member
****
Posts: 52


View Profile Email
« on: December 09, 2008, 07:48:17 »

Hi  darshan,

Have you test Fabrication with Adobe Air?

I get error message for the following statement:

      import org.puremvc.as3.multicore.utilities.fabrication.core.FabricationMediator;
         
      import view.components.Display;
      import view.components.Editor;
     
      public class SimpleAirMediator extends FabricationMediator
   {
      static public const NAME:String = "SimpleAirMediator";
      public function SimpleAirMediator(viewComponent:SimpleAir)
      {
         super(NAME, viewComponent);
      }
      
      override public function onRegister():void {
         registerMediator(new DisplayMediator(display));
         registerMediator(new EditorMediator(editor));
         
      }
         }

The error message are:

1017: The definition of base class FabricationMediator was not found.       
1020: Method marked override must override another method.

Would you please post a simple demo for AIR with Fabrication?

I did the following:

1. copy fabrication-0.5.3-air.swc to libs
2. change main page with

  <fab:AirApplication  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
   xmlns:ns1="view.components.*"
   xmlns:fab="org.puremvc.as3.multicore.utilities.fabrication.components.*">

 </fab:AirApplication>

I download fabrication-0.5.3-air.swc from wiki site. do you think it is lastest one?

Thank

Mark






Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #1 on: December 09, 2008, 08:17:34 »

You shouldn't be extending FabricationMediator, you should extend from the FlexMediator. Also, there are no Mediator classes under the core directory, that is only for the core actors such as the View, Model and Controller. The bulk of the classes are in the patterns folder, and the mediators are in the mediator folder under the patterns directory.

I'd recommend downloading the actual source and taking a little time to browse through the files to familiarize yourself with how Fabrication works. A little time invested in understanding the inner workings will go a long way in your project.

As Darshan mentioned in another thread, the only difference between a Flex project and an Air project is the base Application it extends (AirApplication instead of FlexApplication), everything else is the same as a Flex only project.
« Last Edit: December 09, 2008, 08:20:15 by jasonmac » Logged
marks416
Sr. Member
****
Posts: 52


View Profile Email
« Reply #2 on: December 09, 2008, 08:45:35 »

I download the demo from wiki and I just try to convert it to Air.

would you post a AIR demo in your wiki?

Would you please which code is the latest demos I can download?

Thanks


Mark
Logged
marks416
Sr. Member
****
Posts: 52


View Profile Email
« Reply #3 on: December 09, 2008, 09:28:08 »

Hi  darshan & Jasonmac  ,

I extend mediators from FlexMediator now.it works for AIR !!

But why the Flex demo can extend FabricationMediator and works fine?

I hope to see your AIR demo soon.

Thanks

Mark

Logged
Pages: [1]
Print