Two more things:
First, if I put a PtDamageWidget() at the end of my setup() routine all
works as expected. But I don’t consider this exceptable.
Second, I don’t know if this is related but, the dialog widget is on top
of a PtRaw widget that is drawn using an off screen context. However, the
OS_Context is NOT being updated at the time that this dialog exists. I.E.
the PtRaw is only used during data collection mode. This dialog can only
be requested if your NOT in data collection mode.
Bill Caroselli <qtps@earthlink.net> wrote:
BC > A little more information:
BC > In my setup() routine I have the following two lines:
BC > SetTextString( AbGetABW( format_widget_group[ nc ].osd_desc_text ), format.formats[ nc ].osd_desc );
BC > SetTextString( AbGetABW( format_widget_group[ nc ].prtr_desc_text ), format.formats[ nc ].prtr_desc );
BC > SetTextString() is a convienence function that looks like this:
BC > void SetTextString ( PtWidget_t * widget, const char * string )
BC > {
BC > PtSetResource( widget, Pt_ARG_TEXT_STRING, string, 0 );
BC > return;
BC > }
BC > format_widget_group is an array of structures that has the ABN_values for
BC > each of the widgets that I need to update.
BC > All of this works perfectly on the first pass through my setup(). Also,
BC > if I comment out either of the two lines above, the subsequent passes
BC > through setup() also work, except that that appropriate field isn’t
BC > updated.
BC > So again, is there any obscure rule that says I can’t call my setup()
BC > routine more than once to set the text resource for a widget more than
BC > once. I know this can’t be true!
BC > Bill Caroselli <qtps@earthlink.net> wrote:
BC > BC > This is damn freaky. I have a dialog window. The setup() routine
BC > BC > initializes all of the data fields from internal memory.
BC > BC > If I leave the dialog window on the screen and load new values the
BC > BC > physical appearance of the window is harmed. (This is done by clicking
BC > BC > on a load button, which pops up a file select widget. When a file is
BC > BC > selected the file is read into a struct and the dialog setup() routine is
BC > BC > called again.)
BC > BC > I have uploaded to my QUICS account (bcaroselli) a before.bmp and an
BC > BC > after.bmp screep shot so that you can see what I’m talking about.
BC > BC > Here’s where it gets wierd. If I click on any of the widgets that were
BC > BC > harmed they get re-drawn correctly. Or, if I pop up another window and
BC > BC > pass it over any part of one of the harmed widgets they get re-drawn
BC > BC > correctly.
BC > BC > The only thing that has changed in this program is that I now have my own
BC > BC > cover function for open() called sp_open() that parses space characters
BC > BC > into and out of the file name as appropriate. BTW, the sp_open() does
BC > BC > work.
BC > BC > Note: I have used the word harmed here only to not use a photon verb like
BC > BC > damage or destroy. I am not doing any of those things.
BC > BC > I have no idea in the world what to even look at. I’ve stopped my program
BC > BC > in the setup() routine before the calls to PtSetResource() for
BC > BC > Pt_ARG_TEXT_STRING. The ascii strings are correct and of correct sizes.
BC > BC > Is there any real reason why I can’t call my setup() callback again
BC > BC > without the dialog having been destroyed in the meantime? This used to
BC > BC > work.
BC > BC > Help me Photon-Wan Kanobi. Your my only hope.
\
Bill Caroselli – Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net