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:
parent
a7fe45b8a5
commit
374eed7432
|
@ -132,8 +132,6 @@ uiBox *makePage16(void)
|
||||||
|
|
||||||
uiTableSetRowBackgroundColorModelColumn(t, 3);
|
uiTableSetRowBackgroundColorModelColumn(t, 3);
|
||||||
|
|
||||||
uiTableAppendTextColumn(t, "Numbers", 8);
|
|
||||||
|
|
||||||
tc = uiTableAppendColumn(t, "Buttons");
|
tc = uiTableAppendColumn(t, "Buttons");
|
||||||
uiTableColumnAppendCheckboxPart(tc, 7, 0);
|
uiTableColumnAppendCheckboxPart(tc, 7, 0);
|
||||||
uiTableColumnAppendButtonPart(tc, 6, 1);
|
uiTableColumnAppendButtonPart(tc, 6, 1);
|
||||||
|
|
|
@ -232,17 +232,6 @@ static BOOL onWM_NOTIFY(uiControl *c, HWND hwnd, NMHDR *nmhdr, LRESULT *lResult)
|
||||||
// make sure clipped strings are nul-terminated
|
// make sure clipped strings are nul-terminated
|
||||||
if (n >= item->cchTextMax)
|
if (n >= item->cchTextMax)
|
||||||
item->pszText[item->cchTextMax-1] = L'\0';
|
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
|
} else
|
||||||
item->pszText[0] = L'\0';
|
item->pszText[0] = L'\0';
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue