Class.this.method overriding inheritance trying to understand

Hi I saw a piece of code that calls MyClass.this.aFunctionOverriddenByMeThatIsInMySuperClass ()
Im just looking for some clarity on how this works what function this actually calls and why someone would write code in this manner.
I have created a simpler version below
2 class A and B and there basic functionality is described in each
class A {
public A (){};
public int func1 () { return 1; }
class B extends A {
public B (){};
public int func1() { return 0; } //note this returns 0 where A.func1 = 1
public int myFunc() { return B.this.func1(); }
//public int myOtherFunc() { return A.this.func1(); } //NOT LEGAL wont compile
B.java:5: not an enclosing class: A //pardon the stupidity but what is an enclosing class??
public int myOtherFunc() { return A.this.func1(); }
class D extends B {
public D (){};
public int func1(){ return 4; }
class C
public static void main (String [] args)
A a = new A();
B b = new B();
D d = new D();
System.out.println(a.func1()); //prints 1
System.out.println(b.func1()); //prints 0
System.out.println(b.myFunc()); //prints 0
System.out.println(d.myFunc()); //prints 4
I guess my assumption is that using MyClass.this.someOverriddenFunction allows the subclass to have more control ??
any thought or comment would be much appreciated.
thanks

Do you know what inner classes are? Inner classes are classes that are defined within another class. If an inner class is not declared as static, it needs an instance of the class it is defined within to exist, this is the enclosing class. MyClass.this can be used so that the inner class can explicitly invoke methods on it's enclosing instance

Similar Messages

  • Re-Implementing Standard Class's Method

    Hi ,
    I want to Enhance a Standard class's Method.
    For this class "/SAPSRM/CL_CLL_PWL_A_SC_H" i want to write a new implementation for method "IF_POWL_FEEDER~GET_DETAIL_COMP".
    This method is inherited from "/SAPSRM/CL_CLL_POWL_BASE_AGENT" and is implemented in this class.
    Now if i want to write a new implementation in class "/SAPSRM/CL_CLL_PWL_A_SC_H" , how do i do it?
    Regards,
    Ashish Shah

    Created an Implicit Enhancement of Class /SAPSRM/CL_CLL_POWL_BASE_AGENT , method  IF_POWL_FEEDER~GET_DETAIL_COMP.
    Solved by using import parameter I_TYPE of IF_POWL_FEEDER~GET_DETAIL_COMP method.

  • Trying to understand methods - calling methods within own class - help

    I'm trying to write a simple program to search for letters in a string. I'm having a ton op problems; java seems so complicated with a lot of rules.
    The main problem I'm having (for now) is calling a method within the same class as main.
    import java.io.*;
    class LookForLetters{
        public static void main(String[] args)
         int i = 0;     
         int j = 0;
         int l = 0;
         int m = 0;
         String question1 = "Enter the line to be searched"; 
         String question2 = "Enter the line to be searched";       
         returnResponse stringtosearch = new returnResponse(question1); // here's where my problem is
            char[] chartosearch = stringtosearch.toCharArray();
         returnResponse letterstofind = new returnResponse(question2);
            char[] chartofind = letterstofind.toCharArray();     
         int findlength = chartosearch.length();
         int searchlength = chartofind.length();
         int[] k = new int[searchlength];
         for(i = 0; i < findlength; i++)
             for(j = 0; j < searchlength; j++)   
              if(chartosearch[i] == chartofind[j])
                  k[l] = i;
                  l++;
                  System.out.print("T");
             System.out.print(i + " " + l);
                if(l == 0)
                    System.out.print(chartofind[i] + " is the not in the sentence.");
                    System.out.println();       
                else
                    System.out.print(chartofind[i] + " is the ");
                 for(m = 0; m < l; m++)
                     System.out.print(k[l] + " ");
                    System.out.print("letter of your sentence");
                    System.out.println();
                    l = 0;
        public String returnResponse(String question){
         String response = " ";
         System.out.print(question);
         try
             InputStreamReader isr = new InputStreamReader(System.in);
                BufferedReaderbr = new BufferedReader(isr);
             response = br.readLine();            
         catch(IOException e)
             System.out.print("error");
         return response;
    }The compiler says that it can't find the returnResponse method. when I try to instantiate the whole class, it says the package is not included. Please help.

