[comp.windows.misc] WIN device busy creating iconic SunView window

bob@omni.com (Bob Weissman) (08/18/89)

(I've already asked this in comp.sys.sun, but that group suffers such
delay that I can't wait any longer for my posting to appear...)

I'm writing a program which creates a window in SunView1 (on a 4/110
running SunOS 4.0.3, if that matters).  Everything works fine, except that
if I start the window iconic with -Wi, I always get

  WIN ioctl number 20006703: Device busy

and then the icon appears perfectly and everything is fine.

I've read all the documentation (over and over and over...) and can not
for the life of me figure out how to get rid of this message.

Appendix B of the SunView1 System Programmer's Guide hints that this
message is related to the WININSERT ioctl, since the last two digits of
the number in the error are 03.  But I don't understand what this is
trying to tell me.

I've tried moving the command line argument parsing (using
FRAME_ARGC_PTR_ARGV) around to different places in the program, and
nothing works.

Please help!  Thanks!

-- 
Bob Weissman
Domainish: bob@omni.com
UUCPish:   ...!{amdahl,apple,pyramid,sgi,tekbspa,uunet}!koosh!bob

bob@omni.com (Bob Weissman) (08/25/89)

In article <807@koosh.omni.com>, I wrote:

> I'm writing a program which creates a window in SunView1 (on a 4/110
> running SunOS 4.0.3, if that matters).  Everything works fine, except that
> if I start the window iconic with -Wi, I always get
>   WIN ioctl number 20006703: Device busy
> and then the icon appears perfectly and everything is fine.
> 
> I've read all the documentation (over and over and over...) and can not
> for the life of me figure out how to get rid of this message.

I finally solved this problem by looking at other sources and applying
some trial and error.

It turns out that you must specify the FRAME_ARGC_PTR_ARGV parameter in
the initial call to window_create().  If you specify it in a subsequent
call to window_set(), you get the "device busy" message.

That's all there is to it.  Just make sure that FRAME_ARGC_PTR_ARGV comes
after any defaults you set (e.g., WIN_WIDTH, WIN_HEIGHT) which the user
may want to override, and before any defaults which you do not want to let
the user override.  This is one case where the ordering "set FRAME_*
attributes, then WIN_* attributes" does not apply.

This bug has been reported to Sun software support under the
service order number 352219.


-- 
Bob Weissman      <bob@omni.com>
UUCP:             ...!{amdahl,apple,pyramid,sgi,tekbspa,uunet}!koosh!bob
Hofstadter's Law: It always takes longer than you expect,
                  even when you take into account Hofstadter's Law.

bob@omni.com (Bob Weissman) (08/26/89)

In article <839@borabora.omni.com>, I wrote:
<In article <807@koosh.omni.com>, I wrote:
<
<> I'm writing a program which creates a window in SunView1 (on a 4/110
<> running SunOS 4.0.3, if that matters).  Everything works fine, except that
<> if I start the window iconic with -Wi, I always get
<>   WIN ioctl number 20006703: Device busy
<> and then the icon appears perfectly and everything is fine.
<> 
<> I've read all the documentation (over and over and over...) and can not
<> for the life of me figure out how to get rid of this message.
> It turns out that you must specify the FRAME_ARGC_PTR_ARGV parameter in
> the initial call to window_create().  If you specify it in a subsequent
> call to window_set(), you get the "device busy" message.

Sigh.  This is documented on page 382 of the SunView1 Programmer's Guide.

If only window_set() was smart enough to complain about invalid arguments,
I would have fixed this in ten seconds...

-- 
Bob Weissman      <bob@omni.com>
UUCP:             ...!{amdahl,apple,pyramid,sgi,tekbspa,uunet}!koosh!bob
Hofstadter's Law: It always takes longer than you expect,
                  even when you take into account Hofstadter's Law.