All Questions
13
questions
0
votes
0
answers
57
views
Looping callback method inside another another callback method
I have the below method in java
@Override
public void getResponse(String res) {
app.send("1",new Controller.CallbackMessage(){
//
@Override
public void responseMessage(String ms) {
...
0
votes
2
answers
47
views
Unable to call back the name of the method I am while in it
I am making simple calculator program that initially and simply asks for a number in regards to addition, subtraction and division.
If they enter a number that is not 1,2 or 3 I want to create an ...
1
vote
2
answers
10k
views
Java simple callback
It is basic problem. I have class A which gives some task to class B. When class B finish the tast it must notify class A. I want register A class method as callback in class B.
I really want do it ...
0
votes
0
answers
1k
views
Why onCreate() method is a Callback Method in Android programming?
I am a novice but I have already read What is callback in Android and How to define callbacks in Android.
I think that I got the point in this kind of examples:
button.setOnClickListener(new View....
0
votes
1
answer
185
views
Callbacks from another class
I have been trying to call methods on the Main Activity from another class. But, the methods are not resolved. Check out the code.
package com.example.android.andhive_glideimagelib.activity;
import ...
0
votes
1
answer
1k
views
How to pass a Callback method between different classes at runtime
I have spent several days on this niggly problem now and just can't find a solution.
Here is what I am trying to do:
Read a line input and change the interpretation of the data, based on certain
...
0
votes
1
answer
91
views
Java Interfaces/Callbacks for Using 1 of 2 Possible Methods
I have read up on Java Interfaces (callbacks) because I was told by a professor I should use callbacks in one of my programs. In my code, there are two Mathematical functions I can 'pick' from. ...
0
votes
1
answer
143
views
parameter assignment of callback method in android
There are some callback methods in android, like "onCreate" or "onClick".
I have a question about them.
When those callback methods show up in programs,
their parameters are not assigned by ...
0
votes
3
answers
133
views
Making the "Calling method" wait for the "Return" of data
I have 2 classes, one class is a JFrame (MainUIHolder.java) and the other class is a JDialog (EditValuationsDialog.java). MainUIHolder can call EditValuationsDialog on button click event.
Once ...
2
votes
2
answers
1k
views
Design Patterns: Callback as a method parameter
I was wondering if defining a callback for a operation in a method parameter is worse than defining it in the object and setting via setters, concerning about design patterns.
I'm not sure if exists ...
1
vote
2
answers
319
views
Call for methods of an ArrayList in another class in Java
If I have three classes. One class A, one class Customer where I've put an ArrayList of A in the constructor and one class SavingsAccount where I want to put them together. In class A I have a method ...
1
vote
1
answer
509
views
Best implementation for a callback method to update multiple fields
I am developing a mobile application (BlackBerry) with Java that makes use of the Google Translate API. I have it set up so that a user can specify a language before logging in, and then once they ...
10
votes
3
answers
9k
views
How to register a JavaScript callback in a Java Applet?
I'm developing an invisible Java Applet, that will be controlled entirely from JavaScript.
I can call the applet's Java methods easily, and I can call JavaScript methods from within the applet by ...