[Newbie Q] Custom component function appellant error #1061

Hello, I am trying to call a public function defined in a custom main application component, get error 1061...

Here is the code for

/ * generator.mxml * /.

<? XML version = "1.0" encoding = "utf-8"? >
< mx:Application
applicationComplete = "_init (); »
"" xmlns: my = ' * '.
xmlns:MX = "http://www.adobe.com/2006/mxml".
layout = "absolute".
width = "875.
height = "635" >
< mx:Script source = "generator.as" / >
...........................
..........................
< mx:VBox >
< mx:Panel put width = "658" height = "185" layout = "vertical" title = "Banner" id = "pnlBanner" horizontalAlign = "center" verticalAlign = "middle" >
< / mx:Panel >
< my: elementList / >
< / mx:VBox >
< / mx:HBox >
< / mx:Canvas >
< / mx:Application >

/ * generator.as * /.

...........................
..........................
private void imageHandler(event:Event):void {}
the image = new Image();
aImage.source = img._imgTmp.source;
aImage.maintainAspectRatio = false;
aImage.id = "0";
aImage.x = 0;
aImage.y = 0;
aImage.width = img._imgTmp.width;
aImage.height = img._imgTmp.height;
pnlBanner.rawChildren.addChild (aImage);
elementList.addElement ('image', the image);
}
...........................
..........................

/*elementList.mxml*/

<? XML version = "1.0" encoding = "utf-8"? >
< mx:TileList xmlns:mx = "http://www.adobe.com/2006/mxml".
creationComplete = "init (); »
Click = "clickElement (Event);" »
dragComplete = "dragElement (event);" »
allowMultipleSelection = "false".
dragMoveEnabled = "true".
dropEnabled = "true".
dataProvider = "{cllElements}" >
< mx:Script source = "_elementList.as" / >
< / mx:TileList >

/*elementList.as*/

ActionScript file
import flash.events.Event;
Import mx.collections.ArrayCollection;
private var arrElements:Array = new Array();
[Mandatory]
private var cllElements:ArrayCollection = new ArrayCollection (arrElements);
................................
................................
public void addElement (type: String, obj:Object): void {}
cllElements.addItem (obj);
}
................................
................................

I get a compile time error #1061 gravity and Description path location creation time Id resource
1061: Chiamata a UN metodo called no addElement mediante a re con tipo statico class.    generateur/src/generator.as 65 1243862469015 1900 line

Sorry for the Italian, BTW the error is in the red line on the generator.as file.

Any ideas would really be apperciated, because it's for hours trying to guess the reason...

In fact your class name and the id must be the same. Sorry for my previous suggestion...

You should try to change it to:

and

elementListID.addElement ('image', the image);

and if they are in the same folder so no need for the import statement.

-Gerard

Tags: Flex

