Questions tagged [method-call]
386 questions
0
votes
1 answer
What is the sequence of call when creating new view in android
I have a Game class
Where I do this
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(TAG, "onCreate");
int diff = getIntent().getIntExtra(KEY_DIFFICULTY, DIFFICULTY_EASY);
puzzle =…

Kraken
- 23,393
- 37
- 102
- 162
0
votes
1 answer
How to Get ByteArray of Classes in ASM
I am trying to implement method call application with CHA,XTA,RTA .For this purpose i use ASM.What should be bytecode variable below?How can i traverse all classes of Java project.
ClassReader cr = new ClassReader(bytecode);
ClassNode cn = new…

cyo
- 193
- 2
- 4
- 17
0
votes
4 answers
How can I automatically forward all paramters from one method to another in Ruby?
If I have methods:
def method_a(p1, p2)
# do some stuff
method_b(p1, p2)
end
def method_b(p1, p2)
# do other stuff
end
Is there a way to call method_b and automatically pass all parameters to it? (Sort like how you can call super and it…

ardavis
- 9,842
- 12
- 58
- 112
0
votes
1 answer
Calling a specific instance's method in another class in Java
Originally, this started as a nonstatic method being called from a static context error. I've since realized that I cannot reference the class itself, but a specific instance of that class. However, after giving my initialized object a specific…

user3055592
- 1
- 1
- 2
0
votes
1 answer
Android: Which Method performs the "onClick" Events of the Buttons, which are defined in the XML Layouts.
I'm trying to get a better understanding of the Android framework and therefore I've created a simple App, which actually consists of just one Button. Whenever this button gets clicked, a method called sendMessage in the MainActivity starts a new…

user2989815
- 59
- 1
- 7
0
votes
1 answer
multiple methods using for loops and arrays
Ok I will post what I have for Java code at the end but here is what I need it to do.
In the main method a boolean array called Lights is declared which runs through how_many (declared int).
Then I have to call a method called initialize which I…

Daniel Gosz
- 19
- 4
0
votes
3 answers
Using multiple classes
I am trying to make a simple program that asks the user to enter an integer. Once the program receives the input it takes and stores it and then counts from 1 to the input integer and sums the total of the count. Then it displays the results in a…

Robert C.
- 17
- 4
0
votes
2 answers
Issue with instance variables
My overall goal at the moment is to call a method that is in a different class, there is no inheritance between the classes.
After researching i found the best way to do this was to initialise an instance of the object in the method I am trying to…
user2904018
0
votes
1 answer
Java count external methods calls
I have a Java project using many external frameworks and libraries and I'd like to get the number of these external components methods calls. I've tried many tools for static Java code analysis but none give me the number of external (I mean of…

idell
- 107
- 1
- 2
- 13
0
votes
4 answers
Trying to call a method with an object, but can't figure out arguments to put
I have a method in the class EarthquakeDataSet called public void mergeSort() where I create an object and try to call a sort() method from my MergeSorter class. The MergeSorter class itself is not my code, it's written by someone else but I'm…

Craig Anderson
- 23
- 2
0
votes
1 answer
AWS S3 PHP getObject standard example causing fatal error
I have some code that looks exactly like this:
$result = $client->getObject(array(
'Bucket' => $bucket,
'Key' => 'data.txt',
'SaveAs' => '/tmp/data.txt'
));
its one of the examples listed here:…

Ramuk
- 217
- 1
- 4
- 9
0
votes
1 answer
Call parent method from child method using various argument list
Suppose following situation. There are class hierarchy, that uses various arguments list in a method, that might be extended for each descendant class.

BlitZ
- 12,038
- 3
- 49
- 68
0
votes
2 answers
call a method from another method in Code behind C#
I need to call btn_submit_Click(object sender, EventArgs e) from another method protected void Timer1_Tick(object sender, EventArgs e) which normally calls by a button click.
Now here in Timer1_Tick compares a time and if current time exceeds, i…

Dilukshan Mahendra
- 3,230
- 7
- 41
- 62
0
votes
2 answers
Calling a method of GreetingServiceImpl from other class in GWT
Is there a way to call a GreetingServiceImpl 's Method from other Java class in Server Side package. I want to extract a piece of data from a method in GreetingServiceImpl but I am unable to do so since it requires 'static' methods and GWT RPC…

PratikKGupta
- 343
- 1
- 3
- 11
0
votes
1 answer
Grails Service Calls From TagLib Overhead
I have a really simple taglib and service:
class TestTagLib {
FooService fooService
static namespace = "bar"
def test = {
out << "text"
}
}
class FooService {
//This is an empty method that does absolutely nothing
…

Alex Beardsley
- 20,988
- 15
- 52
- 67