Creating a very simple XML-driven gallery

Hi, I'm learning XML in AS3 and I am having real trouble finding a resource that can help me learn how to build a very simple XML-driven picture gallery.
I am working in an FLA file with AS3, with a dynamic text field with the instance name "textfield". I also have a UILoader Component with the instance name "UILoaderComponent" and an XML file called "rootdir.xml".
I have an XML file in the following format.
<images>
     <imagenames>
          <name>image1</name>
          <name>image2</name>
          <name>image3</name>
          <name>image4</name>
          <name>image5</name>
     </imagenames>
     <imagepaths>
          <path>image1.jpg</path>
          <path>image2.jpg</path>
          <path>image3.jpg</path>
          <path>image4.jpg</path>
          <path>image5.jpg</path>
     </imagepaths>
</images>
I am using the following as my actionscript.
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("rootdir.xml"));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
parseImg(xmlData);
function parseImg(imgLoad:XML):void {
var imgChild:XMLList = imgLoad.images.children();
for each (var imgTrace:XML in imgChild) {
trace(imgTrace);
No matter which way I experiment, I always have poor results with my dynamic text, and every tutorial I've followed does not reproduce anything like the same returned data in "textfield" that it does with the trace command.
My objective is: I simply want to build a menu inside a textbox called "textfield" that lists images1-5, and when clicked, calls upon the relevant image. For instance: I load the file "rootdir.xml" into the file "index.fla". I call a function to parse the XML into a dynamic text box called "textfield". When image 2 is clicked on the textbox "textfield", it would call upon a function that would load into the UIComponent Loader "image2.jpg".
Are there any tutorials for this? I'm so confused as to why dynamic text operates so differently from the trace command. I'm not interested in doing a fancy menu bar with thumbnails, scrollbars and animations, I just want to learn the basics.

I don't really see how you are getting a valid trace out of that code (I get nothing if I try it as is), but as far as the textfield goes, you haven't shown any attempt in your code that might help to point to why you cannot get the text into a textfield.  It might be a problem with how you are trying to write to the textfield and not how your are manipulating the data.
While you could make use of a textfield for the menu, doing so is not straightforward, as you would need to implement htmlText with special coding in order to have the text clickable.  You might consider using a List component or ComboBox instead.
What I always do when I am working with xml is to store the data into a data structure, usually an array conatining objects, and then make use of that structure rather than dippng into the xml data itself when I utilize the data.
Another thing, which rquigley demonstrated, is that your xml will serve its purpose better if the data for each image is collected under the same node.  If you have separate sections for each piece of data like you have, when it comes to editing it will be more prone to error as you have to be sure you are editing the correct entry of each separate group.
I too am no expert in the world of xml, but I have not yet worked with parameters inside the tags, so I would usually structure it as...
<images>
   <image>
       <imgName>image 1</imgName>
       <imgPath>image1.jpg</imgPath>
   </image>
   <image>
       <imgName>image 2</imgName>
       <imgPath>image2.jpg</imgPath>
   </image>
</images>
Now, back to what you have...  let's say you have a textField named imgText that you want to list the image names in.  The following should work, though I do not go my usual route of storing the data into an object array first...
function parseImg(imgLoad:XML):void {
   var imgNames:XMLList = imgLoad.imagenames.name;
   var imgPaths:XMLList = imgLoad.imagepaths.path;
   // show name
   for each (var nameTrace:XML in imgNames) {
      trace(nameTrace);
      imgText.appendText(nameTrace +"\n");
   // show path
   for each (var pathTrace:XML in imgPaths) {
      trace(pathTrace);
      imgText.appendText(pathTrace +"\n");
   // show name and path
   for(var i:uint=0; i<imgNames.length(); i++){
      trace(imgNames[i].text()+"  "+imgPaths[i].text());
      imgText.appendText(imgNames[i].text()+"  "+imgPaths[i].text() +"\n");

Similar Messages

  • Hello, i'm creating a very simple animation in ps cs5, but when I try to transform a smart object in a frame, all the frames are affected by it. What can I do ? Thanks, Ep

    Hello, i'm creating a very simple animation in ps cs5, but when I try to transform a smart object in a frame, all the frames are affected by it. What can I do ? Thanks, Ep

    Ok, you are in frame animation mode. I thought cs5 had a timeline mode, but now I think I was wrong.
    In frame animation mode what you do is in one frame you have the object rotated in one position, then select an other frame and rotate it. If it rotates the first frame, which I think it will. Create duplicate of the object in a new layer. Then rotate the second layer.
    At this point in my example you would have two layers, one of which has a rotated object.
    Clear the frames
    Convert the two layers to frames.
    You now have two frames, one for each layer.
    Select both frames then click the tween button.
    This will create the in between frames.
    In the tween dialog box the higher the number of frames set here, will create a smoother animation but will result in a longer time frame for the animation to play.
    Because Photoshop has no way of knowing which way the object should rotate, it is feasible for it to rotate the opposite direction or could look wonky. Just undo and add an in between layer showing how it should look in the middle, then continue on.
    So your layers should be the following, a frame that shows all objects in their rest state.
    All objects that remain in a rest state must be copied to the next layer (ctrl-j on Windows or cmd-j on Mac)
    All subsequent layers are then used for rotating a duplicate of the object. (Ctrl j or cmd j)
    You will find the commands to clear the frames, convert layers to frames and tweeting in the hidden menu found when you click the small icon in the upper right hand corner of the animation panel.

  • Create a very simple mp3 player with flash

    newbie with flash...
    with the FLVPlayback component i can get a nice looking basic player for .flv files easily...
    Q: is there some way to set up the same functions to create a very simple mp3 player with flash?

    Search Google for "Flash MP3 tutorial"  and if you know which version of actionscript you plan to use, try substituting that for "Flash"

  • Flash Lite XML Driven Gallery Simple Question

    Hello Flash Lite Gurus',
    Someone Named "Mr. Samir K. Dash;" did a wonderful tutorial regarding Flash Lite XML driven Photo Gallery, and I have just a small question:
    1> I changed the attributes schema of the xml as attached and noticed that it is not working, and I wonder what could be the reason (please see the attached XML new attribute schema, I didn't change fields names, I just changed the way the attributes' schema looks like).
    The link to the tutorial is the following:
    http://www.adobe.com/devnet/devices/articles/xml_photo_gallery.html
    Looking forward to your help
    best regards
    Talal

    As I look at your modified XML file, you need to make major changes in the script.
    You have changed the attributes to become child nodes. So, you will need to use firstChild.nodeValue or childNodes[i].nodeValue everywhere.
    Regards,
    Hemanth Sharma
    http://www.flashlitehub.com/blog

  • How to create  a very simple dyamic tree with rich faces

    hi i have spent more than 5 days trying to make a very simple rich faces tree but with no result
    i want to make a very simple dyamic tree
    for example i have a button when i click it.i want to add two nodes in my tree("node 1" and "node 2")
    i have also failed in making even a static tree with richfaces i think that some thing is wrong with them i checked the live demo website
    http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree
    i have tried the source code but with no result :(
    thank you

    You can try something like this
    <rich:tree switchType="server" >
    <rich:treeNodesAdaptor nodes="#{CB.calendarioHandler.organizacion.departamentos}"
    var="departamento">
    <rich:treeNode>
    <h:outputText value="#{departamento.nombre}"/>
    </rich:treeNode>
    <rich:treeNodesAdaptor nodes="#{departamento.empleados}"
    var="empleado">
    <rich:treeNode>
    <h:outputText value="#{empleado.nombre}"/>
    </rich:treeNode>
    <rich:treeNodesAdaptor nodes="#{empleado.calendarios}"
    var="calendario">
    <rich:treeNode>
    <h:outputText value="#{calendario.nombre}"/>
    </rich:treeNode>
    </rich:treeNodesAdaptor>
    </rich:treeNodesAdaptor>
    </rich:treeNodesAdaptor>
    </rich:tree>
    where departamentos, empleados and calendarios are just simple pojos lists.
    I hope to help.
    Edited by: sfdgd on Apr 1, 2009 6:40 PM

  • Very simple XML question

    1. I have a simple table with a clob to store an unlimited number of contacts as follows ....
    CREATE TABLE MY_CONTACT (USER_id NUMBER, All_Contacts SYS.XMLTYPE );
    2. I inserted 1 user with 2 contacts as follows :
    INSERT INTO MY_CONTACT
    VALUES(1, sys.XMLType.createXML('<?xml version="1.0"?>
    <CONTACT>
    <CONTACTID ID="1">
    <FNAME>John</FNAME>
    <MI>J</MI>
    <LNAME>Doe</LNAME>
    <RELATIONSHIP> </RELATIONSHIP>
    <ADDRESS>
    <STREET>1033, Main Street</STREET>
    <CITY>Boston</CITY>
    <STATE>MA</STATE>
    <ZIPCODE>02118</ZIPCODE>
    </ADDRESS>
    </CONTACTID>
    <CONTACTID ID="2">
    <FNAME>Carl</FNAME>
    <MI>J</MI>
    <LNAME>Davis</LNAME>
    <RELATIONSHIP>Son</RELATIONSHIP>
    <ADDRESS>
    <STREET>1033, Main Street</STREET>
    <CITY>San Francisco</CITY>
    <STATE>CA</STATE>
    <ZIPCODE>06456</ZIPCODE>
    </ADDRESS>
    </CONTACTID>
    </CONTACT>'));
    --- 1 row inserted .
    I have the the following issues :
    3. When I run the following :
    select A.All_Contacts.extract('/CONTACT/CONTACTID/@ID').getnumberval() ID,
    A.All_Contacts.extract('/CONTACT/CONTACTID/FNAME/text()').getstringval() FNAME,
    A.All_Contacts.extract('/CONTACT/CONTACTID/LNAME/text()').getstringval() LNAME
    from MY_CONTACT A ;
    I was hoping this query would return :
    ID FNAME
    1 John
    2 Carl
    But instead, I am getting : .... How do I fix the query to get the results I am looking for ( above) ?
    ID FNAME
    12 JohnCarl
    4. I have another query :
    select A.All_Contacts.extract('/CONTACT/CONTACTID/@ID').getnumberval() ID,
    A.All_Contacts.extract('/CONTACT/CONTACTID/FNAME/text()').getstringval() FNAME,
    A.All_Contacts.extract('/CONTACT/CONTACTID/LNAME/text()').getstringval() LNAME
    from MY_CONTACT A
    where
    A.All_Contacts.extract('/CONTACT/CONTACTID/@ID').getstringval() = 1;
    that returns no rows at all !!!
    How do I get the query to return only the first set of values for CONTACTID ID=1 ? :
    ID FNAME
    1 John
    I hope this is easy to fix - my aim is to store up to ten contacts in the clob, but I cant't even get it to work with just 2 contacts ...
    Any help would be greatly appreciated.
    Thanks !!!

    If you are on 10g (I think at least 10.2.x.x) or greater, then you can also use the following. I prefer XMLTable over the table(xmlsequence()) structure.
    SELECT cid, fname, lname
      FROM MY_CONTACT A,
           XMLTABLE('CONTACT/CONTACTID'
                    PASSING A.All_contacts
                    COLUMNS
                    cid    NUMBER PATH '@ID',
                    fname  VARCHAR2(20) PATH 'FNAME',
                    lname  VARCHAR2(20) PATH 'LNAME')
    WHERE cid = 1;
          

  • How to Use NDS Tool and create a very simple application

    Hi All,
      Today i have Installed NDS on my machine,but i dont know
    how to use it,is there any guide inside NDS which gives me step by step procedure to create a simple application.
    Can any link help me know about this.version of NDS is 2.0.9.Is this latest one?
    I am pretty confused about NDS and PDK,if NDS can be used to develop java apllications ,then whats the need of PDK at all?
    Thanks in Advance
    Rani A

    Hi Rani,
      The Portal Development Kit (<b>PDK</b>) provides documentation and examples with source code to demonstrate how to develop portal applications and portal content for the SAP NetWeaver Portal using the <b>SAP NetWeaver Developer Studio</b>.
    PDK includes coding examples on the following topics:
    *Creating Portal Components and Portal Services,Portal Profiles,Resources,Internationalization,Portal Beans,Page Builder,EPCF,Application Integrator,Connector Framework,Portal Navigation,Object Based Navigation,Transformation Service,User Management etc
    PDK is for deployment for portal application, has very good documentation of portal development, contains sample application, Java Docs for all the apis for portal and KM and plugins for eclipse(which you don't need if you are using NWDS). It is basically a nice help for developer along with an iviews for uploading par and testing them.
    In EP 6.0 it is just business package that you import to your portal. This will then give a "java development" role in portal which can be assigned to users. The role will then create a tab called "Java Development" in the top navigation and click on it you can see all the contents underneath.
    If u want to see the application on which an iview is based on import that par file into NWDS.
    Regards,
    Pooja.

  • XSL for a Pie chart with a very simple XML data file

    Hi All
    Using BI Pub Desktop 10.1.3.2.1 with Oracle Apps R12.1.3.
    I am trying to do a pie chart for the below data in an xml file. Normally this is pretty straight forward but with the below simple data structure I am a bit stuck, maybe thinking about it too much. Appreciate any help on what the xsl should like.
    xml file contains only the below. There is no other data in the file.
    <G2>
    <ITEM>ALL</ITEM>
    <AA>10</AA>
    <BB>20</BB>
    <CC>50</CC>
    <DD>30</DD>
    </G2>
    I want to be able to have a pie chart that shows the labels: AA, BB, CC and DD with the corresponding data values of 10,20,50 and 30.
    Thanks for viewing the question.
    Cheers Cel

    Please disregard. i went back to the original blog code and started over, and figured this out.

  • Creating a very simple dice game - help needed

    I have been assigned to create a simple dice game with the result like below :
    Welcome to the Dice game.
    Please answer the following questions with 2-16 characters :
    Whats the name of player 1? a
    wrong format
    Vad heter spelare 1? Duffy
    Vad heter spelare 2? John
    Duffy throws: 6
    John throws: 4
    I have come to the "Duffy throws 6" part and have absolutly no idea how i should continue. I have tried to look up the codes in "API Specification" but found no codes / names with "dice" :)

    I have come to the "Duffy throws 6" part and have
    absolutly no idea how i should continue.How on earth should it continue??? I can't mind read unfortunately.

  • Simple xerces DOMParser.  Why won't this validate? Very simple, xml schema

    I have written a java program called "Validate.java" to validate an xml file. The program uses the xerces DOMParser. When I try and validate a correct .xml file with a correct schema in an .xsd file I get the following errors:
    [Error] Document is invalid: no grammar found. line 2 column 6 - name5.xml
    [Error] Document root element "name", must match DOCTYPE root "null". line 2 column 6 - name5.xmlThe XML file, the XSD file, and the Validate.java program are all in the same directory. My CLASSPATH includes xml-apis.jar, xercesImpl.jar, and xercesSamples.jar.
    Here is the xml file (name5.xml):
    <?xml version="1.0"?>
    <name
        xmlns="http://www.myOwnURL.net/name"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.myOwnURL.net/name name5.xsd"
        title="Mr.">
      <first>John</first>
      <middle>Fitzgerald</middle>
      <last>Doe</last>
    </name>(I saved the file in the UTF-8 encoding, which causes it to look double spaced in some text editors.)
    The schema is in the following xsd file (name5.xsd):
    <?xml version="1.0"?>
    <schema
        xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://www.myOwnURL.net/name"
        xmlns:target="http://www.myOwnURL.net/name"
        elementFormDefault="qualified">
      <element name="name">
        <complexType>
          <sequence>
            <element name="first" type="string"/>
            <element name="middle" type="string"/>
            <element name="last" type="string"/>
          </sequence>
          <attribute name="title" type="string"/>
        </complexType>
      </element>
    </schema>(Again, the file is saved in UTF-8 format.)
    Here is the code for Validate.java:
    public class Validate implements org.xml.sax.ErrorHandler
        private String instance = null;
        private int warnings = 0;
        private int errors = 0;
        private int fatalErrors = 0;
        private org.apache.xerces.parsers.DOMParser parser = new org.apache.xerces.parsers.DOMParser();
        public Validate() // constructor
            parser.setErrorHandler(this); // Set the errorHandler
        public void setInstance(String s)
            instance = s;
        public boolean doValidate()
            try
                warnings = 0;
                errors = 0;
                fatalErrors = 0;
                try
                    // Turn the validation feature on
                    parser.setFeature( "http://xml.org/sax/features/validation", true);
                    // Parse and validate
                    System.out.println("Validating source document...");
                    parser.parse(instance);
                    // We parsed... let's give some summary info of what we did
                    System.out.println("\nComplete " + warnings + " warnings " + errors + " errors " + fatalErrors + " fatal errors");
                    // Return true if we made it this far with no errors
                    return ((errors == 0) && (fatalErrors == 0));
                catch (org.xml.sax.SAXException e)
                    System.err.println("\nCould not activate validation features - " + e.getMessage());
                    return false;
            catch (Exception e)
                System.err.println("\n"+e.getMessage());
                return false;
        public void warning(org.xml.sax.SAXParseException ex)
            System.err.println("\n[Warning] " + ex.getMessage() + " line " + ex.getLineNumber()
            + " column " + ex.getColumnNumber() + " - " + instance);
            warnings++;
        public void error(org.xml.sax.SAXParseException ex)
            System.err.println("\n[Error] " + ex.getMessage() + " line " + ex.getLineNumber()
            + " column " + ex.getColumnNumber() + " - " + instance);
            errors++;
        public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
            System.err.println("\n[Fatal Error] " + ex.getMessage() + " line " + ex.getLineNumber()
            + " column " + ex.getColumnNumber() + " - " + instance);
            fatalErrors++;
            throw ex;
        public static void main(String[] args)
            Validate validate1 = new Validate();
            if (args.length == 0)
                System.out.println("Usage : java Validate <instance>");
                return;
            // Set the instance
            if (args.length >= 1) validate1.setInstance(args[0]);
            // Validate (the doValidate returns either true or false depending on
            // whether there were any errors.)
            if (!validate1.doValidate()) return;
    }My question is: why do I get those errors??? Why doesn't everything just validate like it is supposed to??? Also, why does the error even mention DOCTYPE -- I thought that was for DTDs, and I am using XML Schema.
    I will be very grateful to anyone who can tell me what is going on here.
    Thanks,
    Jon

    I have solved my problem. I just needed to add the following line to my java program:
    parser.setFeature("http://apache.org/xml/features/validation/schema", true);I'm still not sure how I was supposed to know this, however. I guess spending three hours searching on google is what you are supposed to do. Also, I was thrown for a bit of a loop by the following official faq found at http://xml.apache.org/xerces2-j/faq-pcfp.html:
    [faq]
    Question: How can I tell the parser to validate against XML Schema and not to report DTD validation errors?
    Answer: Currently this is impossible. We hope that JAXP 1.2 will provide this capability via its schema language property. Otherwise, we might introduce a Xerces language property that will allow specifying the language against which validation will occur.
    [faq]
    I am very new to XML (less than a week), but that FAQ sure makes it sound like using only XML Schema and completely avoiding DTDs is impossible. On the other hand, I think that is what I was able to achieve by adding the above line to my code.
    Oh well.
    Jon

  • Very simple EJB 3.0 MDB but I get NullPointerException

    I tried to create a very simple EJB 3.0 Message Driven Bean in JDeveloper 10.1.3.2 as follows:
    Message Driven Bean Class:
    import javax.ejb.MessageDriven;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    @MessageDriven(mappedName="MDBQueue")
    public class MDB implements MessageListener {
    public void onMessage(Message message) {
    System.out.println("Got message!");
    Application Client:
    import javax.annotation.Resource;
    import javax.jms.*;
    public class MDBAppClient {
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;
    public static void main(String args[]) {
    try {
    QueueConnection queueCon = queueCF.createQueueConnection();
    QueueSession queueSession = queueCon.createQueueSession
    (false, Session.AUTO_ACKNOWLEDGE);
    QueueSender queueSender = queueSession.createSender(null);
    TextMessage msg = queueSession.createTextMessage("hello");
    queueSender.send(mdbQueue, msg);
    System.out.println("Sent message to MDB");
    queueCon.close();
    } catch(Exception e) {
    e.printStackTrace();
    But I get the following error:
    java.lang.NullPointerException
         at model.MDBAppClient.main(MDBAppClient.java:17)
    I read similar problem in the this thread:
    Re: message driven bean on ejb 3.0 does not work
    some one said that the version in ejb-jar.xml must be changed from 2.1 to 3.0
    but in this case there is no ejb-jar.xml.
    ( I have other cases with ejb-jar.xml file but I can't change the version in ejb-jar.xml)
    the version in web.xml is 2.4 but it not accept any value except 2.4 and an error occur when I tried to change it to 3.0
    please can you tell me why I get NullPointerException and how can I allow EJB 3.0 MDB and JMS to work in JDeveloper

    Note that you can't run MDBs in the embedded OC4J in JDeveloper - try deploying to a stand-alone install of OC4J and see if it works there.

  • Very simple mp3 player

    What is an easy way to create a very simple flash mp3 player
    in DW CS3? I
    tried the DW mp3 plugin, but that caused confusion for
    visitors who did not
    know how or want to install a plugin. I googled "flash mp3
    player" and
    there are many available, but they support play lists and
    many other
    features. I just want to play one static mp3 url and have
    Quicktime-like
    controls of play, pause, rewind, etc. Any suggestions or
    tutorials on how
    to do this? If there is a simple tutorial on how to roll your
    own in Flash,
    I have Master Collection which includes Flash.
    Best,
    Christopher

    I spent a couple of days reviewing various flash mp3 players
    on the net and
    decided to use SoundPlayer from FlashLoaded.com. For $35 it
    works OK. But
    here's my question. Why doesn't DW CS3 include a flash mp3
    player component
    similar to the flv player? Or did I miss it? Yes, I know the
    generic
    plugin can be used, but that requires visitors to install an
    additional
    plugin. Adding mp3 players to web pages would seem like a
    common problem in
    search of a simple solution in DW; why isn't a flash solution
    included with
    DW CS3 and/or Flash CS3? Am I missing something? This was my
    first Flash
    project, so perhaps I overlooked the obvious.
    Best,
    Christopher

  • Need help with a very simple example.  Trying to reference a value

    Im very new to Sql Load and have created this very simple example of what I need to do.
    I just want to reference the ID column from one table to be inserted into another table as DEV_ID.
    Below are my: 1) Control File, 2) Datafile, 3) Table Description, 4) Table Description
    1) CONTROL FILE:
    LOAD DATA
    INFILE 'test.dat'
    APPEND
    INTO TABLE p_ports
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    DEV_id REF(CONSTANT 'P_DEVICES',NAME),
    NAME FILLER ,
    PORT_NO
    2) DATAFILE:
    COMM881-0326ES09,6
    3) TABLE DESCRIPTION:
    SQL> describe p_ports
    Name Null? Type
    ID NOT NULL NUMBER(10)
    DEV_ID NOT NULL NUMBER(10)
    PORT_NO     NUMBER(3)

    hi,
    i managed to do this for my app. (think i referred to viewTransitions sample code and modified quite a bit)
    i can't remember this well cos i did this quite a while back, but i will try to help as much as possible
    1) from the appdelegate i initialize a root controller (view controller class)
    2) this root controller actually contains two other view controllers, let's call it viewAController and viewBController, for the screens which u are going to toggle in between. and there's also a function, let's call it toggleMenu, which will set the menus to and fro. i copied this whole chunk from the sample code. it actually defines the code on what to do, i.e. if current view is A switch to B and vice versa.
    3) inside the controller files, you need to implement the toggleMenu function too, which basically calls the rootController's toggleMenu
    4) we also need viewA and viewB files(view class)
    5) need to add the .xib files for the respective views and link them up to the controller class. i did not use the .xib files for ui layout though, because of my app's needs. however, it will not work properly without the .xib files.
    5) inside the view class of both views, i.e. viewA.m and viewB.m, you need to create a button, that will call the toggleMenu function inside the respective controller class.
    it will look something like this:
    [Button addTarget:ViewAController action:@selector(toggleMenu:) forControlEvents:UIControlEventTouchUpInside];
    so the flow is really button (in view)-> toggleMenu(viewController) -> toggleMenu(rootController)
    i'm sorry it sounds pretty hazy, i did this part weeks before and can't really remember. i hope it helps.

  • A very very very simple question

    Hi guys,
    I have a very simple question and standard but I cant find anywhere...
    I have two dateTime variables, i need to calculate difference between this dates in days, thats it.
    I tried all functions and tried without success a Java Embed task but I couldnt retrieve this objects as java.util.Date so I couldnt calculate exactly the difference in days like this pure java code:
    (dataVencimento.getTime() - dataReferencia.getTime()) / 86400000L)
    can you help me this?

    Hi Jose
    Just see if these alternate approaches works. I know there may be lot like this and you may be lucky to find out simple out of box solution itself. If you want to solve this issue and move ahead, gives these approaches a shot.
    1. Create a very simple standalone WebService that takes 2 input date elements (can be of Date type or String type. If string type, convert to date in your java code). Create a simple operation like getDaysBetween(firstDate, secondDate). In the generated webservice impl class, use the java code apis (refer earlier link for usage), and get the difference. Return this value. NOW, invoke this WebService in your BPEL Process, and pass your 2 inputs (if the bpel payload elemetns are date object or string objects of date), and get output, and then use this output in your continuing bpel process.
    2. This approach, I did a long back. When we insert any expression using XPath, in that editor window on bottom right side, we see many categories and for each category we see list of functions we can use, like for String, we can use concat etc. I vaguely remember reading somewhere, that we can add our own custom functions also in this section. So explore this direction and see if you can add your own function and then use that fucntion with your 2 input dates.
    I have not given solution to your problem, but may be these directions can help you move ahead. Or something along these lines.
    Thanks
    Ravi Jegga

  • Very simple html5 quiz runs very slow on android 4

    I created a very simple 10 question, no pictures, no transitions, and no audio (which I can't get to work anyway when exported as html5 for android) html5 app built with phonegap.  I tried everything that was suggested by other developers, and I can't get a simple quiz to run even with a poor framerate.   I get about 5 to 10 fps. 
    Has anybody successfully built an APP that runs OK on Androids running KitKat?
    Thanks

    I'd recommend profiling the application with Adobe Scout to see what's going on, then optimizing based on those results.
    http://gaming.adobe.com/technologies/scout/

Maybe you are looking for

  • Songs do not show up in Match? Baffled...??

    I joined Match and ran through the upload process, only to have my purchased music (2500 songs) be the only thing that shows up. None of my other music- some 70 gigs- apears. No idea what to do. Every time i hit UPDATE MATCH it says it's up to date. 

  • So what exactly does it take to qualify a phone as "Certified Like-New"?

    ...verify the phone turns on and then ship it out? I've had a Droid since launch...its been in a case and screen protector since day one and I take pride in keeping it (and all my other electronics) in mint condition. When I installed 2.2 last month,

  • Dynamic Configuration of File Adapter

    Hi, XI Version 3.0 SP13, Planning to upgrade to SP14 In my scenario I need to pick up files from 4 static locations and based on the file name and pick up type(file/ftp) I can find out the destination's connectivity information from a Cross-Referenci

  • Problem in calling FBL3N and passing Dynamic Selection Screen Parameters

    Hi Experts, I am calling the standard report FBL3N in one of my reports using Submit. I am passing the GLcode, Company code and Open at key Date in the selection screen. Now my requirement is that I need to pass the Posting Key as '40' in my report.

  • Wrong sorting of events

    I have several Events called ! Event 1 and ! Event 2 and so on... (That these are on top when sorting via names). No problem with iPhoto 09, but iPhoto 11 has wrong sorting, even when i sort it via names. Some ! Event x are in the beginning, then som