Setting a layer delegate affects drawRect being called

2009-04-16 Thread Mohan Parthasarathy
Hi, I have a View whose drawRect method never gets called when I call [View setNeedsDisplay]. It looks like the reason is that the View's layer delegate is been set and If I remove that drawRect is called. Is this an expected behavior or something else is going on ? thanks -mohan

CALayer with KVC

2009-01-30 Thread Mohan Parthasarathy
Hi, I am storing some Key-Value Pairs when creating a CALayer. If i read it back immediately, i can read the values intact. Later when i read it in e.g., touchesBegan, the values seem incorrect. From my reading of the document, it says it can store any key/value pairs. Is that wrong understanding

Re: NSURLConnection changing the URL

2009-01-21 Thread Mohan Parthasarathy
On Tue, Jan 20, 2009 at 9:17 PM, Michael Vannorsdel wrote: > I've looked into this quite some time ago and have seen NSURLConnection > keep FTP and HTTP connections open even after the originating > NSURLConnection had been deallocated. The same connection was reused for > subsequent NSURLConnect

Re: NSURLConnection changing the URL

2009-01-21 Thread Mohan Parthasarathy
Mike, On Tue, Jan 20, 2009 at 8:45 PM, Michael Ash wrote: > On Tue, Jan 20, 2009 at 7:49 PM, Mohan Parthasarathy > wrote: > >> Is there a way to not to allocate the connection everytime i need to > send > >>>>> a new request ? > >>>>> &

Re: NSURLConnection changing the URL

2009-01-20 Thread Mohan Parthasarathy
On Tue, Jan 20, 2009 at 4:38 PM, Andrew Farmer wrote: > On 20 Jan 09, at 13:36, Mohan Parthasarathy wrote: > >> On Tue, Jan 20, 2009 at 1:23 PM, Andrew Farmer wrote: >> >>> On 20 Jan 09, at 12:22, Mohan Parthasarathy wrote: >>> >>> I want to be abl

Re: NSURLConnection changing the URL

2009-01-20 Thread Mohan Parthasarathy
On Tue, Jan 20, 2009 at 1:23 PM, Andrew Farmer wrote: > On 20 Jan 09, at 12:22, Mohan Parthasarathy wrote: > >> I want to be able to establish the TCP connection to a server and do >> multiple HTTP GETs with different URLs. I thought will achieve this by >> allocating a

Re: NSURLConnection changing the URL

2009-01-20 Thread Mohan Parthasarathy
able call this from somewhere so that whenever the view loads it needs to fetch the data always ? Is this possible or i have to disable caching ViewControllers that have UIWebView in them ? Thanks mohan On Tue, Jan 20, 2009 at 12:22 PM, Mohan Parthasarathy wrote: > Hi, > > I want to b

NSURLConnection changing the URL

2009-01-20 Thread Mohan Parthasarathy
Hi, I want to be able to establish the TCP connection to a server and do multiple HTTP GETs with different URLs. I thought will achieve this by allocating a NSURLConnection and then initWithRequest:urlRequest with a different URL everytime as there is no other way to set the URL. It looks like tha

"Cocoa Fundamentals Guide" Clarification

2009-01-19 Thread Mohan Parthasarathy
Hi, I am reading the section "Functions, Constants and Other C Types", in the Cocoa Fundamentals Guide ( http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/chapter_2_section_2.html) and a little confused about the wording in this section. The following list o

Re: Constructing class names dynamically

2009-01-15 Thread Mohan Parthasarathy
meClass class]); > > When I NSLog, I often put square brackets around strings in case there are > spaces or newlines that I might not notice. > > --Andy > > On Jan 15, 2009, at 1:27 PM, Mohan Parthasarathy wrote: > > Hi, > > I have tried this to make s

Re: Constructing class names dynamically

2009-01-15 Thread Mohan Parthasarathy
omString existed >> though, so I am switching to that instead of using the runtime.h >> function. >> >> >> >> >> On Tue, Jan 13, 2009 at 8:45 PM, Mohan Parthasarathy >> wrote: >> > On Tue, Jan 13, 2009 at 8:06 PM, Ken Tho

Re: Constructing class names dynamically

2009-01-15 Thread Mohan Parthasarathy
unction. > > > > > On Tue, Jan 13, 2009 at 8:45 PM, Mohan Parthasarathy > wrote: > > On Tue, Jan 13, 2009 at 8:06 PM, Ken Thomases > wrote: > > > >> On Jan 13, 2009, at 3:33 PM, Jean-Daniel Dupas wrote: > >> > >> he is just talki

Re: UITableViewController with dynamic data

2009-01-14 Thread Mohan Parthasarathy
s requested while you're in the process of freeing but you > haven't yet called reloadData, you will do the right thing. > > Luke > > > On Jan 14, 2009, at 12:57 PM, Mohan Parthasarathy wrote: > > Yes, that's what i meant. Just to confirm.. It is safe to

addObserver problem with protocols

2009-01-14 Thread Mohan Parthasarathy
Hi, I have protocol X that is implemented by a few classes of my own. These classes are not known directly to my main code but only through the protocol (id). When my main code tries to addObserver:self to the object id, i get a warning saying that my protocol does not implement it. This would hav

Re: UITableViewController with dynamic data

2009-01-14 Thread Mohan Parthasarathy
l be ready. > > Luke > > > On Jan 14, 2009, at 12:24 PM, Mohan Parthasarathy wrote: > > Hi, >> >> I am using a UITableViewController and the data for the table view is >> generated dynamically (fetched from the network). The data is normally >> fetched based

UITableViewController with dynamic data

