Ciao Greg,
I want to get news from some sites.
In the first phase I want to fill an array which will contain
objects with data like: news_site news_tittle getnews_method
getnewsinfo1_method
Then I want to view the news inside a list using VID (RebGUI ?) and
read the news clicking on a line. On each click the NEWSREAD method for =
that
kind of site must be executed. We may have 10.000 news and 10 origins; =
10
origins belonging to 10 different getnews_method code.
During the creation of the array of objects getnews_method
getnewsinfo1_method whould be set to appropriate value for that site. =
So,
reading the news is a matter of calling =
newsarray/newsindex/getnews_method.
I know I could do this using a "switch" statement and getnews_method
will point to the code associated with that site value but I want to use =
a
more compact version of the function. (I want to understand more =
complicated
things).
The solution provided by Volker seems to answer my question
Now it is time to understand how to create an array with data and
objects, select the object out of an index and run the method of the =
object
located in that specific array position.
Hope have I been clear enough.
Giuseppe Chillemi (at his second REBOL program)
=09
-----Messaggio originale-----
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di
Gregg Irwin
Inviato: luned=EC 7 novembre 2005 7.28
A: Giuseppe Chillemi
Oggetto: [REBOL] Re: R: Re: Question about REBOL objects and reusabilty =
of
code.
Hi Giuseppe,
GC> I need to make 10000 instances of the same object but the code of =
the
GC> functions must be reused and be able to access the local variables. =
It
is
GC> too memory consuming having 10000 times the same 4/5 kind of codes.
Could you give us more details about what it is you're trying to do?
Maybe objects aren't the best way to go.
-- Gregg =20
--=20
To unsubscribe from the list, just send an email to=20
lists at rebol.com with unsubscribe as the subject.
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.