How to access a function in a tabnavigator container?

I have a tabNavigator container that I create the tabs using
the following code:
var tabFieldsBase1:Canvas = new Canvas();
var _userFields:userFields = new userFields;
tabFieldsBase1.label = "User Fields";
_userFields.id = "userFields";
tabFieldsBase1.addChild(_userFields);
tabHolder.addChild(tabFieldsBase1);
inside the tabed document/class I have a function/method
named: startMeUp(). How can I call this function in the currently
active tabed class using AS3 in my app?
I've tried many ways including: var testTemp:Object =
tabHolder.selectedChild.getChildAt(0);
testTemp.startMeUp();
userFields.startMeUp();
Thanks for the help;
Carlos

Thanks Tracy for your input, I think my problem is
understanding Flex 2 scopes properly.
I'm under the impression that when you create an mxml file
compoenent that Flex 2 converts that into an AS2 class, but I guess
not.
I solved this situation by using Actionscript 3 classes to
build my tabs. Now when my main form changes I'm able to
automatically synchronize the displayed tab by calling a method in
the class.
Thanks!!
Carlos

Similar Messages

  • How to access a function of PopupWindow from a Main file

    Hello All,
    I have a function in a PopupWindow. I want to access that function from another file. Can someone help me in this respect.
    Thanks in Advance,
    Nirmal Kumar Bhogadi.

    Hi,
    Try this,
        var popupdisplay:YourpopupName=new YourPopUpName();
    popupdisplay.YourfunctionName from Popupwindow
    PopUpManager.addPopUp(popupdisplay,this,true);
    Thanks
    Jayagopal.

  • 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

  • How to access a function of an object from another object

    Hi all, here's my problem, I have three classes;
    1)Class human
    2)Class animal
    3)Class environment
    class environment
      public static void main(String[] args)
        human luffy = new human();
        animal chpper = new animal();
    class human
       // here I wanna access a method in chpper,
       // what's the best way to day that?
       // and is it even possible with this structure??
    }Thanks
    Roronoa Zoro
    Edited by: Roronoa.Zoro on Nov 19, 2009 6:55 PM
    Edited by: Roronoa.Zoro on Nov 19, 2009 6:55 PM
    Edited by: Roronoa.Zoro on Nov 19, 2009 6:56 PM

    Alright guyz, I guess I'm super stupid but please stay with me.
    Here's the whole problem; I'm writing an application that draws rectangles, so this application is a JPanel that has a layout which has two JPanels, first JPanel contains the JButtons and an ActionPerformed function, and the second JPanel has the canvas that I should draw on.
    Here's the whole code;
    public class animationAll extends JPanel
         public animationAll()
              this.setLayout(new BorderLayout());
                     this.add(new animationButtons(), BorderLayout.WEST);
                     this.add(new animationCanvas(), BorderLayout.CENTER);
    public class animationButtons extends JPanel implements ActionListener
      JButton btnCreate = new JButton("Create");
      public animationButtons()
        JButton btnCreate= new JButton("Create");
        btnCreate.addActionListener(this);
        public void actionPerformed(ActionEvent e)
           if(e.getSource() == btnCreate)
                 //here I want to call the draw method in animationCanvas.
    } Thank you in advance, and please bare with me on this one
    Roronoa Zoro

  • How to access the function which saves passwords so that I can save passwords to all the sites and not just the random ones that Firfox asks about?

    Sometimes the question comes up of the top of the screen" do you want to save this password" which is great. But it does not always come up...this is the problem. I can't seem to locate where to find this application? Can you help?

    Saved Password Editor extension has a feature that allows you to add passwords / usernames to Firefox manually. <br />
    https://addons.mozilla.org/en-US/firefox/addon/60265

  • How to access function from Top Class to Function of class that contain the the member variable of TopClass

    Dear All,
    is there any way that i can access function or member variable of aggregate class.
    i am working in Visual Studio 2010 
    and making win32 dll with mfc Support. i am new in dll system. just learning and doing.
    previously all in exe and i am working this like
    CTestDoc*pDoc = (CTestDoc*)GetTestDocument();
    somevar = pDoc->xDoc.mVar.GetValue (); 
    now i am trying to put all in dll. so getting problem 
    will i get help on this. thanks in advance.
    below code is just an example.
    for example
    // dll 1
    class aaa : public BaseClass
    public:
    int Index;
    char *cName;
    void doSometing()
    if (GetCurBColor() == 125) // how to access GetCurBColor function of the
    color = GetCurBColor();
    long color;
    // dll 2
    class bbb :public BaseClass
    public:
    int Index;
    long lSize;
    long color;
    void doSometing();
    // dll 3
    class DDD
    public:
    vector <aaa> va;
    vector <bbb> vb;
    int cura;
    int curb;
    long GetCurBColor ()
    return vb[curb].color;
    };// MFC doc/view support
    /// in exe in document
    class inExe
    public:
    DDD d;
    void addB()
    { bbb bb;
    bb.color = 152;
    d.vb.push_back(bb);
    bb.color = 122;
    d.vb.push_back(bb);
    bb.color = 1232;
    d.vb.push_back(bb);
    d.curb = 1;
    void addA()
    { aaa aa;
    aa.color = 152;
    d.va.push_back(aa);
    aa.color = 1232;
    d.va.push_back(aa);
    aa.color = 1542;
    d.va.push_back(aa);
    aa.color = 15;
    d.va.push_back(aa);
    d.cura = 2;
    d.va [1].doSometing ();

    Dear All,
    is there any way that i can access function or member variable of aggregate class.
    i am working in Visual Studio 2010
    and making win32 dll with mfc Support. i am new in dll system. just learning and doing.
    previously all in exe and i am working this like
    CTestDoc*pDoc = (CTestDoc*)GetTestDocument();
    somevar = pDoc->xDoc.mVar.GetValue ();
    now i am trying to put all in dll. so getting problem
    What problem?
    The rules of C++ do not change because some of the code ins in a DLL. But the classes in a DLL need to be exported. See for example
    https://msdn.microsoft.com/en-us/library/81h27t8c.aspx
    You should also supply a macro so that the class header can be used in both the DLL and the client. See for example
    http://stackoverflow.com/questions/14980649/macro-for-dllexport-dllimport-switch
    If  you exchange memory between the DLL and the client (as your example will do, because of the std::vector content), you should also be sure to use the same version of the compiler for each module, and to dynamically link to the CRT.
    I would also advise you to start with a less complicated scenario, with just one DLL.
    David Wilkinson | Visual C++ MVP

  • How to access reference data in BPS Exit Function

    Hi Experts,
    Can any please tell me how to access reference data in BPS Exit function. I am creating a copy function using ABAP Exit Function (Std copy and fox formula doesn't work for my requirement).
    Please suggest,
    Thanks in advance,
    Shiwesh

    Hi Deepti,
    Thanks a lot for your reply. xth_data contains all the data based on package filteration. Let me explain you,
    Say, I have a characteristic char and whose value is 'A', I want to change it to 'B' in my copy function, while keeping the original record with 'A' as well. So now I want my xth_data to contain two records, one with A and other with 'B'. I mean to say from value is 'A' and to value is 'B'. Now my package contains 'B' (the to value) as the allowed value, but not A because in the package I am setting this using a BPS variable. There are two types of variables, one is to variables other is from variable. There could be two scenarios,
    1. If I set from varibale in the package: if I do so, I will have the data in xth_data containing 'A' as char value. But in this case when I change it to 'B' and try to save both the records, package won't recognize the record with value 'B' and reject it.
    2. If I set to variable in the package: In this case the xth_data itself will not contain anything and I can not loop over xth_data because there is no record with 'B'. Only record available in the system is with 'A' values.
    That is why I am thinking about having reference daya somewhere. I could loop over reference data and then pass it to xth_data. Package will contain to variable so it will allow all my modifications to get saved.
    Thanks and regards,
    Shiwesh

  • How to access Call Back Functions using *.dll in the Labview?

    Hai,
    I am Pavan Ram Kumar Somu.
    I am new to Labview, currently I am working on MVB Interface.
    I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
        1. Pointer Arguments(To which memory it points in Labview)
        2. function pointers Arguments
        3 .pointers in structures and pointer structures in structures and many other data types.
    Please Answer the below queries also:
    1. How to pass pointer arguments to API functions in DLL and how to collect pointer  
        return types from API functions in DLL
    2. How to pass structure arguments to API functions in DLL and how to collect structure
        return types from API functions in DLL
    3. How to use callback functions(nothing but function pointers) in Labview and how to
        collect callback fuctions return types from API functions in DLL
    I need your help while passing these datatypes to API functions in DLL from labview.
    Suggest me if there is any other alternative for implementing this task.
    I am referencing some examples here:
    Examples:
    I)
    Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
    void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
    II) #include <windows.h>
         #include <process.h>
         HANDLE rcvEvent0, rcvEvent1;
    /* Function call*/
    CanGetReceiveEvent(handle[0], &rcvEvent0);
    Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
    With regards
    Pavan Ramu Samu

    "Somu" <[email protected]> wrote in message news:[email protected]...
    Hai,
    I am Pavan Ram Kumar Somu.
    &nbsp;
    I am new to Labview, currently I am working on MVB Interface.
    &nbsp;
    I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
    &nbsp;&nbsp;&nbsp; 1. Pointer Arguments(To which memory it points in Labview)
    &nbsp;&nbsp;&nbsp; 2. function pointers Arguments
    &nbsp;&nbsp;&nbsp; 3 .pointers in structures and pointer structures in structures and many other data types.
    &nbsp;
    Please Answer the below queries also:
    &nbsp;
    1. How to pass pointer arguments to API functions in DLL and how to collect pointer&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp; return types from API functions in DLL
    &nbsp;
    2. How to pass structure arguments to API functions in DLL and how to collect structure
    &nbsp;&nbsp;&nbsp; return types from API functions in DLL
    &nbsp;
    3. How to use callback functions(nothing but function pointers) in Labview and how to
    &nbsp;&nbsp;&nbsp; collect callback fuctions return types from API functions in DLL
    &nbsp;
    I need your help while passing these datatypes to API functions in DLL from labview.
    &nbsp;
    Suggest me if there is any other alternative for implementing this task.
    &nbsp;
    &nbsp;
    I am referencing some examples here:
    Examples:
    I)
    Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
    &nbsp;
    void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
    &nbsp;
    II) #include &lt;windows.h&gt;
    &nbsp;&nbsp;&nbsp;&nbsp; #include &lt;process.h&gt;
    &nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp; HANDLE rcvEvent0, rcvEvent1;
    &nbsp;
    /* Function call*/
    CanGetReceiveEvent(handle[0], &amp;rcvEvent0);
    &nbsp;
    Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
    &nbsp;
    With regardsPavan Ramu Samu
    Search the forum (forums.ni.com) for callback, pointer or handle, and you'll find that it is all possible, but not very easy.
    e.g.: http://forums.ni.com/ni/board/message?board.id=170&message.id=88974&requireLogin=False
    Regards,
    Wiebe.

  • [IDOC] How to access IDOC in function module?

    Hey,
    I know how to assign an function module to an incoming IDOC.
    Do I have to define the IDOC as import parameter or how to
    access the data of the IDOC?
    Anyone got a link to a short example?
    regards
    chris

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/03e6e790-0201-0010-9d98-ab8102817a92
    refer section 5.2.2.4

  • How to access Business object type attribute from a method/function modul ?

    Hello,
    i have created a business object type object along with attributes and methods. Now inside the method i want to access the attributes. inside the method i am writing:
    data a type XXX.
    a = me->attribute
    this is creating a compilation error.
    Now the method is defined as a function module in some package, so can anyone inform me how to access object attributes from the function module ?
    pointes are awarded
    Regards

    Hello,
    thanks for your answer, but this too did not work, "=>" is for static attributes and the attributes i have are not static. Moreover, i tried it but it gave the same error :
    the abap error was when i was checking the code is :
    the type me=>documenttype is unknown
    as you know in SWO1 i created an object and when i create a method you link it to a function module and this is where you have the implementation of the method, so from this method how can i access the attributes on the main object that i created in SWO1
    regards

  • How to access the screen from one function group to other function group

    Hi Experts,
    How to access the the screen from one function group to other function group.
    Please help me on this , Bcoz it is client requirement i need to finish this urgently.
    Please
    Thanks
    Basu

    HI ,
    You can do a call transaction or submit and return
    Regards,
    Sooness.

  • How does one access custom function in OBIEE RPD for Session Init Block SQL

    Hello:
    We are using SSO for authentication and authorization for OBIEE, using Init Blocks in the RPD and httpHeader as the source of variables in the Instanceconfig.xml file. (As long as the user is member of one group, the results are fine. However, as soon as the user is assigned to multiple groups, group values become URI-encoded.)
    To solve the problem of URI-encoding, we have deployed a function to the DB (ora 10gr2).
    The problem I am running into is that when I call the function from an Init Block (Security), OBIEE Presentation Services (OPS) acts as though the function does not exist or is not called.
    Initialization String: select group_OBIEE(WEBGROUPS) from dual
    ("group_OBIEE" is the function that was deployed.)
    Testing: Successfully tested the function in PL/SQL as well as using the Test button in RPD.
    Reason for the fuction: The function decodes the extra characters using a substr function. SSO uses Shibboleth for Authentication and Authorization.
    For example, for our group name, we expect to obtain the following value:
    edw:hrdir;edw:findir (2 groups separated by a semi-colon)
    However, we are obtaining the following: (Determined via the narrative view in Answers: @{biServer.variables['NQ_SESSION.GROUP']} )
    URI-ENCODED&lt;edw%3ahrdir%3bedw%3bfindir&gt;
    Please note: There are no such problems when we are passing only a single group value (i.e. edw:hrdir). So, in cases when we pass only for Group for the user, we are able to authenticate and authorize w/o a problem.
    Any suggestion on how to call the function or a better way to approach this problem?
    Thanks in advance for your help.

    You don't need a function to assign the groups in your Init Block. In fact you should not use it. You need to use a standard select and define the Init Block as Row-Wise. This means the BI Server knows the Init Block will return more than one row. You select statement should look like this:
    SELECT 'GROUP', YOUR_GROUP_NAME FROM YOUR GROUP_USERS_TABLE WHERE YOUR_USER_ID_COLUMN = ':USER'

  • How to accessing item renderers in action script??

    Hi
    I am working on itemrenderes in Flex!
    I have link button component as item renderer inside one of the data grid column, please find my piece as below!
    Now how do we make that item render invisible once we click on it!
    We need to make that link button invisible to the user!
    Let me know how to access like this!
    public function onClick():void {
                // we use our custom component as the template for the popup window
                var confirmWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, ConfirmationPopUp, true));
                // you will only need to take care of the yes response since you don't have to do anything
                // if the response was a no
                confirmWindow.addEventListener("selectedYes", function():void {  
                            //Alert.show("Can be Upgraded to an Alarm");
                            upGradeEventToAnAlarm();
                confirmWindow.addEventListener("selectedNo", function():void {         
            public function upGradeEventToAnAlarm():void
                eventRO = new RemoteObject();                  
                      eventRO.destination = "eventBrowser";
                      eventRO.upGradeEventToAlarm.addEventListener("result",getResultHandler);                 
                      eventRO.addEventListener("fault", getFaultHandler);
                      eventRO.upGradeEventToAlarm(eventsDataGrid.selectedItem.id);
            private function getResultHandler(event:ResultEvent):void
                      //eventsDataGrid.dataProvider.removeItemAt(eventsDataGrid.selectedIndex)
                      if(event.result == true)
                       Here I need to access the link button which is clicked and need to make invisible
    Alert.show("Successfully  Upgraded to an alarm");
                      else
                            Alert.show("Cannot be Upgraded to an alarm");  
                //Fault Handler.             
                private function getFaultHandler(event:FaultEvent):void 
                      Alert.show(event.fault.faultString, 'Error');
                ]]>
    </mx:Script>           
          <mx:TabNavigator x="24" y="25" width="95%" height="90%"
                styleName="MyTabNavigator" horizontalGap="-20"  backgroundColor="#e6e4e5">
                <mx:Canvas label="View" width="100%" height="100%" >
                      <mx:DataGrid id="eventsDataGrid" dataProvider="{myModel.eventsList}"
                             height="90%" width="98%" x="10" y="23" >
                      <mx:columns>
                      <!--  <mx:DataGridColumn  id="iconFlagID" headerText="IconFlag"
                                  dataField="iconFlag" visible="false"/>-->
                            <mx:DataGridColumn  headerText="EventID" dataField="id" visible="false"/>
                            <mx:DataGridColumn  headerText="Event Name" dataField="eventName"/>
                            <mx:DataGridColumn  id="catFieldId" headerText="Category"
                                  dataField="category"/>
                            <mx:DataGridColumn  headerText="AlarmName" dataField="alarmName"/>
                            <mx:DataGridColumn  headerText="Severity" dataField="severity"/>
                            <mx:DataGridColumn  headerText="Source" dataField="source"/>
                            <mx:DataGridColumn  headerText="Updated Time" dataField="updateTime"/>
                            <mx:DataGridColumn  headerText="Description" dataField="description"/>
                            <mx:DataGridColumn  id="upgradeLinkButtonId" 
                                  headerText="Upgrade To Alarm" dataField="iconFlag">                          
                            <mx:itemRenderer>
                            <mx:Component>
                    <mx:Box height="100%" width="100%">               
                    <mx:LinkButton id="eventsLinkButtonID" textDecoration="underline"
                                  icon="@Embed(source='assets/eventsBrowser/images[97]1.JPG')"
                                  click="outerDocument.onClick();" visible="{!data.iconFlag}"
                                  textAlign="center" includeInLayout="true">
                    </mx:LinkButton>                                       
                            </mx:Box>
                    </mx:Component>
                    </mx:itemRenderer>
                            </mx:DataGridColumn>
                      </mx:columns>    
                      </mx:DataGrid>
    Thanks in advance
    Aruna.S.N.

    Hi Prashant
    Thanks for your reply!
    But where my viewStack need to be declared??
    Is it inside dataGridColumn if so its giving error as comonent declaration is not allowed here!
    Tell me how to go about!
    Thanks in advance
    Aruna.S.N.

  • Accessing JavaScript function from an Applet?

    Hi,
    I've found how to access an applet's method from Jscript, but can we do the inverse? I'd like to refresh some frames in my web pages from my applet.
    The refresh of several frames could be done with a Jscript function but how can I call it from my applet?
    Thanks!
    Stephane

    actually look at this link to make more sense
    http://www.woodger.ca/jv_jsint.htm

  • AS3: How to access and control embedded sounds in an external swf?

    I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can't seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF.
    It's easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF.
    I read several solutions, but none seem to work.
    I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 import tool and then open the actionscript properties panel on flash to select the class name: SoundSegment1. Then I edit the class code and create a file called SoundSegment1.as and it's saved right next to my document class main.as in the same directory. The code of the SoundSegment1 class looks like this:
    package  {
        import flash.media.*;
        public class SoundSegment1 extends Sound
            public function SoundSegment1 ()
                // no code in here
            public function playSound()
                var soundSegment1:Sound = new SoundSegment1();
                var channel:SoundChannel = soundSegment1.play();
    Then, in my main.as, I have done several attempts to play this sound such as:
    var fileLocation:URLRequest = new URLRequest(SWFToLoad); loader.load(fileLocation); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener); loader.contentLoaderInfo.addEventListener(Event.INIT, initListener); 
    function initListener(e:Event):void // I also placed this code on the completeListener and it didn't work {      loader.content.soundSegment1.playSound(); // doesn't work.  }
    I get:
    Line XXX 1061: Call to a possibly undefined method playSound through a reference with static type flash.display:DisplayObject.
    or, I also read that I should be able to do something like this anywhere in the Main.as file:
    var theClass:Class = Class(loader.content.getDefinitionByName("SoundSegment1")); var theSound:theClass = new theClass(); theSound.play()  //doesn't work either.
    I also tried on the completeListener:
    var TheClass:Class = e.target.applicationDomain.getDefinition("SoundSegment1") as Class; var theSound:TheClass = new TheClass();
    theSound.play()  //doesn't work either.
    I get:
    ReferenceError: Error #1065: Variable SoundSegment1 is not defined. at flash.system::ApplicationDomain/getDefinition()
    I am stuck and I really need to get this to work. I would be genuinely grateful for your help.
    Thank you in advance for any help provided. I really need to get it to work, because I can't simply embed them in the main SWF or load them individually externally one by one.
    Thanks again!

    THANK YOU!
    I think your code may be over my head though. I think you are using an anonymous function which is not something I am familiar with (but I want to learn about if it's useful).
    I also don't know where the classS came from. I see that it's a parameter sent along with the event, but I don't really see where that came from.
    Someone at: http://www.kirupa.com/forum/showthread.php?305098-Playing-a-embedded-sound-in-an-external- swf&p=2658098#post2658098
    Is showing what seems to be an easier solution, but my problem there is I can't access the source file of the "child" swf....  ayayay.....
    I am going to tinker with your solution and see if it gets me anywhere. Thanks so much for your help again.

Maybe you are looking for