get constant static in a class

Hi, I have this class:

package cl.mejorencasa.pedido.modelos
{

Pedido/public class implements IPedido
{
public static const = "en Espera"; ENESPERA:String
public static const = "Is" ATENDIENDO:String
public static const = "En Cocina" ENCOCINA:String
public static const = "Fuera de Cocina FUERADECOCINA:String."
public static const = "En Camino '; ENCAMINO:String
public static const = "Entregado ENTREGADO:String."
public static const = "Perdida por Repartidor; PERDIDOPORREPARTIDOR:String
public static const = "Pérdida por Cocina" PERDIDOPORCOCINA:String
public static const = "Cancelado por client" CANCELADOPORCLIENTE:String
public static CANCELADOPORFALTADEPRODUCTOS:String const = "Cancelado Falta Stock."

}

what I want to do is to create a method that gets all of the constants in this class and return them in an ArrayCollection collection. I must say I want this method to be dynamic, I mean, I want him to go through each constant that are in the class. Myself, I don't wan't to add in an ArrayCollection collection.

The problem is that I don't know how to create such a method, can someone help me?

Thank you very much.

Sebastian Toro

To view the static, I think you have to pass the class itself, rather than an instance of the class, to describeType(). So try

describeType (Pedido);

Gordon Smith

Adobe Flex SDK team

Tags: Flex

Similar Questions

  • How to get a static Image location (Lon & Lat)

    Hi, I have a location (long & Lat),

    How to get a static Image of these data?

    Thank you

    JAM373 blackberry jam europe reading

    and

    http://supportforums.BlackBerry.com/T5/native-development/crush-in-BB-Cascades-imageView-SetImage/m-...

    Found the solution using MapImageGenerator

    I am applying like this

    on .qml:

    function getImage() {
       mapImage.getImageMap(lat, lon, screenWidth);
    }
    
    attachedObjects: [
       StaticMapImage {
         id: mapImage
         onGetProperties: {
           staticMapImage.image = aPropertyMap.img;
         }
      }
    ]
    
    ImageView {
       id: staticMapImage
       preferredWidth: screenWidth
       preferredHeight: 300
    }
    

    on StaticMapImage.cpp:

    StaticMapImage::StaticMapImage(QObject *parent):
        QObject(parent)
        {
    
        }
    
    void StaticMapImage::getImageMap(const double &aLatitude, const double &aLongitude, int width)
        {
        ViewProperties mapProperties;
        mapProperties.setLatitude(aLatitude);
        mapProperties.setLongitude(aLongitude);
        QRect windowRect(0,0, width, 300);
        mapProperties.setWindow(windowRect);
    //  mapProperties.setAltitude(500);
    
        iMapImageGenerator = new MapImageGenerator(mapProperties);
        bool result = connect(iMapImageGenerator,
                SIGNAL(finished(bb::cascades::maps::MapImageGenerator *)),
                this, SLOT(imageFinished(bb::cascades::maps::MapImageGenerator *)));
        Q_ASSERT(result);
        Q_UNUSED(result);
    
        iMapImageGenerator->start();
        }
    
    void StaticMapImage::imageFinished(bb::cascades::maps::MapImageGenerator *aMapImageGenerator)
        {
        bb::cascades::Image img(aMapImageGenerator->imageData());
    
        QDeclarativePropertyMap* propertyMap = new QDeclarativePropertyMap;
        propertyMap->insert("img",  QVariant(QVariant::fromValue(img)));
        setProperties(propertyMap);
    
    //  delete iMapImageGenerator;
        }
    
    QDeclarativePropertyMap *StaticMapImage::properties()
        {
        return iPropertyMap;
        }
    
    void StaticMapImage::setProperties(QDeclarativePropertyMap *aPropertyMap)
        {
        iPropertyMap = aPropertyMap;
        emit getProperties(iPropertyMap);
        }
    

    on StaticMapImage.hpp:

    class StaticMapImage: public QObject
    {
        Q_OBJECT
        Q_PROPERTY(QDeclarativePropertyMap *properties READ properties WRITE setProperties NOTIFY getProperties)
    public:
        StaticMapImage(QObject *parent = 0);
        Q_INVOKABLE void getImageMap(const double &aLatitude, const double &aLongitude, int width);
    
    private slots:
        void imageFinished(bb::cascades::maps::MapImageGenerator *aMapImageGenerator);
    
    public slots:
        QDeclarativePropertyMap *properties();
        void setProperties(QDeclarativePropertyMap *aPropertyMap);
    
    signals:
        void getProperties(QObject *aPropertyMap);
    
    private:
        MapImageGenerator *iMapImageGenerator;
        QDeclarativePropertyMap *iPropertyMap;
    };
    

    Thank you

  • With the help of constant static as the FXML id

    Is it possible to use a constant static like the id in FXML and if so, how?

    For example if I have a Person class with a constant static set, such as:

    public static final String NAME = "name" field

    And then in a FXML file:

    <? import person? >
    < TextField id = Person.NAMEFIELD / >

    The code above FXML generates an error saying that "what exspected.
    I also tried with "$Person.NAMEFIELD", but this does not work either.

    Any suggestions?

    Is it possible to use a constant static like the id in FXML and if so, how?

    Yes, this is supported in JavaFX 2.2:

    
      
     
    

    The code above FXML generates an error saying that "what exspected.

    The quotes are required. FXML must be syntactically valid XML.

  • Get a static reference to decoration

    Is it possible to get a static reference to a decoration? I have some tips that is represented by colorful decorations that I want to change the colors of them based on the data that I get. I know, it is possible to obtain references to the decorations in a programmatic manner, but it is something huge maintainability because it is incredibly difficult to follow the course of the program. Thank you.

    I don't think you can get that directly. Check the exchange of ideas. I think that there has been a few proposals along this line.

    Perhaps another approach would be to put indicators of color behind the decorations box and change the color of those. The borders of your pipe decorations would be opaque, while the Interior would be transparent to allow the squares of color to show through. The color boxes appear as standard terminals on the block diagram. With appropriate labels, they fit perfectly in the paradigm of data flow.

    Lynn

  • Static instead of sound - whenever I'm playing the sound, all I get is static

    Whenever I'm playing the sound, all I get is static, if the volume is 100 or 5. What can I do to recover my sound?

    Hello

    1. what operating system do you use?
    2. you use headphones?
    3. the problem happens on the speakers and the headphones?

    Check what operating system you are using. See the link below:
    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    If you use Windows 7, then follow these steps:


    Step 2
    : try using the troubleshooting of Audio playback and check if it detects the problem.

    To open the troubleshooter of Audio playback:
    a. click the Start button and then click Control Panel.
    (b) in the search box, type troubleshooting and then click Troubleshooting.
    c. under hardware and sound, click on the audio playback problems.
    d. follow the instructions contained in the resolution of the problems.

    Refer to this article:
    http://Windows.Microsoft.com/en-us/Windows7/open-the-playing-audio-Troubleshooter


    Step 3:
    disable the optional speaker effects that are known as improvements and test

    Follow the steps below to disable the improvements:
    a. Click Start, and then go to the control panel.
    b. click sound.
    c. Select the playback tab.
    d. Enter select speakers/headphones
    e. click Properties
    f. Select enhancements tab
    g. disable all improvements
    h. restart the computer

    Refer to this article for help:

    Tips for solving common audio problems
    http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-sound-problems

    Kind regards
    Afzal Taher
    Microsoft technical support engineer

  • I get constant errors and disconnects in chat room

    I get constant errors and disconnects when in aim chat rooms... often cannot access the CAFÉ of ARTISTS

    Contact the Support of the GOAL of help with their Chat rooms.

    See you soon.

    Mick Murphy - Microsoft partner

  • Windows 10 installed without permission, I reload Win 7, now I get constant reboot commands.

    * Original title: Constant reboot command

    MicroSoft, without my permission, loaded win 10, I followed the instructions to remove and reload Win 7, now I get constant reboot commands.

    Hello

    According to the description, I understand that you lowered the score of 10 windows and now face problems with your Windows 7 computer.

    I would like to know some information.

    1. You receive an error code or error message?

    2. This restart commands you talk too much?

    3. What is the current status of your computer you can start on the computer?

    First of all I suggest you to disconnect all external devices such as USB printers, USB Hubs, etc.

    I suggest try to start the computer in safe mode and check, please see Microsoft article and check out them below if it can help.

    http://Windows.Microsoft.com/en-us/Windows/Start-computer-safe-mode#start-computer-safe-mode=Windows-7

    Alternatively, you can help Microsoft Article given below to perform the verification and startup repair.

    http://Windows.Microsoft.com/en-us/Windows/what-are-system-recovery-options#what-are-system-recovery-options=Windows-7

    Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.

  • How to get the name of a class private data controls?

    How can I get the names of the controls within a class private data?

    I use the framework of the actor and try to create a tha method will be executed when run the actor. This method should an o list all names of control inside the data class to find the initial value within a configuration file (config.ini file), the key to the configuration file will be the name of the control.

    Thank you.

    You already do the substitution method just because you write for the bundle by name.  And then how are you going to respond to all types of data might be the key.  You do more difficult things that it takes to really very few benefits.

  • Get the default value for class LV 1498 error

    I call get the Default Value.vi LV class to dynamically load a class.

    It was working fine until I added Open Config Data.vi to read an .ini file.

    The application works fine when I press the button RUN in the LabView development environment, but when I create the executable file with Application Builder and then run it, I get:

    "1498 error occurred getting class LV Default Value.vi"

    Possible reasons:

    LabVIEW: Library has errors. Correct the errors before performing this operation.

    «"" "String of full appeal:»»"»

    Download LV class by default Value.vi

    Test.VI

    LabVIEW has tried to load the class in this path:

    g:\cal\devices\Digital300Meter\Digital300Meter.lvclass

    I narrowed the problem down to open Config Data.vi included in the application, not in the class. I don't have to call the Open Data of Config vi to get this error.

    I have a Subvi, called "SelectDevice" which refers to Open Data from Config. In my main Test.vi SelectDevice is in the true case of a true/false case structure, which is set to False.

    If I put a design schema off around the Open Data of Config vi, I do not get the error.

    I suspect that including Open Config Data include a VI in the application that interferes with the LV ranks by default.

    Thank you, it works!

    I also put the additional Exclusions page as follows:

    Disconnect the type definitions - verified

    Remove unused polymorphic instances of VI - verified

    Remove unused libraries project - members verified

    Change the project library file after removing unused members - unaudited

  • can someone tell me why do I continually get constant wireless monitor icons on the taskbar?

    I recently got the wireless internet and in my taskbar, there are icons to come constant monitor. As soon as I run my mouse over them, they disappear. I can't get a straight answer from anywhere as to how do to stop this. Help!

    Hello L Heft,

    Thanks for the return of the response.  What exactly happens when you try to start your computer in normal mode?  Are you an error?  Your new internet service work for you since evolution?

    If you have always had this problem, since the evolution of your internet plan/provider to Shaw, I suggest visit the link below.

    Shaw support:

    http://Shaw.ca/support/

    Please let us know status.

  • I get constant attention that my Vista is not valid. How can I turn it back on it?

    How to re-enable

    I turned off my ADSL router and it made my phone freeze and not be able to restart again. Send in repair and store PC has managed to recover the Vista, although a lot, a lot of my data has been corrupted and could not be recovered. In addition to this, I get a constant attention that my Vista is not longer valid. Vista was already installed when I got my laptop two years ago and I don't remember how I got it registered last time even though I know I did. I do not have a CD with it and don't know where to find key "reg".

    I'm worried that I will be thrown completely after some time has elapsed. I have lost so muc htime on this incident everything and can not afford another disaster. MS will be able to give me the information of the previous time, I registered?

    You can reactivate your Windows Vista installation by doing the following:

    1. click on the Start button and in the box, type search: slui.exe 4

    2. press the Enter key on your keyboard.

    3. Select your country.

    4. follow the instructions for the activation of the telephone (toll-free).

    NOTE: When you call this number, you will first hear an automated voice. If the automated voice gives you an option to talk to a
    Live the Rep of Activation, select this option. If this is not the case, do not enter all the numbers. This should force the automated voice transfer
    an Activation Rep. Live trying to activate through the automated voice won't work, in your case, only through the Live Activation Rep
    your activation will be successful.

    Carey Frisch

  • Variable static in a class bug?

    Hi guys. I try to keep a number of objects of a class with the static count variable.

    When I try to compile with 'public static int count' it gives the compiler errors "reference to undefined"Box::count"for the two cases where the number is incremented and decremented

    Strangely, it compiles perfectly if I use only "int count" without the keyword 'static'... but it's not useful to me.

    Here is my code... can someone tell me where I have gone wrong?

    #include
    using namespace std;

    Box class
    {
    public:
    public static int count;
    Box()
    {
    Count ++;
    } //compiler survey "refers to the undefined"Box::count"here
    ~ Box()
    {
    County;
    } //compiler survey "refers to the undefined"Box::count"here
    };

    int main (int argc, char * argv)
    {
    Area B1;
    fprintf (stderr, "Hello");
    return 0;
    }

    Welcome on the support forums.

    You must initialize the static variable
    you access the variable with Box::count

    See
    http://www.parashift.com/c++-FAQ-Lite/link-errs-static-data-MEMS.html

  • fieldChange get variables from the main class

    I'm doing a simple calculator that users enter numbers, press on calculate, and the answer is displayed in the status bar.  The problem I have is that when I try to get the EditFields values in the fieldListener, I get an error that says that the variable was not found.  Here is an example of the code that I have:

    public class MyScreen extends MainScreen {
        public MyScreen() {
            super();
            LabelField title = new LabelField("Automotive Loan Calculator", LabelField.ELLIPSIS | LabelField.FIELD_HCENTER);
    .
    .
    .
            EditField sell = new EditField("Selling Price: $", "", 10, EditField.FILTER_REAL_NUMERIC | EditField.FIELD_RIGHT);
    
            EditField taxrate = new EditField("Tax Rate: ", "", 5, EditField.FIELD_RIGHT | EditField.FILTER_REAL_NUMERIC);
    .
    .
    .
    ButtonField button = new ButtonField("Calculate Payment", ButtonField.FIELD_HCENTER);
            CalcButtonListener calculate = new CalcButtonListener();
            button.setChangeListener(calculate);
    .
    .
    .
     final class CalcButtonListener implements FieldChangeListener {
            public void fieldChanged(Field field, int context) {
    
            String sellData = sell.getText();
            float sellVal = 0;
            if (sellData != null && sellData.length() > 0) {
                sellVal = Float.parseFloat(sellData);
            }
            String taxrateData = taxrate.getText();
            float taxrateVal = 0;
            if (taxrateData != null && taxrateData.length() > 0) {
                taxrateVal = Float.parseFloat(taxrateData)/100;
            }
    
            total = sellVal * taxrateVal + sellVal    
    
                LabelField newpmt = new LabelField("Total: " + total, LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH) {
                public void paint(Graphics g) {
                    int x=  g.getColor();
                    g.setColor(Color.GRAY);
                    g.drawRect(0,0,this.getWidth(), this.getHeight());
                    g.fillRect(0,0,this.getWidth(),this.getHeight());
                    g.setColor(Color.WHITE);
                    super.paint(g);
                }
            };
            setStatus(newpmt);
    
            }
        }
    

    Nevermind, I figured it.  I forgot to set them in my code.

  • Cannot get internet static IP address

    Hi, I put several new Win7 PC in an office that replace Win XP PC. I need to use static IP addresses on all of the PCs, as it is required to access the Unix server. Start of the new PC with internet access very well, but when I assign static IP addresses, they have more internet. My IP address, DNS server, gateway, etc. are all correct and identical to what is plugged into the PC XP (except IP address of course). Even if the new PC do not have internet access, they can connect with the Unix server and other PCs on the working group. When I diagnose the problem I get the answer: "your computer seems to be configured correctly, but the device or resource (DNS server) is not responding." All the XP computers using the static IP address and have the internet very well. Yes, I already tried to clear the DNS cache.

    Hello

    As you work on a domain network, the question would be better suited on the TechNet support forum.

    I suggest you to check with TechNet support for more information.

    http://social.technet.Microsoft.com/forums/en-us/newThread?category=&Forum

  • Get a static noise when using the sound track

    I just Adobe Premiere Clip, thanks to Kevin, because he was talking on his vlog every day lol.

    I managed to make a little video, photos of stil, and I work very well, but when I announced a soundtrack, all I hear is static noise, seeing the video, in the first video, but when I save the video and read it, then it sounds very good.

    I use Adobe Premiere Clip version 1.1.2.1161 on Android version 6.0 on a Sony Experia E5

    I understand now.

    I will ask to confirm the media audio information.

    You can use the MediaInfo application which will help you to get all the information about this Audio clip. (https://mediaarea.net/en/MediaInfo/Download this application specifically runs on desktop computers)

    Also, let me know the source of this Audio file.

Maybe you are looking for

  • How to prevent the storage of Apple Mail emails locally

    I use several IMAP accounts for my mail, containing GB of data. Unfortunately, Apple Mail copy these emails on my local disk. I don't want to. Y at - it a way to prevent Apple Mail to store e-mails locally, but rather only access those via IMAP? Than

  • iBooks has not worked since last iOS 9 update... why?

    iBooks has not worked since last iOS 9 update... why?

  • HP pavilion g series: windows drives disappeared

    I tried to reinstall windows 7 on my laptop and where it is written on this drive to install to, there are more readers to select. Now I'm not sure what to do. Help, please. Should I download something?

  • Cannot remember the password restriction or reset iPhone

    Hello I recently asked my son to take off / change the restrictions on his iPhone, since these restrictions are younger. When I tried to enter the password, he said it was wrong.  I tried the passwords I most often use / used and none of them work. I

  • Rename the cRIO-9081 with MAX 5.5

    We have several cRIO - 9081 s.  We have deployed the year last two and deploy at least 4 more this year.  Those deployed last year is MAX 5.4 running and we were able to give them an alias so that our code can work on both systems. 4 new run MAX 5.5.