[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1057.0. "Problem with XtUnrealizeWidget" by AIDA::CARCANO () Tue Jul 04 1989 12:43

From within a callback my application calls XtUnrealizeWidget(widget). 
The widget is a popup dialog box. The same happens if I unrealize the parent
shell of the widget. However, if I call UnmanageChild(widget) or 
XtDestroyWidget(widget) everything works fine. Which is the reason for this?
Could be something wrong in my application? Is there something I'm missing?

Thanks in advance,

Matteo

(Italian ACT, Milan)

T.RTitleUserPersonal
Name
DateLines
1057.1What wrong?4981::thomasThe Code WarriorTue Jul 04 1989 13:544
>>The same happens

The same what?  You never described what happens.

1057.2Really sorry...PIOPPO::CARCANOWed Jul 05 1989 03:3518
Well, something went wrong while including the text file: sorry!
What happens is that I get an ACCESS VIOLATION when calling XtUnrealizeWidget
but everything works fine with the Unmanage or Destroy calls (so, the widget 
pointer doesn't seem to be the problem).
Now it makes sense to ask: which could be the reason for this "crash"?
Is there something I'm missing?

P.S.: I want to Unrealize a popup dialog box containing a lot of stext widgets.
Let's assume that the user, after having entered data in 5 out of 10 of the 
stext fields wants to cancel the entire dialog box window. If I simply Unmanage
the widget, next time I manage it I find the 5 stext fields filled with the
previously entered data: I don't like this as well as I don't like to clear each
field from the callback considering that the field are about a hundred.

Sorry again and thanks,

Matteo

1057.3LEOVAX::TREGGIARIWed Jul 05 1989 12:0124
> Now it makes sense to ask: which could be the reason for this "crash"?
> Is there something I'm missing?

XtUnrealizeWidget has some problems in V1.  These are fixed in V2.
Also in V2, popup dialog boxes have a new resource (DwtNautoUnrealize).
When set to TRUE (default is FALSE) the dialog box will unrealize itself
when it is unmanaged.  This could be useful on non-virtual memory servers
as it will keep the window count lower (you can put *autoUnrealize: true
into your Xdefaults file). 

> P.S.: I want to Unrealize a popup dialog box containing a lot of stext widgets.
> Let's assume that the user, after having entered data in 5 out of 10 of the 
> stext fields wants to cancel the entire dialog box window. If I simply Unmanage
> the widget, next time I manage it I find the 5 stext fields filled with the
> previously entered data: I don't like this as well as I don't like to clear each
> field from the callback considering that the field are about a hundred.

Unfortunately, I don't think XtUnrealizeWidget will do what you want.
The intention of unrealizing is to destroy the window, but not to change
the state of the widget in any other way.  That is the stext fields are still
going to be filled with the previously entered data.

Leo

1057.4Thanks a lotAIDA::CARCANOWed Jul 05 1989 12:3312
Leo,

thanks a lot for this answer and for the others you gave me in the past.
You are of great, great help.

P.S. From your reply it seems that the only way to do what I need 
     is to destroy the widget or clear field by field, right?

thanks again and ciao,

Matteo

1057.5LEOVAX::TREGGIARIWed Jul 05 1989 14:159
> P.S. From your reply it seems that the only way to do what I need 
>     is to destroy the widget or clear field by field, right?


Right.  Clearing field by field should be much more efficient than
having to re-create the widgets.

Leo

1057.6XtUnrealizeWidget work arounds??LARVAE::BULLARDFri Aug 18 1989 05:5310
    	I have hit a problem with XtUnrealizeWidget.If I unrealize my
    widget hierarchy and realize it again my Pulldown menus stop working
    (maybe other widget do as well).I have tested this against version
    2 and it appears to be fixed.The real problem is that Decwindows
     V2 won't be available until Fy90 Q3 which is a problem for one
    of my customers.Are there any work arounds?
    
    regards Mark
    

1057.7LEOVAX::TREGGIARISun Aug 20 1989 21:495
    I can't think of any work-around.  What are they using it for?
    Maybe there is an alternative way to accomplish the same thing...
    
    Leo