[slang-users] Advice on "complex" data type integration

John E. Davis davis at space.mit.edu
Sun Oct 23 22:16:43 EDT 2005


Robert Lipe <robertlipe at usa.net> wrote:
>Another approach (which doesn't thrill me) that came to me after
>struggling with this for a while was to just bring out acessors with
>arguments of strings.
>
>	linkylink = gb_get_wpt(wpt, "url");
>	gb_set_wpt(wpt, "url", "http://" + linkylink);

It is fairly easy to construct an interface that permits the above to
be written:

   wpt = gb_new_wpt ();
   wpt.url = "http://" + wpt.url;

and have the wpt object to be automatically freed when it goes out of
scope or reassigned.  To do the above, you would use the sput and sget
class methods.  Is this something more akin to what you are looking
for?

Thanks,
--John




More information about the slang-users-l mailing list