On Tue, 16 Aug 2005, Jens Langner wrote: > Hello Ilkka, > > On Tue, 16 Aug 2005 18:36:47 +0300, Ilkka Lehtoranta wrote: > > [...] > >> so here you can see that I already added a proper initialization to > >> the MUIM_Setup method of TextEditor. The question is now why later on > >> data->tmprp.Font is NULL? Because it shouldn't be null in MUIM_Show > >> cause MUIM_Setup sets up the font for the temporary rastport already > >> because MUIM_Show is called. > > > > Okay. data->tmprp.Font is NULL because data->font is NULL at > > MUIM_Setup. That is, GetFont() in InitConfig() call fails and both > > data->fixedfont and data->normalfont are NULL (I dont have fonts > > configured). > > Ah! this was the missing link. I didn't think of the possibility that you > haven't got any fonts configured. Thanks for the hint. So please checkout > the latest version as I fixed the problem now and forever (hopefully) :) And > please report back if it now works for you on MOS. It works now. > > >> No. If I am correct then the initialization done in MUIM_Setup should > >> already setup the temporary rastport right before a Window_Open call > >> and make it valid right on creation time of the TextEditor object. > > > > I'll try to build test cases to see if there are problems. "Dont fix it > > if it aint broken" ... :) > > Yes that would be great. But let me correct myself. I checked it and > MUIM_Setup is of course only called when the window is opened with > MUIA_Window_Open. However, I guess there still might be no problem if > data->font is not yet initialized at that point as the object is set as > "data->shown = FALSE" and as such no operation should be done which requires > a valid data->font. But of course, if you could provide testcases that would > definitly help in verifying it. I will look what I can do when I'm back from vacation (in Monday :). cu, Ilkka _____________________________________________________________________________ TextEditor ML - //www.freelists.org/list/texteditor_mcc Listserver help - mailto:texteditor_mcc-request@xxxxxxxxxxxxx?Subject=HELP Bugtracker......: http://sourceforge.net/tracker/?atid=731469&group_id=135025