HTTPService data object / class variable number

Hello

I am building a Flex application with ActionScript classes where the class contains all events management. In a class like:

{stuff package
public var xml:XML() = new XML();
public void MyObject() {}
public void getData (): void {}
Here I create an HTTPService object, fill in all the information and send it.
}
public void resultHandler(event:ResultEvent):void {}
XML = XML (event.result);
I get the XML very well here, but after the end of this call, I can't get this data more
}
error handler, etc.
}


The problem is that if I want to view/use these data in the result handler, that is fine, but if I try to store these data in a class variable, I can't recover this data from outside the class. If I refer to this object to another object, the data, all right and I can see the xml from the results Manager, but I can't seem to store these data, then pull it out via a class variable, or via a getter method that returns the variable. Is there something I'm missing here? Basically, I want to get the information via the HTTPService and store this information in a class variable that I can access it later. How can I do this?

Thank you.

Thanks for all your suggestions. The final problem was indeed the asynchronous nature of data calls HTTPService. I found a series of articles that has highlighted and provided solutions to the issue. An important quote from one of the articles is: "the fact that the web service calls flex are asynchronous have implications on how you design your code." and even, "the asynchronicity of remote calls has a major impact on how you design the customer."

This is exactly the kind of information was missing and I have not found well-described in the Adobe Flex 3 documentation or tutorials I've read.

Here are some links to more useful articles I found:
http://tinyurl.com/34py5p
http://techpolesen.blogspot.com/2007/09/coping-with-Flex-asynchronous-remote.html
http://techpolesen.blogspot.com/2007/09/coping-with-Flex-asynchronous-remote_26.html
http://techpolesen.blogspot.com/2007/11/coping-with-Flex-asynchronous-remote.html

Tags: Flex

