Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Accessing Objects from remote classes...

12 views
Skip to first unread message

bal...@gmail.com

unread,
Mar 25, 2005, 8:09:20 PM3/25/05
to
Lets say i have this scenerio

class A {
public B objB; //B is my own class
main() {
objB = new B();
C objC = new C();
...

}

class B {
B() {}
public void aFunt() {..}
...
}

class C {
C() {
objB.aFunt();
}
}

basically im in class C, and i need to call functions in class B, which
was origionally instantionated in class A.

Does this make any sense? im trying to access/manip an object in
class A, from class C, so that when class C unloads, all the tweaking
its done to the object stays permant. (the object just happens to be
of type B) is this even possible?

Cheers,
Adam.

Ulf_N

unread,
Mar 26, 2005, 6:03:30 AM3/26/05
to
bal...@gmail.com skrev:

C objC = new C(objB);
...

}

class C {
C(B objB) {
objB.aFunt();
}
}

0 new messages