4 January 2009 by jourdein
I was scratching my head of why the heck does the my tableview does not automatically update its data.
My binding:
NSArrayController = ACIssues
Controller Class = Issue Controller (have NSArray property subviewControllers)
ACIssues has it contentArray binded to subviewControllers’s array in Issue Controller. Somehow, changes made to the array of subviewControllers in Issue Controller does not reflect on other table which I had it binded to ACIssues.
After searching the internet, I found this
http://boredzo.org/blog/archives/2008-11-26/how-to-work-with-a-bound-to-array (open in new window)
Very good one. What it said… There’re right and wrong way to bind.
The right way is by using indexed accessors. Then, your Array Controller will see any changes you’ve made. What I did was creating indexed accessor methods.
- (void)insertObject:(id)object inSubviewControllersAtIndex:(unsigned)index {
[[self subviewControllers] insertObject:object atIndex:index];
}
- (void)removeObjectFromSubviewControllersAtIndex:(unsigned)index {
[[self subviewControllers] removeObjectAtIndex: index];
}
and calling it where I wanted to change the array.
[self insertObject:obj inSubviewControllersAtIndex:(index + 1)];
[self removeObjectFromSubviewControllersAtIndex:index];
the structure of this indexed accessor:
insertObject:(id)object inKeyAtIndex:(unsigned)index
where key is the property or in my case array that is binded to the Array Controller.
Posted in Cocoa, How-to, Programming, XCode | Leave a Comment »
3 January 2009 by jourdein
I did a google search on which is the best one to use to redirect page from another. I had this in mind, whether to use meta tag refresh or 301 redirect in htaccess file. I was afraid that using meta redirect would be rank penalize by google.
After the search, the safest way to redirect is to use 301 redirect. To do 301 redirect you just need to add this code in .htaccess file in the root directory:
RewriteEngine On
Redirect 301 /index.html http://mydomain.com/blog/
You might be asking what is meta fresh tag… It just a simple html code put on the top of the html file that redirect user from that page to another page. It look like this:
<meta http-equiv="refresh" content="0;url=http://www.anotherdomain.com">
Here I’ve got some good illustration of the what those mean with other types or redirection.

Here is the link which I referred to (all links open in new window):
Posted in How-to, SEO, Web Development | Tagged 301, meta tag, redirect, SEO | Leave a Comment »
8 August 2008 by jourdein
Though iPhone dictionary keyboard is an innovative word suggestion but sometimes, I would like the keyboard to be turned off so that I would be able to write in my language. Actually, if it turned off, I would not mind. I think I would be typing faster if the dictionary is disabled.
Thus, I googled on how to disable the dictionary for iPhone 2.0. In iPhone 1.1.4 firmware, they have the tweak called KB that will disabled it. But in 2.0, none of it happened to be anywhere yet. The solution I found required SSH to some folder and renaming it language bundle.
The instruction requires terminal to connect to iPhone through SSH but I prefer using Transmit (FTP app).
So, what you require are:
- SSHed iPhone
(I installed OpenSSH from Cydia. This mean that your phone is already jailbroken ‘ed’)
- FTP App (I use Transmit on MacBook)
Where to start?
- Open FTP application. Connect to iPhone using IP address with username:root password:alpine
- Point you FTP browser to
/System/Library/TextInput/
- Rename
TextInput_en.bundle to something. I rename to TextInput_en_bak.bundle.
- Create a new folder with original name which you have renamed
TextInput_en_bak.bundle
- Respring or reboot you iPhone to commit changes.
If you would like to see the source of website that I’ve referred to, visit:
http://n00.be/archives/724/
Posted in Hack, How-to, iPhone | Tagged autocomplete, autocorrect, disable language, Hack, How-to, iPhone | Leave a Comment »