Article View: comp.windows.news
Article #422Re: three NeWS / OpenWindows 3 questions
From: Syst{ Kari
Date: Thu, 20 Aug 1992 14:15
Date: Thu, 20 Aug 1992 14:15
45 lines
1786 bytes
1786 bytes
In article <1992Aug20.034650.17692@sq.sq.com> lee@sq.sq.com (Liam R. E. Quin) writes:
[1] Can I access X Defaults from a NeWS-only program?
The followind code reads all DisCo.* resources and makes
/resource_name resource_value def
/DefineResources { % string string =>
(\n) alist
{
% stack
dup 2 index search {
pop
pop
(:) search {
% (% is %(%)\n) [ 2 index 5 index MakeValue dup type] sprintf =
dup cvn 3 index { MakeValue } stopped not {
def
} {
console (Syntax error on resource %\n) [ 3 index ] fprintf
} ifelse
pop pop
} if
pop pop
} {
pop pop
} ifelse
} forall
pop
} def
/GetRes { % string =>
/GetPropertyString DefaultsService send {
DefineResources
} if
} def
(DisCo.) GetRes
--
% This article represents my personal views.
% Kari Systa, Tampere Univ. Technology, Box 553, 33101 Tampere, Finland
% work: +358 31 162585 fax: +358 31 162913 home: +358 31 177412
% Internet: ks@cs.tut.fi X.400: C=fi ADMD=fumail O=TUT OU=CS S=ks
--
Technical Details
Message-ID:
<KS.92Aug20161511@karikukko.cs.tut.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!tut!ksReferences:
<1992Aug20.034650.17692@sq.sq.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.news
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!tut!ks
From: ks@cs.tut.fi (Syst{ Kari)
Subject: Re: three NeWS / OpenWindows 3 questions
In-Reply-To: lee@sq.sq.com's message of Thu, 20 Aug 92 03: 46:50 GMT
Message-ID: <KS.92Aug20161511@karikukko.cs.tut.fi>
Sender: usenet@funet.fi (#Kotilo NEWS system )
Nntp-Posting-Host: karikukko.cs.tut.fi
Organization: Tampere Univ. of Technology, Finland.
References: <1992Aug20.034650.17692@sq.sq.com>
Date: Thu, 20 Aug 1992 14:15:11 GMT
Lines: 45