Mercurial > projects > dwt-mac
diff dwt/internal/cocoa/NSControl.d @ 37:642f460a0908
Fixed a lot of compile errors, a "hello world" app compiles now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Fri, 10 Oct 2008 12:29:48 +0200 |
parents | f565d3a95c0a |
children | d8635bb48c7c |
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSControl.d Tue Oct 07 12:56:18 2008 +0200 +++ b/dwt/internal/cocoa/NSControl.d Fri Oct 10 12:29:48 2008 +0200 @@ -13,6 +13,7 @@ *******************************************************************************/ module dwt.internal.cocoa.NSControl; +import dwt.dwthelper.utils; import dwt.internal.cocoa.id; import dwt.internal.cocoa.NSAttributedString; import dwt.internal.cocoa.NSCell; @@ -44,9 +45,9 @@ return OS.objc_msgSend(this.id_, OS.sel_abortEditing) !is null; } - public objc.SEL action () + public String action () { - return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action); + return fromStringz(cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action)); } public objc.id alignment () @@ -181,9 +182,9 @@ return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedTag); } - public bool sendAction (objc.SEL theAction, id theTarget) + public bool sendAction (String theAction, id theTarget) { - return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1, theAction, theTarget !is null ? theTarget.id_ : null) !is null; + return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1, theAction.ptr, theTarget !is null ? theTarget.id_ : null) !is null; } public NSInteger sendActionOn (NSInteger mask) @@ -191,9 +192,9 @@ return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_sendActionOn_1, mask); } - public void setAction (objc.SEL aSelector) + public void setAction (String aSelector) { - OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector); + OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector.ptr); } public void setAlignment (objc.id mode)