    JoachimSauer wrote:
    DaneWKim wrote:
    thank you very much for your response. I'm sure it's obvious that I'm really confused. I'm used to C and assembly programming, so the OO concepts are really foggy.That particular line doesn't even deal with any OO concept. But the fact that you already know C helps me give a (hopefully) more useful answer:
    What is the return type of the method you're trying to call?
    What is the type of the variable you want to assign the return value to?
    Are those compatible? Or even more general: do they both exist?I changed it to:
            String stringtosearch = returnResponse(question1);
            char[] chartosearch = stringtosearch.toCharArray();
         String letterstofind = returnResponse(question2);
            char[] chartofind = letterstofind.toCharArray();I guess I'm getting confused with medthods, class and types. There's a whole host of new vocabulary and rules with OO and java that have me a bit confused. I appreciate your help.

  • Overriding Inherited methods

    why cant we override the inherited methods with more secure access modifier (private)..... while if we do the apposite ie override with more non secure access modifiers , java is able to distinguish them and call the appropriate method or pop up the syntax error.. i am not able to understand the concept ... if any one could give a practical example it would helpful to me to understand...

    rajeshrocks25 wrote:
    Hey, correct me i am wrong.
    When we inherit Java loads all the members of the super class and we override or hide them then it simply ignores the superclass members ri8???
    thats what happening in the above code?I strongly suggest rereading the tutorial for Polymorphism or searching Google for alternative explanations for "Java Polymorphism", it doesn't sound like the concept has fully sunk in yet. As for a direct answer, at the bottom of the polymorphism tutorial I linked earlier they mention:
    The Java virtual machine (JVM) calls the appropriate method for the object that is referred to in each variable. It does not call the method that is defined by the variable's type. This behavior is referred to as virtual method invocation and demonstrates an aspect of the important polymorphism features in the Java language.To add, if the object being referred to does not contain the appropriate method, then the JVM will look for an appropriate method in the superclass, and the superclass of the superclass until the appropriate method is found.
    Also to clarify your confusion earlier, if a subclass A extends a class B, then A is considered a B so there is no use in casting A to B. In a more practical sense, imagine a [Boy] extending a [Man]. The [Boy] is of course a [Boy] because that is what we have defined him as. But the [Boy] is also a [Man] because he extends the [Man]. Therefore casting a [Boy] into a [Man] is pointless, because he already is indeed a [Man], just a subclass in the form of a [Boy].
    Furthermore if we declare a [Man] and instantiate him with a [Boy] then invoking a method talk(), [Boy] is inspected for the appropriate method talk(), if it has not been overridden then the JVM will look in [Man] and calls the appropriate method. Alternatively if we declare a [Man] and instantiate him as a [Man] then invoking the method talk(), [Man] is inspected for the appropriate method. It might also be of worth to note the instantiated [Man] cannot be cast into a [Boy], because a [Boy] is a subclass of [Man] and may contain properties or methods undefined by [Man].
    Mel

  • How can a class extending MouseAdapter override mouseDragged method?

