Programmatically creating an NSTableView (trouble getting the NSHeaderView to show up)(cocoa osx)

Here is some code to programmatically create a table view with a scroll bar, and multiple columns. // create a table view and a scroll view NSScrollView * tableContainer = [[NSScrollView alloc] initWithFrame:NSMakeRect(10, 10, 380, 200)]; NSTableView * tableView = [[NSTableView alloc] initWithFrame:NSMakeRect(0, 0, 364, 200)]; // create columns for our table NSTableColumn * column1 … Read more

How to declare a string in Objective-C?

A C string is just like in C. char myCString[] = “test”; An NSString uses the @ character: NSString *myNSString = @”test”; If you need to manage the NSString’s memory: NSString *myNSString = [NSString stringWithFormat:@”test”]; NSString *myRetainedNSString = [[NSString alloc] initWithFormat:@”test”]; Or if you need an editable string: NSMutableString *myMutableString = [NSMutableString stringWithFormat:@”test”]; You can … Read more

Best way to do interprocess communication on Mac OS X

I am currently looking into the same questions. For me the possibility of adding Windows clients later makes the situation more complicated; in your case the answer seems to be simpler. About the options you have considered: Control files: While it is possible to communicate via control files, you have to keep in mind that … Read more

What is NSBundle and mainBundle in Objective-C?

A bundle is a structure used for packaging software on Mac OS X. Applications, frameworks and plug-ins are all different kinds of bundles. Bundles may contain executable code, resources, header files and other stuff (including other bundles) if you so wish. Bundles are implemented as directory trees with a defined structure. Applications, frameworks and plug-ins … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)