Similar Questions

  • Variant of data object class

    The 'variant data' has 'Type' is a required entry, according to the help documentation.

    However, I can make a Variant to the data without the help of the type when the variant is an object and a class method is fixed. Is this expected behavior?

    A screenshot is also attached. The top loop to have a "blue wire" method, which is then become a child of the «Brown wire» method Since there is no type, blue seems to have kept his last colors. By duplicating the code, the new instance has the right color. The two loops to provide the same performance.

    Richard_Ha wrote:

    The 'variant data' has 'Type' is a required entry, according to the help documentation.

    The documentation is no longer correct. I guess at some point, that someone thought it was a good idea to let the function of being able to deduce the data from the output if nothing is connected to the entry type, but then I forgot to update the image of the assistance.

    I do not remember to do with classes (or to all the less, I almost never rely on this behavior, because I prefer explicitly the type of wiring), but I could certainly imagine where it would work unexpectedly. Unlike other types, the classes have a dynamic element to the data type, which is certainly more an incentive to make sure you wire in the class.

  • Variable number of objects detected in Calculator handling VBAI

    I have an inspection looking for shiny objects (holes) in a product, and in general it is not all (good), but when he does I need to know the location of each hole, to determine the xy-limits of the area of holes, that is, the minutes and culminates each hole xy coordinates. To do this, I would use a stage of caclulator and iterate through all of the holes found... but I don't think that the calculator can handle a variable number of holes... or it can?

    Thank you

    Eric

    Hi Eric,.

    Step of the calculator does not support tables. We have had many requests on the better table support in VBAI and we are going to solve it.

    In the meantime, you can browse the results of a step that produces berries by building a state diagram a bit more complex. Index Example.vbai measures and classify objects Example.vbai for examples on how to do it.

    I hope this helps.

    Best regards

    Christophe

  • Binds a shared variable to a NOR-PSP data object does not work

    Hello

    I want to share data between a RT-target and one or several hosts (LV 8.6.1). Shared network variables are deployed to the target RT.  According to NOR to access shared another project or host variables must be done by defining a variable shared on the host computer and the aliasing they NEITHER-PSP data object on the target.

    I did and the shared host variable was an error (0x8BBB0011) during execution.

    Next I have an alias to a shared variable, deployed on the host to another project. It worked.

    Another thing I tried was to bind the variable of the RT-target to a display element:

    This works! And as you can see that the path of the NOR-PSP data object is exactly the same thing! So, what is the difference between linking a data object to a shared variable and a display element?

    Is there a bug in the EVS, or am I missing something here?

    Home project:

    The VI editor

    Hope someone has an answer.

    Concerning

    Matthias Quade

    Dear Mr. Quade,

    Thanks for posting on the Forum of National Instruments. There is a known issue with the path of the linked with LabVIEW 8.6.1 variable

    Please download the patch for LabVIEW 8.6.1, it should solve your problem:

    http://Joule.NI.com/nidu/CDs/view/p/ID/1255/lang/de

    Best regards from Munich

  • Date conversion variable number

    I could do this using javascript, but I wanted to do this through if possible liquid so I can use it in more liquid logic. I want to reach adds a number of hours at a variable 'date' and have the date calculated, if I worked in PHP I would use something like a UNIX time however I can't find an equivalent to work in British Colombia.

    For example say I have today dateTime variable " 2015-10 - 01 T 13: 02:33" I want to add 1,000 hours to what is about 42 days putting us around November 11, I can't quite understand how to achieve this, if I were to do something like {{globals.site.dateNow |}} "" date: "YYYYMMDD" | {{more: days-}}, where days = {{1000 | dived_by: 24 | cleli}} this will work until we had to move from October to November, in this example I'd end up with a variable that was closest to the 43rd October which obviously isn't quite right.


    I think the key is in making the date as a total number of hours, or by converting the 1000 hours in a dateTime variable valid to add to the Start date however after bother for a few hours, while going through the Developer Referencedocumentation, I can't quite work as it should. Any help would be appreciated.

    Read this:

    Liquid data types

    That should help

  • How to change data objects and update the corresponding task and task forms?

    Hi all

    I modified this thread because I found that I had many questions to ask.

    1.
    I'm quite new to OBPM and would like to know how to change data - for clarity objects add a new attribute "Dependents of the Client" "Customer care" - and therefore update the task that uses the 'customer information' what makes via data binding - I get an error message here - or via the data about the data Task-The chosen tab it does not appear to be linked to my approach in some sort.

    2.
    Will be the task form that I generated earlier in < 1 > update automatically? Is it possible to update manually if the task has been clearly customized?

    3.
    What are the objects of project data? They do not store values in my process. They are for the arguments only - like reusable process?

    Thanks in advance,

    Kind regards

    Yanis

    Hi Yanius,

    (1) assume that you start from scratch. First, you declare your data object structure. To do this, you must go to the BPM project Naviagtor, right-click on 'Catalogue of trades' and create a new Module. Then you can right click on the module you created and select the new object of trade. Add all the attributes you need. It is the same to declare a class in Java. Second, you must declare a variable of the type process you have created: select the process, go to the Structure display (if you don't go and activate it in menu view Jdev-> Structure). Right click on the Process data object and create your variable. It's like setting a variable in Java. In short, answering your question, make the path opposite: find in your process of type "Customer Details", then go to your catalog Business, right click and change the definition to add what you need.

    (2) the human task will not update automatically (annoying). If you change the object itself, so you don't need to change your mappings because actually there the same object you are through the task as in / out argument. There are two things here: the human task and form associated with it (where probably change you the subject i.e. customer details). Go to the form (.jspx) - click on the tab links (by default, you are in the Design). In the links page, there is a link on top: "Page Définition File" (something like proj/pageDef/...xml). Open the XML file and go to the source. There you can add manually now all the attributes you need and that were not available before (i.e. dependent Client). It's a little complicated, but at least you don't have to recreate it. particularly useful if you have already implemented and subsequently form, you need to add more things (business is very good to say otherwise, "I would like to see something else in the form" ;)

    (3) project data objects are visible by all processes that you have in the project rather than the object of process data that are visible only to the method where you set the variable to. This means that you declare an object of data of the project once and then it will be available to all processes. Keep in mind that each process has a copy of it. In other words, it is not like a global variable that everyone sees. If edit you in a single process, other processes will not see the new value.

    I hope that I have answered your questions.
    See you soon,.
    Felipe

  • Determine whether the instance of the object is of a specific object class.

    I was not able to find the answer in the documentation or in the forum. My terminology is perhaps a bit off (Java and c# background back to PL/SQL programming).

    The general question is: given an object instance how to determine if the type of the instance is of the same kind as a specific object class.

    In particular, I do a unit test and examine the returned object instance. The effective yield is described as follows

    -This data structure contains a pointer to an LDAP session
    SESSION OF SUBTYPE IS RAW (32);

    I expect an instance of DBMS_LDAP. SESSION. To confirm this, I propose that the returned pointer DEREF and see if it's a type of DBMS_LDAP. SESSION. When this is confirmed, then I can further the return of reference.

    Draft code is

    BEGIN
    IF DEREF ({RETURN$}) some_operator_which_compares_object_types DBMS_LDAP. SESSION
    THEN
    RETURN TRUE;
    ON THE OTHER
    RETURN FALSE;
    END IF;
    END;

    where some_operator_which_compares_object_types is what I need to know.

    Thank you for your help. And of course, the other way to do business and/or links to the correct location in the documentation are appreciated.

    Kind regards
    Bill

    I think you are looking for [IS OF | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions014.htm] condition.

    SQL> create or replace type mytype as object(a number);
      2  /
    
    Tipo creato.
    
    SQL> declare
      2  x mytype := mytype(1);
      3  begin
      4  if x is of (mytype)  then
      5  dbms_output.put_line('OK');
      6  end if;
      7  end;
      8  /
    OK
    
    Procedura PL/SQL completata correttamente.
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/29/estrarre-i-dati-in-formato-xml-da-sql/]

  • AM Customer Interface + method with a variable number of parameters

    Hello

    I use JDev11 & ADF. I have an App Module exteding, an application custom module (ApplicationModuleImpl) class. I created a few methods and expose them in the Client Interface. I read that I can only use the return types and methods of simple or serialized attributes in the Client Interface of AM. I need to create a method with the variable number and type of parameters, something like "Createwithparams", something like:
        public void Method(String[] FieldNames, Object[] FieldValues)
    Is there a way to do it?

    TKS.

    You just did it. It should work as far as I know.
    If you can not make available the method try list instead of normal array.

    Timo

  • Process of reading/definition of component Java Spring or XSLT data objects

    I have a BPMN process that refers to a service component of spring.
    The spring has a Java class and within this category, I would like to be able to reference the data of the BPMN process objects.
    Ideally, I would like to simply read and write to these objects within the Java class.
    However, if this is not possible, I have not I can define the input parameter for the Java class and have it return an object.
    If I go this way, how spend or return an object of one type other than your standard types (string, int, boolean)?

    For example, I have a data object is a type that I created, based on a schema.
    How do I refer to one in a Java class?

    Hope that makes sense.
    Thank you
    Mike

    Mike,
    Steps 1 to 3 are correct. You should not change the WSDL file however. You have 2 options:

    1. create the POJO with your code of spring which have the same or similar structure to the schema you want to use. Add them as arguments and the return type of your operation. Then you can re-create the exposed service and it will regenerate your WSDL with the new definitions of type of these objects.
    2. you could generate your existing schemas JAXB java objects and use them as the argumengs and types back. We had problems in the past with this so it may not work for you, depending on your version.

    Thank you
    Adam DesJardin

  • Attention impossible to bind to property 'somevar' on the 'Object' class object is not an IEventDispatcher?'

    Hi all

    How to fix under WARNING:

    Attention impossible to bind to property 'somevar' on the 'Object' class object is not an IEventDispatcher

    Thank you

    Sunil Rana

    Hi Paul,.

    I found the solution on the net & here's news

    Cast the data in your itemrenderer as an objectProxy.

    itemRender.mxml

    http://www.Adobe.com/2006/mxml '.

    verticalScrollPolicy = "off".

    horizontalScrollPolicy = "off".

    creationComplete = "init (); » >

    Import mx.utils.ObjectProxy;

    [Bindable]
    public var dataProxy:ObjectProxy;

    private function init (): void {}
    dataProxy = new ObjectProxy (data);
    }
    ]]>
        

    Thank you

    Sunil Rana

  • How to access the static class variable calendar / singleton?

    How can I access a timeline of a static class variable / singleton?

    You can pass any object to display list to your class when instantiating it.  all objects in the display list has a placement property that allows access to the stage and them you can use the correct path/name to your variable.

  • Date to the Date object string

    Hello

    How I'd go on parsing the date in DD/MM/YYYY format strings in a date objects. I'm sure its an easy problem but I can't find a simple way to do as most of the API wants a different format as DD/MM/YYYY

    Thanks for any help

    Hello

    in the actionscript 3.0 Cookbook, there is a class DateFormat described, which allows to parse strings of objects date.

    You can download the code for the dateformat.as from there.

    http://www.rightactionscript.com/ASCB/

    Best regards
    Kcell

  • The data access class

    Hi guys!

    I want to create a class with a method that returns data that will be loaded when running.

    For example

    Class DalBooks {}

    public void BooksList (): ArrayCollection collection
    {
    Insert here the code
    }

    }


    I want to call the BooksList method and have a returned ArrayCollection collection.
    The problem is that when I use classes such as HttpService, RemoteObject, etc. of loading data, these classes generate events and the result Manager is the one that gets the data, not my BooksList method. So my method may not return the ArrayCollection collection.

    Is there someone who can help me with that? Any idea?

    Thank you!!

    Flex is asynchronous, so its always best to use the result event for access to the loaded data.

  • Binds the data object graph, causing memory

    Hello

    I want to create a WPF application that uses Measurement Studio to display the data points on the graph.

    We have already implemented a HAL, the data in the reports of the UI (after a few manipulations), using the DAQmx.

    I saw in your examples you display only the last second points, but my users can choose to see the data in an hour, and if I continue in the data memory of the points for the last hour I get out of memory (the data object become very big).

    How can I display in the chart of the data of the last X minutes / hours without keeping all the data in memory?

    Sorry, it was my fault (the years were defective in my local test as well, just, I had not noticed). Fortunately, what makes the solution even simpler: the CustomXAxis implementation can change just object ISourceDataProvider.TryGetSourceDataStart() { return default(DateTime); } .

    Also, for future reference: to the changes of the properties in WPF, you must be a dependency property or INotifyPropertyChanged , but not both (i.e. didn't need you OnStartTimePropertyChanged in CustomXAxis ).

  • With a variable number of input ports on a Subvi

    How can I have a Subvi with a variable number of input ports that can be changed in the other VI that uses the Subvi?

    You can't actually do what you trying to do, how LabVIEW is implemented does not screw created by the user with arbitrary entries.  And to be honest, there is probably a better way to do whatever it is you want to do.

    If you really really want to do that, but... you can come kind of close.

    1. create a new VI

    2. change its connector to the one with the inputs and outputs pane more possible (terminals 8-6-6-8, 28)

    3 create controls/indicators for any desired input/output of not scaling can connect the (i.e. the error in / error, son of reference, etc.)

    4. hang them until the connector pane

    5 count how many entries are left and create a control for each entry and their son all

    6 drop your VI on the block diagram of the VI one another as a Subvi

    7. Note that when you mouseover, it looks like a Pincushion

    8. right click the VI and uncheck the "display as icon".

    9. you can now "slide down" at the bottom of the VI

    The terminals in the section "slide down" are as a package by name or node property that you can click on them to reallocate them to what it is not already selected.  The default is to make all the entries in alphabetical order, then all the outputs in alphabetical order.  If you rename the terminals that allows you to make appear in the order that you prefer is up to you.

    As all terminals, for the best that you can do to detect if they are wired is to define a default value that should never be used.  If she is floating points, you can use 'NaN' or 'Inf '.  If this is a cluster that you did, add an item more boolean which is true in the default values for this entry VI.

    Then just wire up all the identical terminals together in a table, filter the items which appear to be unwired and make all your treatment on the rest.

Maybe you are looking for