How does derived class access mx_internal namespace ?

Hi,
I've been struggling with the PopUpButton for a day now.. Just trying to move the popup location. Since I can't get moving the PopUpButton into my directory and have it find the icons, I'm attempting to subclass PopUpButton.
Some of the methods in PopUpButton  are defined as mx_internal. I cannot seem to access the methods during runtime. I get an error:
Main Thread (Suspended: TypeError: Error #1006: value is not a function.)
ViewControl/clickHandler
I can compile the code, prefixing the specific function with "mx_internal."
Here is the code:
package {
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import mx.core.mx_internal;
import mx.controls.PopUpButton;
use namespace mx_internal;
public class ViewControl extends PopUpButton
  public function ViewControl(state:String = ViewSelectorState.TILE, value:Number=0):void
   super();
   /* Add the popup */
   _renderer = new ViewSelectorRenderer();
   super.popUp = _renderer;
  /* override the click */
    override protected function clickHandler(event:MouseEvent):void
     if (overArrowButton(event))
        if (mx_internal.isShowingPopUp())
         mx_internal.closeWithEvent(event);
        else
         mx_internal.openWithEvent(event);
        event.stopImmediatePropagation();
     else
        super.clickHandler(event);
        if (openAlways)
         if (mx_internal.isShowingPopUp())
            mx_internal.closeWithEvent(event);
         else
            mx_internal.openWithEvent(event);      

I haven't yet had the need to use a mx_internal, however there are 2 differences that may be a problem which I saw between your code and the link below:
Flex 3 Looping over itemRenderers in a List
Those differences are:
-import mx.core.mx_internal; //this import statement should appear be last.  So, for some reason I assume the author is saying to have that listed last, out of all of your imports.
-use namespace mx_internal; This line is nested between the class brackets.  Yours is nested in the package brackets.
Does that help?

Similar Messages

  • After recording text using the dragon dictation app, it is converted, it can be copied to the iOS system clipboard for use in any app, how does the user access the clipboard to retrive this information if it is no longer on the screen?

    after recording text using the Dragon dictation app, it can be copied to the iOS systme clipboard for use in any app, how does the user access the clipboard to retrive this information if it is no longer on the screen?

    You need to do a long-press in any data entry field, then select Paste.

  • How does the Concurrent Access License (CAL) work.

    Description from Google: How does the Concurrent Access License (CAL) work? Xcelsius Engage Server CALs allow for concurrent live data updates inside Xcelsius dashboards. Every time an end-user triggers a Web service inside an Xcelsius dashboard to retrieve live data, a CAL is consumed for a period of 5 minutes. For that period, in a five CAL deployment for example, there will be only four CALs left for consumption. A five CAL deployment could support up to 25 users and additional CALs can be added to support a larger deployment.
    My question is as follows:
    How a five CAL deployment could support up to 25 users and what does it mean. In the first line it is saying that each CAL for a web service is consumed for a period of 5 minutes and how come it can support 25 users concurrently. Did it mean 25 web service connections inside a swf flash file or 25 different users to access a single web service through swf flash.

    The "Set cost controls" concurrent program is used in R12 to mass update the cost control fields on item costs.
    The cost control region is found by going to Cost management >Item costs > Item Costs
    The concurrent program lets you specify which items /costs should be updated by using various parameters such as cost type, item range, category range etc.
    And you can specify the source for the new cost control data and the new value for the fields.
    Hope this answers your question,
    Sandeep Gandhi

  • How does the Class javax.security.auth.Subject work?

    Hi,
    i don't understand how does the class Subject work.
    First i will describe how do i understand u can use the class Subject
    This is the way you can create a Subject(i think):
    1. create a LoginContext, where u can tell over its parameter which
    Module to use
    2. a LoginModule will be used
    3. now the LoginModule create a Subject
    if this steps right--> ok, else--> please write how it really works
    Now the questions:
    1. Where do the LoginModule get the username and stuff like this from
    to fill the Subjects? Principals?
    2. Where will be the Subject save, at server or at client side?
    when save on server: how to reference a Subject is belong to the
    right Client?
    when save on client: how to ensure the client do not modify it?
    3. In the documentation of JavaTM 2 Platform Std. Ed. v1.4.1, there is
    no advice, that the class have any FIELDS, but then where the
    principals are saved?
    4. The Class Subject do not have any methodes to modify the principals,
    so how to modify it if necessary?
    i think this is enough for the beginnig :)
    thanx,
    edo

    Hi
    Let me try to answer. I am a bit confused too.
    Hi,
    i don't understand how does the class Subject work.
    First i will describe how do i understand u can use
    the class Subject
    This is the way you can create a Subject(i think):
    1. create a LoginContext, where u can tell over its
    parameter which
    Module to use
    2. a LoginModule will be used
    3. now the LoginModule create a Subject
    Correct.if this steps right--> ok, else--> please write how it
    really works
    Now the questions:
    1. Where do the LoginModule get the username and stuff
    like this from
    to fill the Subjects? Principals?
    The Loginmodule does not need the user name. The username is
    only relevant to your application not to JAAS. Consider a standaalone
    application. Whoever starts the application, becomes the user.
    After you start the application, and login (whatever way), your subject
    is created. This subject pertains to the person who is executing the application, not the application specific userid/username. So the user id or name is not required. There is only one user, who is running the application. The JAAS architecture is more relevant for UNIX like
    permission/grant structure, which determines who can execute what.
    >
    2. Where will be the Subject save, at server or at
    client side?
    Again the Subject has nothing to do with your application specific userid. It will be there in the LoginContext. So in a sense a LoginContext is actually a user, not a Subject.
    when save on server: how to reference a Subject is
    is belong to the
    right Client?
    when save on client: how to ensure the client do
    do not modify it?
    In a client server mode, usually the login is done twice. You have to find a way to communicate the subject to the server.3. In the documentation of JavaTM 2 Platform Std. Ed.
    v1.4.1, there is
    no advice, that the class have any FIELDS, but then
    en where the
    principals are saved?
    4. The Class Subject do not have any methodes to
    modify the principals,
    so how to modify it if necessary?
    I think you can add Principals. That is definitely there.i think this is enough for the beginnig :)
    thanx,
    edo
    Hope this helps. As of now I do not think JAAS provides a very good architecture for authorization.
    cheers
    Projyal

  • How does my wife access this with a different ID

    How can my wife access iMatch using a different ID on her iPad?  She is not able to get the music I have loaded in iCloud.

    She doesn't. iTunes Match is designed to be a single-user service that is not sharable. It is associated with one, and only one, iTunes Store account. To access your music your wife will have to sign into the iTunes Store with your account ID and stay signed in.
    Also keep in mind that iTunes Match and iCloud are not the same thing. The two services are distinct services and one does not require the other.

  • Does Apple have a way to manage iTunes accounts on Corporate owned devices, meaning if someone leaves the company how does the company access the purchase apps as they are the owner of them.

    Does Apple have a way to manage iTunes accounts on Corporate owned devices?  So, if someone leaves the Corp. how would the company have access to all purchased apps for any device.

    If the apps were purchased using a corporate iTunes account, someone at the company should have the password. If they were purchased under a user's iTunes account, even though the device was owned by the company, the apps are tied to the user's Apple ID and do not belong to the company.

  • How does "Derive Territory" action in Account screen work?

    Hey all,
    Does anyone have idea on how the action "Derive Territory" in Account screen work?
    Is it based on Rules(in the Decision table) of already completed "Realignment Runs"? I observed that it is picking up based on State of Account.
    If yes, is there any way that I can configure this Decision table apart from Realignment Run creation screen?
    How is this intelligence to pick a Territory based on Geographic location included here? Is it picking from same Decision table? Coz we don't define these geographic positions while defining a territory. We just give names. Am I going wrong anywhere here?
    Vatsav

    Thanks for the tip Janina but it didn't help me unfortunately. From the screenshot below (taken from page# 234), I can go with the assumption that I already have but I need a confirmation on that.

  • How does derived/WRk Record work?

    How do I find out where a wrk record is getting its information from? If a field is using a work record, does it mean that info is being provided by the user as a parameter? I dont' quite understand how a work record works

    The record is usually populated with PeopleCode or possibly through the record definition. It contains calculated or generated values not stored on the database used for either display to the user or as work fields (variables) available within the buffer for processing.
    The structure does not represent a table or view within the database - it's a tools only incarnation.
    Some of the more complicated pages use derived fields as input fields, only transferring the value to real table fields using SavePreChange PeopleCode.
    Derived tables are also used as STATE records in Application Engine programs, which are the same as variables to pass values from one step to the next.

  • How does Night Camera access the camera?

    Hello,
    Night Camera is an app that takes a photo when it detects the phone is relatively still. This is supposed to help reduce shake and make night pictures sharper.
    My question: How do they do this? The only way to access the camera is to use the UIImagePicker which is totally user dependent. How dot they trigger the camera via software?
    Thanks

    It's possible without private calls and using documented code.
    When no motion is detected, a NSTimer is enabled. When the timer fires, you ask the capture button for its target and associated action.
    You perform this action on the found target, as documented here:
    http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIContro lClass/Reference/Reference.html#//appleref/occ/instm/UIControl/allTargets
    http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIContro lClass/Reference/Reference.html#//appleref/occ/instm/UIControl/actionsForTarget:forControlEvent:

  • How can a class access a variable on a MovieClip's time line?

    in my class I declare a linked movie clip:
    a_mc = new LinkedMC ();
    trace(a_mc.testString);
    and on the time line of LinkedMC:
    var testString = "test string";
    but I can't access testString. 
    any clues?
    Thanks!

    you're trying to access the variable before it's defined.  have your LinkedMC dispatch an event letting your know the variable has been defined and assign a listener to a_mc to detect that event.  in the listener function, use your trace() function.

  • How does one Component access another Component via Component Interface ?

    Folks,
    Hello. I have developed my project as 2 Components ( A and B). I have created a Search Record and a Component Interface for each Component.
    Now, a push button in a page in Component A needs to access all pages in Component B via its Component Interface. What are the steps to do for Component A to access Component B via their Component Interface ?
    Thanks.

    You could define the PeopleCode to make the Component Interface work on the FieldChange event of that push button you were talking about, but it would be better to put your PeopleCode in a Save event. To do that, you would use the DoSaveNow() function on the button's FieldChange event. Then, that would trigger a save, and you could put your code on the SavePostChange of any field or on the Component itself.
    Once you decide on an event, the easiest way to start is to open the blank PeopleCode window. Also, place the Component Interface in your project. Next, drag the Component Interface from the Project and drop it into your PeopleCode editor window. This will generate a bunch of PeopleCode that you can use as a starting place.
    The Component Interface allows you to remote control a component as if your code were a user sitting at the Browser. So, when coding the program that uses the Component Interface, you have to have that mindset. It helps me to open a browser and walk through what I want my code to do. Then, I code each step as I do it online.
    There is probably a lot more that you need to know, but is this a good starting point? Is it somewhat on track with what you were asking? Let me know were to go from here with more information.

  • How does a class set itself to null?

    if error happened, can an instance sets itself to null?
    i mean, inside the class,
    i.e. this=null?

    Nope. 'this' is only a referencer to the current class instance as passed by argument or its data members and methods in which it is used. You cannot treat it as a stand-alone variable. Valid: this.something. Valid: method(this). Invalid: this=something.
    And, nope. An instance cannot set itself to null. You can set it to null from another class with a reference arrived at by 'new' or by extraction.
    Or, you can use the finalize() method, which is, in essence, a means for an instance to null itself.
    One word of warning: an object (class instance) will not be garbage collected until ALL references to it have been lost. This goes for myclass = null and finalize(). You'll have to check that no other classes or threads are holding references to the object before it goes away completely.
    Robert Templeton

  • How do java classes handle searches?

    how do java classes store information? and how do I get it out again?
    I am a relational programmer who has decided 2 take a detour in object oriented lands.
    In a relational table you store info and u get the information out through a (my)SQL query
    now how does a class Project with instance project 1,2,3,.........
    get the information from a project with a certain name?
    eg:
    projectid: 1
    responsible: 1234 (<--userid)
    projectname: testproject
    projectid: 2
    responsible: 1256
    projectname: leukproject
    projectid: 3
    responsible: 1483
    projectname: testproject
    projectid: 4
    responsible: 3245
    projectname: darnedproject
    and so on....
    so lets say our class Project has a thousend instances. I want to search by name, how do i write the onces to the screen who have name "testproject"?
    So how do i do this without sqlquerys, totally oop?
    any help would be very much appreciated! :?

    Hi NiQuil,
    Let me tell you a few basic things. First, RDBMS and OOP are quite different things.
    In RDBMS, you ask ur database, "hey, I want this piece of info. Get me that". But you
    don't tell it how to go and search for it, right. Well, things are not as simple as that in
    OOP. Here you have to specify how to get your data also. But Java will surely help you
    to make it easier.
    First of all, you should not map between tables (of RDBMS) and classes (of OOP),
    although certainly you can do this in some crude ways. What you have to do is, put all
    your projects in a single instance, and then using a method, query that instance. There
    are numerous ways for querying. Several classes like Hashtable, Vector, Collection
    etc etc helps you to store, search and retrieve data. But I dont think it is necessary or
    helpful to describe these in detail here.
    However, I would like to tell you one important point. OOP is not just about data storage
    and retrieval. OOP is a way of thinking. It allows you to combine your data and operations
    on it. An object is just a combination of data and operations on that data. Other objects
    access this data only through an interface defined by these operations. Once you
    understand this concept, life will be easier. But it takes some time, especially because
    you come from RDBMS, a world which talks just about data.

  • How does serialization work.......!!

    As Serializable interface is an MARKER interface and does not have any methods or field. Then how does a class implementing Serializable interface is automatically serialized(or the object is converted into bytestream).
    Is it that, JVM does know what to do with a serialized object.
    If this is the case, can I have a MARKER interface of my own, for a particular functionality.
    with regards,
    SHIRISH

    As Serializable interface is an MARKER interface and
    does not have any methods or field. Then how does a
    class implementing Serializable interface is
    automatically serialized(or the object is converted
    into bytestream). They are not serialized automatically. There are methods available for that - ObjectInputStream.readObject() and ObjectOutputStream.writeObject().

  • How do Standard class based exceptions understand an exception?

    Dear All,
    Can any one explain how does the standard class based exceptions understand and identify the specific exception. For example CX_SY_ZERODIVIDE is an exception class we use to catch the divide by zero exception. How does the class understand it. To clear my point  please refer the code below
    data: v1 type i,
            v2 type i.
    try.
    v2  = v1 / 0.
    catch CX_SY_ZERODIVIDE.
    The above code will work and an exception will be handled properly. But how??
    suppose if i write..
    try.
    v1 = Apple
    catch CX_SY_ZERODIVIDE.
    it obviously doesnt work.
    so my point is how does an exception class understand the exception?
    I have very poor knowledge about it, i have checked the class CX_SY_ZERODIVIDE and its methods. There is no code in it. .
    Any help would be greatly appreciated.
    Thanks and Regards,
    Abdullah.

    1) You can write your own log class. Call the log method from your catch
    2) Upgrade to JDK1.4.0 and you can use the Logger function
    3) Check jakarta for log4j

Maybe you are looking for