Questions tagged [method-call]

386 questions
-1
votes
1 answer

Python - difference between self.method, lambda: self.method() and self.method() on startup

In order to understand the difference in use of method calls, I wrote a MVC in python 2.7. Here is the code: import Tkinter as tk class Model(object): def __init__(self, *args, **kwargs): # dict self.data = {} # --…
MrPadlog
  • 115
  • 1
  • 8
-1
votes
2 answers

Iterative function calls with a loop causes unexpected troubles

Now if I replace the lines : for(i = 25;i<1000;i*=2){ pen.DrawStar(i,ctx); } To this: pen.DrawStar(25,ctx); pen.DrawStar(50,ctx); pen.DrawStar(100,ctx); pen.DrawStar(200,ctx); pen.DrawStar(400,ctx); pen.DrawStar(800,ctx); I get the desired…
kpie
  • 9,588
  • 5
  • 28
  • 50
-1
votes
1 answer

Only One Method Call is Shown in Output

I am trying to figure out how to call and output my methods correctly. However, in the output, only one method call is shown (the last one). How do I get it to output all of the method calls and not just the last one. Seems like all of the previous…
Fryguy
  • 17
  • 4
-1
votes
1 answer

Java Error when calling a method with an array parameter

I'm having an error when I try to call a method compute() and I cannot figure out why. I am fairly new to java and it is very possible that I am not doing something the correct way. The error I get when I call the method is "Cannot make a static…
CassiePray
  • 43
  • 1
  • 1
  • 4
-1
votes
2 answers

How does method chaining work?

How does getRequestDispatcher("xxx") get called from getServletContext() in the example below? How does calling procedures like this work in general? Please give me a clear picture about this context. RequestDispatcher dispatcher =…
Pugazh
  • 9
  • 3
-1
votes
1 answer

Passing parameters to and calling a method without a constructor

I have a homework assignment where I have to pass a 2D array to a method, that method takes a 2D array as a parameter and prints out the table. I have the table working fine, the problem is I cannot figure out how to call this method from my main…
hazy7687
  • 67
  • 8
-1
votes
4 answers

Passing an object by reference

I've read quite a bit about this, but I think it's only gotten me even more confused. To strip down the issue, here's what I want to do: public sealed partial class MainPage : Page { MyFirstDataType Object1 = new MyFirstDataType(); …
Ali250
  • 652
  • 1
  • 5
  • 19
-1
votes
1 answer

How to call a method of a public class within another class?

I have a public class A which contains several methods. I have two other classes within which I create the object of class A to call its method say MethodA(). Now it is behaving very strangely: when I call MethodA() from the other two classes it…
user2786794
  • 29
  • 1
  • 7
-1
votes
3 answers

Java- how do I stop a method being called?

I have a Java method which, when called, will listen for any traffic being sent across the network, and print information about that traffic to the console. My program currently runs in the console, but I am now looking at creating a graphical user…
Noble-Surfer
  • 3,052
  • 11
  • 73
  • 118
-1
votes
1 answer

I am having trouble initializing arrays with multiple methods.

I'm having some difficulties figuring out exactly how tot initialize my arrays for a project. I have an array being created in one method and it being called and copied in another then called to another method to be printed and i can't seem to get…
Tatention
  • 7
  • 3
-1
votes
1 answer

Calling a Method of class-1 and using it in Class2 in asp.net, using Visual studio 2010

I have a Homepage which has 4 combobox named c_LOB, c_Projectname, c_countryname, c_releasename. Now i'm trying to change the tooltip on the basis of enabled property of these combo boxes. Following is the code written in Visual Studio 2010 using C#…
user2992534
  • 7
  • 1
  • 1
  • 4
-1
votes
2 answers

Having difficulty calling a method

I have a feeling that the answer's right under my nose, but my n00b-ness to Java has me chasing my tail. First part, I'm suppose to ask a user to in put two strings, compare them, and state the number of characters in the first string. Second…
Devora
  • 7
  • 2
-1
votes
2 answers

No known class method for selector

The .h file: @interface WibraryViewController : UIViewController { IBOutlet UIActivityIndicatorView *activityIndicatorView; } + (void) notifyServerOfFileOpening:(NSString *) docName; The .m method: + (void)…
Robert
  • 5,278
  • 43
  • 65
  • 115
-2
votes
2 answers

Call Backend Method From JavaScript and Parameter Passing

Is it possible in ASP.NET. I know we can easily achieve this is JSF, RichFaces or in ADF Faces. If possible, can you show me an example?
Tapas Bose
  • 28,796
  • 74
  • 215
  • 331
-2
votes
1 answer

Different Objective C syntax for functiona call

[UIView animateWithDuration:1.0 animations:^(void) { im.transform = CGAffineTransformIdentity; } completion:^(BOOL finished) { [UIView animateWithDuration:1.0 delay:1.0 options:UIViewAnimationCurveEaseOut animations:^(void) { …
Krishna
  • 368
  • 5
  • 17