Pass Class Object To FMS Using NetConnection.call Method

Hello All,
I have a custom class that defines several methods on itself
to retrieve its data. This class object is then sent to FMS via the
NetConnection.call method. Once received by FMS, FMS calls the
remote method to dispaly the class object on connected clients
(minus the originator).
Now, standard properties are displayed correctly, but when I
call the class method to retrieve the class data, no data is
retrieved.
My question is, can FMS handle class objects as parameters in
a NetConnection call. If not, is there a better practice of
applying methods to retrieve the class data? Example below...
class com.QuizItem
var numOfAnswers;
var getAnswer;
function QuizItem(question)
this.numOfAnswers = 0;//<-- Returns correct number of
answers
this.getAnswer = function(answerNumberToGet)//<-- Does
not return any data when called by client side script
return this.answers[answerNumberToGet];//Already populated
array
Regards,
Shack

First, I know JAVA does not working "pass by
reference". It's only working pass by value. (or call
by value)But obviously you don't fully understand what it means.
Isn't main_a and method_a alias?
if there is not alias, why? please explain to me.No. They're two independent references coincidentally pointing to the same object. In your swap method, you move method_a to point to something else. This does not affect main_a.
and why main_a.hashcode() is main_a's value?why not? What else should it be?
I think It's mean copy object. but main_a and
method_a, they have same object id! @_@;;;It means "copy reference", same object.

