From 374eed74329a706a53661c8636632e5c9cb88111 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 29 May 2018 20:27:31 -0400 Subject: [PATCH] Removed the facilities for printing an int as text; this was causing the tester to crash in a weird way on OS X (through NSApplication _crashOnException: without telling me what that exception was) and I didn't intend on this part type to be used in this way anyway... --- test/page16.c | 2 -- windows/table.cpp | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/test/page16.c b/test/page16.c index 3a5ac639..80ac0139 100644 --- a/test/page16.c +++ b/test/page16.c @@ -132,8 +132,6 @@ uiBox *makePage16(void) uiTableSetRowBackgroundColorModelColumn(t, 3); - uiTableAppendTextColumn(t, "Numbers", 8); - tc = uiTableAppendColumn(t, "Buttons"); uiTableColumnAppendCheckboxPart(tc, 7, 0); uiTableColumnAppendButtonPart(tc, 6, 1); diff --git a/windows/table.cpp b/windows/table.cpp index 934acd46..c5dc9ef3 100644 --- a/windows/table.cpp +++ b/windows/table.cpp @@ -232,17 +232,6 @@ static BOOL onWM_NOTIFY(uiControl *c, HWND hwnd, NMHDR *nmhdr, LRESULT *lResult) // make sure clipped strings are nul-terminated if (n >= item->cchTextMax) item->pszText[item->cchTextMax-1] = L'\0'; - } else if (typ == uiTableModelColumnInt) { - char buf[32]; - intptr_t data; - int n; - - data = (intptr_t)(*(mh->CellValue))(mh, t->model, row, mcol); - sprintf(buf, "%d", (int)data); - n = MultiByteToWideChar(CP_UTF8, 0, buf, -1, item->pszText, item->cchTextMax); - // make sure clipped strings are nul-terminated - if (n >= item->cchTextMax) - item->pszText[item->cchTextMax-1] = L'\0'; } else item->pszText[0] = L'\0'; break;