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...

This commit is contained in:
Pietro Gagliardi 2018-05-29 20:27:31 -04:00
parent a7fe45b8a5
commit 374eed7432
2 changed files with 0 additions and 13 deletions

View File

@ -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);

View File

@ -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;