mrs@philabs.philips.com (don't know) (05/09/89)
I have a number of questions with respect to SunView that I've been saving
up. I would appreciate the net's help in answering them.
1) When I run lint on some files that use SunView's variable
argument list, I get the following message:
pass 2 error:(file interface.c) more than 59 args?
Q1) How do I get lint to work with long argument lists.
Currently I use a "#ifndef lint .. #endif" construct.
2) Whenever I use a SunView function such as
data = (Structure *) window_get(panel, WIN_CLIENT_DATA,0);
Lint reports an error message such as:
interface.c(153): warning: possible pointer alignment problem
Q2) How do I get lint to shut-up about such constructs.
3) I'm attempting to use "window_loop()/window_return()" functions
to implement a blocking popup. Unfortunately, and as stated in
the SunView manual, window_loop() will not work with subframes
composed of more then one type of window. In my specific case I
have a frame that encloses a canvas and a panel subwindow. The
frame does block; however, only the first sub-window defined is
shown and I can't interact with the other subwindow.
Q3) Is it possible to use SunView blocking pop-ups that have more
than one subwindow?
4) My application generates a number of pop-up panels that
the user can display and interact with at any time.
However, there is a practical limit to the number of
windows that can be simultaneously open.
Q4) How does one determine if the next window_create() call
can open a window, since window_create() never returns with
an error status because SunView bombs internally.
5) I have a problem with the following minimal code construct:
my_menu = menu_create(
MENU_ITEM, MENU_STRING, "String1",
MENU_ACTION_PROC, dispatch_menu_command,
MENU_CLIENT_DATA, COMMAND_1,
0,
MENU_ITEM, MENU_STRING, "String2",
MENU_ACTION_PROC, dispatch_menu_command,
MENU_CLIENT_DATA, COMMAND_2,
0,
MENU_GEN_PROC, init_menu,
0);
Menu init_menu(menu,op)
Menu menu;
Menu_generate op;
{
Menu_item menu_item;
if (op != MENU_DISPLAY)
return(menu);
#ifdef THIS_WORKS
menu_item = (Menu_item) menu_get(menu, MENU_NTH_ITEM, 1, 0);
#else
menu_item = (Menu_item) menu_find(menu, MENU_CLIENT_DATA, COMMAND1, 0);
#endif
/*
* code to do something with the menu_item.
*/
return(menu);
}
Q5) What happens is that the menu_find call also recursively calls
the menu's generate procedure, so the program goes into an infinite
loop, repeatedly calling the function "init_menu". If, as shown above,
I "#define THIS_WORKS" the program performs as expected. However, I
want the menu_items to be position independent, and they will be
uniquely identifiable by MENU_CLINET_DATA. Is this a feature of
SunView or have I missed something?
Mark R. Simpson (914) 945-6163
Philips Laboratories uunet!philabs!mrs
North American Philips Corporation or
Briarcliff Manor, NY 10510 mrs@philabs.philips.com
barnett@unclejack.crd.ge.com (Bruce Barnett) (05/23/89)
I have two SunView questions: (a) Has anyone used the attr_create_list() code for dynamically creating attribute lists? I tried a simple example and got: Malformed or non-terminated attribute-value list. Last valid attribute was Attr pkg= (null), id= 0, cardinality= 0 (0x0). The example was similar to Chap. 18, pg 331 of the SunView I programmers manual, May 88. Does someone have an example that works? (b) Has anyone implemented a panel button that repeats when you hold it down? Bruce G. Barnett <barnett@crdgw1.ge.com>
rdh) (01/04/90)
I have several questions upon which some wizard out there could perhaps shed some enlightenment...all issues are for Sun 3/80 8MB monochrome, OS 4.0.3, essentially run as single user (occaisionally someone rlogins to annoy me). This list of questions is rather long, but I've been saving them up for awhile now...and I figure better one easily n'ed message than a bunch of shorter ones... 1) I am trying to run both "eyecon" and a bunch of "perfmeter"s under SunView. They start up OK, but eventually end up in subspace. They seem to get swapped out (when running OK, state is "S", when not responding, state is "IW") and then forgotten by the schedular. If I mouse over to the lost perfmeter (or eyecon) [just moving the mouse to the icon is sufficient, I don't have to click], a brief flurry of disk and paging activity ensues and it works again, for awhile. They are started up in the iconified state, but so is my clock, which has NEVER gone to sleep on me. Although I seem to recall that very occaisionally eyecon would flake out under OS 3.5, I don't remember it happening to perfmeters (in other words, the problem is either new to or much more significant under 4.0.3 - an Ada compile is guaranteed to nail at least one [and usually all] of 'em). Relevant parts of my .sunview file: cmdtool -Wp 0 0 -Ws 670 103 -WP 0 0 -Wl [Console] -WL console -C clock -Wp 497 32 -Ws 218 39 -WP 688 0 -Wi perfmeter -Wp 189 799 -Ws 64 48 -WP 528 852 -Wi -v cpu perfmeter -Wp 189 799 -Ws 64 48 -WP 456 852 -Wi -v page perfmeter -Wp 126 799 -Ws 64 48 -WP 392 852 -Wi -v disk perfmeter -Wp 63 799 -Ws 64 48 -WP 328 852 -Wi -v intr perfmeter -Wp 0 799 -Ws 64 48 -WP 256 852 -Wi -v pkts eyecon -Wp 72 72 -Ws 202 39 -WP 0 836 -Wi shelltool -Wp 0 103 -Ws 650 728 -WP 984 0 shelltool -Wp 502 121 -Ws 650 728 -WP 1056 0 2) Under OS 3.5, I had ``/Tty/Bold_style "Offset_X"'' in my .defaults which made "man" output emphasized items in "bold face" rather than under- lining them. I have to add ``/Tty/Underline_mode "Same_as_bold"'' for OS 4.0.3 to achieve the same effect. My question is: what is the meaning of ^H_'ed text - does it mean "underline", or "emphasize" text? (I.e., underline, bold, blinking, italics, etc are all physical character at- tributes, emphasis is a logical concept implemented by some physical mapping of attributes. I assumed that ^H_'ing was emphasis.) Was the observed 3.5 behavior merely coindidental, and the new 4.0.3 behavior "correct" in some more global sense? Have I misdirected global graphics by forcing underlining to bold face? (All I want is for man to use bold face, not underlining - and most especially not reverse-video!!!. I feel like I am using an awfully big hammer on a very small nail, running the risk of smashing all sorts of other stuff as a side effect...) And, after all that, why do command tool windows ignore all the settings and just output the text totally unemphasized? 3) And for that matter, why do command tools still not support file recognition/completion (via ESCAPE)? Is there some fundamental philo- sophical difference between command and shell tools [as far as users typing Unixy commands like "man" and "ls"]? I.e., something more than fancy editing and scroll bars and other "fluff", something that makes the user interface to csh/etc [appear to] work radically differently? Oh well, guess I'll stick to shell tools... 4) I would like to use "Left Handed" mouse key-mapping, but all I can find is left-handing the mouse AND KEYBOARD FUNCTION KEYS. I want to map the mouse keys (keep "select" on the "index" finger), and leave the "Lnn" and "Rnn" keys alone. Can I do this? 4a) From playing around with defaultsedit, I would like to know the philosophy on input_from_defaults. It is not automatically run, so once I change something, then log out, the next person finds my left-handed keyboard/mouse. All the other .defaults defaults seem to take action automatically as SunView/etal start up. Is there something I need to put in my .sunview file to run input_from_defaults? (Side issue: I run with the Delete and Back Space keys swapped (CURSE YOU SUN!!!!!!!!!!) [Side question: has anyone tried to pry off the keycaps and swap them? Will this destroy the keyboard?], and input_from_defaults unswaps the two, so I need to run my swapBsDel krock after input_from_defaults...) 5) TFM says not to use ^D^Q, but rather to use menu selection to quit SunView. Why? I Hates Mices to Pieces [why do think I shove the bloody mouse off to the left side of desk where it is out of my way? It ain't 'cuz I'm left-handed...], and prefer ^D^Q as it is faster to type, but don't want to risk damaging something, leaving some arcane database corrupted, or whatnot... 6) How do I use "Meta" characters via .ttyswrc? I would like to define (e.g.,) ``mapi F11 M-xgnus\n'' (where M-x is Meta-x). I realize that I can "cheat" and use \Ex rather than M-x, but I'd like to know if it is possible. 6a) Can I dynamically define (e.g.,) the Fnn keys on the fly, say from a shelltool window. Ideally, I would hit Compose, F11, and type in the string I wanted... (Is the Compose key used for anything?) 7) Is there a "clean" way to run SunView if and only if you are on a SunView'able device? Other than the usual krockitude of grepping the tty name to guess if you're the real console or a dump terminal or rlogin'ed... Something like: % sunview -exitpolitelyifnotrunnignonappropriatedevicetype or % if (runningonappropriatedevicetype) sunview 8) Is there any way to have windows magically warp the mouse to a useful place when activated? E.g., after mousing across the screen to click on a iconified shell tool, or after mousing to someplace on the screen where I can menu my way into a new shelltool/etc, I then have to mouse all the way back to wherever the new shelltool/etc happens to choose to appear (for some reason, this is especially annoying with dbxtool - I guess 'cuz I leave my icons at the top of the screen, and dbxtool's command window is at the bottom of its window...). It would be so convenient if clicking on or creating a shelltool left the mouse in the shelltool window so I could type directly (ditto dbxtool, etc. - I imagine most tools have a fairly logical "default" position for the mouse upon invocation). [I realize that any particular windowing application can do anything it wants with the mouse - what I would like to know is if SunView/shelltool/ etc currently have any such option, and if so, how do I set it?] 9) One of the things I liked about the Symbolics window system was their way of emphasizing the selected ("keyboard focused", in SunTalk) window by gently stipling all the other windows, rather than just changing the window border. E.g., the "background" is nominally a 50% gray, non-se- lected windows would be, say, 5-10% gray (which leaves them both readily understandable and obviously not-selected), and the selected window white. It made it so obvious which window you were typing into! Does SunView have any such facility? Any plans/hopes for any such thing? Many thankx in advance for any constructive answers! -RDH