2009-01-14 Thread Mohan Parthasarathy
Hi, I am using a UITableViewController and the data for the table view is generated dynamically (fetched from the network). The data is normally fetched based on some search. But when the Controller is loaded and i don't have the data ready, i want to return something back sane and later reload th

Re: Constructing class names dynamically

2009-01-13 Thread Mohan Parthasarathy
On Tue, Jan 13, 2009 at 8:06 PM, Ken Thomases wrote: > On Jan 13, 2009, at 3:33 PM, Jean-Daniel Dupas wrote: > > he is just talking about class name, not class. >> >> NSClassFromString() is probably what you're looking for. >> >> NSMutableString *clsName = derive class name from the entry. >> >>

Re: Constructing class names dynamically

2009-01-13 Thread Mohan Parthasarathy
thanks, this is exactly what i was looking for.. thanks mohan On Tue, Jan 13, 2009 at 1:41 PM, Bill Bumgarner wrote: > On Jan 13, 2009, at 1:33 PM, Jean-Daniel Dupas wrote: > >> he is just talking about class name, not class. >> >> NSClassFromString() is probably what you're looking for. >> >>

Constructing class names dynamically

2009-01-13 Thread Mohan Parthasarathy
Hi, Sorry for the bad subject name. I found no other way to explain this. What i need is a way to generate a class name dynamically. For example, the user selects an entry in the Table (assume just one column) and each entry is handled by a separate class. Obviously, i can have a dictionary which

Re: Release vs. autorelease

2009-01-12 Thread Mohan Parthasarathy
Hi, Sorry for the incorrect wording. I assumed that the reference count reached zero which is what you are hinting at i guess.. thanks mohan On Mon, Jan 12, 2009 at 12:47 PM, Andy Lee wrote: > On Jan 12, 2009, at 2:37 PM, Mohan Parthasarathy wrote: > >> In places other than d

Re: Release vs. autorelease

2009-01-12 Thread Mohan Parthasarathy
draining perofrmance should not really matter whether it is one pool or multiple pools. What am i missing ? Thanks mohan On Mon, Jan 12, 2009 at 11:59 AM, Jean-Daniel Dupas wrote: > > Le 12 janv. 09 à 20:37, Mohan Parthasarathy a écrit : > > > Hi, >> >> In places other than

Release vs. autorelease

2009-01-12 Thread Mohan Parthasarathy
Hi, In places other than dealloc where memory needs to be released (e.g, reassigning pointer to objects), is there a difference in doing autorelease or release of the object in terms of perfomance etc. ? I can see that the memory is released immediately in one case whereas in the other it is slig

Re: Resetting the TableView

2009-01-09 Thread Mohan Parthasarathy
gt;> than >>> once if you have a low memory situation as, I believe, the >>> UIViewController >>> can release it's view if it's not in use). In your normal case, the view >>> is >>> loaded the first time and then kept around as you move it

Re: Resetting the TableView

2009-01-08 Thread Mohan Parthasarathy
uation as, I believe, the UIViewController > can release it's view if it's not in use). In your normal case, the view is > loaded the first time and then kept around as you move it on and off the > navigation stack. > > HTH, > > Wyatt > > > On Jan 8, 2009, a

Re: Resetting the TableView

2009-01-08 Thread Mohan Parthasarathy
ata method > > - Miguel > > > On Jan 8, 2009, at 3:58 PM, Mohan Parthasarathy wrote: > > Hi, >> >> I try to reuse UIViewControllers in didSelectatRowIndexPath. The new View >> has a table which is filled with data eventually. Later the view gets >> popped

Resetting the TableView

2009-01-08 Thread Mohan Parthasarathy
Hi, I try to reuse UIViewControllers in didSelectatRowIndexPath. The new View has a table which is filled with data eventually. Later the view gets popped and when reusing the same ViewController the table shows old data. Is there a way to clear the data while still reusing ViewControllers (as rec

Re: [iPhone] Search control like in App Store

2009-01-08 Thread Mohan Parthasarathy
gt; > IB is actually particularly useful for handing web views as you can create > buttons and wire them up to common function directly with no code (back, > forward, reload, etc). > > -rob. > > On Jan 7, 2009, at 4:01 PM, Mohan Parthasarathy wrote: > > Hi, >> >&

Re: [iPhone] Search control like in App Store

2009-01-07 Thread Mohan Parthasarathy
Hi, I agree that IB is useful but sometimes does not work as expected (mostly because i am doing something wrong). I am new to Cocoa Application development and perhaps takes times to get used to it. Recently i was trying to use UIWebView (one of the views in my navigation hierarchy). And my view

Re: Asyncronous message handling

2009-01-07 Thread Mohan Parthasarathy
On Wed, Jan 7, 2009 at 10:20 AM, Keary Suska wrote: > > On Jan 7, 2009, at 10:44 AM, Mohan Parthasarathy wrote: > > NSNotificationCenter? Object Delegation Pattern < >> http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/cha

Re: Asyncronous message handling

2009-01-07 Thread Mohan Parthasarathy
On Tue, Jan 6, 2009 at 8:12 PM, Keary Suska wrote: > > On Jan 6, 2009, at 11:14 AM, Mohan Parthasarathy wrote: > > Let us say that there are two objects A and B. >> >> 1) Object A produces some data >> 2) Object B consumes the data produced by object A >>

Asyncronous message handling

2009-01-06 Thread Mohan Parthasarathy
Hi, I am new to cocoa and hence i have this basic question for which i could not find a good answer after researching on this topic. Let us say that there are two objects A and B. 1) Object A produces some data 2) Object B consumes the data produced by object A When object B sends a message to o