Class to class function calls

How do I call a function that is in one class from another
class? My first class is creating instances of a second class. The
second class draws itself. I want it so that if a user clicks on an
instance of the second class, the first class will know which
instance of the second class was clicked. I try to use a
clickHandler inside the second class that then calls the function
(doThis) in the first class, but I get this error:
1180: Call to a possibly undefined method doThis.
Here is a very simplified version of what I have going on:

right. yet Engine is the Document Class for the FLA. there is
only one instance of Engine (if any at all?). How do I reference
that instance from the Node class.
I do not want doThis() to be a node method. I want to keep
doThis() as Engine method, as Engine manages many variant instances
of Node.
I would think something like this would be sufficient to pass
a node reference to doThis() from a node, as both Engine.as and
Node.as are in the same directory:
public function clickHandler(event:MouseEvent):void {
doThis(nodeID);
I have also tried: Engine.doThis(NodeID);
Again, how exactly do I reference an Engine function from
Node?

Similar Messages

  • Problem Calling a Java class from PLSQL function

    We are calling a Java class through oracle function as
    FUNCTION CalculateAMW (contributorid IN Number,
    fromdate IN Date,OHorAnncoverage in Number,
    OHAnncoverage in Number,
    AppStatus in Number,
    Status in Number)
    RETURN Number
    AS LANGUAGE JAVA
    NAME 'AMWCalculations.calculateAMW
    (long,java.sql.Timestamp,long,long,long,long) return double';
    on execution of this function the sql prompt for the 1st time it is giving the output
    but
    if reexecute it is throwing and error ORA - 932 : Inconsistent
    datatypes.
    Recompiling the java class then it works for the 1st time and the next
    time
    we execute it throws error as explained above.
    What could be the problem.
    Thanks
    Nanda Kishore

    any idea???Yes, you are in the wrong forum, this is a Java forum, you have an ASP question, so i suggest you visit an ASP forum/site

  • Calling java class from abap function moduile

    Is it possible to call java class from function module.
    i am a java guy. my need is to call a java class from a  function module in the backend. which in turn performs certain functions.
    i would be highly obliged if someone could let me know if this is possible.
    regards
    Srikumar V

    Hi Srikumar ,
    you can call a java webservice in ABAP .
    u can call the webservice and via that u can trigger the java class..
    Regards
    Renu

  • OCI Function call vs Odatabase Class

    In my application I've used ODatabase class to
    open a database connection.
    At the same time, I use OCI function calls method to connect to the same database. This is use to execute store procedure & query.
    My question is that does it cause double connection to Oracle?

    Yes.

  • MovieClipLoader Class doesn't allow function calls

    I have functions within a movieClip that loads into a main
    movie. The functions operate with no problem when using loadMovie
    method, but I need to execute some script after loading so I
    switched to the movieClipLoader class instead.
    Problem is, after the movieClip is loaded, any function calls
    from a keyframe (or even a button) are totally ignored.
    What am I missing. Should I be doing something different?
    here is my movieClipLoader code:

    Actually, I think I found the solution after looking at some
    other posts. I changed "onLoadComplete" to "onLoadInit" and it
    worked.
    As I found in another post, onLoadComplete doesn't mean all
    of the code is loaded yet, but onLoadInit means the movie and code
    is loaded.

  • Global class event handler not called

    I am having a problem where I created a function module that instatiates an application log class. This application log class has methods ON_* for public events of other classes.
    The function module then processes its routines and as a result some of these events are raised. Ex: The function module creates a Purchase order and in that class I have a public even PO_CREATED that is raised upon succesfull creation of the PO. The global class APPLICATION_LOG I created has a method ON_PO_CREATED for event PO_CREATED of class ZCL_MAT_PO.
    I put a break point in the APPLICATION LOG method but is os not called.
    ANy idea of what Iam doing wrong or missing?
    Thanks,
    Leo

    Hi Leo, did you set the handler method?
    SET HANDLER <method_name> FOR <object>.
    Regards,
    Rich Heilman

  • [svn:bz-trunk] 20873: Update description of class deserialization validators functionality in example services-config .xml for BlazeDS/trunk.

    Revision: 20873
    Revision: 20873
    Author:   [email protected]
    Date:     2011-03-16 06:35:10 -0700 (Wed, 16 Mar 2011)
    Log Message:
    Update description of class deserialization validators functionality in example services-config.xml for BlazeDS/trunk.
    Checkintests: Not run. No code changes.
    Modified Paths:
        blazeds/trunk/resources/config/services-config.xml

    Thanks Carlo for your reply.
    I have read again the link and you are correct that in using the preferred command together with localhost under POTS dial-peer, I can now select which correct path to choose for my outbound calls. I'm just not very strong with dial-peer and translation rules at the moment.
    I will try this solution during the weekend and let you know. But it would have been better if there was a sample configuration for this option.

  • Nameless Nested Classes passed in Function Parameter?

    I am trying to get my head around the following code example:
    javax.swing.SwingUtilities.invokeLater( new Runnable() { public void run() { createAndShowGUI(); }});What is actually getting passed to the SwingUtilities.invokeLater() function?
    Can anyone explain all of the parts and pieces of :
    new Runnable() { public void run() { createAndShowGUI(); }} ?
    Here is my best guess:
    1) { public void run() { createAndShowGUI(); }} is an unnamed nested class that is instantiated using the Runnable() interface.
    2) this class has one method called run() that executes createAndShowGUI();
    Is my best guess even close to what is really going on?

    richard.broersma wrote:
    1) { public void run() { createAndShowGUI(); }} is an unnamed nested class that is instantiated using the Runnable() interface.Yes, that's essentially correct. It's called an anonymous inner class.
    This is similar to doing
    // a non-anonymous inner class
    private class MyClass implements Runnable
      public void run()
        createAndShowGUI();
    MyClass myclass = new MyClass();
    javax.swing.SwingUtilities.invokeLater(myclass);
    2) this class has one method called run() that executes createAndShowGUI();Yes. It must have a parameterless public void run method since it implements the Runnable interface.
    Is my best guess even close to what is really going on?Yes, you're catching on.

  • How to refer to the class in regular functional module

    Hi ABAP guru's
    I wish to get details of GET_REQUID parameter of method IF_RSBK_REQUEST_GENERAL that is available in
    class CL_RSBK_REQUEST.
    I am writing a ABAP function module and I wish to use this class in that function
    module. Can someone help to write this code on how to read value of GET_REQUID in my function module?
    Thanks for your help in advance
    Ag

    Hi Allgon,
    welcome to the SAP Community Network. I hope you become a valuable member by contributing regularly.
    You need to appreciate a few things.
    Firstly read Welcome and Rules of Engagement.
    It includes the following suggestions...
    Please...
    - Use the correct or most appropriate forum,
    - Do not cross-post or multiple-post, and
    - Search for information before asking basic questions, again.
    Cheers
    Graham Robbo

  • How do we know that which processing Class doing what functionality ?

    Hi SAP HR Experts .
    Q:-1 How do we know that which processing Class doing what functionality ?
    Like : Processing class 1 , 2 ,... etc .
    Similerly Simulation Class is On (Check Box is Ticked) then what impact we occur ?
    Kind Regards : rajneesh

    Hi Rajneesh,
    The best way to understand the processing class is to go thru each and every class in table T512W_D ( Go to SM30 -> t512w_d ).Here in this table you will have the wagetypes ,just double click on the wagetypes and you will find the screen with processing classes. Just go thru each and every class by f1 . Each class is having its own importance and implication.
    Same with Cumulation class. Go to SM30 -> enter T54C3. Follow the same logic here too, and try to analyse the max thru f1.
    This is how we can understand the logic.
    Regards,
    Sri..

  • Java class containing parseEscapedXML function?

    I'm interested in using the ora:parseEscapedXML function in some Java code. What class implements this function, and what library contains that class?
    Thanks for your time,
    Paul Camann

    Hi,
    You could try to do this on your own.
    You need to write a piece of code that converts the escaped entities [&amp;&gt;&lt;&apos; etc] to their actual characters, and then write a simple DOM parsing logic to parse it into a document.

  • Using Methods not Defined in a class that you are calling them from

    For one of my assignment I have had to create a class with methods and then create another class to test the methods.
    I keep getting the error message "cannot resolve symbol"
    And the error points to the line where I am calling the class.
    I have put the classes in a package and imported them.
    Here is the method I am calling.
    public boolean validDate(int day, int month, int year)
    if(leapYear(year))
    daysInMonth = 29;
    else
    getNumberOfDaysInMonth(month);
    return true;
    This is how I am calling it from the test class
    if(validDate(day1,month1,year1))
    testnewDate.java:38 cannot resolve symbol
    symbol : method validDate(int,int,int)
    location:class newdate.testnewDate
    if(validDate(day1,month1,year1))
    ^
    If anyone is able to help I can give you my java source files if I haven't given enough information.

    You can't call another class's method directly from your class. You need to get an object of that class and should call the method using that object.
    If you have written public boolean validDate(int day, int month, int year) method in class DateValidator, then from your test class, you have to call that like this,
    DateValidator dv = new DateValidator();
    if(dv.validDate(day1,month1,year1)) {
    // Take actions
    Hope it is clear.
    Sudha

  • Dev Classes in a Function Group?

    Can you have objects with different development classes in one Function Group? If so, any risks involved?
                                Thank-You

    Hello Ferry, SE03 or program RSWBO052 I believe will do the trick because I need to change Dev Classes to individual tables and objects as some in the Function Group have the correct Dev Class, others do not.
    However, I do not see where I can change the dev Class of a table in SE80. The Go To Object Directrory Entry.Change, it seems, only allows me to change the Last Changed By field, and won't let me put in the new Dev Class name. the Dev Class name appears in the popup but I am not allowed to select it.
                            Thanks for your help.

  • Are Classes better than Function groups and Modules

    Hi,
    Are classes better than Function groups? For example if you want to execute something is back ground or use parallel processing you can't do it using classes. Even inside classes most of the places we use Function modules.
    Then how classes are beneficial?
    Regards,
    Deepak Bhalla

    Yes they are compared in the sense that the class and function group are the containers, and the methods and function modules are the interfaces in which you interact with the encapsulated data. 
    Again if you are developing an application in which you are not forced to push the processing to differenet work processes,  then using classes/methods is preferrable. The reason I say this, is because anything coming from SAP will most likely be implemented as a class as opposed to a function group.  This is not to say that SAP will not create new function modules, because of course there still is a use for them.
    Regards,
    Rich Heilman

  • Calling Class from Class

    Hi,
    I am sure this is a very basic question but I don't have anyone to ask, have tried a few formats but it does'nt like it. I have two compiled classes and wish to call one from the other, can anyone give me the format to do this?
    Thanks,
    Neil Mc

    class WotifReff {
        public static void main(String[] args) {
            WotifReft wotifreft = new WotifReft();
            wotifreft.call();
            WotifRef2 wotifref2 = new WotifRef2();
            wotifref2.call();
    }The only method that exists in your class is called "main". However you are attempting to call a method called "call". It does not exist. You can only call methods that do exist. So try adding that method to your class.
    class WotifReff {
        public static void main(String[] args) {
            WotifReft wotifreft = new WotifReft();
            wotifreft.call();
            WotifRef2 wotifref2 = new WotifRef2();
            wotifref2.call();
        public void call() {
            System.out.println("Now the code will compile");
    }OOPS! Misread your class names.
    class WotifReff {
        public static void main(String[] args) {
            WotifReft wotifreft = new WotifReft();
            wotifreft.call();
    class WotifReft {
        public void call() {
            System.out.println("Now the code will compile");
    }That should work.

  • How to call a C function calling a Java Method from another C function ?

    Hi everyone,
    I'm just starting to learn JNI and my problem is that I don't know if it is possible to call a C function calling a Java Method (or doing anything else with JNI) from another C function.
    In fact, after receiving datas in a socket made by a C function, I would like to create a class instance (and I don't know how to do it too ; ) ) and init this instance with the strings I received in the socket.
    Is all that possible ?
    Thank you very much for your help !

    Hard to understand the question, but by most interpretations the answer is going to be yes.
    You do of course understand that JNI is the "API" that sits between Java and C and that every call between the two must go through that. You can't call it directly.

Maybe you are looking for

  • Is it possible to add a jpeg and a layer on top

    Hi, I want to add a jpeg image as a background to an applet then i want to add a layer (perhaps a panel) on top of this to draw circles and lines using the Graphics2D class. Is it possible to do this?? If so can you point me in the right direction pl

  • Account ID

    Hi All, Thanks for your assistant in solving my issues. Please in my QAS (client 200) system at invoice (FB60) level were i state the house bank and the ID for account details (sub-account) that i want to use to pay vendor, the system we pull the hou

  • BR340 8.80 filter problems

    After upgrading from v8.65 to v8.80 of firmware on BR340 and BR500 devices most protocol filters were automatically removed. We had it set to discard protocols not in the forward list so most traffic stopped. ARP and STP were the only two still in th

  • Colors in iPhoto look great - not when pics are viewed on web / printed out

    When I go in and adjust my images in iPhoto, nothing looks the same when I print them out at costco or view them on the web. I understand about profiles and color spaces... I'm just wondering what is the easiest way other iPhoto users have found to c

  • What will happen if I delete ACTIVE logfile member

    hi gurus JUST FOR TESTING. Consider the situation as follows I create a table,insert some rows into the table,then do a log switch. And then I remove the logfile which still in the "ACTIVE" states with operating system command. Finally I shutdown and