Flex :: Callback To Model Object?

Jul 23, 2010

I am trying to figure out how to define a callback to my model object, via the Mate Frameworks LocalEventMap.

<EventHandlers type="{WebServiceEvent.RT_GET}" debug="true">
<HTTPServiceInvoker url="/services/rtGet.asp">
<resultHandlers>

[Code]....

I get essentially the same error if I try to make method="model.rtGetHandleResult"

So, in keeping with the presentation model... how do I have the event map get this to the model to execute?

View 2 Replies


Similar Posts:


JavaScript :: Passing Object To Flex Using Callback Function

Jul 11, 2011

My web application pass a javascript object to flex application using addCallback function.
when the flex application is in modal dialog in safari browser, the object in the flex application is null and when I open the flex application just in a new window, the object is passed correctly. But, I need the showmodaldialog to show the flex application.

The flex code:
ExternalInterface.addCallback( "handleEvent", handleEvent );
override public function handleEvent( event:Object ):Object {
Alert.show(String(event)); .....

View 1 Replies

Flash :: Silverlight - MVVM - Presentation Model In Flex Vs Presentation Model In Silverlight: Advantages And Disadvantages?

Apr 10, 2011

As it is said here: [URL] "If you do a Google search today for "MVVM and Flex", the first post is by somebody who claims that MVVM is not a good fit for Flex. I couldn't disagree more. Out of the box, the Flex framework makes it much easier to implement a Presentation Model than similar MVVM implementations in Silverlight. That is not to say that there aren't good third-party libraries that make it easier in Silverlight, but without any help, it is easier to do in Flex." So MVVM as LOGICAL CONCEPT can be implemented in both but the way it is implemented in Silverlight requires more Plumbing than Flex.

What prevents Silverlight MVVM to be implemented like Flex ? Doesn't Silverlight have same capability in event system to do the same? If yes why does Silverlight do things more complicated what's the advantages then ? Is it about using Class Interfaces which are more strongly typed? What are the disadvantages also ? For example as for implementing MULTIPLE VIEWS for 1 View-Model does Flex implementation make it also more obvious?

View 2 Replies

Flash :: Finding Correct Scope Of An Object For A Callback?

Dec 11, 2009

I'm working on writing a tweening class in as2 that has a callback variable and I can't seem to find a good way to get the scope without specifically passing in a scope variable as well. This tweening class needs to work in classes as well as on the timeline. Here's what my codes looks like right now.params.scope[ params.onComplete ]( params.onCompleteParams );params is an object passed into the class. This works but I don't want to have params.scope in there.

View 1 Replies

ActionScript 2.0 :: [Flash8] Setting Callback Functions On An Object Methods?

Jan 12, 2006

Been doing some actionscript magic lately, done a nice interpolator class. The class, whenever an update occurs, calls a previously specified callback function. Normally, setting a variable of funCallback:Function and calling it works fine. However when I wanted to specify an *object's method* as the callback for the interpolator, it apparently called it as if it would be a static method.

And it isn't.What I need to do, simply speaking, is to be able to call an object's public method, having just th object's reference and function name, just like the second variant of setInterval does ( the one having "object, string" as the first two params, not "function").

View 12 Replies

ActionScript 3.0 :: Find The Language's Document Object Model (DOM)?

Feb 17, 2011

Just getting started with ActionScript 3, which is, I'm told, an object-oriented langauge.Therefore I am trying to find the language's Document Object Model (DOM), but I cannot find it anywhere.This would be a comprehensive outline of all AS3 objects with their respective properties, methods, etc.  Any real OOP language would have this.

View 8 Replies

Flash :: Merge An Object Model With A Sprite Or Make A Refernce?

Feb 20, 2012

I'm making a game where I have must have some objects like weapons and characters, which I in the end would like to get visual as a sprite or movieclip

Should I write the logic for the objects in several classes and then make a reference to the object in a sprite class like the following :

[Code]...

And then when I need to do damage just call the WeaponSprite's method weaponModel() when I need to acces the methods or should I just merge the two together into one class.?

View 1 Replies

AS3 :: Calling A Flex Callback From Javascript

Sep 28, 2009

I have a Javascript API, which should be usable with GWT and Flex. Using the FABridge it is really easy to call Javascript methods from AS3 and vice versa. But when I try to register a callback to an AS3 method in my Javascript API I get stuck. Here is a short code sample:

[Code]...

View 2 Replies

Javascript :: ShowSettings Callback In Flex?

Mar 24, 2010

I am pretty new to flex, so forgive me if this is an obvious question.Is there a way to open the Security.showSettings (flash.system.Security) with a callback? or at least to detect if it is currently open or not? My flex application is used for streaming audio, and is normally controlled by javascript, so I keep it hidden for normal use (via absolute positioning it off the page).

When I need microphone access I need to make the flash settings dialog visible, which works fine, I move it into view and open the dialog. When the user closes it, I need to move it back off the screen so they don't see an empty flex app sitting there after they change their settings.

View 2 Replies

Javascript :: Flex ExternalInterface Callback?

Dec 5, 2011

Flex:

public function callFromJavaScript():String
{
test.label='dfdsfsdf';
return "1";
}
public function init():void {

[Code]...

I have no clue wich one are crossbrowser compatible (cant install IE to test out)I have tried multiple but i cant get them to work(in any browser), im probably using the wrong id, ive been trial & erroring for a couple of hours but i don't have anything working.(i heard there was a problem with ExternalInterface.addCallback on a local file system?, should i upload the swf? < is the flex code right& problem = javascript/html side?)

View 1 Replies

Flex :: Not Receiving Event.Complete Callback

Feb 12, 2010

I created an image uploader for an app I am working on. I first used php for the server side script, and everything worked fine. I found out afterwards I had to use .net, so I created new serverside scripts. The problem I am having is that my event.COMPLETE listener is never firing. I can receive data back using a DATAEVENT listener, but then it stops at this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.

Here is how I am sending my file.
var fileRefReq:URLRequest = new URLRequest(FILE_UPLOAD_TEMP);
var fileReqVars:URLVariables = new URLVariables();
fileReqVars.subdir = "Temp";
fileRefReq.data = fileReqVars;
fileRefReq.method = URLRequestMethod.POST;
fileRef.upload(fileRefReq);

The file definitely gets uploaded to the first TEMP directory, but then it breaks with the above error.

View 2 Replies

Flex :: Event Listener Callback Not Firing?

Jun 17, 2011

In our app, I am periodically noticing that a particular event handler is not firing. 99% of the time, it works fine, but, every so often, it just dies. How can I find out whats happening? Is the DispatchEvent() not happening/working somehow? Is my listener still listening? Did something else catch the event, and not pass it along so that the 'right' listener can get to it ?

Here's a little bit of the code...

Thats a somewhat pruned down version of what the real code is, but I don't think I trimmed out anything important. The key, as I see it is that we fire up the params dialog, then start to listen for the closed event. Then, we show the param dialogs close function. What happens when it fails is that the trace message "caught close event.." is never generated, and, consequently, the closeHandler is not getting called at all.

View 1 Replies

Flex :: Implement Wcf Callback Functionality In Client?

Jan 26, 2012

I want to send notification from wcf to flex client, how to do as flex client only provides client socket functionality.

View 1 Replies

Flex :: Store The Model Of An Application?

Apr 25, 2011

I am working on an StoryBoarding application,it is a slide based application in which the authors can put several components like image , sound , captions etc in each of the slide.A collection of slides will make a storyboard.This application will be deployed on a web server (sharepoint + IIS , and php+apache), and several users can collaborate with each other for authoring or reviewing the storyboard.In my application I also want to support auto save ,which will keep on storing the state of the storyboard.User can also save at any point of time by clicking the save button.I am confused about how to store the state of the storyboard.

1)Presently I am doing this by passing all the storyboard data to a dot net web-service and then that service is storing images,caption etc in their respective tables into a database .2)Another approach possible is to store the model of the application as a serialized object into the db , which will be more convenient since separating the components of the model (like images,captions etc..) will not be required and also restoring the state of the objects in the application will be easy . I have two doubts about using approach 2 :-i) I want the the saved storyboard to load quickly, for which I would like to support the partial so that lighter objects like caption can be loaded quickly but other heavier objects like image,video etc can be loaded on demand. Using approach 2 , do I have to send the whole data in one go or is there way to support partial loading ?