Similar Messages

  • How to pass class object  as in parameter in call to pl/sql procedure ?

    hi,
    i have to call pl/sql proecedure through java. In pl/sql procedure as "In" parameter i have created "user defined record type" and i am passing class object as "In" parameter in call to pl/sql procedure. but it is giving error.
    so, anyone can please tell me how i can pass class object as "In" parameter in call to pl/sql procedure ?
    its urgent ...
    pls help me...

    793059 wrote:
    I want to pass a cursor to a procedure as IN parameter.You can use the PL/SQL type called sys_refcursor - and open a ref cursor and pass that to the procedure as input parameter.
    Note that the SQL projection of the cursor is unknown at compilation time - and thus cannot be checked. As this checking only happens at run-time, you may get errors attempting to fetch columns from the ref cursor that does not exist in its projection.
    You also need to ask yourself whether this approach is a logical and robust one - it usually is not. The typical cursor processing template in PL/SQL looks as follows:
    begin
      open cursorVariable;
      loop
        fetch cursorVariable bulk collect into bufferVariable limit MAX_ROWS_FETCH;
        for i in 1..bufferVariable.Count
        loop
          MyProcedure( buffer(i) );   --// <-- Pass a row structure to your procedure and not a cursor
        end loop;
        ..etc..
        exit when cursorVariable%not_found;
      end loop;
      close cursorVariable;
    end;

  • Problem in passing/returning objects over dynamic web service call

    Hi Friends,
    I am beginner in java web service.
    Here is the problem I am facing when I pass/return user defined objects to remote web service method using dynamic we service call.
    The client can call the remote web service method in 2 ways.
    1. By generating client stubs using WSDL file
    - In this case, I am able to pass/return the user defined objects to remote method without any issue only when the server side web services are deployed in any server(jboss)
    - But in java 1.6 & above, the web services can be deployed without server using endpoint. In this case, I am not able to pass/return objects over web service calls.
    2. Without generating client stubs (dynamic web service call)
    - This will establish a connection at run time using the given WSDL file (I have attached the document). I have to form an XML(This will contain API name, arguments) string as input at run time
    - In this case, it allows only string as argument while passing & returning.
    Please let me know if you can help me on this.
    Regards,
    pani

    I'm not sure about your question, but this might help:
    [http://forum.java.sun.com/thread.jspa?threadID=5251188|http://forum.java.sun.com/thread.jspa?threadID=5251188]
    You might also want to read on JAXB.

  • How to get a LabVIEW class object to expose an invoke-node method?

    Hi,
          I like the property/invoke-node "paradigm" used for interacting with "objects".  Can LabVIEW-class objects expose their properties and methods this way?  Can one or more LabVIEW-class objects be compiled into a library or "assembly" (or other distrubution format) that allows the property/invoke-node usage?
    I've looked at (but not completely understood) "Creating LabVIEW Classes".  Have also searched for related posts.
    The pic below shows an invoke node wired to a class with a Public VI "VAT.Status.Hello.vi".  I'd like to see VAT.Status.Hello show-up as a Method.  (I just tried "Select Method", and selected "VAT.Status.Hello.vi" but dialog's "OK" button stays greyed-out.)
    Cheers.
    Message Edited by tbd on 03-29-2007 03:15 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    VATStat.JPG ‏54 KB

    Hi Aristos,
          Thanks for the reply!  It was a bit dissappointing, though.
    It appears the LabVIEW-class object will be moving away from (what seems to me) a convenient object-interface presented by the invoke-node/method paradigm - which allows us to interface with a large set of "objects" (.NET, ActiveX, LabVIEW GUI, VISA Resource, ?) in a similar manner and independent of the object's origin.  Being able to read the methods and parameters that appear in these nodes is also helpful for understanding diagram logic!
    I do like the option of dropping a friendly "VI looking" icon on the diagram, but perhaps an optional - even default - VI-icon representation for a class-object invoke-node is feasible - so the LabVIEW class-object could be the more generic object first, but with a traditional-G representation(?)
    Given the answer "We would like, someday, to support the property node"
    and "in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future",
    ... I guess you'll break the wire in the next version, but (perhaps) allow it again - if support of the property node is ever implemented?
    Regards.
    P.S. For the record, huge THANKS to whoever it was that straightened-out enumerated-types (somewhere) between LV4.1 and LV6.1.  Every time I add or remove an enumeration in a typedef, I silently give thanks to the bright and thoughtful soul(s) who made this valuable tool work so well!
    Hello. This is your friendly neighborhood R&D guy for LabVIEW classes.
    Regarding your request about property and invoke nodes as relates to LV classes....
    Short story: We would like, someday, to support the property node. We have no intention of ever supporting the invoke node.
    Long story: As we were creating LV classes, we had to evaluate the right programming interface for these things. We wanted LV classes to behave as new data types in LV. A developer should be able to create a LV class, then give it to someone who doesn't even know OO programming, and that second programmer could use the new data type without learning a lot of new concepts. From this principle, we held fast to the idea that the programming interface should be subVI calls whereever possible. The invoke node is really nothing more than a VI minus the icon. If you want, you can popup on any subvi node and uncheck the option "View as Icon". This will make the node display in a way that has the terminals listed as text, like the invoke node. So, at the end of the day, the invoke node is simply a subroutine call in LV that is language dependent, as opposed to the language independent iconography of LV generally.
    The property node is a slightly different story -- the functionality of a property node is actually different than an invoke node as its terminals are various subsets of the properties available, not a fixed list of parameters like the invoke node. The property node provides a nice interface for setting multiple properties in a block and only having to check a single error return. Very friendly. Our intent is to allow you to create a VI that has 5 terminals: object in, object out, error in, error out, and either a single input or a single output of your chosen type. VIs with this conpane could be marked as "properties" of the class and would show up when you wire the class wire to the property node. We would call the subVIs behind the scenes as needed to get/set the properties.
    This is on the longer term roadmap because it is "syntactic sugar" -- it sweetens the programming style, but it is not necessary to program effectively. You can get the same effect by writing those same VIs and stringing them along on a block diagram "railroad track" style. We'll probably get around to it in three or four versions of LV -- there are some major user requests that impact functionality that have to get done first.
    PS -- in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future of people thinking there's a way to use these nodes.
    Message Edited by Aristos Queue on 04-02-2007 09:56 AM
    Message Edited by tbd on 04-03-2007 12:39 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Problem while sending ByteArray from as3 client through netconnection call method to red5 server

    Hi to all,
    I'm trying to send from as3 client a ByteArray of more or less 3 MB using NetConnection's call method but I am unable to do it, cause I get a timeout on the server and the client get disconnected (I have also increased the timeout limit in red5.properties but nothing changed). If I try to send a smaller ByteArray I don't have problem, even if the trasfer is really slow.
    Any solution?
    thanks

    put it in code tags so it's readable
    CLIENT
    public void sendLoginData(String data)
    int c=0;
    byte loginData[]=new byte[data.length()];
    loginData=data.getBytes();
    try
    out.write(loginData);
    System.out.println(client.isClosed());
    // here i want 2 receive the 1 byte data whch i hv sent frm server's RUN() method
    //following code is not working :( it gets hanged
    while((c=in.read())!=-1)
    System.out.print(c);
    System.out.print("hi");
    catch(Exception e)
    System.out.println("Caught:" + e);
    finally
    out.close();
    }SERVER
    public void run()
    boolean flag;
    try
    flag=verifyLoginData(ID); //this function verifies the login data by connecting to DB
    System.out.println(flag);
    if(flag==true)
    //send login valid
    bos.write(1);
    bos.close();
    else
    //send login invalid
    bos.write(0);
    bos.close();
    catch(Exception e)
    System.out.println("caught " + e);
    }

  • About Class Object  as Array

    Hello.. I'm beginner in Java Programming
    Now i learn about Array.. i'm not understand about use class object become array. for example i'm create class object Card.
    Then i call Card object to CardTest as main object and Card object called as array.
    can you tell me about how to work Card object as array in CardTest ?
    Edited by: 994075 on Mar 14, 2013 11:55 PM

    994075 wrote:
    yup..thanks guru :DI'm no guru, I just bought a decent Java book 10 years ago and here I am.
    so i guess Object Class can be array :).I don't get that statement. You can store objects in an array, if that's what you mean. An array itself is also an object.
    but i'm not understrand if static method in Card object can be called automatically when Card initialized in CardTest?a) research constructors
    b) you usually don't need static methods, its just something that people new to the language tend to overuse because then you don't have to create object instances. Forget about static methods, try to make it work using regular non-static methods.
    And you really should read and study more, you're coming to the forum way too soon. First get a solid knowledge base, the only thing you're doing now is asking questions that you could have answered for yourself by studying more.

  • Issue with Capturing Long text using CALL METHOD EDITOR- GET_TEXT_AS_STREAM

    HI Experts,
    Standard Long text is capturing using CALL METHOD EDITOR->GET_TEXT_AS_STREAM
         but not working for Custom Long text – Only changes
    Here is the Issue:
    1)      Created Custom Long text in TAB. --> Good
    2)      Entered few lines in custom Long text  --> Good
             Click on Standard Tab , Leaving Custom tab and Custom Long text-->Good
    4)      In PAI of Custom Tab – Changes captured using CALL METHOD 1 ( See below Code 1)--> Good
    5)      Entered few lines in Standard Long text in Standard Tab -->Good
    6)      Click another Standard Tab
    7)      In PAI of Standard Tab – Changes captured using CALL MEHTOD 2 ( See Below Code 2)-->Good
    8)      Come back to Standard Tab / Standard Long Text , Enter few more lines.
    9)      Change the Tab , IN PAI of Standard Tab/Standard Text , Changes Captured using CALL METHOD2 ( See Below CODE 3) --> Good
    10)   Go to Custom Tab , Custom Long text , Entered few more lines--> Good
    11)   Click on any other tab, Triggered again PAI of Custom tab / Custom Long text using Call Method1 ( See Below Code 4) -->Good triggered PAI same CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM.
    12)   But additional lines are not captured , saying ZERO LINES in Internal Table and IF_MODIFIED = NO  -->Issues lies here.
    CODE1 ( Custom Long text entry capturing – First Few Lines )
    Custom Long text Entries are stored in LS_OUTTAB-TEXT first time when entered few lines and LV_MOD is 1.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT ( FIlled with Lines entered in custom long text )
              IS_MODIFIED            = LV_MOD ( Value 1 , Modified )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    CODE2 ( Standard Long Text Entry Capturing – First Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT first time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE ( Value 1 , Modified )
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED.
    CODE 3 ( Standard Long Text Entry Capturing – Second time Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT  second  time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED. ( Value 1 , Modified )
    CODE4 ( Custom Long text entry capturing – Second Time Few Lines )
    Custom Long text Entries are not stored in LS_OUTTAB-TEXT Second Time when entered few lines and LV_MOD is 0.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT  ( ZERO ENTRIES )
              IS_MODIFIED            = LV_MOD   ( NOT MODIFIED Flag )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    Can anyone help me out of this.
    With Regards,
    Bala M

    Excellent Eitan,
    Here is what I am trying to Achieve.
    In Create Notification IW21 , They need 5 Long Text in Custom Tab ( Say Tab Name is MBR ).
    TAB1 NOTIFICATION Standard Information , TAB2 REFERENCE OBJ , TAB 3 MalFunction , Breakdown Standard one...... TAB 7 ( Custom Tab ).
    In Custom Tab , I added 5 LONG TEXT ( its 5 WHY Concept ).
    When the User enters data in 5 Long text , it should store long text along with Notification number when save.
    But Notification number will be generated @ the time of SAVE , but before that its just shows as
    %0000000001 ( and Number will be generated 1000065479) at Save.
    How to achive this .
    I did this:
    Added 5 Custom Container. and In PBO / PAI
      PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    IN PBO
       CREATE OBJECT TEXT_EDITOR1 ,    CREATE OBJECT TEXT_EDITOR2,    CREATE OBJECT TEXT_EDITOR3 like wise 5
       CALL METHOD TEXT_EDITOR1->SET_TEXT_AS_R3TABLE ,    CALL METHOD TEXT_EDITOR2->SET_TEXT_AS_R3TABLE .. Like wise 5 , So when the user Click on Custom Tab ( MBR ).
    It give 5 Long text.
    When he click tab1 or tab2 or tab3 .. and again tab MBR , still data is available.
    How to store this data for future retrival ( IW22 or IW23 ) ?
    Its working fine when I enter first time and goes here and there and finall save .
    IN SAVE BADI , I imported the Long text and created Standard Text SO10 with Notification Number with LONG1 , LONG2 .. means 1000065479LONG1 as standard text.
    But not working when I entered first time and go to tab1 and tab2 and then to MBR tab and added few more lines , its not exporting full lines and in IMPORT ( SAVE BADI ) giving ZERO Lines.
    Please help and thanks for your quick response.

  • How to typecast Object Class object dynamically

    Hai every one
    i have a object of any particular class , but i don't know the variables in that class object. But i have string variable contains value of variables in that class object.
    So i use following method for get value of variables in that class object.
    class ObjectCLass
         Sub s=new Sub();
         public static void main(String[] args)
              ObjectCLass a=new ObjectCLass();
              try
                   System.out.println(*a.getClass().getDeclaredField("s").get(a)*);
              catch(Exception e)
                   System.out.println("Exception");
    class Sub
         int i=5;
         public void print()
              System.out.println("Hello World!");
    }Here the bolder line give Object class object. By using this Object class object i need access the variable i and method print(). So i need to cast Object class object into sub class
    so how can i typecast it
    i try with following methods , but i cant succeed
    1.(  *(a.getClass().getDeclaredField("s").get(a).getClass)*   a.getClass().getDeclaredField("s").get(a)   ).print() ;
    2.(  (Class.forName(�Sub�) ) a.getClass().getDeclaredField("s").get(a) ).print();Please any one one help me how to typecast it dynamically
    By
    Thiagu

    If you know you're going to invoke the "print" method on an object, then you also need to know the type of the class, or interface, which has that method.
    It seems what you are looking for is a tutorial on interfaces.
    http://java.sun.com/docs/books/tutorial/java/IandI/index.html
    In a nutshell, you can set up an interface which defines a "print" method, and create class(es) which implement that interface. Then as long as you have an object which implements that interface, but do not know the exact type of that object, you can simply cast it to the interface type and invoke the method.

  • Differences between NetConnection.call() and RemoteObject

    I need to make a call from a Flash client to a server. I figured out that I can either make a remote call using NetConnection.call() or RemoteObject. Can anyone tell me what are the differences between the two? Is there another way to make remote call?

    Explain the purpose of the call? You could use xml.load() or even LoadVars() to make calls to servers.

  • Errors when using the Call statement for MS SQL Server

    I've tried executing a Stored Procedure using the Call method of Portal 2 Go. But it gets an internal error b/c of it. Any Ideas why and how to resolve?

    Hello,
    Which version of SAP BOBJ XI3.1 you are using?
    What I am aware is BEGIN_SQL was very well working for SQLServer2005 in case of ODBC connection.
    Can you try one thing for SQLServer2008 have a Native driver installed on your client machine and use ODBC connection rather than OLEDB connection.
    If that works fine, its good
    Otherwise you can raise a message for resolving this problem with the support team.
    Thanks,
    Vivek

  • Issue using ODBC CALL

    I'm calling a oracle stored procedure using ODBC Call method
    {call testSP(?)}"&params
    The parameter read from the SP is VARCHAR2. On this call, the 2001th character gets replaced by chr(0). The same SP called with Begin, End block does not reproduce the error. Can someone please point me to a document which explains this? please feel free to ask any questions to clarify the issue

    maybe you can try another theme. You can download hundreds of themes. There is surely one that displays the time during the "incoming call" screen.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • Calling method of a custom infotype from ABAP

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from abap report this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Had the same problem (probably copied from the same program). The answer is that you need to commit the work at the end using something like
    * Commit
    CALL METHOD busilog->flush
      EXPORTING
        no_commit = space.
    Here is an example of my code for IT0002 which works.
    *& Report  Z_TEST2
    REPORT  z_test2.
    DATA: a_masterdata_bl TYPE REF TO if_hrpa_masterdata_bl,
          p0002         TYPE p0002,
          lo_0002 TYPE REF TO cl_hrpa_infotype_0002,
          ls_p0002_ref TYPE REF TO data,
          container_tab    TYPE hrpad_infty_container_tab,
          container  TYPE REF TO if_hrpa_infty_container,
          message_handler TYPE REF TO cl_hrpa_message_list,
          infotype_logic TYPE REF TO if_hrpa_infty_bl,
          update_mode TYPE hrpad_update_mode VALUE 'XXX',
          lt_0002_container TYPE REF TO cl_hrpa_infotype_container,
          key TYPE pskey,
          l_is_ok          TYPE boole_d.
    FIELD-SYMBOLS <p0002> TYPE p0002.
    * get business logic from masterdata factory
    CALL METHOD cl_hrpa_masterdata_factory=>get_business_logic
      IMPORTING
        business_logic = a_masterdata_bl.
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    *TRY.
    CALL METHOD a_masterdata_bl->read
      EXPORTING
        tclas           = 'A'
        pernr           = '508'
        infty           = '0002'
        begda           = sy-datum
        endda           = sy-datum
        no_auth_check   = 'X'
        message_handler = message_handler
      IMPORTING
        container_tab   = container_tab
        is_ok           = l_is_ok
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    READ TABLE container_tab INTO container INDEX 1.
    lt_0002_container ?= container.
    TRY.
        CALL METHOD lt_0002_container->primary_record_ref
          IMPORTING
            pnnnn_ref = ls_p0002_ref.
      CATCH cx_hrpa_violated_assertion.
    ENDTRY.
    ASSIGN ls_p0002_ref->* TO <p0002>.
    MOVE-CORRESPONDING <p0002> TO key.
    break stantric.
    <p0002>-vorna = 'Rick'.
    container ?= lt_0002_container->modify_primary_record( <p0002> ).
    TRY.
        CREATE OBJECT lo_0002
          EXPORTING
            tclas = 'A'
            infty = '0002'.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    CREATE OBJECT message_handler.
    TRY.
        CALL METHOD lo_0002->get_specific_bl
          EXPORTING
            versionid      = '01'
            tclas          = 'A'
            pskey          = key
          IMPORTING
            infotype_logic = infotype_logic.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    TRY.
        CALL METHOD infotype_logic->modify
          EXPORTING
            old_container   = lt_0002_container
            massn           = space
            massg           = space
            update_mode     = update_mode
            no_auth_check   = 'X'
            message_handler = message_handler
          IMPORTING
            is_ok           = l_is_ok
          CHANGING
            container       = container.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    * Commit
    CALL METHOD a_masterdata_bl->flush
      EXPORTING
        no_commit = space.

  • CALL METHOD CL_GUI_CFW= DISPATCH.

    what is the use of CALL METHOD CL_GUI_CFW=>DISPATCH. one?

    Hi Vinay.
    I would like to suggest,
    [SDN - Reference for Usage of CALL METHOD cl_gui_cfw=>dispatch|cl_gui_cfw=>dispatch;
    [SDN - Reference for Issue in cl_gui_cfw=>dispatch|About CL_GUI_ALV_GRID's event-handling & PAI/PBO;
    Hope that's usefull.
    Good Luck & Regards.
    Harsh Dave

  • Error on Calling Methods Using an Object of a Class

    I keep getting the error cannot resolve variable addStud . I can't figure out why. I've created objects of classes before this way, then called methods within that class like this and it worked fine. I can't discern any difference between the syntax of the program that worked successfully and this one. I commented the parts where the error is when I tried to send a variable to a method in the class Recieve of which addStud is an object of. If you can see something that I can't I'd appreciate it. I've checked the obvious things like making sure the class name and method name is spelled the same way in both my frame and the class file.
    import java.awt.event.*;
    import java.awt.*;     /* Used by IntroTest3.java. */
    import javax.swing.*;
    public class RegFrame extends JInternalFrame
    {   // Begin class RegFrame
    static final int xOffset = 30, yOffset = 30;
         private JLabel nameLabel, displayLabel;  
         private JTextField nameField;
         private JTextArea displayText;
         private JButton addButton;
         private String name;
         private int numStu;
    public RegFrame() {     // Begin RegFrame constructor  
                  super(" Register a New Student ",
                  true, //resizable
                  true, //closable
                  true, //maximizable
                  true);//iconifiable
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            setSize(400,300);        //Set the window's location.
            setLocation(xOffset, yOffset);
            Container content = getContentPane();
            setBackground(Color.white);
            content.setBackground(Color.white);
            content.setLayout( new FlowLayout());
      //*   CREATE LABELS AND TEST ENTRY FIELDS FOR REGISTERING A NEW STUDENT       *
            *  HERE IS WHERE OBJECT OF RECIEVE IS CREATED *
         Recieve addStud = new Recieve();
         nameLabel = new JLabel(" Enter student name: ");
         nameField = new JTextField(20);
         content.add ( nameLabel );
         content.add ( nameField );
         addButton = new JButton( "Add Student" );
         content.add( addButton );
         addButton.addActionListener(
              new ActionListener()
         { // Open ActionListener
              public void actionPerformed (ActionEvent e)
                   getInput();
         } // Close ActionListener
        }   // End RegFrame Constructor
    // get input
        private void getInput()
              numStu++;
              name = nameField.getText();
              JOptionPane.showMessageDialog( null, "NAME: "  + name + "\n"
                    + "Student number:"+ numStu );
                    addStud.addName( name );   /** <--- HERE IS ERROR **/
    } // End class RegFrame;This is the class:
    public class Recieve
    { // Begin class Recieve
        private double stAssign[];
        private double stLab[];   
        private double stProject[];
        private double stQuiz[];
        private double stTest[];
        private String stNames[];       
        int snc;  
    public Recieve ()
            stAssign = new double[10];
            stLab = new double[10];
            stProject = new double[10];
            stQuiz = new double[10];
            stTest = new double[10];
            stNames = new String[10];
            snc = 0;    // Student Name Counter      
    public void addName (String stName)
            stNames[snc] = stName;
            snc++;
    } // End class Recieve

    1- Add the following class variable declaration for RegFrame:
    private Recieve addStud;2- Change in the RegFrame constructor:
    addStud = new Recieve();

  • Pass callback function to class object

    There is a FORM in program.
    I need to pass FORM's name to class object, and this object to run FORM.
    Like it done in ALV:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
        I_CALLBACK_PROGRAM = SY-CPROG
        I_CALLBACK_USER_COMMAND = 'MY_FROM'

    here every thing will be done using the Event handling(local classes based on event definition) check this program 
    BCALV_TEST_GRID_EVENTS

Maybe you are looking for

  • HP LaserJet P2050 (2055) printer Easyprint problem

    We have Windows 2008 R2 Remote Desktop farm with deployed RemoteApps. We use Easyprint by group policy settings. No printer drivers are installed on RD servers. But every time when client computer with HP LJ P2050 printer make connect to RD farm, dri

  • Unable to send or receive text messages after apply s/w update on Q10

    After apply software release 10.1.0.4181 (size 6mb) on my Q10, I can no longer send or receive text messages, pls help. At first I thought the text messages were only collapsed, but I am unable to send, receive or open any previous chat. I have reboo

  • MSI GX620 Display failed?

    Hi All, I was using my laptop earlier today and i have the laptop screen as primary display and an external LCD as secondary. For the last few days i've noticed a kind of whining / squeak coming from the laptop whenever i restart it from sleep mode.

  • Sales by Contract

    Hi, I need to create a query that shows for each contract, how much has been sold and how much is outstanding. For example: Contract | Sales Order | Qty Sold | Qty Outstanding I have looked in VAITM and VDITM but can seem to find the contract informa

  • How do I delete my user ID photo, taken with the camera in the MacBook Pro.  It keeps appearing randomly when I sign in....even after I make changes.

    How do I delete my user ID photo, taken with the camera in the MacBook Pro (when you first buy and set up the computer...).  The photo keeps appearing randomly, even after I've changed it to a "better picture".  I can't get the change to "stick".  An