Mar 21
I started reading a book for Cocoa. It’s good to start with some application which can take you from a program that sets values or gets it to manipulate something. Hello World stop your curiosity but that doesn’t give you next steps.
I am building a program which can take current time as seed and generate random numbers. Also, i explored this awakeFromNib function which is kind of Page_Load or Init() routine. This will be exected automatically to provide your app a chance to initialize values.
Step 1: Create a new Project as “Cocoa Application” and name it as “RandomNumberGenerator”
Step 2: Create a new Class called MyController.m/h
Step 3: Open MainMenu.nib and make an interface to look like the following:
Continue reading »
Mar 21
I’ve been doing .NET development for about 10+ years. I recently started looking at Mac OS X development efforts. I had a hard time starting with that because of all of my Windows way of doing it. Finally, i got a hand on it. This is my version of Hello World application for Mac OS X 10.5 using XCode 3.1 (for iPhone Development). The IDE looks powerful. But as a first timer, i did struggle a little to get around.
Step 1: Launch XCode 3 and click File - New Project from the menu
Â
Â
Continue reading »
Dec 10
When you are developing an application for iPhone users, you may need to find a way to have images uploaded or documents uploaded to your app online. The way i did was to setup an email to receive those things and help the user to fetch them in his page or portal.
i setup an account images@blahblahblah.com and ask users to send an email from their phone or other email accounts. When they go back to the site to see those images, i wrote the following code to fetch data from that POP server. I found a free or Open source POP library which can fetch and manipulate attachment and messages. It’s available at http://sourceforge.net/projects/hpop/.
Example Code: Pop Client Sample
Sep 27
Great idea to embed small or tiny graphs in a document or sentence. For example, if you are writing a page which shows the performance of Dow Jones Index, you can do so by the following:
| Dow Jones |
 |
10765.45 |
?32.82 (?0.30%) |
This makes the user not to get distracted and follow the story you wanted to convey. In technology part of it, this is a simple graph which you can draw it with basic API on most languages. I build a sample program in C# where i got the source from here.
Also, you can take this Visual Studio Solution to quickly have it working. Download Sample
May 08
Microsoft release this new Vistual Studio Code name “Orcas” with .NET Framework 3.5 pre-release beta. I was poking around to see any new interesting features. I found this LINQ. LINQ is Language Integrated Query. Now you can add sql statements power into the languages itself. For example,
var xyz = from account in db.Accounts where account.balance < 0
select new { account.Name, account.Address };
So, you can put a foreach statement on top of this to get results like a record or row in a table to manipulate Name and Address. It’s a real cool feature. I haven’t read the entire article to see how extensive they are. but good for a beginner like me.
Dec 19
Delegates are nothing but the old concept of Function pointers. You will use them in situations where you wanted to pass a reference for your function to a caller so that they can call your method when they do something. Storing a state may not be an ideal thing in those situations. So triggering something will make it easier and use delegates for that.
I added a sample where i create a main form and create a sub form by passing a delegate to call back when they are closing the child form. Then, main window can clearup something and move forward to let child to destrou itself. click the following to download and run it with Visual Studio 2005 (.NET 2.0) Delegate Test .