Changed 'bind' function to 'bindWidget' to eliminate conflict with 'bind' from the 'socket' library

modified:   cocoa.nim
	modified:   cocoa/NSFunctions.nim
	modified:   cocoa/widgets/bind.m
This commit is contained in:
Armando Rivera 2023-10-12 13:52:49 -04:00
parent aa29344f72
commit 905f852eab
3 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ proc state*(widget: ID): cint {.cdecl, importc: "State".}
proc clear*(widget: ID) {.cdecl, importc: "LB_Clear".}
proc `item=`(widget: ID; pos: cint) {.cdecl, importc: "SetItem".}
proc remove*(widget: ID; pos: cint) {.cdecl, importc: "RemoveItem".}
proc link*( widget: ID, widgetIvar: cstring, target: ID, targetIvar: cstring) {.cdecl, importc:"bind".}
proc link*( widget: ID, widgetIvar: cstring, target: ID, targetIvar: cstring) {.cdecl, importc:"bindWidget".}
proc `tooltip=`*(widget: ID, tip: cstring) {.cdecl, importc: "setToolTip".}
# TableView Functions

View File

@ -77,6 +77,6 @@ proc Notify*(title: cstring; subtitle: cstring; text: cstring) {.cdecl, importc:
proc newSeparator*(parent: ID; x: cint; y: cint; width: cint): ID {.cdecl, importc: "createLine".}
proc link*( widget: ID, widgetIvar: cstring, target: ID, targetIvar: cstring) {.cdecl, importc:"bind".}
proc link*( widget: ID, widgetIvar: cstring, target: ID, targetIvar: cstring) {.cdecl, importc:"bindWidget".}
proc `tooltip=`*(widget: ID, tip: cstring) {.cdecl, importc: "setToolTip".}

View File

@ -1,6 +1,6 @@
#import <Cocoa/Cocoa.h>
void bind( id widget, const char * widgetIvar, id target, const char *targetIvar) {
void bindWidget( id widget, const char * widgetIvar, id target, const char *targetIvar) {
[widget bind: [NSString stringWithUTF8String: widgetIvar] toObject: target withKeyPath:[NSString stringWithUTF8String: targetIvar] options:nil];
}