When I do the pulldown call it sets up the dropdown menu as a sub- 
window.  I verified this by getting the returned channel from a set  
to the window _wm.swinf) from the call and doing a clear.  It cleared  
the sub-window (loose item) of the drop down menu properly so PE does  
see it properly.

The issue here is that when I try a printf after setting to the sub- 
window, the printf doesn't seem to recognize this and defaults to the  
original owner window - generic (upper left hand corner).

If I do the same routine from the primary window, printf does pick up  
the redirection to the loose item.

It seems as if Printf may be broken in this case or, of course, I may  
be missing something.

By the way, the chan number does indicate the correct ownership for  
each sub window within the drop down menu.

jim


On 13-Nov-06, at 7:36 AM, P Witte wrote:

James Hunkins writes:

> In C68 when I set things to a window using wm.swinf or wm.swapp, any
> printf statement after that goes into the proper window within my app.
>
> When I do a drop down menu (window), doing the same call and clearing
> the window with the returned channel works just fine.
>
> But when I do another printf, the text ends up at the 0,0 location in
> the primary (owner) window, not in the drop down menu area at all or
> any sub-window element.
>
> Any idea what is going on and how I can write to a info window within
> a drop down menu?  I want to do some information updates quickly
> while copies and things are happening.

(Jim probably knows most of the below already ;o) but others wont.)

Its probably happening because a sub-window is not really a fully- 
fledged
window, with its own channel no. etc. You need to make the window  
think it
is the sub-window. There is a call to do this. In EasyPtr for S*Basic  
the
one call MWINDOW does this for all elements.

In C look for a routine called something like  WM_SWDEF. Other calls,  
such
as WM_SWLIT and WM_SWSEC, set the window to the
size of a LI or a sub-window menu section respectively. (These  
routine names
are taken from EP's C library).

Ive noticed that PE sometimes gets in a muddle (I always thought this  
was an
EP peculiarity, but perhaps it isnt). Certain actions and errors seem to
reset the window (eg malformed windows, window or element too large,  
writing
to a different element in between writes,..). You could also try to
re-assert the setting each time just before you print to the window.

Per
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to