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 / Architecture / Re: component build with pure mvc loaded into fla built with mvc on: November 15, 2009, 01:29:23
Thank you sir :)
2  Announcements and General Discussion / Architecture / component build with pure mvc loaded into fla built with mvc on: November 14, 2009, 12:50:35
Hello,

I have written a component with pure mvc (single core) and am trying to load it into a swf that is build using pure mvc single core as well.  I can only instantiate one instance of applicationfacade, either I use the component mvc and it breaks the shell swf mvc or I use the shell pure mvc and it breaks the component mvc.  So, this sounds to me like I'm going to need to use the multi-core version of pure mvc.  Here are my questions....

1.  Does only the shell swf need to be multicore or do both the component and shell need to use multi-core?
2.  Do I actually need multicore or is there another way of getting around this.

I guess that is it.  Am I on the right path with my thinking?

Thanks,
Josh
3  Announcements and General Discussion / General Discussion / Execution of notification on: April 30, 2009, 08:57:51
Hello,

I'm working on a progressBar for the loading of several local files in an AIR app.  I am sending notifications out of a loop that runs on every line of a file that has loaded.  I can't, for the life of me, get the progressbar to visually update, and was wondering if something may be weird with the way notifications work.  Do they dispatch events and run asynchronously with the execution thread or are they fired synchronously.  From what I've seen it looks pretty sycronous because I set breakpoints in my setProgress function which is supposed to update the progressBar.  I've tried just about everything with the progressBar, manual mode, event mode (dispatching my own ProgressEvents, etc.) and nothing will work.  I'm running mac os x10.4 and compiling for flash player 9.  Anybody have any ideas.  Here is a code snippet from where I'm updating the progressbar.  I know this post goes a little outside of PureMVC, but thought maybe, somewhere it has something to do with it, or at least it is worth my time asking.

Like I said, I can verify, through breakpoints, that setPercentage is getting called, but no visual result displayed.

<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml">
   <!--<mx:Dissolve id="myShow" duration="500" alphaFrom="0.0" alphaTo="1.0"/>-->
   <mx:Box>
      <mx:Script>
          <![CDATA[
             import com.widgetmakers.coolwidget.globals.MessageStrings;
             
            [Bindable] private var progressLabel:String = MessageStrings.EXTRACTING_INVOICE_INFO;
                        
            public function setPercentage(thePercentage:Number):void {
               var theP:Number = Math.round(thePercentage);
               this.bar.setProgress( theP, 100 );
            }
            
          ]]>
      </mx:Script>
      
   <mx:VBox>
      <mx:ProgressBar id="bar" labelPlacement="bottom" themeColor="#F20D7A"
            minimum="0" visible="true" maximum="100" label="{this.progressLabel}"
            direction="right" mode="manual" width="100%"/>
   </mx:VBox>
   </mx:Box>
</mx:Module>
4  Announcements and General Discussion / General Discussion / Re: notifications and thread blocking on: March 31, 2008, 09:08:55
Question about commands.  If they are FIFO what happens when a command you call creates an asynchronous operation?  When the asynchronous operation starts is the command 'finished' and then another command can start?
5  Announcements and General Discussion / Architecture / Re: Database blocking Notification? on: March 31, 2008, 07:32:55
What happens if my notification gets called from a sqlite transaction block?
6  Announcements and General Discussion / General Discussion / notifications and thread blocking on: March 30, 2008, 01:12:33
I'm having this problem with cancelling a database operation.  When someone clicks import on a form I have I begin running through a file and inserting information into the database.  I have opened the database asynchronously so I do not block the main application thread.  I have a cancel button that people can click to cancel/rollback the import process.  The cancel event does not get broadcast immediately, and I can't really figure out why it broadcasts when it does.  It registers the click about 50 percent of the way through the database operations.  Right now I have the cancel button calling a function in the mediator which, in turn, calls a proxy function that cancels the database action.  I though maybe I needed to send another notification from the mediator (the proxy call might be deferred until the other notice finishes), but that didn't work either.  I was reading that if a notification is sent out when another notification is running that the second notification will run and then when it is completed the thread will go back to the original notification.  Is this correct?  What could I be doing wrong?  When I access the file to import, could that be blocking the notifications?
7  Announcements and General Discussion / Architecture / Re: Database blocking Notification? on: March 19, 2008, 06:43:45
thanks.  I'll give it a go.
8  Announcements and General Discussion / Architecture / Database blocking Notification? on: March 18, 2008, 06:30:40
Hello.  I have an application I'm creating that uses the sqlite database.  I have one method where I am inserting quite a few rows of information into a database.  I use a few insert statements to get all the data in their correct tables.  I'm trying to output a status of how many rows have been inserted while the user waits 'cause sometimes it can take 20 seconds or so.  The problem I'm running into is that when I broadcast a notification in between inserts it is not picked up until all the inserts have happened.  I can trace out stuff in between inserts, and I even use a preliminary select statement to feed each insert statement so I know stuff is going on in between inserts.  I open the database in synchronous mode.  Does anybody know what I could be doing wrong?
9  Announcements and General Discussion / Architecture / Re: Losing File reference in Notification body?? on: March 10, 2008, 08:20:59
oops, that was stupid.  Thank you.
10  Announcements and General Discussion / Architecture / Re: Losing File reference in Notification body?? on: March 10, 2008, 07:25:11
It is listening to the event.select here...