    I've found this code from somewhere, don't remember where
    private class DragLimiter extends MouseAdapter {
    @Override
    public void mousePressed(MouseEvent e) {
    pressedX = e.getX();
    pressedY = e.getY();
    @Override
    public void mouseDragged(MouseEvent e) {
    label.setLocation(
    Math.min(
    Math.max(label.getX() + e.getX() - pressedX, BORDER),
    panel.getWidth() - label.getWidth() - BORDER),
    Math.min(
    Math.max(label.getY() + e.getY() - pressedY, BORDER),
    panel.getHeight() - label.getHeight() - BORDER));
    }The question is how can a class extending MouseAdapter override mousedragged()?
    I found that MouseAdapter implements MouseListener whose subinterface is MouseMotionListener, I think this has something to do with the question.
    But I've always thought you can only override methods of the super classes or interfaces not vice versa.
    I believe I have some kind of fundamental misunderstanding of this and would like to have some help in understanding this.
    Thanks

    This is more a Java question than a Swing question.
    I found that MouseAdapter implements MouseListener whose subinterface is MouseMotionListenerThat's not correct: if you look at MouseAdapter Javadoc, you'll find that it implements both MouseListener and MouseMotionListener (and MouseMotionListener is not a subinterface of MouseListener).
    Regardless, if you look at the javadoc, you see that MouseAdapter declares a method public void mouseDragged(MouseEvent). It doesn't matter whether this is also declared by an interface, a subclass can override it all the same.

  • Why does this abstract class and method work without implement it?

    hi,
    I have seen many times that in some examples that there are objects made from abstract classes directly. However, in all books, manual and tutorials that I've read explain that we MUST implement those methods in a subclass.
    An example of what I'm saying is the example code here . In a few words that example makes Channels (java.nio.channel) and does operations with them. My problem is in the class to make this channels, because they used the ServerSockeChannel class and socket() method directly despite they are abstracts.
       // Create a new channel: if port == 0, FileChannel on /dev/tty, else
       // a SocketChannel from the first accept on the given port number
    private static ByteChannel newChannel (int netPort)
          throws Exception
          if (netPort == 0) {
             FileInputStream fis = new FileInputStream ("/dev/tty");
             return (fis.getChannel());
          } else {
    //CONFLICT LINES
             ServerSocketChannel ssc = ServerSocketChannel.open(); //<--I have never thought do that!! Anyway, how it is static method may work.
             ssc.socket().bind (new InetSocketAddress (netPort)); //<--but here, this method (socket) is abstract. WHY RETURN A SOCKET????????  this mehod should be empty by default.
             System.out.print ("Waiting for connection on port "
                + netPort + "...");
             System.out.flush();
             ByteChannel channel = ssc.accept();
             ssc.close();
             System.out.println ("Got it");
             return (channel);
       } I test this code and works fine. So why can it be??
    Also, I read that the abstract classes can't have static methods. Is it true???
    Please Help!!
    PS: i have seen this kind of code many times. So i feel that I don't understand how its really the abstract methods are made.
    PS2: I understand that obviously you don't do something like this: *"obj = new AbstractClass(); "*. I dont understand how it could be: ServerSocketChannel ssc = ServerSocketChannel.open(); and the compiler didn't warn.

    molavec wrote:
    ServerSocketChannel ssc = ServerSocketChannel.open(); //<--I have never thought do that!! Anyway, how it is static method may work.
    The static method creates an instance of a class which extends ServerSocketChannel, but is actually another non-abstract class.I thought that, but reading the documentation I saw that about open() method:
    Opens a server-socket channel.
    The new channel is created by invoking the openServerSocketChannel method of the system-wide default SelectorProvider object.
    The new channel's socket is initially unbound; it must be bound to a specific address via one of its socket's bind methods before connections can be accepted.
    ...and the problem is the same openServerSocketChannel is abstract, so i don't understand how it could return a ServerSocketChannel.There is a concrete implementation class that has implemented that method.
    I guess that really the open() method use a SelectorProvider's subclase but it doesn't appear in the doc.It doesn't need to. First, you don't care about those implementation details, and second, you know that if the class is abstract, it must use some concrete subclass.
    Ok, I speak Spanish by default (<-- this sounds like "I am a machine", ^_^' ). So, I didn't know how to say that the method would be {}. Is there a way to say that?? I recommendable for me to know, for the future questions o answers.Not sure what you're saying here. But the other respondent was trying to explain to you the difference between an abstract method and an empty method.
    // abstract method
    public abstract void foo();
    // empty method
    public void bar() {
    Which class does extend ServerSocketChannel? I can not see it.It may be a package-private class or a private nested class. There's no need to document that specific implementation, since you never need to use it directly.

  • Need Help in trying to understand class objects

    I need help on understanding following problem.I have two files for that, which are as follows:
    first file
    public class Matrix extends Object {
         private int  matrixData[][];     // integer array to store integer data
         private int    rowMatrix;     // number of rows
         private int    colMatrix;     // number of columns
         public Matrix( int m, int n )
         {       /*Constructor: initializes rowMatrix and colMatrix,
              and creates a double subscripted integer array matrix
              of rowMatrix rows and colMatrixm columns. */
              rowMatrix = m;
              colMatrix = n;
              matrixData = new int[rowMatrix][colMatrix];
         public Matrix( int data[][] )
         {     /* Constructor: creates a double subscripted integer array
              and initilizes the array using values of data[][] array. */
              rowMatrix = data.length;
              colMatrix = data[0].length;
              matrixData = new int [rowMatrix][colMatrix];
              for(int i=0; i<rowMatrix; i++)
                   for(int j=0; j<colMatrix; j++)
                        matrixData[i][j] = data[i][j];
         public int getElement( int i, int j)
         {      /* returns the element at the ith row and jth column of
              this matrix. */
              return matrixData[i][j];
         public boolean setElement( int  x, int i, int j)
         {     /* sets to x the element at the ith row and jth column
              of this matrix; this method  should also check the
              consistency of i and j (i.e.,  if  i and j are in the range
              required for subscripts; only in this situation the operation
              can succeed); the method should return true if the operation
              succeeds, and should return false otherwise.
              for(i=0;i<rowMatrix;i++){
                   for(j=0;j<colMatrix;j++){
                        x = matrixData[i][j];
              if(i<rowMatrix && j<colMatrix){
                   return true;
              else{
                   return false;
         public Matrix transposeMatrix( )
         {     /*returns a reference to an object of the class Matrix,
              that contains the transpose of this matrix. */
         Verify tata;
         Matrix trans;
         //Matrix var = matrixData[rowMatrix][colMatrix];
         for(int row=0;row<rowMatrix;row++){
              for(int col=0;col<colMatrix;col++){
              matrixData[rowMatrix][colMatrix] = matrixData[colMatrix][rowMatrix];
         trans = new Matrix(matrixData);
                         return trans;
         public Matrix multipleMatrix( Matrix m )
              /*returns a reference to an object of the class Matrix,
              that contains the product of this matrix and matrix m. */
          m = new Matrix(matrixData);
              //Matrix var = matrixData[rowMatrix][colMatrix];
              for(int row=0;row<rowMatrix;row++){
                   for(int col=0;col<colMatrix;col++){
                        //trans[row][col] = getElement(row,col);
         return m;
         public int diffMatrix( Matrix m )
              /*returns the sum of the squared element-wise differences
              of this matrix and m ( reference to the formula in the description
              of assignment 5) */
         return 0;
         public String toString(  )
              /* overloads the toString in Object */
              String output = " row = " + rowMatrix + " col="+colMatrix + "\n";
              for( int i=0; i<rowMatrix; i++)
                   for( int j=0; j<colMatrix; j++)
                        output += " " + getElement(i,j) + " ";
                   output += "\n";
              return output;
    Second file
    public class Verify extends Object {
         public static void main( String args[] )
              int[][] dataA = {{1,1,1},{2,0,1},{1,2,0},{4,0,0}}; // data of A
              int[][] dataB = {{1,2,2,0},{1,0,3,0},{1,0,3,4}};   // data of B
              Matrix matrixA = new Matrix(dataA);     // matrix A
              System.out.println("Matrix A:"+matrixA);
              Matrix matrixB = new Matrix(dataB);     // matrix B
              System.out.println("Matrix B:"+matrixB);
              // Calculate the left-hand matrix
              Matrix leftFormula = (matrixA.multipleMatrix(matrixB)).transposeMatrix();
              System.out.println("Left  Side:"+leftFormula);
              // Calculate the right-hand matrix
              Matrix rightFormula = (matrixB.transposeMatrix()).multipleMatrix(matrixA.transposeMatrix());
              System.out.println("Right Side:"+rightFormula);
              // Calculate the difference between left-hand matrix and right-hand matrix
              // according to the formula in assignment description
              double diff = leftFormula.diffMatrix(rightFormula);
              if( diff < 1E-6 ) // 1E-6 is a threshold
                   System.out.println("Formula is TRUE");
              else
                   System.out.println("Formula is FALSE");
    }My basic aim is to verify the formula
    (A . B)' =B' . A' or {(A*B)tranpose = Btranspose * A transpose}Now My problem is that I have to run the verify class file and verify class file will call the matrix class and its methods when to do certain calculations (for example to find left formula it calls tranposematrix() and multipleMatrix();)
    How will I be able to get the matrix which is to be transposed in transposeMatrix method (in Matrix class)becoz in the method call there is no input for transposematrix() and only one input for multipleMatrix(matrix m).
    please peeople help me put in this.
    thanking in advance

    Please don't crosspost.
    http://forum.java.sun.com/thread.jspa?threadID=691969
    The other one is the crosspost.Okay, whatever. I'm not really concerned with which one is the original. I just view the set of threads overall as being a crosspost, and arbitrarily pick one to point others toward.
    But either way
    knightofdurham... pick one thread and post only in
    the one.Indeed. And indicate such in the other one.

  • Web Deploy error - "This method is not supported by this class"

    I have an MVC project which I am trying to deploy to one of our internally-hosted web front end servers via a TFS build process. Our server hosts the MS Deploy service, and other solutions deploy without problems to the same box. The parameters for the build
    process are as follows:
    /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=WMSVC /p:MsDeployServiceUrl=https://<server>:8172/msdeploy.axd /p:DeployIISAppPath="<internal.site.com>" /p:username=<username> /p:password=<password>
    /p:IncludeIisSettingsOnPublish=false /p:AllowUntrustedCertificate=True /p:OutputPath=bin\ /p:SkipExtraFilesOnServer=True /p:VisualStudioVersion=11.0
    The error message I receive at the point the build reaches the deployment activity is:
    Web deployment task failed. (Could not complete the request to remote agent URL 'https://<server>:8172/msdeploy.axd?site=<internal.site.com>'.)
    Could not complete the request to remote agent URL 'https://<server>:8172/msdeploy.axd?site=<internal.site.com>'.
    The request was aborted: The request was canceled.
    This method is not supported by this class.
    We've found
    this StackOverflow post which describes the same error we're experiencing, however the suggested solution is something we already do in our server configuration, so this doesn't resolve the issue for us.
    Has anyone seen this error before, or is able to make any suggestions why it is happening?

    Hi Matt,
    You have to have a look in the build log then copy the command that is under Run MSBuild node and executed it on the build agent.
    You should find something like below:
    C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe /nologo /noconsolelogger "C:\Builds\....sln" /nr:False /fl /flp:"logfile=C:\Builds\...log;encoding=Unicode;verbosity=normal" /p:SkipInvalidConfigurations=true /p:CreatePackageOnPublish=true /p:DeployOnBuild=true /p:SkipExtraFilesOnServer=True /m /p:OutDir="C:\Builds\...\bin\\" /p:Configuration="DEV" /p:Platform="Any CPU" /p:VCBuildOverride="C:\Builds\....sln.Any CPU.DEV.vsprops" /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;BuildUri=vstfs:///Build/Build/31630;IgnoreDuplicateProjects=False;InformationNodeId=14;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;LogProjectNodes=True;LogWarnings=True;TFSUrl=http://...-tfs:8080/tfs/...;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;" /p:BuildId="aa2d3857-27e9-4854-b44f-4ca625ccd786,vstfs:///Build/Build/31630" /p:BuildLabel="..._2015.02.27.2" /p:BuildTimestamp="Fri, 27 Feb 2015 11:16:41 GMT" /p:BuildDefinition="..."
    Daniel

  • Trying to pass parameters between GUI classes and methods

    Hi All.
    I have been working on a rather large final year project in college and it is getting close to the deadline. It looks as though I need to "tidy up" my code as it contains too many static methods, variables and other bad programming habits. My package consists of many different GUI's and classes. Up until now I have been calling different GUI's with guiName.NameOfMethod. I have been told this is bad practice so I am trying to fix this. Also instead of passing parameters correctly I have been creating static variables in my main class and using them. So for example if one class needed to pass a variable to the other I would first myGlobalVariable = X; in the first class. And then the second class can use this. This is also bad, right?
    So I guess im really just looking for a good example or tutorial on how to pass parameters between classes and methods, GUI if possible. Here is an example of how my GUI classes look:
    public class anotherGUI extends JFrame implements ActionListener {
            private JTextField a, b, c;
            private JButton button1, button2;
            JPanel p, p1;                   
            public anotherGUI() {
                LayOutAnotherGUI();
                setLocationRelativeTo(DnDMain.pictureArray[a]);
                setTitle("Example");
                setVisible(true);
                pack();     
            private void LayOutAnotherGUI(int c) {
         //GUI is layed out here     
            public void actionPerformed(ActionEvent e) {
                Object source = e.getSource();
                if (source == submit)
                    clickOK();
            public void clickOK(){
                //Here is where I have been accessing and modifying static global variables.  (But this needs to change).
    public void showanotherGUI() {
            new anotherGUI();
    }This is more or less how I have been going about creating my GUI's. These are used as pop ups. The user enters a value and then it is closed.
    To be honest I have been able to pass a variable correctly from one class to a GUI class but I have still having difficulty. For example in my code above I can pass the variable into this class but I cannot pass it into clickOK(). An this is where it is needed.
    Can anyone please help?
    I hope I have explained my problem well.
    Thanks in advance.

    I dont think that is what I need. An example of what I do in my program is:
    I have a main GUI with an array of images. There are a number of other small GUI's that appear for certain functions when the user clicks on an image or does some other function. I am trying to pass a value into the GUI class that is used for the smaller "pop up" GUI. So lets say the user has clicked the image in array[12]. Then a GUI is displayed. I need to pass the integer 12 into this class.
    Thanks.

  • Redefination of Method in Inherited Class

    dear Gurrus i am facing an issu.
    I have defined and implimented 2 classes A and B,
    B is inherited by A and B has also redefined an inherited method of A. at runtime i have created an  object of B and called a redifined method. and its working properly, but i have a requirment that i want to get result of the method orginally defined by class A and also at the same time i also want to see the result of redefined method by B.
    can i access the method of A class althoug i have redefiend the same method in B class using the object of B?
    Edited by: Shadab Ali on Jun 4, 2009 8:55 PM

    I spent a while looking into this after reading your question, and came to much the same conclusion you had. Here's the best I could come up with, but it suffers from all the flaws you mentioned:
         public static Type report(Method method, Class contextClass) {
              Type grt = method.getGenericReturnType();
              Class dc = method.getDeclaringClass();
              TypeVariable[] tva = dc.getTypeParameters();
              Class directDescendent = contextClass;
              while( !directDescendent.getSuperclass().equals(dc)) {
                   directDescendent = directDescendent.getSuperclass();
              Type t = directDescendent.getGenericSuperclass();
              if( t instanceof ParameterizedType ) {               
                   ParameterizedType pt = (ParameterizedType)t;
                   int index = 0;
                   for( Type ta : pt.getActualTypeArguments() ) {
                        if( tva[index++].equals(grt) ) return ta;
              return null;
         }Might be worth asking this again in the Generics forum.

  • To what class does this method belong?

    If one sees in the documentation something like
    - (retType *) text1:(Type1 *)aType1 text2:(Type2 *)aType2;
    then to what class does this method belong? I do not see in the Objective-C documentation any way that one can tell without the 'context' in which the method is declared or defined. This makes reading the documentation very difficult (for me). What you see is not what you get. There is stuff missing.
    In my world there is no difficulty in determining the class to which a method belongs. It is stated explicitly in the method name. For example:
    PROCEDURE (self: MyClass) methodName (arg1: Type1; arg2: Type2);
    and one sees that 'methodName' belongs to 'MyClass'.
    In Objective-C how does one know the class to which a method belongs? Is it only determined by context, that is, by the fact that it is within the @implementation section or that it is within the @interface section? If that is the case then I would think that in documentation one should always be required to assert something like:
    <<MyClass>> -(retType *) text1:(Type1 *)aType1 ...
    -Doug Danforth

    PeeJay2,
    I think I now have the distinctions needed but still have a question about what you said. But first here is my current understanding. A "method" is by definition bound to *at least* one class whereas a "message" need not be bound to any class. Hence one can send any message to any class and it will either be handled or ignored. A message looks like a method signature (and maybe one but is not constrained to be one).
    The difference between C++ and Objective-C is that in C++ method calls are not messages sent to a receiver. They are just calls of the method for the dynamically bound object. That method must be syntactically correct at compile time whereas messages need not be syntactically correct for any receiver. At least that is my current understanding.
    Now my question. You state that "casting the receiver of a message will in no way alter the flow of the code". I attempted to test this with a simple program but ran into a problem (see my new posting "Multiple classes in one file?").
    Assume the following
    @class Child : Parent
    Child *child = [[Child alloc] init];
    Parent *parent = [[Parent alloc] init];
    Parent *bar;
    bar = child;
    [bar doSomething]; // (C) call to child's doSomething method?
    [(Parent *)bar doSomething]; // (P) call to parent's doSomething method?
    You comment seems to say that both case (C) and (P) give the same result. If they do then which result is it the parent's or the child's method (assuming that the child has indeed reimplemented the parent's method)? Have I understood you correctly?
    -Doug Danforth

  • I am trying to understand the licensing procedures for using tabKiller for 3.5.7 firefox. Who should I contact for this? I do not see any customer service phone number for Firefox

    I am trying to understand the licensing procedures for using tabKiller for 3.5.7 firefox. Who should I contact for this? I do not have the customer service phone number for Firefox

    Tab Killer is not created by Mozilla, it is created by a private individual who has made it available at no cost for other people to use.

  • I am new to mac and am trying to understand how to do something i did in Word. In Word you can set up document so that you have 2 pages per 8.5 x 11 landscape page. Each page is treated as a separate page. Can this be done in word for mac 2008?

    I am new to mac and am trying to understand how to do something i did in Word. In Word you can set up document so that you have 2 pages per 8.5 x 11 landscape page. Each page is treated as a separate page. Can this be done in word for mac 2008?

    Suggest you ask on the Microsoft Mac forums since it's their software you have a question about:
    http://answers.microsoft.com/en-us/mac

  • HT201272 This method is exactly how I'm trying to get my music on my new iPod touch, it starts downloading but then stop and says unable to download at this time. What the **** is going on ?

    This method is exactly how I'm trying to get my music on my new iPod touch, it starts downloading but then stop and says unable to download at this time. What the **** is going on ?

    Try going to Settings>Store and sign out and sign back in.
    It also could be due to an Apple server problem. and yu will just have to wait and try again.

  • HT5622 I'm trying to find out why am I not being able to update my apps and there telling me my payment method is declined !  Due to the fact that it's continuously stating this I'm am trying to enter a new card !

    I'm trying to find out why am I not being able to update my apps and there telling me my payment method is declined !  Due to the fact that it's continuously stating this I'm am trying to enter a new card !

    Do you recognize the ID?

Maybe you are looking for