views:

81

answers:

1

iChat does not allow to change your credentials to your account when List window is open and you are connected to server. I am just wondering how this is implemented.

I could imagine that internally iChat has some sort of ICAppDelegate that hold a pointer to ICPreferencesControler and an array of ICListWIndows. And now how preferences are informed that list window is connected to something?

Is iChat using here NSNotificationCenter? Or maybe pointer to preferences window is passed with -initWithPreferences: to list window?

A: 

If I had to guess, I'd say it's more like an ICChatAccount object being passed around with something similar to -[ICChatAccount isConnected]. ICChatAccount would be saved to the preferences, but it would do more than just save and load preferences.

Tom Dalling