Started tests for truly empty uiGroups and uiTabs; started banning NULL in uiBox.
This commit is contained in:
parent
79a522efb3
commit
0e785d886b
|
@ -404,6 +404,9 @@ uiDarwinControlDefaultSetHuggingPriority(uiBox, view)
|
||||||
|
|
||||||
void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
|
void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
|
||||||
{
|
{
|
||||||
|
// TODO on other platforms
|
||||||
|
if (c == NULL)
|
||||||
|
userbug("You cannot add NULL to a uiBox.");
|
||||||
[b->view append:c stretchy:stretchy];
|
[b->view append:c stretchy:stretchy];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ CFILES += \
|
||||||
test/page8.c \
|
test/page8.c \
|
||||||
test/page9.c \
|
test/page9.c \
|
||||||
test/page10.c \
|
test/page10.c \
|
||||||
|
test/page11.c \
|
||||||
test/spaced.c
|
test/spaced.c
|
||||||
|
|
||||||
HFILES += \
|
HFILES += \
|
||||||
|
|
10
test/main.c
10
test/main.c
|
@ -45,7 +45,9 @@ int main(int argc, char *argv[])
|
||||||
int i;
|
int i;
|
||||||
const char *err;
|
const char *err;
|
||||||
uiWindow *w;
|
uiWindow *w;
|
||||||
uiBox *page2, *page3, *page4, *page5, *page6, *page7, *page8, *page9, *page10;
|
uiBox *page2, *page3, *page4, *page5;
|
||||||
|
uiBox *page6, *page7, *page8, *page9, *page10;
|
||||||
|
uiBox *page11;
|
||||||
uiTab *outerTab;
|
uiTab *outerTab;
|
||||||
uiTab *innerTab;
|
uiTab *innerTab;
|
||||||
int nomenus = 0;
|
int nomenus = 0;
|
||||||
|
@ -130,6 +132,12 @@ int main(int argc, char *argv[])
|
||||||
page10 = makePage10();
|
page10 = makePage10();
|
||||||
uiTabAppend(innerTab, "Page 10", uiControl(page10));
|
uiTabAppend(innerTab, "Page 10", uiControl(page10));
|
||||||
|
|
||||||
|
innerTab = newTab();
|
||||||
|
uiTabAppend(outerTab, "Pages 11-?", uiControl(innerTab));
|
||||||
|
|
||||||
|
page11 = makePage11();
|
||||||
|
uiTabAppend(innerTab, "Page 11", uiControl(page11));
|
||||||
|
|
||||||
if (startspaced)
|
if (startspaced)
|
||||||
setSpaced(1);
|
setSpaced(1);
|
||||||
|
|
||||||
|
|
|
@ -74,3 +74,6 @@ extern uiBox *makePage9(void);
|
||||||
|
|
||||||
// page10.c
|
// page10.c
|
||||||
extern uiBox *makePage10(void);
|
extern uiBox *makePage10(void);
|
||||||
|
|
||||||
|
// page11.c
|
||||||
|
extern uiBox *makePage11(void);
|
||||||
|
|
Loading…
Reference in New Issue