How to Manipulate Data of MySQL Tables on Mac OS X

Published on February 27, 2011 by Amir Sedighi

I was looking for a tutorial to fetch data from MySQL on Mac OS X or Linux flavors. This helped me. I just modified it a bit. After saving the following code as myclient.c: /* See url for more info: http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html */ #include #include #define Q1 “insert into test (a , b) values (? , [...]

Posted in Cocoa/Objective-C, Linux

Diving into Objective-C

Published on January 15, 2011 by Amir Sedighi

Introduction After many years of development I just wondered at the time I got familiar with Objective C. I’ve had long experience with Java, Delphi and C#. Also I was familiar with modern DSLs such as Groovy. However, Objective C looks pretty different when you start to learn it. After two weeks of challenges I [...]

Posted in Cocoa/Objective-C

Sending tasks to background thread in cocoa with performSelectorInBackground

Published on June 22, 2010 by Kamran Vatanabadi

Download, open and run the following example, written in Xcode 3.2.2 and tested in Mac OS 10.6.4: Download simple multi thread example Ok, before describing how it works, let us see the application it selfs. It has 3 counters, the first from the left has red counter, if you push the “Start in main thread”, [...]

Posted in Cocoa/Objective-C

Simple Cocoa Status Menu

Published on June 7, 2010 by Kamran Vatanabadi

It is more than 15 years that I haven’t written code for windows, I remember it was difficult and so tricky to move an application in the tray, but here in Mac OS X, you can easily send your application in status menu. You can download sample status menu from here, now let us take [...]

Posted in Cocoa/Objective-C

Asynchronous URL loading with NSURLConnection

Published on May 31, 2010 by Kamran Vatanabadi

if you don’t want to wait for a connection to complete loading a url, you can load it asynchronously using NSURLConnection. Take a look at the demo application named “BufferedURL” we prepared. You need two important variables, NSURLConnection for establishing a connection to server and a NSMutableData to store results. As we have in our [...]

Posted in Cocoa/Objective-C

Cocoa NSTimer Example

Published on May 30, 2010 by Kamran Vatanabadi

It is almost 2 or 3 months that we have started to work on cocoa application. At first it was difficult to digest the concepts of Objective-C and Xcode but as time goes by we get more familiar and believe that Objective-C’s concepts or syntax and they way Xcode lets us to write programe are [...]

Posted in Cocoa/Objective-C

Categories

Archives