Similar Questions

  • Using Custom Component error MEssage display

    Hello

    I built the custom component to validate the size of the file and the file Extension.

    That is, user should be able to check in the document if the size is less than 5 MB and the file extension is one of the "png", "tiff", "doc", "Pdf".

    Here, whenever validation files I'm throwing the exception "Type of file file size exceeds the limit or not valid.

    I am able to get the custom component of work according to the validation. And is alsi recording the error in the log file.

    But I need to show the error message when the click the user on the button control on the page of the Complutense University of MADRID.

    From now on, it shows a generic error saying "cannot perform the function validateStandard and service CHECKIN_NEW_SUB.
    The error was caused by a problem generated internally. The error was logged.

    Any help on this is much appreciated.

    Kind regards
    Helen Shetty.

    Hello

    You can throw a ServiceException in your filter with the message you want to display.

    Roman.

  • How to pass skinclass for custom component?

    Hi guys, I'm moving my main application of my custom component skinClass. Here is my code, but it gave me an error saying "initializer for 'skinType': values of type spark.componets.supportClasses.Skin' cannot be represented in the text. "  I don't know if it is possible to do. Any thoughts? Thank you very much.

    hand. MXML

    < components: loginPanel id = "loginPanel" horizontalCenter = "33" "-15" = Red

    skinType = 'skins. CustomPanel.

    loginButtonClick = "loginpanel_loginButtonClickHandler (event)" / >

    component loginPanel

    script

    [Bindable]

    public var skinType:Skin;

    MXML

    < s:Panel cornerRadius = "5".

    ID = "loginPanelComp".

    "32" = x y = '8 '.

    width = "373" height = "200".

    title = "sign in".

    skinClass = "{skinType}.

    >

    ...............

    < / sign >

    You try to pass a string to match the value of a class. SkinnableComponent skinClass property is a style.

    You must use styles css, or if you want to set this runtime do something like

    private var _skinRef: Class;

    public function set skinClassRef(value:Class):void

    {

    _skinClassRef = value;

    If (loginPanelComp)

    {

    loginPanelComp.setStyle (skinClass, skinRef);

    }

    }

    C

  • Focusout/focusouthandler() in a custom component

    Hello.

    I made a custom component using a canvas with a TextInput and a button inside.

    I need to make a Focusout/focusouthandler() event to be called when the focus out of my component custom, but not be called when the focus switch beetween the inputtext and the button inside the canvas.

    How can I do?

    Tanks.

    Hi This is simple. Please try this example.


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    "xmlns:MX ="library://ns.adobe.com/flex/mx"xmlns:Cn =" "*" creationComplete = "Init ()" >
                  
       
            import flash.events.Event;
    Import mx.controls.Alert;
           
    private function Init (): void
    {
    objTemp.addEventListener ("Focusout/focusouthandler()", FocusOutHandler);
    }
           
    private void FocusOutHandler(event:Event):void
    {
    trace ("CanCom out focus");
    }
    ]]>
       

       
       
           
       

       

       
       
       

       

    _____________________________________ CanCom.mxml ______________________________________


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/halo" >


            import flash.events.Event;
           
    private void FocusOutHandler(event:Event):void
    {
    try {}
    If (this.getFocus () == btnTemp: this.getFocus (). parent.parent == txtTemp)
    {
    return;
    }
    } catch (err: error) {}
               
    dispatchEvent (new Event ("Focusout/focusouthandler()"));
    }
    ]]>
       


           

  • Custom component... Null object reference

    I'm having a hard time understanding how to solve a problem, I have met in my flex application and I hope someone here can help me out! I will try and provide a very basic example that illustrates my problem...

    <! - Main.mxml - >

    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="vertical"initialize =" init () "> "

    < mx:Script >
    <! [CDATA]

    private function init (): void {}

    I have a call here that connects to a server of clodfusion by a remote object that returns a user object

    }

    []] >
    < / mx:Script >

    Then, I call a component customized which manages permissions for my application.  I pass on the user object in the custom component

    < user comp: permissions = "{user}" / >

    < / mx:Application >

    <! - Permissions.mxml - >

    " < = xmlns:mx mx:VBox ' http://www.Adobe.com/2006/MXML "creationComplete ="init ()">

    < mx:Script >
    <! [CDATA]

    Basically, this function is triggered and gets some info that depends on the user loged in

    private function init (): void {}

    svc.getSomething (user. PKEY);

    }

    < / mx:Script >

    < / mx:VBox >

    So the problem is that my call to the main application takes a few seconds to run and as the client component is processed before the entire purpose of the use is returned I get the error "object Null Reference '...  How can I make sure that the user object has been created and returned prior to use in my custom components?

    Thank you

    Probably the error will disappear if you create an empty instance of the VO of the user.

  • 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...

  • Get the custom IdocScript function contributor data file

    Hello

    I have a requirement to retrieve a number of elements of a given contributor data file. The problem is, I don't know how to retrieve the XML code inside a custom component of IdocScript.

    Given the content of the data contributor file ID, is there an easy way to get the XML file, or do I need to use with a service call?

    Thank you!

    If it's a Java component, why not just get the direct file system XML file? The demand function, you could have a file path in the binder... If not, use the IdcFileDescriptor object:

    https://groups.Yahoo.com/neo/groups/intradoc_users/conversations/topics/25937

  • Alternative to RIDC getResponseStream() in Custom Component

    I am trying to create a custom component that does some work with the primary file and checks in another file. When the replacement file is started, I want to check in the primary file.

    I have found a way to recover the primary file using RIDC, but I'd like to find a way to include this functionality in a custom filter class. Here's a snippet of what I want to reproduce inside the filter:

    ServiceResponse response = idcClient.sendRequest (userContext, binder);

    InputStream fis = response.getResponseStream ();

    OutputStream fos = new FileOutputStream (filename); @

    read of fis, write to fos

    the comparison/work

    My question is mainly to find where the content server provides the input stream for a file that is stored in the database.

    http://www.redstonecontentsolutions.com/technical-blog/Java-filter-retrieving-aFile

    http://www.ecmconsultant.NET/2011/09/UCM-11g-retreiving-rendition-path.html

    Jonathan

    http://jonathanhult.com

  • Not able to make a checkin to a custom component

    Hi all

    I'm building a custom component which should do a checkin in Webcenter Content.When we are trying to do and test what we get below error every time.

    The error is not so much more descriptive and tried to see if there is any more logs generated in the information system of verification of the Webcenter content but there is no more errors in the Audit log as well.

    Here is the error:

    ! csUnableToCheckIn, (null)! csSecurityGroupNotDefined

    If anyone has faced this problem before, please let us know the solution so that we can fix it immediately, because it becomes a Blocker for us.

    Kind regards
    Elena

    We have solved this problem by e-mail.

    You do not correctly set dSecurityGroup.

    You do this:

    String dSecurityGroup = "";

    serviceBinder.putLocal (dSecurityGroup, "Complaints");

    You must do this:

    serviceBinder.putLocal ("dSecurityGroup", "Complaints");

    The key for putLocal must be the literal string of the name of the metadata field. You will need to change all your other putLocal both method calls.

    Jonathan

    http://jonathanhult.com

  • OSB custom Xpath functions

    I use custom XPath functions. I put all the associated files in the % OSB_HOME%/config/xpath-functions. It works very well in my development environment which is a unique domain server.

    But when I'm deploying on my new UAT environment including a multiple domain server, it gives an error.
    My server admin is port 7001 and server run on 8001. Sbconcole located on 7001, I see my custom in the Xquery function window function. I can also click on the test button in the Xquery designer view and it works very well.

    But when I activate my proxy and then use the test console to run the proxy it gives an error. Test console running the proxy on the managed server. I guess that enforcement cannot find the custom managed server jar file.

    no idea what directory I need to copy the jar file on measurement so tat it works as well in the admin and the managed server?

    just a point, when I use fn - bea * functions that it works very well. To me, it is also a custom function. But I noticed that the jar file is not installed in the % OSB_HOME%/config/xpath-functions. no idea what is the name of the jar for fn-functions of bea.

    concerning
    Roshan

    I have built custom functions and tested in the single server, and also an area of OSB in cluster. Fuctions of custom XPath work correctly in two of these area in the console to Test the OSB

    I just placed the files xml and jar containing custom under C:\beaplatforms\11g\wls1033\osb11g\config\xpath-functions functions

    osbCustomFunctions.xml
    osbCustomFunctions.properties
    customXPathFunc.jar

    You can try to restart the full Domain - Admin servers and managed and test again.

  • Alignment of child in the custom component in Flex 3

    Hello

    I am newbie to Flex and glued on the essential point.

    I'm trying to align the children in a custom as Center horizontally and vertically from the Middle component but the result is not harmonizing at all.

    It's my custom componet "LoadingPanel.mxml" under the component package which children I want to focus.

    <?xml version="1.0" encoding="utf-8"?>
     
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
                 width="100%"
                 height="100%"                                   
                 title="DCP v1.1" horizontalAlign="center" verticalAlign="middle">
         
         
         <mx:Panel backgroundColor="#BB3030" width="300" headerHeight="15">
               
               <mx:ProgressBar id="bar"
                                    indeterminate="true"
                                    labelPlacement="top"
                                    minimum="0"
                                    visible="true"
                                    maximum="100"
                                    label="Loading..." 
                                    direction="right"
                                    mode="manual"
                                    width="100%"
                                    trackHeight="14"
                                    
                                    color="#FFFFFF"/>
         </mx:Panel>
         </mx:Panel>
    
    

    Here are my main application where I use this custom component

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:component="component.*">
         <fx:Declarations>
               <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         <component:LoadingPanel/>
    </mx:Application>
    
    

    I also tried to give the alignment in the custom component instantiation.

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:component="component.*">
         <fx:Declarations>
               <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         <component:LoadingPanel horizontalAlign="center" verticalAlign="middle"/>
    </mx:Application>
    
    

    I'm sure that there must be no way to do it, but it's hard luck for me.

    Thank you

    Mac

    Jin

    pls put your control on the box and set the property of the box horizontalAlign="center" verticalAlign="middle" , may be it will be wrk.

  • Changing the State of the application from a custom component

    Hello, I have several custom components that are included in the original application.

    When I try to change the State of a custom component, I get an error saying "undefined state: name of the State." How can I change the State of the application from a custom component? All States are defined in the original application.

    @linrsvp,.

    If you are using Flex3 try Application.application.currentState = "somestate;

    If you use Flex4 try FlexGlobas.topLevelApplication.currentState = "somestate;

    Don't forget to import the namespaces corresponding to the above.

    Thank you

    Jean Claude

  • Pass a parameter for the custom component - get null

    Main MXML (part of the code):

    < s:Application

    "" xmlns:ns1 = "*".

    creationComplete = "init (); >

    import MyComponent;

    private function init (): void {}

    var myArray:Array is ["FFF", "TT", "RRR"];.

    myComp.width = 200;

    myComp.height = 200;

    myComp.getArray = myArray;

    myContainer.rawChildren.addChild (myComp);

    }

    < fx:Declarations >

    < ns1:MyComponent id = "myComp" x = "0" y = "0" / >

    < / fx:Declarations >

    custom component:

    package 
    {
              public var getArray:Array;
    public class MyComponent extends Sprite { } trace (getArray); trace null
    }
    }

    What is myContainer?

    I have a working version with my container as UICOmponent inside the hand.

    SerializableAttribute public class MyComp extends Sprite

    {

    private var _getArray:Array;

    public void MyComp()

    {

    }

    public function get getArray (): Array

    {

    Return _getArray;

    }

    public function set getArray(value:Array):void

    {

    trace ("setter", value);

    _getArray = value;

    }

    }

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    "" xmlns:NS1 = "*".

    minWidth = "955" = "600" minHeight

    creationComplete = "init (); » >

    private function init (): void {}

    var myArray:Array is ["FFF", "TT", "RRR"];.

    myComp.width = 200;

    myComp.height = 200;

    myComp.getArray = myArray;

    myContainer.addChild (myComp);

    }

    ]]>

    Not sure whether what you are after but it traces:

    Setter FFF TTT, RRR

    Why do you add to rawChildren?

    C

  • Code preloader: error 1061

    I bought a preloader on Flashden.com and it did come with many instructions.

    Here's what I did:

    My index file has my calendar with stocks, preloader, then my video clips for my opening page. I placed my preloader Framework 1 movieclip and ends on frame 2. In a frame on the layer actions I stop();

    I then have all of my video clips on frame 3 with my actions to my movieclips on frame three. I added a name to frame named clue 3

    My preloader movieclip has this code:


    Stop();


    this.addEventListener (Event.ENTER_FRAME, loading);


    function loading(evt:Event):void
    {

    var percentageLoaded:Number = Math.round (this.stage.loaderInfo.bytesLoaded/ this.stage.loaderInfo.bytesTotal * 100);
    this.loaderInformation.loadingtxt.text = "loading" + percentageLoaded + "%";
    If (percentageLoaded > = 100)
    {

    this.removeEventListener (Event.ENTER_FRAME, loading);

    this.parent.gotoAndPlay ("index");
    }
    }

    When I have the test file, I get an error 1061 saying call to a gotoAndPlay method maybe not defined through a refernece with static type flash.disply:DisplayObjectContainer.

    Any ideas on what I can do to fix this? I contacted the person I bought it, but have not heard yet return.

    Thank you!

    Mariah Danielsen

    Try the casting of the parent as a MovieClip...

    MovieClip (this.parent) .gotoAndPlay ("index");

  • Reset the custom component

    Hello!

    I have an application with some States.

    Each State shows a different custom component.

    My problem is that if someone types something in one of the States then changes state and returns then the text will always be there.

    Is there a way to reintitialize the custom on each display state component or do I have to create functions to reset everything myself?

    Thank you!

    Hello Mashup,

    You must manually reset all fields in your component to make the component reset...

    To clear the textInputs you must explicitly set the text property to empty to reset their and so...

    Thank you

    Jean Claude

