🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #16997

Re: Pasar parametreos ..

#16997
From: Zorro
Date: Thu, 14 Dec 2000 16:49
32 lines
1621 bytes
Prueba esto (no lo he probado pero por aqu� ir�an los tiros)

tratar_comando(Object obj)
{
    Class miClase=obj.getClass();

    Field campo1=miClase.getField("asigna");
    campo1.setInt(obj,1234);

    Field campo2=miClase.getField("dfg");
    campo2.set(obj,new OtroObjeto());

}


Oscar Jofre escribi� en mensaje <91aqhn$knd$1@talia.mad.ttd.net>...
>Hay alguna manera de hacer una funciona que pasandole diferentes
componentes
>acture de la misma manera ?? Me explico:
>
>   tratar_comando( nombre1 ) , este nombre1 es un TextField
>   tratar_comando( nombre2 ), este nombre2 es un Label, por ejemplo o otra
>clase
>    a la que le modificare siempre los mismos campos.
>
>               tratar_comando( ?? nombre )
>                       nombre.asigna = ..
>                       nombre.dfg = ..
>
> Me entienden ?? Gracias
>
>
Technical Details
Message-ID: <91at80$na4$1@talia.mad.ttd.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!fu-berlin.de!newsfeed.bcn.ttd.net!news.mad.ttd.net!not-for-mail
References: <91aqhn$knd$1@talia.mad.ttd.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,a5fb4730a79403ae
X-Google-Attributes: gid1116f3,public
X-Google-ArrivalTime: 2000-12-14 08:47:41 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!fu-berlin.de!newsfeed.bcn.ttd.net!news.mad.ttd.net!not-for-mail
From: "Zorro" <noexisto@noexisto.com>
Newsgroups: es.comp.lenguajes.java
Subject: Re: Pasar parametreos ..
Date: Thu, 14 Dec 2000 17:49:06 +0100
Organization: Telefonica Transmision de Datos
Lines: 34
Message-ID: <91at80$na4$1@talia.mad.ttd.net>
References: <91aqhn$knd$1@talia.mad.ttd.net>
NNTP-Posting-Host: nitrico.gipuzkoa.net
X-Newsreader: Microsoft Outlook Express 4.72.2106.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4