Fixed compilation errors. Hm, nothing is still freed...
This commit is contained in:
parent
a850ea3ac5
commit
ab393ed6b2
|
@ -5,7 +5,6 @@
|
||||||
@property uiControl *uiC;
|
@property uiControl *uiC;
|
||||||
@property void (*uiOnClicked)(uiControl *, void *);
|
@property void (*uiOnClicked)(uiControl *, void *);
|
||||||
@property void *uiOnClickedData;
|
@property void *uiOnClickedData;
|
||||||
@property NSMutableArray *uiFreeList;
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation uiNSButton
|
@implementation uiNSButton
|
||||||
|
@ -34,7 +33,7 @@ uiControl *uiNewButton(const char *text)
|
||||||
uiControl *c;
|
uiControl *c;
|
||||||
uiNSButton *b;
|
uiNSButton *b;
|
||||||
|
|
||||||
c = uiDarwinNewControl([uiNSButton class], NO, NO, NULL);
|
c = uiDarwinNewControl([uiNSButton class], NO, NO);
|
||||||
b = (uiNSButton *) uiControlHandle(c);
|
b = (uiNSButton *) uiControlHandle(c);
|
||||||
b.uiC = c;
|
b.uiC = c;
|
||||||
|
|
||||||
|
@ -42,21 +41,21 @@ uiControl *uiNewButton(const char *text)
|
||||||
[b setButtonType:NSMomentaryPushInButton];
|
[b setButtonType:NSMomentaryPushInButton];
|
||||||
[b setBordered:YES];
|
[b setBordered:YES];
|
||||||
[b setBezelStyle:NSRoundedBezelStyle];
|
[b setBezelStyle:NSRoundedBezelStyle];
|
||||||
setStandardControlFont((NSControl *) bb);
|
setStandardControlFont((NSControl *) b);
|
||||||
|
|
||||||
[b setTarget:b];
|
[b setTarget:b];
|
||||||
[b setAction:@selector(uiButtonClicked:)];
|
[b setAction:@selector(uiButtonClicked:)];
|
||||||
|
|
||||||
b.uiOnClicked = defaultOnClicked;
|
b.uiOnClicked = defaultOnClicked;
|
||||||
|
|
||||||
return b.c;
|
return b.uiC;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO text
|
// TODO text
|
||||||
|
|
||||||
void uiButtonOnClicked(uiControl *c, void (*f)(uiControl *, void *), void *data)
|
void uiButtonOnClicked(uiControl *c, void (*f)(uiControl *, void *), void *data)
|
||||||
{
|
{
|
||||||
button *b;
|
uiNSButton *b;
|
||||||
|
|
||||||
b = (uiNSButton *) uiControlHandle(c);
|
b = (uiNSButton *) uiControlHandle(c);
|
||||||
b.uiOnClicked = f;
|
b.uiOnClicked = f;
|
||||||
|
|
Loading…
Reference in New Issue