🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #630

read option -monochrome

#630
From: Martin Schmidt
Date: Tue, 29 Sep 1992 09:33
30 lines
1207 bytes
Hi people

I am using InterViews 3.1-beta2 on a Sun Sparc2. Within
my program I try to find out if it was started with
   # prog -monochrome       or only with   
   # prog

The program looks like that

#include <stdio.h>
#include <InterViews/session.h>
#include <InterViews/style.h>

int main(int argc, char** argv)
{
    Session* session = new Session("prog", argc, argv);
    Style *st = session->style();

    if( st->value_is_on("monochrome") ) 
            printf( "mono is on\n");
    else    printf( "mono is off\n");
    
    ...
}

THIS PROGRAM ALWAYS answers  "mono is off". What is wrong ??

Thanks for any hint
Martin
schmidt@rpksun1.mach.uni-karlsruhe.de
Technical Details
Message-ID: <1992Sep29.093303.4114@rz.uni-karlsruhe.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!seismo!darwin.sura.net!wupost!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!uni-heidelberg!rz.uni-karlsruhe.de!rpksun1.mach.uni-karlsruhe.de!schmidt

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!seismo!darwin.sura.net!wupost!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!uni-heidelberg!rz.uni-karlsruhe.de!rpksun1.mach.uni-karlsruhe.de!schmidt
From: schmidt@rpksun1.mach.uni-karlsruhe.de (Martin Schmidt)
Newsgroups: comp.windows.interviews
Subject: read option -monochrome
Message-ID: <1992Sep29.093303.4114@rz.uni-karlsruhe.de>
Date: 29 Sep 92 09:33:03 GMT
Sender: usenet@rz.uni-karlsruhe.de (USENET News System)
Organization: Univerity of Karlsruhe (FRG)
Lines: 30