Re: an interesting delegate design issue raised by IB...
Re: an interesting delegate design issue raised by IB...
- Subject: Re: an interesting delegate design issue raised by IB...
- From: Ondra Cada <email@hidden>
- Date: Wed, 12 Sep 2001 19:39:39 +0200
Michael,
>
>>>>> Michael B. Johnson (MBJ) wrote at Wed, 12 Sep 2001 08:46:52 -0700:
MBJ> >[[view delegate] addImage:xxx]; [view reloadData];
MBJ>
MBJ> Actually, this is something I don't understand. My image view registers
MBJ> for notifications from its data source, and the data source sends out
MBJ> notifications when images are added, deleted, or updated, so a call to
MBJ> reloadData is unnecessary. This seems even cleaner to me - or am I
MBJ> missing something that my scheme will miss?
I guess this:
for (i=0;i<MANY;i++) [[view delegate] addImage:xxx];
[view reloadData];
Of course, you can send those notifications using NSPostWhenIdle, which
would easily solve this problem (but not some more elaborated ones).
OTOH, the "automatic display" is a very nice thing generally and I would
keep it; adding a method "addImageWithoutNotification:" or alike would cover
IMHO all needs perfectly.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc