Re: Swapping isa's (was Re: Hex Edit controls (resknife))
Re: Swapping isa's (was Re: Hex Edit controls (resknife))
- Subject: Re: Swapping isa's (was Re: Hex Edit controls (resknife))
- From: Nicholas Shanks <email@hidden>
- Date: Thu, 2 Dec 2004 15:42:19 +0000
Uli just pointed me to this thread, so I figured I would chip in. Sorry
for crashing the party so late on! It seems you guys managed to figure
out why I originally chose to swap the isa pointer (evil IB bugs with
NSTextView subclasses) so I won't bother mentioning that.
The reason for having the subclass in the first place was so I could
control selection, copy & paste. It still has bugs, contribution of
fixes would be most welcome. I haven't committed code to the CVS
repository for a while now.
Jeff Laing wrote:
Of course, one should never lose sight of the fact that I was able to
take
the code from ResKnife (including its nib) and weld it into my Cocoa
project
in about two hours, and it worked enough to prove the concept. There
must
be something right going on here...
Two hours is rather long. Could you suggest ways I could improve the
reusability of the class?
Switching from rant back to (hopefully) productive discussion, one
thing I
noticed in the ResKnife code was that they chose to have a
HexWindowController, a HexWindowDelegate and three HexTextView
entities. In
all the stuff I've done so far, I haven't seen a good reason to
seperate the
controller from the delegate - can anyone give one, other than some
theoretical "it conforms to this pattern" ?
It was done that way for two reasons:
1) So files don't become unweildly large.
2) Because.
Feel free to rape and pillage until it works as you would like :-)
Personally, I'd say "be proud". Its exactly the "information" I
needed,
despite the fact that I managed to crash it by dragging text
back/forward in
the hex editor ;-)
And thanks once again for making the source public.
I fixed that bug about six months ago. I really ought to upload my
changes to sourceforge more frequently :-)
And you're very welcome. When I was starting out, sample code was very
important as I had no books and was self-taught. I wanted to allow
others the same opportunity. (And I had no idea what Open Source
Software was at the time).
I do request that I be credited somewhere if it gets used in someone
else's software though.
- Nick.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden