Sunday, November 29, 2009

Add Model reference to View

In Model View Controller in the context of Cocoa, when View(PolygonView) needs a reference to Model(PolygonShape):
Step 1: declare an instance variable of PolygonShape in PolygonView



Step 2 Link the Outlet PolygonShape to Class PolygonShape

Thursday, October 15, 2009

#include vs #include "file"

First: <> vs ""
Both would work if file exist. The difference is the order of directories are searched.
In case of <>: ONLY searches in list of SYSTEM directories. If file does not exist in the system directories then C1083 error.

In case of "file": First searches in the including file directory(current file directory), if not found then searches in the SYSTEM directories. If either is found then C1083 error.

Second: file vs file.h
Some of the header files end with ".h" others do not. Eg stdio.h vs fstream .Both of the files are in system directory so proper inclusion would be
#include
#include

of course the following would work as well
#include "stdio"
#include "fstream.h"

See picture for more clarification example





verifies files are in system directory


ref:http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html

Monday, September 14, 2009

proxy

Thursday, August 20, 2009

parameterized types are only available if is 5.0



This error turned out when I tried to use HashMap, the reason was the compiler compliance level. OS: Ubuntu

Wednesday, August 19, 2009

Saturday, August 15, 2009

lost wireless connection after updating ubuntu kernel



I reversed the update by reinstalling the odd kernel
linux-ubuntu-modules-2.6.24-24-generic_2.6.24-24.39_i386.deb

Thursday, August 13, 2009

add .jar library




right click on project
choose buildpath
then add libraries