View 1 Replies

Flex :: DTO / VO Versus Presentation Model

May 5, 2011

In Flex world, is DTO / VO same as Presentation Model?

View 2 Replies

Flex :: Bind XMLListCollection Into Model?

Mar 24, 2012

When the XMLListCollection is updated in the DataGrid, I want it to add the XML (bind it) into the Model. How would I do this? Or if not possible, how would I manually add XML into the Model?

This is a rough example of what I'm trying to do. Adding data to the DataGrid works fine; it just doesn't go into the Model when sending to the HTTPService.

<mx:Model id="model">
<root><colors>{collection}</colors></root>
</mx:Model>
<mx:XMLListCollection id="collection" />

[Code]....

View 1 Replies

Flex :: Execute A Callback After A Set Of Asynchronous Service Calls Complete?

Dec 6, 2010

In Flex, I'm making a set of asynchronous calls:

service.method1.send().addResponder(responder1);
service.method2.send().addResponder(responder2);
service.method3.send().addResponder(responder3);

I want to execute some code after all of these service calls have returned (either success or failure, I don't care which). How can I do this?

View 1 Replies

Flex :: Performance - Why Does Use A Single Threaded Model

Jul 10, 2009

Over the past few weeks I have been building a prototype application using a Flex front end connected to a J2EE backend using blazeDS. The prototype is an experiment to learn flex and see what its suitability is for a complex trading application requiring a large number of dynamic updates (i.e > 20 a second) via a pub sub type model. During some lightweight performance tests it's become apparent that I need to use multiple threads to ensure the UI remains stable when receiving a large number of updates from the server. All was going well until I discovered that flex has a single threaded programming model!

From a quick Google it looks as though there are numerous hacks to implement thread like behavior. I am sure many people must have been faced with a similar problem. Can people let me know: Are there any good threading libs that are well maintained etc Do other RIA technologies such as silverlight have the same problems. Why did abobe implement a single thread model? Are there any other tricks I can use to ensure my UI is stable.

View 7 Replies

Flex :: Zend Framework Model With Service?

Feb 10, 2010

i have a question about Zend Framework and mainly the model part. I know there is no abstract model class and understand why. I red a lot of blog posts about it, but couldn't find any example that would clearly explain it to me. I'm building a very basic application. Lets imagine we have just three tables.company(ID, name, street, streetNo, Town), meta(ID, name, description), company2meta(ID, companyID, metaID, value, note). All types of realtionship are there (1n n1, nm). The a need also services (amf) with Value Objects. So, here is what I think:

[Code]...

View 1 Replies

Flex :: Back PopUp (Dialog) With A Model

Mar 9, 2010

I'm using MATE on an Adobe Flex project for MVC. On one of our pages, we have a dialog window that is presented to the user that displays them information that comes from RPC. The pages where this dialog pops up is unrelated to the data being displayed so this is a separate model. How do I create a MATE mapping file that will create the dialog window, make it visible to the user, and then inject in data from a model?

View 1 Replies

Flex :: Adobe Prevent Model Tainting?

Mar 29, 2011

I have some values stores in my model. I need to create a copy of those values, make some changes, and then output those changes without affecting the model values.

var my_source:Array = model.something.source
var output:Array = new Array();
for each (var vo:my_vo in my_source) {

[code].....

View 2 Replies

Flex :: One Data Model Multiple Platforms Different UI?

Jul 3, 2011

I have designed "the core" of the application i am working on ( it communication with the server, data processing, etc. ), and now i am a bit stuck on the User Interface, because i wish it to be specific, and probably different on the different platforms it goin to run on ( PC, tablet, gsm ).

My question basically is How to separate the "core" of the application, which must remain the same for all of the platforms, from the UI's which shall be very different applications ?

View 1 Replies

Flex - Cairngorm Model Locator Pattern?

Jul 5, 2011

In Cairngorm (Flex Framework), there is Model Locator Pattern, which is similar to Global variables, is it a right pattern, Adobe is saying for flex its best pattern

[Code]...

View 1 Replies

Flex :: Cairngorm 3 Presentation Model Initializations?

Jul 13, 2011

I have a TitleWindow that I open up... and I have 6 states defined.I am using the Presentation model pattern for all of my views. When I tell my window to go to XXX state, the controls have to initialize since the states in flex use lazy loading. so... my PM code that says myTextArea.text bombs out and say "cannot access..." so as a work around, I made some creationComplete events on my controls to register the control with the PM. So when the state changes, the textarea finally initializes and on creationComplete calls PM.registerTextArea() which sets a reference to it. then in that function I run my code... myTextArea.text.. etc.

This seems like such a ugly hack that I hate it. Is there any way to wait until the entire state in created then call code on the PM? I have tried enterstate... but this event seems to fire before the state controls are ready.I tried to add a comment, but I guess editing is the only way I can do this...I am doing something slightly off straight PM. Every view has a viewController (as I call them). Its kinda my own hybrid of a delegate / dataprovider. But this is moot. It's the flex component lifecycle when dealing with states that is the pain.if you change state.. there is no event to say "all my components in this state are ready".only event to say "we changed state". so my code that fires on state change is trying to talk to components that aren't ready yet.So from what I see, there seems to be no design pattern or perfect way to ensure that all components are created in a state unless using creationComplete on every component in the state to register it is ready... if you don't, you get a race condition. Regardless of frameworks or design patterns, this seems to be a root issue.

I am trying to attach video to a display once I get to that state. This is done via addchild. regardless of where I do it.. I need to know that the videoDisplay is done loading before I call addchild. I even tried currentStateChange event since docs say that fires last... but alas.. the components in the state are still initializing. So it seems that creationComplete is my only option. Maybe the only sane way to keep to clean code is to create the entire thing(videodisplay and video) using as once the state is entered. I just hoped the flex framework had events to ehlp me here rather than buiilding everything on the fly in as.

View 1 Replies

Flex :: Communicate Between The Skin And The Data Model?

Dec 2, 2011

How to send to the skin some value which have changed?

View 1 Replies

Javascript :: Flex - Flash Callback Method Produces Error UNLESS Alert() First?

Jan 11, 2010

I have a flex app and I am adding a callback method like this:

private function init():void
{
ExternalInterface.addCallback( "playVideo", playVideo );
}

[code].....

However if I uncomment and run the alert first. I get no error and it works perfectly.My first thought was that the alert was buying time until the script could execute, so i tried to run the script inside a setTimeout() but did not work.

View 1 Replies

Flex :: Pass An Extra Parameter To Callback Event And Have It Evaluate Early?

Jun 30, 2011

For example:

for(var i:int=0; i<someArray.length; i++)
{
var loader:Loader=new Loader();
loader.load(new URLRequest("http://testurl.com/test.jpg"));

[Code]....

The second paramter (i) for imageLoaded is always 1, I guess because i no longer exists and is defaulting to 1. Is it possible to get that second paramter to be evaluated when the load is started rather than on complete?

View 2 Replies

Actionscript 3 :: Flex Adding Event Listeners With Callback Functions Which Have No Arguments

Jun 10, 2009

fileReference.addEventListener(Event.COMPLETE, uploadCompleteHandler);
private function uploadCompleteHandler(event:Event):void {}

Above is one way to add an event listener in Actionscript. By default the callback function needs to have an argument with name event and type Event. Is there a way to declare this function without any arguments :

private function uploadCompleteHandler():void {}

Edit : It's possible to add an event handler without any arguments in mxml. So one student wanted to know, why isn't it possible to do the same in actionscript?

View 2 Replies

Flex :: Update The Model Without Losing Focus In Datagrid?

Jan 25, 2010

In my Flex Project using Cairngorm, I have a model that stores a bindable ArrayCollection displayed by a DataGrid. My problem occurs when the model is updated by the responder (from a Java service, after an "update" event), because the focus located in a cell of the DataGrid is lost (the scroll position il also lost). So, I retrieve the position before the update, with DataGridEvent.ITEM_FOCUS_IN event :

myModel.focusedCell.rowIndex = e.rowIndex;
myModel.focusedCell.columnIndex = e.columnIndex;

But, from where restore these parameters ? How to trigger this update only when the model is updated ?

View 1 Replies

Flex :: Single Model - Multiple Filtered Views

May 17, 2010

I have data model (dataProvider as ArrayCollection) i want to display in few views , each view should show filtered data. As you probably know, filterFunction is property of ArrayCollection,so I can't use this solution (unless creating new instance of ArrayCollection for each view on top original and impementing filterFunction).

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved