To add an example:

Original\nString\nGoes\nHere
        ^8      ^15   ^20   ^25

Now I insert the first image, say just 1 character:

Original\nAString\nGoes\nHere
        ^8       ^16   ^21   ^26

See how all the insertion offsets would have to change? But since you already 
have your list of insertion offsets, you'll insert in the wrong spot, and it'll 
just get worse and worse with each insertion, especially the longer it is.

Backwards is not a problem:

Original\nString\nGoes\nAHere
        ^8      ^15   ^20    ^26

Only the end changes on the first insertion, and on the second:

Original\nString\nAGoes\nAHere
        ^8      ^15    ^21    ^27

Only the end and the (already-completed) last insertion location changes.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to