Sunday, January 17, 2010

Cocoa development sequence

The sequence to development cocoa application

1) in Interface builder, layout the components.
2) in XCode, to create the corresponding class to the layout in the interface builder.
3) link the components in IB with the class in XCode.
3.1) create an instance of the class in IB.
3.2) link the components to the corresponding IBOutlets and IBActions.
Build and run.

Blackberry development sequence

The sequence to development the Blackberry application

1) create a class of the main screen.
1.1) create the constructor
1.2) add components in order.
2) create a class, like TheApp, that contain the main() entry point.
2.1) create the constructor
2.2) create the instance of the main screen and push it into the system screen.
2.3) in the main()
2.3.1) create an instance of TheApp class.
2.3.2) finally, enterEventDispatcher().
Build and run.

Sunday, January 10, 2010

php & apache on 10.5

Record the steps I made.

1) update /etc/apache2/httpd.conf
Add lines below
LoadModule php5_module libexec/apache2/libphp5.so
AddHandler php5-script php
AddType text/html php
AddType application/x-httpd-php-source phps

2) Locate php script files to /Library/WebServer/CGI-Executables.

3) Restart "Web Sharing" in "System Preferences" > Sharing.