POV-Ray : Newsgroups : povray.off-topic : The marvels of Win32 : Re: Tag lists Server Time
28 Sep 2024 21:18:12 EDT (-0400)
  Re: Tag lists  
From: Darren New
Date: 13 Oct 2009 12:14:22
Message: <4ad4a75e$1@news.povray.org>
Invisible wrote:
> The way AmigaOS handled this stuff was to use tag lists.

A very un-OO way of doing it.

Better would be something like
x = new Window();
x.title = "Hello there";
x.background_color = red;
....
x.show();

Of course, that works best if your language is meta enough that you can put 
strings like "title\thello\nbackground_color\tred\n" into a file and read 
the file at runtime and generate those calls/assignments without a whole lot 
of effort. (And the assignments would translate to method calls, of course, 
in the overloaded-operator sense.)

> (Tag lists didn't exist under Kickstart 1.3. It was only added with 
> Kickstart 2.0.)

That explains it.

> Oddly, this feature doesn't seem to be apparent anywhere in Win32. It 
> seems the Win32 Way(tm) is to have a big struct, and pass in a pointer 
> to the struct and also a length indication, and the function you're 
> calling decides which version of the struct you've given it based on the 
> length...

Nobody said win32 was a *good* way to do it. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.