Re: vpApp -- a GUI application framework using Motif

Daniel W. Connolly (connolly@hal.com)
Mon, 25 Apr 1994 14:09:31 -0500

In message <9404251519.AA20971=guido@voorn.cwi.nl>, Guido.van.Rossum@cwi.nl wri
tes:
>A colleague of mine has put together an impressive application
>framework based on my Motif extensions.

Looks nifty... I built python with X11/Motif a while ago, so I tried it
out. I got lots of this:
connolly@ulua {** NONE **}../test[1080] python HelloWorld.py
Warning: application is using outdated GetValues semantics
Warning: application is using outdated GetValues semantics
Warning: application is using outdated GetValues semantics
Warning: application is using outdated GetValues semantics
Warning: application is using outdated GetValues semantics

I traced that down to Resources.c in Xt library: (well... this
version of the source doesn't emit a warning, but I guess the
version that I linked with python does...) Anyway... this looks
a little scary:

void _XtCopyToArg(src, dst, size)
char* src;
XtArgVal *dst;
register unsigned int size;
{
if (! (*dst)) {
/* old GetValues semantics (storing directly into arglists) are bad,
* but preserve for compatibility as long as arglist contains NULL.
*/
if (size == sizeof(long)) *dst = (XtArgVal)*(long*)src;
else if (size == sizeof(short)) *dst = (XtArgVal)*(short*)src;
else if (size == sizeof(char)) *dst = (XtArgVal)*(char*)src;
else if (size == sizeof(XtPointer)) *dst = (XtArgVal)*(XtPointer*)src;
else if (size == sizeof(char*)) *dst = (XtArgVal)*(char**)src;
else if (size == sizeof(XtArgVal)) *dst = *(XtArgVal*)src;
else bcopy((char*)src, (char*)dst, (int)size);
}
else {
/* proper GetValues semantics: argval is pointer to destination */
if (size == sizeof(long)) *((long*)*dst) = *(long*)src;
else if (size == sizeof(short)) *((short*)*dst) = *(short*)src;

>o model-view framework
>o command classes supporting undo operation
>o layout classes based on the "boxes and glue" model

Yeah! I'm looking forward to trying these out...

Meanwhile... there's a code path in the Font module that seems to be untested:
(its related to scalable fonts -- I guess the testers didn't have an R5 server)

if parsedfont[_PIXELS] == '0':
# scalable font
parsedfont[_PIXELS] = `pixelsize`
parsedfont[_POINTS] = '*'
parsedfont[_RES_X] = `_dpi_x`
parsedfont[_RES_Y] = `_dpi_y`
parsedfont[_AVG_WIDTH] = '*'
thefont = _makefontname(parsedfont)
# @@ size??? DWC 1994-04-25
# pntsize = size
break

Actually, several of the tests abort with exceptions. I'm sure they're
just little nits, but with the bad news about maintenance...

>Support & maintainance
>----------------------
>
>I will be leaving for another job shortly and will therefore probably not
>be able to give any support or do any maintainance on vpApp.

This is really sad: the package is not stable enough for me to use it
out of the box, but it looks really valuable. Maybe I'll spend the time
to maintain it.

Daniel W. Connolly "We believe in the interconnectedness of all things"
Software Engineer, Hal Software Systems, OLIAS project (512) 834-9962 x5010
<connolly@hal.com> http://www.hal.com/%7Econnolly/index.html