void VETypeList::DoNoCPPbSupportDialog( ConstStringPtr inFileName ) { StApplicationContext appContext; StDialogHandler dialog(PPob_NoCPPbSupport, LCommander::GetTopCommander()); // make the error string LStr255 errorStr(STRx_NoCPPbSupport, NoCPPb_StringFirst); if ( inFileName[0] > 0 ) { errorStr += inFileName; } errorStr += LStr255(STRx_NoCPPbSupport, NoCPPb_StringSecond); LStaticText *theCaption = dynamic_cast<LStaticText *> (dialog.GetDialog()->FindPaneByID(NoCPPb_Caption)); theCaption->SetDescriptor(errorStr); dialog.GetDialog()->Show(); MessageT theMessage; do { theMessage = dialog.DoDialog(); } while ( (theMessage != msg_OK) && (theMessage != msg_Cancel) ); LCommander::SetUpdateCommandStatus(true); }
void CControlPanel::UpdateDebug() { long total, contig; LProgressBar *theBar = dynamic_cast<LProgressBar*> (_floatWindow->FindPaneByID(kMemoryIndicator)); LStaticText *theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kMemoryField)); ::PurgeSpace(&total, &contig); if (_totalMem == 0) { _totalMem = total; } if (total != _displayedTotalMem) { LStr255 purgespace = LStr255(total/1024); LStr255 totalspace = LStr255((long)_totalMem/1024); LStr255 message; message += purgespace; message += "K free of "; message += totalspace; message += "K"; theCaption->SetDescriptor((StringPtr)message); theBar->SetMinValue(0); theBar->SetMaxValue(_totalMem/1024); theBar->SetValue(_totalMem/1024 - total/1024); _displayedTotalMem = total; } }