Problem in the use of custom component.

I want to create a component that is customized by using action script
I use flex builder 2.
I looked at the flex guide 2 devlopers and tried with the simplest example, having two parts:

MyButton.as file for the custom component:
the myControls package
{
Import mx.controls.Button;
public class MyButton extends button
{
public void MyButton (): void
{

}
}
}

the main application mxml file contains:
<? XML version = "1.0" encoding = "utf-8"? >
< mx:Application
' xmlns:MX =' http://www.adobe.com/2006/mxml '
layout = "absolute" xmlns:myControls = "myControls.*" >
< myControls:MyButton width = "100" height = "25" / >
< / mx:Application >

When compiling, flex builder displays a message:
Errors exist in the project (s) required: MyProject
Continue the launch?

However, when I remove the following line from the main application file:
< myControls:MyButton width = "100" height = "25" / >
It runs successfully.

Please someone help if there is any question about.

The only thing I can think is that MyButton.as is not a directory of myControls, with myControls directory is a subdirectory of the directory is your mxml file. It's the only thing I can think of.

Tags: Flex

Similar Questions

  • I am facing problem in the use of applications of windows8. I am not able to use even a single App. What shoulg do. ?

    I am facing problem in the use of applications of windows8. I am not able to use even a single App. What shoulg do. ?

    Hi Shubham,

    You receive an error message when you try to use the Apps in Windows 8?

    Exactly how have you connected to the computer (Microsoft Account or Local account)?

    follow these steps to solve the app suggested you nuisance.

    Method 1:

    Run applications troubleshooting

    I suggest you to download and run the troubleshooter modern UI App.

    http://download.Microsoft.com/download/F/2/4/F24D0C03-4181-4E5B-A23B-5C3A6B5974E3/apps.diagcab

    Method 2:

    I suggest you follow the steps in the article. Here is the link for your reference.

    What to do if you have problems with a soft

    http://Windows.Microsoft.com/en-GB/Windows-8/what-troubleshoot-problems-app

    Method 3:

    I suggest that you check the proxy settings because if you use the Proxy Server, then the Apps in Windows 8 will not work.

     

    a. click on thegear box in the upper right corner in Internet Explorer.

    b. click onTools and then click Internet Options.

    c. click on theConnections tab, and then click LAN settings.

    d. Uncheckuse a proxy server for your LAN .

    e. clickOk.

    Hope the helps of information provided.

  • Problems with the Transition of custom components bare in s:TileGroup

    I have a problem with transitions play does not correctly on a custom component that is displayed in a < s:TileGroup >.

    Code of the custom component;

    <?xml version="1.0" encoding="utf-8"?>
    <s:SkinnableComponent xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
     skinClass="com.mydomain.view.skins.SkinFile">
     
     <fx:Metadata>
      [SkinState("normal")]
      [SkinState("photo")]
     </fx:Metadata>
    
     <s:states>
      <s:State name="normal" enterState="invalidateSkinState()" />
      <s:State name="photo" enterState="invalidateSkinState()" />
     </s:states>
     
     <fx:Script>
      <![CDATA[
       override protected function getCurrentSkinState():String {
        return currentState;
       }
      ]]>
     </fx:Script> 
     
    </s:SkinnableComponent>
    

    The skinfile itself is relatively simple

    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" 
      xmlns:s="library://ns.adobe.com/flex/spark" 
      xmlns:mx="library://ns.adobe.com/flex/mx"
      width="300" height="200" width.photo="140"
      >
       
     <fx:Metadata>
      [HostComponent("com.mydomain.view.components.MyComponent")]
     </fx:Metadata>
     <s:states>
      <s:State name="normal"/>
      <s:State name="photo"/>
     </s:states>
     
     <s:transitions>
      <s:Transition autoReverse="true">
       <s:Resize target="{this}" duration="500" />
      </s:Transition>
     </s:transitions>
     
     
     <s:Rect id="rect" radiusX="15" radiusY="15" top="0" right="0" bottom="0" left="0">
      <s:fill>
       <s:LinearGradient rotation="90">
        <s:GradientEntry color="0xffffff" ratio="0" />
        <s:GradientEntry color="0xf0f0f0" ratio="1" />
       </s:LinearGradient>
      </s:fill>
      <s:stroke>
       <s:SolidColorStroke color="0xc0c0c0" weight="1"/>
      </s:stroke>
     </s:Rect>
     
    </s:Skin>
    

    When displaying a couple class MyComponent instantiated in a s:TileGroup as follows;

    <s:TileGroup width="940" verticalGap="20" horizontalGap="20" clipAndEnableScrolling="true">
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
     <components:MyComponent currentState="{theState}" />
    </s:TileGroup>
    

    and saw two buttons to switch the value of the 'State' to 'Normal' or 'photo', it resizes the component properly to the small size, but that goes back to the smaller size to the largest size, it does not play the transition. It just makes small to large immediately.

    The strange thing is, however, that if I use a tag < s:HGroup > instead of < s:TileGroup > it works like a charm, so I guess that's not so much the custom component or skin that is causing problems.

    When I put the transition of the size of the component itself instead of in her skin, then it works as expected, but I think that transitions should be defined in the skin and not in the component itself, right?

    I do something wrong or didn't I just encountered a bug maybe?

    It took me a while to realize it was.  TileLayout organises its elements in a grid of 'cells' and each cell is the same size (the size of the largest component).  Then, each element is placed in its own cell because the horizontalAlign/verticalAlign properties.  By default, TileLayout a horizontalAlign = justify which means that extends the element to the size of the cell.  In order to have an effect of resizing plays on the skin of the element does not really have any effect.  He gets to work when the shrinkage, but fails more and larger, I guess because the increase in the width of an element affects all cells, while the lower has not.

    So I think the right thing to do here is to either wrap a group around the Rect and mentioned target that you like, or the TileGroup.horizontalAlign left/center/right value.

    Here's a simplified example of how you can reproduce it:


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark" >
       
            [Bindable] public var test: Boolean = true;
    ]]>
       

       
       
           
               
                   
                       
                       
                       
                       
                   

                   
                   
                       
                           
                       

                       
                           
                       


                   
                   
                   
                       
                   

               
           
       
       
       
           
       
       
       
           
       

       
       
           
           
       

       
       
           
           
       

       
       
           
           
       

       

    If you wish, you can ask about a bug, but I have the feeling that we would not be can not fix because probably you shouldn't use horizontalAlign = justify and change the width of the element at the same time.

  • Getting the list of Custom Component ListView

    Hello

    I'm trying to figure out how to get the 'checked' property of a custom component of QML.

    Basically, it's the same as the first example on https://developer.blackberry.com/cascades/documentation/ui/custom_components/index.html

    This is a list, with a listItemComponents, whose type: "item" contains a check box and the label.

    I have an ActionItem whose job is to take all elements that are enabled and do something.

    The ActionItem triggers a C++ code that should get this list.

    Problem is, I can't figure out how to get the selected items. I tried the selected() function but it returns empty.

    I have to turn this into a multiple selection?

    I got so far is the back of GroupModel, after selection, but this does not include anything other than what I fed in the first place. Which makes sense.

    There are a lot of similarities between this issue and the other. Should help to my code and comments in this post, I think: http://supportforums.blackberry.com/t5/Cascades-Development/LstItemComponent-doesn-t-track-the-model...

  • Satellite P200 - problem with the use of disk HARD original as external drive

    I've been pulling on my hair for a month now and could do with help

    I have a Satellite P200 series PC laptop and have recently updated from the 200 GB for a pair or 320 GB HARD drive. No problem

    The question I have is that the old drive of 200 GB system I am unable to use it in any other machine or according to and external storage device.
    The original secondary disc works fine few matter where I use it... (In my PS3 at the moment)

    When I install the orgional system drive in my laptop and rebuild windows it it still works 100%.
    Hance a good work of 200 GB of HARD drive.
    Take it out and serve in another machine of storage that it won't - boot all I get is cyclic redundancy errors

    I formatted, low level run endless disk tools
    WD test came back with diagnostics Test::Read 11 - cable sector error!

    Even as a drive on the original laptop is the same

    All ideas taken with gratitude that I don't want to lose a good 200 GB HARD drive

    Thank you very much
    Roger

    Hello!

    The external box is maybe defective, because you said that the HARD drive works in your laptop and the PS3 without problem.
    You can test the HARD drive in another external case?

    WD test unknown to me but I always use the Drive Fitness Test:
    http://www.HitachiGST.com/HDD/support/download.htm#DFT
    With the Drive Fitness Test, you can test your HARD drive. Download the CD image, burn it to a CD and boot from it. You can then the HARD drive.
    On the same site is a user's guide if you want to know more.

    Good bye

  • Problem with the use of MID/LEFT functions

    I have a problem, see the point of these functions if (as seems to be the case) they will not allow another cell to be referenced.

    I want to do a SUMIFS with match being the first four characters of another cell data. I can't find any way to do it without manually copying the first four characters in another cell.

    If I use only LEFT like this:

    LEFT ('ABCD', 3) to derive 'ABC '.

    so why would just enter ABC in the first place? But that's what show examples and any attempt to do what I really want

    that is LEFT (F19: 3)

    causes a syntax error.

    I believe that I'm missing something really stupid, but I'm darn if I can see it.

    Hi jon,

    LEFT (F19: 3)

    causes a syntax error.

    Try a comma in place of the colon

    = LEFT(B2,3)

    It's your area used for the decimal point. If you use the comma for decimals, use a semicolon in the formula, = LEFT(B2;3)

    Kind regards

    Ian.

  • I have a problem in the use of 'DAQassistant '.

    Hello world. I am a new learner to labview and China. When I use labview 2014 and DAQassistant with advantech USB4750, it will display ´error-536805376· "¢ Euou ToErrorCluster.vi ' and 'Get a unique temporary file name.' I reinstalled times serval labview and win7, but it still has the same problem (initially, I work well., but finally it did not work sorry for my english.and happy Chinese new year to all.

    a version of this tool also have problem then try using a different version of the

  • Windows media center on starting indicates there is a problem with the failure of a component of recording on the radio and the video how can I solve this problem

    Failure of a component of recording
    Some of the files needed to play radio are missing or corrupt. Registration of the media center components may have failed.

    The above message is displayed whenever I put Media Center on and try to watch television. The guide lists are also not downloading.
    And im having trouble with the tuner.
    Tuner not found
    the tuner is defective or not installed.

    someone help?

    Hello hillsiderWH,

    Seems that your windows installation is missing most important files, I suggest you boot to the top with your windows media center installation CD and run repair on the windows installation. This will replace any missing files and I hope that your media center up and running. If this isn't the case, it could be a problem in the registry.

    -Alex

  • Problem with the shortcut menu custom BB10

    Hi all

    I am currently trying to implement a context menu that is customized with my webworks app. So far I'm not creating a normal webworks / bbUI app, but I'm trying to add some features of bbUI. So to speak, I have a few different elements in my application, each of them triggers the context menu, as expected. So far so good. But now I have some problems to detect which element / div has triggered the call from context menu. How can I get this information?

    I add the context menu like this:

    var contexts = [blackberry.ui.contextmenu.CONTEXT_ALL];
    var itemRead = {
        actionId: 'actionRead',
        label: 'Read Article',
        icon:'../assets/images/new/add.png'
    };
    
    blackberry.ui.contextmenu.addItem(contexts, itemShare, function(arg1) {
        console.log("itemShare: " + arg1);
    });
    

    But as I have already described arg1 is null, and I have no idea on how to detect the appellant.

    Can someone help me, please?

    I thank very you much in advance!

    See you soon,.

    Sven

    You need the feature called custom context. This will give you that you the information on that DIV has been pressed. When you set your DIV, add a tag called:data-webworks-context

    Thus your div would look something like this:

    1
    2
    3
    blackberry.ui.contextmenu.addItem(contexts, itemShare, function(id) {
        console.log("itemShare: " + id);
    });
    

    You are passing a JSON for the CCM object and asking him to come back to you, the ID of the item that called the context menu, so you can do a job. Let me know if that helps

  • Help, please! Problem in the use of http to call the url?

    Hello

    I develop application for Blackberry 8830, which is the cdma device. I want to develop the application that uses the http protocol to call url and gets the response. To use http everything I read there about 5-6 ways. But the only one that fits my needs is direct TCP. But my service provider in India i.e. Auntie Indidcom says that there can be no adjustments to the AFN for CDMA phones. What should I do now. I don't really know if that's the only problem.  I have this thread

    Different ways to connect with Http.

    There are six ways mentioned below: -.

    1 blackberry Enterprise Server with Blackberry MDS - I have Blackberry Enterprise server, so this is not possible.

    2. blackberry Internet Service - for this, the Alliance with the RIM so still no thuought on this subject.

    3 order TCP - do not get the APN settings

    4 WiFi network - I'm not network Wi - Fi is also to the equation.

    5. WAP Gateway - not looked into this yet.

    The only way I thought direct TCP, but it requires settings APN, but the message that I received from the people of Auntie, it's that the APN settings is supported for GSM based phones and not for CDMA phones. So is it possible, if yes, then please let me know, its urgency.

    Here is the code that I use for the connection.

    HttpConnection httpConnection = null;
                DataInputStream dis = null;
                DataOutputStream dos = null;
                url = "http://mailonphone.com:8180/automaticlicensing/LicensingServlet?" +
                      "UserName=ilesh&Password=ilesh123&SiteCode=012345678901234567890&" +
                      "ScratchCard=05533978;deviceside=true";
                System.out.println("URL=>" + url);
                try
                {
                    httpConnection = (HttpConnection)Connector.open(url, Connector.READ_WRITE);
                    httpConnection.setRequestMethod(HttpConnection.POST);
                    InputStream istrm = httpConnection.openInputStream();
                    String resMsg = httpConnection.getResponseMessage();
                    System.out.println("REsponse Message=" + resMsg);
                    int length = (int)httpConnection.getLength();
                    String str;
                    if (length != -1)
                    {
                        byte servletData[] = new byte[length];
                        istrm.read(servletData);
                        str = new String(servletData);
                    }
                    else  // Length not available...
                    {
                        ByteArrayOutputStream bStrm = new ByteArrayOutputStream();
                        int ch;
                        while ((ch = istrm.read()) != -1)
                            bStrm.write(ch);
                        str = new String(bStrm.toByteArray());
                        bStrm.close();
                    }
                    System.out.println("Registeration Key=>"+str);
                    int in=str.indexOf("");
                    int en=str.indexOf("");
                    key=str.substring(in+6,en);
                    key=key.trim();
                    System.out.println("KEy="+key);
                }
                catch(Exception ex)
                {
                    System.out.println("Error while calling url");
                    key = "In catch while calling url";
                    //sendMenuItem.setText("Message not send");
                }
            }
    

    If there is a problem in the code then let me know also. I could not test this even on the MDS do not work on simulator emulator. Look into that, but if its related to another question please let me know.

    Thank you & best regards

    Sunil

    The exception it throws in wrestling, will give you an idea about the problem.  I suspect something is wrong with your data, for example, you have specified HttpConnection.POST, but you provide no post data, so I think that you really wanted to say HttpConnection.GET.

    WAP 2.0 does not work on the Simulator.

    I recommend that you get your code work using the Simulator (i.e. ";) deviceside = true') until you are exposed to problems trying to connect on a real device.

  • problem with the use of the model

    Hello

    I use Photoshop CC and all the time I have a problem with the help of veneer of reason. In fact, I can't use any template, because when I opened the window of boss, there is always this same situation-> window does not open properly /It is the visible part of the window and when I pressed on it do not bosses see / so I can't use any model - printscreen below :

    sample.jpg

    How can I solve this problem?

    Try resetting your preferences.

  • Problem with the use of the lightbox in combination with buttons on the Master slide

    I want to use one have a Walker of popup layer (with content), the user clicks a button on the slide.  The user can close with a button which also appears Walker that the lightbox appears.

    The lightbox layer covers the complete breech the user should click the button close before the next slide can be visited. Everything works fine

    Problem:

    Then I used and prevoious buttons on the slide master and although the layer seems to be on the top of the next and previous buttons, they stil working.

    How can I prevent the buttons on the master slide to work Walker watch the light table?

    Vico

    Each interactive object remains active even if it is covered by a non-interactive object.

    More information on the use of the shape of the buttons, either model of slides or time during the rest of the project: http://blog.lilybiri.com/why-i-like-shape-buttons-captivate-6

    ATTENTION: during time during the rest of the project, to make visible everywhere normally you put on top. But in this case, which means they'll be on top of the viewers. I did pass on the viewers once, maybe I should write in a blog.

    Lilybiri

  • problem in the register a custom look

    Hi all
    I use jdeveloper 11.1.1.3

    To save a custom appearance, there are several steps to do:

    In the navigation Application, right-click the project and select new.

    In the new gallery, expand general and select XML.

    Select the XML Document to an XML schema, and then click OK.

    In the XML to an XML schema - step 1 of 2 dialog box create:

    XML file: Enter trinidad - skins.xml.

    Directory: Add \src\META-INF at the end of the directory entry.

    Select the use of registered patterns and click Next.

    In the XML schema for create - step 2 of 2 dialog box:

    Target namespace: select http://myfaces.apache.org/trinidad/skin.

    Root element: select skins.
    .
    .
    .


    but my target namespace is empty, so I can't select 'http://myfaces.apache.org/trinidad/skin '.

    What should do IDs?


    Best regards

    Hello

    If I understand correctly to save a custom appearance, simply create an xml file named "trinidad - skins.xml" and put it inside the WEB - INF directory. To create an xml file, you should have chosen in the New Gallery the "XML > XML Document" and not "XML > XML XML schema Document. An of course after you have created the XML file, you can change the source.
    A sample of trinidad - skins.xml would be as follows:

    
        
            princess.desktop
            princess
            simple.desktop
            org.apache.myfaces.trinidad.desktop
            skins/princess/princess.css
        
    
    

    Kind regards
    Pino

  • Problem in the use of JSONDATAACCESS for parsing json getting as the server Http response.

    Hey Hi,

    I was tired this solution but get a problem. The problem is when I am trying to build my project it gives an error stating that ' expected ';' before ' ja ' when I declare JsonDataAccess.

    Here is my code snippet:

    JsonDataAccess ja;
    QString response;
    If (response-> error() == QNetworkReply::NoError) {}
    const int available = response-> bytesAvailable();
    If (available > 0) {}
    answer = QString::fromUtf8 (response-> readAll());
    qDebug()< "tag="" name="" is="" ::=""><>
    QVariant jsonva = ja.loadFromBuffer (response);

    }

    even after the addition of the LIBS +=-lbbdata in the .pro file I get no success here.

    Help, please

    Concerning

    Don't forget to:

  • I have problems with of the Subvi after the use of customized device model

    I used to start my machine personalized customized device model and I got success in the deployment until I started to do more complicated the Subvi.   I am currently trying to convert low FPGA and high ticks to the duty cycle, but for some reason when I add it to the RT VI "Data read of HW" driver, it seems to cause a downtime... ideas? Is a circuit agree? I have added a time delay but I am still having problems. It is a device online, so I'm suspicious of it hogging resources, but am not sure.

    Attached images are meant to be read like this:

    1. the case of the RT pilot ReadDataFromHW

    2. it's the Subvi calling ToDutyCycle SIMStimPWMSubVI

    3 ShiftRegister.PNG is inside the Subvi.

    As a robotician I celebrate early and often (usually by a failure or two...), but it seems that the answer was to transform fundamentally the While loop for a loop with a count of 1 and then remove the additional elements to ensure that each shift register has that one and then right click on the shift registers and convert at the Feedback node...
    I was able to deploy to VeriStand as a custom device and it runs and calculates the factor of use with no problems. WOOHOO! Where - what is celebrate button!

Maybe you are looking for

  • Satellite L30-101 very slow with Vista

    That's old for a few days and the slower machine, I've ever had. Anyone have any idea what I can do to speed it up. Is there a free windows xp I can install that I already hate this vista. I bought 3 toshiba laptops in the last 2 months and you have

  • Satellite P100-347 - AC power does not

    I thought I'd let everyone know a solution to a problem. I used the laptop for long hours and I found it out the next immediately at startup.The power supply was not working and prevented from leaving. What I did for the solution... 1. no AC power on

  • Windows is change my folder view settings

    How canI get XP to leave my display settings file that I put them up.  I went in 'folder options' and set it to "remember each folder view settings.  But when I boot I find them changed.  Help!  Very frustrating!

  • Code of the product placed on the wrong profile

    I bought a game for windows live for myself, but I don't have a profile so I put it in the profile of my husband (who was his Xbox profile). When I realized that I could set up my own profile on windows live free, he wouldn't let me play the game on

  • Difference in size between Simulator .bar vs device-release .bar

    So, finally, I created my first app and I have a lot of trouble hell ship. so, here are the steps to generate the file bar. (using qnx momentics 2.0) 1) click Project, and then export to another directory (2) import these files into a new workspace.