:
getImportNewGameData.browseGood = true;
var gsisFilter:FileFilter = new FileFilter("GSIS", "*.xml");

getImportNewGameData.importFile = new File();
getImportNewGameData.importFile.addEventListener(Event.SELECT,fileSelected);
getImportNewGameData.importFile.browseForOpen("Select GSIS File for import", [gsisFilter]);
11  Announcements and General Discussion / Architecture / Losing File reference in Notification body?? on: March 09, 2008, 06:17:11
I have a mediator for a form that sends a notification (body of note is event.target which is a file that has been selected) out to a command, the command relays the info to a proxy, and the proxy delegates loading of file and then returns a notification.  I keep on getting this error that says

TypeError: Error #2007: Parameter file must be non-null.
   at flash.filesystem::FileStream/open()

I'm tracing out the note.body(), throughout the process and it is good until I actually try and open the file.  Am I not casting things in the right manner, not passing info in the notification correctly? 

Here are little snippets of the process. 

In the mediator

:
public function fileSelected(event:Event):void {
getImportNewGameData.filePath = event.target.nativePath;
sendNotification( ApplicationFacade.IMPORT_FILE_SELECTED, [ event.target ] );
}

In the command
:
override public function execute( note:INotification ) :void   
{
            // Get the ImportFileProxy
            var importFileProxy:FileProxy = facade.retrieveProxy( FileProxy.NAME ) as FileProxy;
            importFileProxy.loadFile(note.getBody());

        }

the proxy
:
public function loadFile(event:Object):void
{
// create a worker who will go get some data
// pass it a reference to this proxy so the delegate knows where to return the data
trace("This is the file name from FileProxy:"+event);
var delegate : LoadFileDelegate = new LoadFileDelegate( this );
// make the delegate do some work
delegate.loadGSISFile(event);
}

and finally the helper where I'm getting the error.
:
public function loadGSISFile(event:Object) : void
{
theFile = event as File;
var stream:FileStream = new FileStream();
    stream.open(theFile, FileMode.READ);
    var fileData:String = stream.readUTFBytes(stream.bytesAvailable);
    trace("This is the file data: "+fileData);
    this.responder.result(fileData);

}

Does anybody know what I'm doing wrong.



12  Announcements and General Discussion / Architecture / Re: VOs and data object in Proxy on: March 09, 2008, 12:28:42
thanks for the insight.
13  Announcements and General Discussion / Architecture / VOs and data object in Proxy on: March 08, 2008, 11:24:12
I've got this little xml database that stores user's login and password.  I have used code peek as an example of how to deal with multiple datastores using the abstractProxy.  Here is my question.  In the userProxy I have the data object set to an xmllist in the user proxy.  Should I take the additional step and create a UserVo class that is instantiated and set in the userProxy as a private variable, or is there no need to use a vo when I could return an xmllist from a get User function in the userProxy?


14  Announcements and General Discussion / Architecture / Re: Air sqlite Proxy question on: March 08, 2008, 08:33:56
So, sounds like you're feeling xml as opposed to sqlite for a datasource.
15  Announcements and General Discussion / Architecture / Re: Air sqlite Proxy question on: March 07, 2008, 05:12:03
In anybody's opinion, should I even be using the sqlite database, or is Flex/AIR better with xml as a datasource?
Pages: [1] 2 3