CustomDataTip function in Main application....

Hi,
I have one main application and one custom component..In custom component i have pie chart..I want to write the custom datatip function in main application and call this custom data tip function in custom component in pie chart's dataTipFunction..How can this be done???
Thanks,
Vibhuti

I would put a dataTipFunction variable on the custom component and bind the chart’s dataTipFunction to it.

Similar Messages

  • Calling a method in a component from main application

    Hi,
    I have a mxml component( menu1.mxml) . In the menu1.mxml
    there is a include for the actionscript file(menu1.as). In the main
    application page(SampleLogin.mxml) I want to call the method in the
    btnSubmit_Click() on the saveIndex() method for case 0. I am
    attaching all the code below

    case 0:
    menuOne.btnSubmit_Click( );
    break;
    Also it would probably be following best practices to used a
    custom event to pass the information in your "LoginButton_Click()"
    function to the application.

  • How to access the function in loaded application using swfloader?

    Hi,
    I have a main flex application which has a view stack, panel
    and swfloader in the below hierarchy.
    Flex main app --> Canvas1(Viewstack) --> Panel1 -->
    Swfloader
    Please view
    http://www.probe7.com/flex_ques.gif
    for better understanding.
    I have a function in the loaded application which has to be
    called from a function within the main application. I am not sure
    of the syntax to access the swfloader content which is placed in a
    canvas -> panel.
    I tried this example (
    http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html),
    it works when the swfloader is placed in the main application
    without the viewstack or panel. How can I do this, Is there a way
    to access all the running applictaions, regardless of the
    hierarchy? Any help will be greatly appreciated.
    Also any links for quick reference on various components and
    their access will be helpful.
    Thanks for your time.

    You are probably seeing the deferred instantiation behavior
    which is the default for ViewStack.
    The Swfloader component does not exist until a user navigates
    to the View that contains it.
    Use events to determine when the swfloader content is ready
    for interaction. Here is an example:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=690
    Tracy

  • Calling a function in main mxml  file from a component

    I have a main mxml file for an application.
    Within that file I have a viewStack with 3 components which
    are in separate mxml files.
    I have a function written in Action Script in the main
    application that I want to call from the 3 components.
    How is this done?
    Ta
    Mike

    Thanks for the help. I got it working using ntsiii's method
    (which is more straight forward but maybe not good practice?)
    though the line
    private var _appMain:Application = Application.application
    gave me the error message:
    1118: Implicit coercion of a value with static type Object to
    a possibly unrelated type mx.core:Application.
    So i changed it to:
    private var _appMain:* = Application.application
    Which made it work, I don't really understand why.
    Thanks
    Mike

  • Calling a function in the application

    Whats the best way to call a function that is in the main application file from a custom component that is nested several layers down
    thanks

    Try to use FlexGlobals.topLevelApplication

  • Show component from main application mxml.

    Hi all,
         I have a main application mxml and inside has a button named show_form. After that, I design an form named Form_A. And now, I want when click on show_form button fire the Form_A and made it appear.
         Hown can I do this ?
         Thanks !

    There are many ways of doings this, it depends how your forms are shown.
    Are they in a ViewStack or similar container? If so just change the view from the click handler function for the button.
    If they are in a Canvas/HBox/VBox, in the click handler function of the button you can do a check like if Form_A.visible==true then submit it and hide it, else submit the other form. You can also have a variable that tracks if Form_A was submitted.
    If you have code, post it here and we can find the best solution with a clear example in front.

  • Load/Unload Component from Main Application

    I want to load in my main application 2 components. At this moment I load them with this:
    <components:loadProject id="loadPrj" visible="false" click="loadPrj_clickHandler(event)" verticalCenter="7" horizontalCenter="0"/>
    and I only set visible to true. Inside this component there is a canvas.
    But, is there any other way to do this using an AS class file? I would like to load/unload it on click, not only set true/false to visible.

    For dynamic creation and destruction of objects, you want to use ActionScript.
    So in your main app file, you might have a button that triggers a click handler that does this:
    private function myClickHandler()void {
                    var b1:CustomComponent = new CustomComponent();
                    var b2:CustomComponent = new CustomComponent();
                    /// Be sure to add them to the display list if they are visual components
                    myPanel.addElement(b1);
                    myPanel.addElement(b1);

  • Run External application without Exiting main application

    Hi,
    I am trying to implement a function that executes the external program from within my java application. I am using windows xp. I had googled for this and found some code but so far I am able to run the application in a condition if my main application exits. Instead I want to run the application without exiting my main application. How can I do that:
    Code I am using is:
    ========================
    try{
    Runtime.getRuntime().exec("external program");
    System.exit(0);
    catch (Exception err){
    err.printStackTrace();
    System.exit(-1);
    =========================
    my problem is I cannot run the external program without the line "System.exit(0)". If I remove that line, the external program only starts after I exit my main java application. Is there a way to run the external application without leaving the main application?
    By the way I am using the latest version of JDK 6 update 2 and Netbeans 5.5.1
    Thanks

    I tried and I tried and I couldn't make the same problem occur unless I specfically had a long task execute BEFORE calling the runtime command. See the code below:
    I tried a bunch of things, including having a GUI run before the Runtime call, after the runtime call. Neither affected the movie from being played.
    I tried with different versions of the runtime command, none of it made a problem.
    I tried running the application with a long task that would keep the main thread busy for a while AFTER I launched mplayer - no problem.
    The only thing that made the app work the way you describe was when I built the long task that keeps the main thread active for a while BEFORE I launched mplayer (which is the state of the code as I pasted it below).
    So my guess is that you have a single threaded application and you add the call to mplayer at the very end of your program's execution - thus it doesn't get called until the last thing. My suggestions:
    1) Move the call to the Start of your code, not the end
    2) Move your other work to a new thread so that it can be kicked off without holding the main thread in check.
    package movies;
    import inheritance.BaseWindow;
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        OutputStream os;
        StreamGobbler(InputStream is, String type)
            this(is, type, null);
        StreamGobbler(InputStream is, String type, OutputStream redirect)
            this.is = is;
            this.type = type;
            this.os = redirect;
        public void run()
            try
                PrintWriter pw = null;
                if (os != null)
                    pw = new PrintWriter(os);
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    if (pw != null)
                        pw.println(line);
                    System.out.println(type + ">" + line);   
                if (pw != null)
                    pw.flush();
            } catch (IOException ioe)
                ioe.printStackTrace(); 
    public class MyMainClass
        public static void main(String args[]) throws InterruptedException
             //This is just a GUI as a test
            BaseWindow bw = new BaseWindow();
            bw.show();
            //Keep App Running for a while
            int count = 0;
            while (count < 200) {
                 Thread.sleep(20);
                 count++;
                 System.err.println(count);
            if (args.length != 1)
                System.out.println("USAGE java movies.MyMainClass \"<movie to play>\"");
                System.exit(1);
            try
                Runtime rt = Runtime.getRuntime();
                //String[] cmds = new String[] { "cmd", "/c", "C:\\Mplayer\\mplayer.exe", args[0]};
                //String[] cmds = new String[] { "C:\\Mplayer\\mplayer.exe", args[0]};
                //Process proc = rt.exec(cmds);
                Process proc = rt.exec("C:\\Mplayer\\mplayer.exe "+args[0]);
                // any error message?
                StreamGobbler errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERROR");           
                // any output?
                StreamGobbler outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUTPUT");
                // kick them off
                errorGobbler.start();
                outputGobbler.start();
                //Keep App Running for a while
    //            int count = 0;
    //          while (count < 2000000) {
    //                 Thread.sleep(200);
    //                 count++;
    //                 System.err.println(count);
                // any error???
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);
            } catch (Throwable t)
                t.printStackTrace();
    }I will restate myself:
    "I was not able to repeat the problem, except as described, as long as I took the hints mentioned in the article I posted into account and actually put them into action."
    Of course, as soon as I ignored those hints, I was able to reproduce the error described above quite easily in all the different tests I made... But I guess the OP implemented those fixes, right? He did say he read the article...
    Message was edited by:
    stevejluke

  • Close Window (main application) in 2004s

    Hi,
    I have a webdynpro application (developed in 2004s)  where I have a close button. When user clicks close button, I simply need to close the browser.
    I tried using javascript:void(window.close())" as exit plug parameter from interface view still throws me an exception  com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Invalid URL=javascript:void(window.close())
    Is there any way to close the main application window.
    Thanks for your time and help.
    Best Regards,
    Shiva

    Hi,
    Go thru the below steps. Here u need to create a html file to close the main window.
    1. In your component's interface view, create an exit plug. Name it as - ExitPlug.It's type as "Exit".
    2. Create a paramater for this exit plug. Name this parameter "Url". It should be exactly like the same name.
    3. In your view add the interface view as a required controller.
    4. Create your HTML file. Let's say you call it Static.html.
    <html>
    <head>
    <script langauage="javascript">
    function closeWin(){                    window.close();     
    </script>
    </head>
    <body onload="javascript:closeWin();">     </body></html>
    5. Save this in the mimes folder for your DC under your package. You do this from the navigator view.
    6. Now use the following code:
    try {String url = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"Static.html");wdThis.wdGet<your component name>InterfaceViewController().wdFirePlugExitPlug(url);} catch (WDURLException e) {}
    For more information go thru Re: JavaScript in WD link.

  • HTMLLoader, main application window and scrollbars

    If I instantiate HTMLLoader with "new HTMLLoader.createRootWindow()," scrollbars show up correctly when text overflows the set width and height. I can add it to the stage, but I'm still left with an empty popped up native window
    If I instantiate HTMLLoader with simply "new HTMLLoader()," you can add it to the stage, but it doesn't include scrollbars when the window overflows with text.
    What I want to do is incredibly simple - create a new HTMLLoader instance, have as part of my main application's stage, and get the benefit of the built-in scrollbars.  Why is that so difficult?

    OK - my problem with the HTML Control is I can't seem to add it to a child custom class.
    i.e. - I have my main Air app and a custom class extending UIComponent. I add the custom class to the stage in the main app, and in the custom class, add an HTML Control.  I'm also adding a different HTML Control to the main app.
    Only the HTML in the main app actually shows up. No errors given. What am I missing here?
    Main Air app mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.HTML;
    var _myComp:Comp;
    private function init():void {
    _myComp = new Comp();
    _myComp.init();
    _myComp.x = 200;
    _myComp.y = 200;
    addChild(_myComp)
    var html:HTML = new HTML();
    html.htmlText = "Text on main application window"
    addChild(html);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>
    Comp Class:
    package {
    import flash.display.Shape;
    import mx.controls.HTML;
    import mx.core.UIComponent;
    public class Comp extends UIComponent {
    public function Comp() {
    public function init():void {
    var shape:Shape = new Shape()
    shape.graphics.beginFill(0,1)
    shape.graphics.drawRect(0,0,200,400);
    shape.graphics.endFill();
    addChild(shape)
    var html:HTML = new HTML();
    html.htmlText = "Text Inside child component";
    html.x = 200
    this.addChild(html);
    trace(html.htmlText)

  • Dynamically loading functionality to an application

    Hello, [first time post]
    My goal is to find, if possible, a solution to my desire.
    I have an application, called App. This application will perform certain algorithms on a test set. I would like to have a way to dynamically add new algorithms to the application without re-compiling the application. For example the main application code would look something like:
    LoadAllAlgorithmsInDiry('./Algorithms');
    At which point the function would:
    Menu aMenu.GetAlgorithmMenu();
    aMenu.add(newAlgorithmItem);
    My problem lies in the fact that I don't know if RMI, is what I need, or some other API.
    Should each algorithm be its own application? Or can I simply create a class with a standard API for the application?
    Any help in this matter would be appreciated.

    Let's clarify a bit..Minor mistakes aside, thank you for the clarification.
    I stumbled upon this thread since I'm doing something similar.
    My question is... Is there a "tidy" way to arrive at a list of Algorithm implementations in a given folder/directory?
    ie I would like the users of my app to be able to drop various class files, java files and jar files (containing one or more java/class files) in a predetermined folder. Each giving a unique Algorithm implmentation. Then when the app is started up it would search for all the user-defined classes and add them to a menu or something like your example suggested.

  • I want to do "Invite Friends" functionality in my application.

    Hi,
    I want to do "Invite Friends" functionality in my application.
    My requirement is like for the particular user([email protected]), i neet get a contacts list associated in gmail account.
    So i need to connect to gmail internally and i need to display the contact list of the user([email protected]) in my appllication.
    I need to do it for Yahoo mail also.
    Any API?.
    I got "jgmail" and "g4j" API but there is no documentation or examples to do.
    Please help me out.
    Thanks in advance,
    Prasad.

    I got a solution.
    We found one service provider(*Plaxo*) giving user contact infirmation.
    Plaxo providing a free service.
    U can reach the Plaxo with the follwing Url:
    http://www.plaxo.com/api/widget
    With this my work is done so easily.
    Any querries. I will help U.

  • How can I put my main Application class in a package?

    Hello,
    I would like to put my main Application class for my air app inside a package. If I create a regular FLX application, this works fine. In that case I just move the application file created into a packade and change the run/debug settings. This does not work for an Air app however, when I try I first get the error:
    Adobe AIR application is missing the corresponding MyApp-app.xml
    So I move the MyApp-app.xml into the same package, then I get:
    Unknown error generating output application.xml files. Check the Eclipse error log for more details.
    Is it possible to have the man Application class reside inside a package for air applications?
    Regards,
    Mikael

    Hi Mikael,
    I ran into the same result as you so I asked around and it sounds like this might not be supported.  However, I'd recommend reposting this question over on the Flash Builder forums to see if anyone has found a workaround.
    Please let me know if you're able to resolve this.
    Thanks,
    Chris

  • How to contain a sub-component in the module instead of containing it in the main application

    Hi,
    I've 3 files
    Appln.mxml (application file)  ----  contains main application
    component.mxml (component file)  ----  contains component
    module.mxml (module file)  -----  contains module
    Generally the 'component.mxml' file will get loaded into the 'Appln.mxml' file (i.e., 'Appln.mxml' file will contain the custom component files) and whereas module file will get loaded on-demand.
    So Now instead of containing the data of 'component.mxml' file in the 'Appln.mxml',  I want to contain 'component.mxml' file data in the 'module.mxml' file itself and load the 'component.mxml' when module is loaded on-demand but not when application is loaded. So can any one please suggest me how to do it?
    Thanks in advance..

    Theo--
    You can delete software components & versions from the IR in XI 2.0.  (We're on Service Pack 5, and I've done it to clean up our IR.)
    Here is the process:
    1. Delete all configuration and/or import objects from the SCV.  Don't forget the 2 fault data types that SAP automatically creates in every namespace.
    1a.  Activate all change lists?  I don't remember for certain if this is needed here; if it won't let you save the deleted namespaces in step 2, then do this first.
    2. Double-click on the Software Component Version so that it comes up in the right pane.  Click on the change/edit button.  Delete all the namespaces from the SCV.  Save.
    3. Activate all change lists.  (It won't let you delete the SCV if you have uncommitted changes.)
    4. Open the SCV again (if it's not still open).  On the menu at the top of the right pane, go to Software Component Version...Delete.  You may or may not have to activate changes again.
    If I remember right, the software component will disappear automatically with the deletion of the last version.
    Hope this helps!
    --Dan King
    Capgemini

  • How to set the value of something in a component from the main application?

    Hi,
    Maybe I've been working on this too long, but I can't figure
    out how to set the value of the text property of a text input field
    in a component from my main application in an mx:Script block. I
    have a component called Login in the components folder, and I need
    to set the text value of empNum. In my mxml declaration at that the
    top, I've declared these components as xmlns:c="components.*" So
    logically, the property I'm trying to set is c.Login.empNum.text. I
    can't figure out the correct syntax to get this to work, and I've
    tried everything I can think of. Does anyone have any suggestions?
    I'm thinking this should be an easy one, and I'm just missing
    something.
    Thanks!
    Holli

    Did you try giving it an id ?
    <c:MyLogin id="loginScreen" /c>
    So later you can do loginScreen .empNum.text = "my text"
    Laurent,

Maybe you are looking for