Re: Finder-like icon browser
Re: Finder-like icon browser
- Subject: Re: Finder-like icon browser
- From: Brian Hill <email@hidden>
- Date: Fri, 12 Oct 2001 12:03:22 -0500
On Friday, October 12, 2001, at 11:38 AM, Andreas Monitzer wrote:
On Friday, October 12, 2001, at 06:29 , public wrote:
Does a browser class exist which emulates the Finder's icon view?
This browser would support arbitrarily placed and sized cells.
No. And I know of one person that tried to do it and gave up after 8000
lines of Objective C-code (see macnn forum, if the old posts are still
up there - the thread was called "Don't like the finder? - Write a new
one!" or something like that).
andy
I created something like that for a database-oriented program.
The trick for getting performance to be halfway decent (with a few
hundred icons) was to make the icons cells instead of full-fledged
views. There was plenty of other fun on the way as well, including
dealing with autoscrolling and resizing the 'drag container', etc... I
believe I did it in quite a bit less than 8000 lines of code:
[chronos:~/Documents/CVSWorkArea/DispatchClient] brian% wc -l
DragIconContainerView.*
104 DragIconContainerView.h
923 DragIconContainerView.m
1027 total
[chronos:~/Documents/CVSWorkArea/DispatchClient] brian% wc -l
DragIconCell.*
55 DragIconCell.h
333 DragIconCell.m
388 total
Of course, this is just a view and there's a fairly complex delegate
relationship to deal with the data model.
Unfortunately, the view is a bit specialized as far as what it draws,
and doesn't look exactly like the Finder icons (they're just rectangular
with icons and several text bits), so I doubt that releasing it would
help anyone. However, it's do-able if you take the right approach.
Brian
email@hidden
http://personalpages.tds.net/~brian_hill
___________________________________________________________
"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman
___________________________________________________________