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  PureMVC Manifold / Standard Version / Re: Handling drag and drop with Mediator on: August 13, 2009, 01:34:05
I try to past the events DragEnter in first and then DragDrop :

DragBar.mxml :


<mx:Script>
      <![CDATA[
                      public static const ARCHIVE_DRAG_DROP:String = 'archiveDragDrop';
         public static const ARCHIVE_DRAG_ENTER:String = 'archiveDragEnter';   
                       
                   private function sendDragEvent( action:String ):void
                  {
                     dispatchEvent(new DragEvent( action, true ));
                  }                           
      ]]>
</mx:Script>

<mx:LinkButton id="archiveButton" label="Archive"
            icon="{archiveIcon}"
            dragDrop="sendDragEvent(ARCHIVE_DRAG_DROP)"
                                dragEnter="sendDragEvent(ARCHIVE_DRAG_ENTER)"
                                toolTip="Drop an element here for archiving" />


DragBarMediator.mxml :



                public function UniverseDragBarMediator(viewComponent:Object=null)
      {
         super(NAME, viewComponent);
         // Add Listeners
         universeDragBar.addEventListener( UniverseDragBar.ARCHIVE_DRAG_DROP, onArchiveDragDrop );
         universeDragBar.addEventListener( UniverseDragBar.ARCHIVE_DRAG_ENTER, onArchiveDragEnter );
      }

      private function onArchiveDragEnter( event:DragEvent ):void
      {
          var obj:IUIComponent = IUIComponent(event.currentTarget);
                        DragManager.acceptDragDrop(obj);
                       
      }

      private function onArchiveDragDrop( event:DragEvent ):void
      {
         sendNotification( ProjectManagerFacade.ARCHIVE_ELEMENT );
      }


I follow the flow  with PureMVC Console and I saw that only the event dragEnter is dispatched.

With the same code in first post, the both are dispatched.

Have you an explanation ???

Thanks for your help Cliff



2  PureMVC Manifold / Standard Version / Handling drag and drop with Mediator on: August 12, 2009, 03:11:51
Hello,

I tried to handle Drag and Drop from a DataGrid to an Image for deleting an element but I have some troubles.

Without PureMVC, I handle the events DragEnter and DragDrop in this way :


            private function image_dragEnter(evt:DragEvent):void {
                var obj:IUIComponent = IUIComponent(evt.currentTarget);
                DragManager.acceptDragDrop(obj);
            }

            private function image_dragDrop(evt:DragEvent):void {
                var item:Object = dataGrid.selectedItem;
                var idx:int = arrColl.getItemIndex(item);
                arrColl.removeItemAt(idx);
            }


When i try to past event to Mediator, only one event is dispatched (randomly).

I don't understand what's happen!

I will be glad if someone can help me.

Thanks in advance
3  PureMVC Manifold / MultiCore Version / Re: Modular application with modules without PureMVC? on: August 06, 2009, 08:16:04
Thanks for your answer Cliff,

I checked out the source of Modularity, it's seems adapted to my project.

It is possible to adapt it with loaded modules with the ModuleManager ?

Because for the moment the application have to know the modules(widgets) and one of my requirements is to let the possibility to third parties to develop modules for my application.

Another question:

How I have to manage CRUD operations started by the modules ?

Thanks in adavance for any help

4  PureMVC Manifold / MultiCore Version / Modular application with modules without PureMVC? on: July 08, 2009, 08:09:37
Hello,

I started to develop a modular application with PureMVC Multicore.

The goal of my application is to offer at a community the possibility to create their own modules which use my "framework" (the modules have to implement some interfaces defined in my application)

I would like to know if the external modules can be develop without the PureMVC framework.

Thanks in advance for any help
Pages: [1]