Maybe you are looking for

  • Problems with Toshiba HDD Recovery

    Hello A few days ago, I bought a new Toshiba Satellite notebook, everything was going well until I started to delete or disable the programs that have been added automatically with Windows 7 Home Premium 64 bit on the HARD drive,because for me, most

  • Cannot find drivers or tools for Satellite Pro 2100

    I want to reinstall one of my old Satellite Pro 2100 notebooks.Unfortunately the download section lists all downloads for this laptop. On the German site I use: ArcivSatellite ProSatellite Pro 2xxxSatellite Pro 2100 Even if I search for the model and

  • Drivers for card reader 5070-2566

    I just upgraded my vista to Windows 7 x 64 lodge and I can not find drivers for the SD/flash/etc, 5070-2566 of memory card reader.  Cards do not come under 'My Computer', and the drive appears in the Device Manager, but he said Don t use, I intend to

  • It is important to activate windows firewall

    It is important to enable the windows firewall in my personal office. I am also connected to the internet. What happens if the firewall is not enabled?

  • ISA550 help of deployment.

    Greeting I need to deploy a new ISA550 firewall in network scenarios following: 1. all computers are connected to a switch (192.168.1/24). Static IP address is given to the nodes. Its a Cisco SG - 300 28PoE (L3) switch. 2. There is an ADSL WiFi route