Robert,

How about creating a class like this:

"public class Fred{
   public static final ResourceGizmo resourceGizmoRef;
}"

Then in the main class or init code do Fred.resourceGizmoRef=new <Your
resource gizmo>.

Then any class can access the instance by using Fred.resourceGizmoRef.

Surj

"Robert Simmons Jr." wrote:
> 
> I have a gizmo that keeps track of resources for a program. The problem
> is that Im ending up passing this gizmo to every child component and
> that is beginning to bug me. In C++ I ould just create a global static
> var and let everyone access it. This is one of those rare cases where
> its a good idea. ALL parts use the same instance and the instance is
> read once (at the beginning) and written once(at program shutdown)
> anyone have any more elgant solution then passing it all over the damn
> place ?
> 
> --rob
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to