Thursday, January 28, 2010

Programmer's Notepad - pnotepad

If you are looking around for a light-memory footprint editor for quick coding with highlight and add-on support give Programmer's Notepad a try.

For coloring scheme you visit, downloads section

UPDATE: With Default Preset, 'Consolas', 10px Font configuration this editor works pretty much like TextMate. Learn about Projects, Project Groups and Magic folder for organizing your code.

Monday, January 11, 2010

Installing GNUStep on Fedora Core

In the journey of installing GNUStep on my Fedora Core machine, I noted couple of useful pointers
that could help you save sometime.

* Install GNUStep Make from yum repository (yum install gnustep-make)

* make (compile source) and install GNUStep Base

You will need the following:
export GNUSTEP_MAKEFILES=/usr/lib/GNUstep/Makefiles/

* make (compile source) and install GNUStep GUI

You need to update ldconfig.

vim /etc/ld.so.conf.d/gnustep.conf

Add the content below and save:
/usr/local/lib/ix86/linux-gnu/gnu-gnu-gnu

Execute:
/sbin/ldconfig

* make (compile source) and install GNUstep Backend

You will need the following:
export PATH=$PATH:/usr/local/bin/ix86/linux-gnu/gnu-gnu-gnu

Check out complete documentation on steps followed at How to install GNUStep on Fedora Core

Friday, January 01, 2010

serialize/unserialize php API - an observation

On first request, I was saving the object into session.
$userInstance = new Users_Model();
$_SESSION['__key'] = $userInstance;
Make sure the class Users_Model definition is available.

On second request, I retrieve the object from session for re-use.
$retrievedUserInstance = $_SESSION['__key'];
object(__PHP_Incomplete_Class)[1]
public '__PHP_Incomplete_Class_Name' => string 'Users_Model' (length=11)
private 'id' => string '1' (length=1)
// ...
I noticed the $retrieveUserInstance object missed several methods!!

I realized that on second request, the class Users_Model definition
is not available on the page load and unserialize API is not working as expected.

$_SESSION values are saved using serialize API (as session.save_handler was set to files)

On making the class definition available before session_start() call,
the $retrieveUserInstance worked fine.
object(Users_Model)[1]
private 'id' => string '1' (length=1)
// ...
Hope it saves sometime for you.

This page is powered by Blogger. Isn't yours?