Œuvres of function, but breaks used in class

I have this function I use again and again in my applications (Addins is only something I do this):

private function doAddins (): void {}
var _addIns:Array = [];
var _len:uint = app._chosen2.length;
for (var i: int = 0; i < _len; i ++) {}
var _m:String = app._chosen2 .@sn;
_addIns.push (_m);
}
}

Where "_chosen2" is an ArrayCollection collection defined in the main file of the application. Obviously he travels this collection of table and an array of all the attributes 'sn '. It works perfectly.

So I thought I would add to my class file of public services, such as a static function, such as:

public static void getSNs(a:ArrayCollection):Array {}
var _arr:Array;
var _len:uint is. Length;
for (var i: int = 0; i < _len; i ++) {}
var _m:String = a.@sn;
_arr.push (_m);
Return _arr;
}

And then I call it like: Utitlies.getSNs (app._chosen2);

But he bombed with an error I'm trying to coerce a table within a table collection. Why?

In the second function, you declare the variable as an array _arr, but you don't define it. This could be a part.

var _arr:Array = new Array();

Tags: Flex

Similar Questions

  • I installed Adobe elements 12 update to 6 items.  I need to use the save for Web function, but it is grayed.  I tried re-installing 12 items three times in case there was something missing, but this has not solved the problem and save the enemy

    I installed Adobe elements 12 update to 6 items.  I need to use the save for Web function, but it is grayed.  I tried to reinstall 12 items three times where it was missing something, but this has not solved the problem and enemy Save Web feature is always gray on. How can I get this feature too much work. I contacted the home and they have happened to you. I have 20 minutes to make a customers web work and if I don't work (about £500). Please advise/help.

    You are on the Expert tab in the editor?

  • Memory use and class of the custom movie clip?

    Hello

    I need to create instances of a clip 100. Is it better to add functions for these clips in the movie clip class or in a separate category?

    For example, I move(), setPosition(), setRotation() functions, would be that create these features a hundred times and held memory or just reference functions? What could be better?

    Thank you

    There is a slight advantage to create a function to handle all objects of class vs each class having its own class.  but it's such a small benefit that's not worth it to sacrifice any principle of encapsulation, so you should let each Member of the class to use the class methods.

  • How to use this class

    The following code is a class I want to use (Arc.as), but it doesn't have a constructor function (i.e. public void Arc()). How to use this class in Flex? I also placed the code I thought I could use.

    Yes, in the example of the arc, in the change of loop(e:Event):
    removeChild (sp);
    TO:
    container.removeChild (sp);

  • function of viscanf() using the question

    I write a function (not a primary function) I want to create this function as a document dll, when teststand use dll and run it.

    the question is that I want to use this result to get the instrument function, but I do not confirm viscanf's right?

    ViStatus _VI_FUNC Get_Frequency (ViSession instrSession, ViPReal64 frequency, ViString freqCommand)
    {
    ViStatus status = VI_SUCCESS;

    Bruno buf [BUFFER_SIZE];
    ViInt32 retCnt;

    If (Status = viPrintf (instrSession, "freqComamnd\n")<>
    Return MT8820B_status;
    If (Status = viPrintf(instrSession,"*OPC?\n")<>
    Return MT8820B_status;
    If (viScanf = (instrSession, "% f", & frequency))<>
    return the situation

    Return MT8820B_status;

    }

    I use viscanf() like that, right? Thank you

    You must use a pointer to ViReal64 inside your Get_Frequency () function to make use as output parameter.   When you call Get_Frequency(), you can use the & operator there often being a ViReal64 (not a ViInt32):

    Get_Frequency (instrSession, & frequency, freqCommand)

  • I need help with the use of Class.forName and getResourceAsStream

    I am trying to write code that will play an audio file. All references I found the point of code as follows...

                              Class dir = Class.forName("lib.testother");
                                InputStream input = dir.getResourceAsStream("/explosion.aac");
                                Player player =
                                    javax.microedition.media.Manager.createPlayer(input, "audio/aac");
                                player.realize();
                                VolumeControl vol = getVolumeControl(player);
                                if (vol != null)
                                {
                                    int volume = vol.getLevel();
                                    vol.setLevel(volume);
                                }
                                player.prefetch();
                                player.start();
    

    I use Blackberry JDE. Now, I'm supposed to put the audio file of the project?

    Second, how then use the class.forName function? I put the audio file as a member of the project and then tried the above code and I get that it can not find lib.testother (which is the path of the code).

    If I use getClass() instead of dir above, getResourceAsStream returns null.

    Are there examples of the use of these or how to include the audio in your project... from end-to-end. The code snippet above is all I could find and it isn't enough.

    THX

    D

    Check this thread:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=11616&query.ID=18...

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • I need serious help please... We do translations of textbooks, I searched an excessive type function but have been unable to find, we are working in indesign CS 5. It takes allot of time to delete the text and type in the new language.

    I need serious help please... We do translations of textbooks, I searched an excessive type function but have been unable to find, we are working in indesign CS 5. It takes allot of time to delete the text and type in the new language.

    Argh it's frustrating! I never noticed that the key was not working in InDesign.

    A bit of research and it turns out that the MS Office has this as an option in their software. But I can't find an option in the InDesign preferences to make it work.

    However, somethings do not appear in the shortcuts and preferences and are hidden triggers in InDesign that are accessible via a script.

    I'm not saying that it is possible to activate the button insert by using a script, but it is plausible that he can be activated.

    Maybe ask on the forum script? Scripting InDesign

    I know that this may be a possibility as with InDesign prior to export PDF documents interactive versions, there was previously no way to export PDFs interactive as unique pages if the gaps of.

    But the option to toggle this setting was scriptable.

  • If we then use the DML in function, this function can be used inside s

    If we use the DML statement in a function, then this function can be used within the select query or any DML query?
    select f from t2;
    

    I think that you wanted to interrogate t1.

    This works if the function is a stand-alone transaction:

    create or replace function f return number
    is
    PRAGMA AUTONOMOUS_TRANSACTION;
    begin
        update t1 set c=2;
        commit;
        return 1;
    end;
    / 
    
    select f from t1
    

    But as Billy, why would you do this way DML. And it's not stand-alone procedures should be used.

    A response to an interview question, but nothing wrong with it.

  • using the .class in css ID.

    creation of boxes on my site.  each box will be the same size, have the same rollover effects and everything, but the only difference is the color of the boxes and hyperlinks will be different for each box.

    I know that I can create these as a 'class id' in css, but won't that make sure all the boxes must have the same background color? How can I do this? Using the class option will make me a ton of time, but is not only of course how to make each a different color of the box.

    Your CSS syntax is incorrect-

    . Blue: {}

    This should be present-

    . Blue {}

  • 'OUT' parameter is declared but never used

    Hello
    I created a package.that is given below.

    CREATE OR REPLACE PACKAGE Pkg_Sam_Ref_Cursr
    IS
    TYPE pa_sam_details_recrd IS RECORD (EMPNO number 4);
    TYPE pa_sam_details_cursr IS REF CURSOR RETURN pa_sam_details_recrd;
    END;

    and I created a function.that is given below

    CREATE OR REPLACE FUNCTION FunSam_Report)
    p_empno NUMBER
    )
    RETURN Pkg_Sam_Ref_Cursr.pa_sam_details_cursr
    IS
    data_cursr Pkg_Sam_Ref_Cursr.pa_sam_details_cursr;
    BEGIN
    Data_cursr OPEN to select A.* from Emp A where A.Empno = A.Deptno order p_empno;

    RETURN DATA_CURSR;
    END;

    and created a stored procedure.that is given below

    CREATE or replace PROCEDURE SP_SampleSP)
    P_EMPNO NUMBER,
    OUT Pkg_Sam_Ref_Cursr.pa_sam_details_cursr) IS data_cursr Pkg_Sam_Ref_Cursr.pa_sam_details_cursr;
    BEGIN
    data_cursr: = FunSam_Report (P_EMPNO);
    END;

    at compile time it will throw the following error but sp is created and how to see the result.

    Error: Hint: 'OUT' parameter is declared but never used in "SP_SampleSP".
    Line: 3
    Text: OUT Pkg_Sam_Ref_Cursr.pa_sam_details_cursr) IS data_cursr Pkg_Sam_Ref_Cursr.pa_sam_details_cursr;

    Error: Hint: value of 'data_cursr' in 'SP_SampleSP' never used
    Line: 5
    Text: data_cursr: = FunSam_Report (P_EMPNO);
    CREATE or replace PROCEDURE SP_SampleSP (
           P_EMPNO IN NUMBER,
           data_cursr OUT Pkg_Sam_Ref_Cursr.pa_sam_details_cursr)
    IS
    BEGIN
       data_cursr:= FunSam_Report(P_EMPNO);
    END;
    
  • Using the class Tween w / dynamic text

    Hi all

    I feel sort of my way along here. I'm certainly not an expert in what I'm looking for.

    I created a small flash animation that imports data from an XML file into different six fields of text and one image. It works wonder.

    However, the customer would be as a kind of animation on the text so it fade, scaling, color changing, movement... whatever. I've only used the class tween once but that sounds like the way to go (I think...?).

    I'm stuck. I've been searching the Net and I can't seem to make sense what I read when it comes to use the Tween class with dynamic text.

    I enclose my actionscript.

    Can someone point me in the right direction?

    Thank you!!

    Nevermind, I think I found what I needed. Thank you guys!

  • The end of report database function call. Using the Evaluate function.

    Hi all

    We have a req when we need to call the functions of back-end of the end of the report. I knew the Evaluate function can be used to do the same. I tried to reproduce the same as the same thing, but it didn't work.

    One can please more elaborated on this. Syntax and other details. We must also pass the parameters to the function, probably a column value.

    Also please let me know where all changes must be made. RPD etc. as appropriate.

    It is of the selected, that we need to replicate in OBIEE.

    NVL (DWH.dwh_pa_get_si_value_f (Pa_Projects_All_V.Project_Id, Pa_Periods_All_V.Period_Name,-1, Dwh_Pa_Project_Si_Info.Currency_Type, Dwh_Pa_Task_Si_V.Task_Number, 'R'), 0)

    Thank you
    Pankaj

    Hey I am,.

    I found the solution to your problem...
    Under any logical table... you create a logical column and
    Select existing logical columns as source checkbox
    Click the Eclipse...
    Now, here you write...

    (Evaluate('dwh.dwh_pa_get_si_value_f(%1,%2,%3,%4,%5)', Pa_Projects_All_V.Project_Id, Pa_Periods_All_V.Period_Name,-1, Dwh_Pa_Project_Si_Info.Currency_Type, Dwh_Pa_Task_Si_V.Task_Number, 'R')

    Then click ok...
    Hope it works...
    It worked for me...

    Thank you & best regards
    Kishore Guggilla

  • installation of El Capitan in a mac by usb, but only using windows to create the USB

    installation of El Capitan in a mac by usb, but only using windows to create the USB

    I'm having a problem to install el capitan on a mac book pro 2009 has changed (dead) to an ssd HARD drive

    I can't find that any information how to do this from a windows machine (now only available) of the old system had the lion as I was told and when trying to install lion line or wireless it says it isn't available now so the machine is stuck without an operating system.

    If you are anywhere near an Apple Store, I would suggest bringing your MBP to and asking to help. For USB, you need to partition and format to allow to boot on a Mac, what Windows can not do. Then either create a bootable installer or install OS X on USB and then copy the installer it, boot from it and run the installer with the SSD as a target.

  • In my laptop, when I open the itunes window there is an option 'Internet Radio' to listen to the different type of music. This "Internet radio" function can be used on my iphone5? And if so, how can I make it work?

    In my laptop, when I open the itunes window there is an option 'Internet Radio' to listen to the different type of music. This "Internet Radio" function can be used on my iphone 5? And if so, how can I make it work?

    No more. It merged with the Apple's music.

Maybe you are looking for

  • clear Ext hard disk partitions in El Capitan to return to a single

    I have a disc of lightning (WDC) 2 TB ext.  I had it partitioned with 2 partitions - but now I want to use the entire disk as a single partition. I searched the web a solution (re El Capitan) and found this solution below BUT whenever I have to erase

  • the buffer copied into the buffer entry with Rs232

    Hello I have a problem with serial port and do not know what to think I send commands to a device (hmp231) and when I read the message on the entry stamp I retrieve the command only one thing that I've ever met, it would be a coding error? everybody

  • IV volume + iv tried everything, Please HELP!

    IV TRIED EVERYTHING BUT MY LAPTOP HAS NOT EITHER VOLUME! I WOULD LIKE TO HAVE SUITABLE ANSWERS. THIS JUST HAPPENED TODAY BEFORE IT WAS FINE!

  • CLICK DISAPPEARED

    IM RUNNING WINDOWS XP PROFESSIONAL SERVICE PACK 3.  Windows xp lost his sound.when ' by clicking on ' a new page or movement occurs it is usually a "click" of the bip. There is now no 'click' sound. It used to be there. That's happened? How to restot

  • My z3 is not waterproof

    Today I went to the sea with my z3 and I checked the flicks that we properly closed.I bought the mobile of Saudi ArabiaAfter 30 seconds in the goes off.Is this common problem.And whst ican do now