mirror of
https://github.com/Airr/nim-cocoa.git
synced 2025-05-11 19:12:09 +00:00
Merge branch 'master' of https://git.binarymagic.net/AIR/NimCocoa
merging
This commit is contained in:
commit
4aa9f3d968
@ -24,7 +24,7 @@ void AddItem(id widget, const char* txt ){
|
|||||||
NSString *widgetClass = [[widget class] description];
|
NSString *widgetClass = [[widget class] description];
|
||||||
|
|
||||||
/* ListBox */
|
/* ListBox */
|
||||||
if ([widgetClass isEqualToString:@"CocoaListBox"])
|
if ([widgetClass isEqualToString:@"CocoaListBox"] || [widgetClass isEqualToString:@"CocoaTableView"])
|
||||||
{
|
{
|
||||||
[[widget db] addObject: [NSString stringWithUTF8String: txt]];
|
[[widget db] addObject: [NSString stringWithUTF8String: txt]];
|
||||||
[[widget tbl] reloadData];
|
[[widget tbl] reloadData];
|
||||||
@ -46,8 +46,8 @@ const char* GetText(id widget) {
|
|||||||
|
|
||||||
/* TextEdit */
|
/* TextEdit */
|
||||||
}else if ([widgetClass isEqualToString:@"CocoaTextEdit"]) {
|
}else if ([widgetClass isEqualToString:@"CocoaTextEdit"]) {
|
||||||
if ( [[[widget textStorage] string] length] > 0) {
|
if ( [[[widget documentView] string] length] > 0) {
|
||||||
return [[[widget textStorage] string] UTF8String];
|
return [[[widget documentView] string] UTF8String];
|
||||||
}else{
|
}else{
|
||||||
return @"".UTF8String;
|
return @"".UTF8String;
|
||||||
}
|
}
|
||||||
@ -167,4 +167,4 @@ void addToParent(id parent, id child) {
|
|||||||
|
|
||||||
void setToolTip(id widget, const char *tooltip) {
|
void setToolTip(id widget, const char *tooltip) {
|
||||||
[widget setToolTip: [NSString stringWithUTF8String: tooltip]];
|
[widget setToolTip: [NSString stringWithUTF8String: tooltip]];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user