RE: Hex Edit controls
RE: Hex Edit controls
- Subject: RE: Hex Edit controls
- From: Jeff Laing <email@hidden>
- Date: Tue, 30 Nov 2004 14:12:11 +1100
> From: Greg [mailto:email@hidden]
> There is a cocoa Hex Editor application written by Raephael at
www.ex-cinder.com
>
> I don't know whether the code is available, but it worth a look see.
No it isn't, at least not on the website. I have a copy of HexEditor
already, but have not had the nerve to ask someone "can I have the source?"
Thanks for the pointer.
> From: Andrew Merenbach [mailto:email@hidden]
> Rather than converting the HexEditor code to normal Objective-C/Cocoa,
> you could employ it in an Objective-C++ project, of which Apple
> provides some examples.
I want to use it in an otherwise pure Cocoa/IB project - what I'm after is
something derived from NSView or NSControl, I suspect and that sounds to me
like a lot of work.
So far, I've kicked around faking it by subclassing NSTextView a *lot* so
that I get things like text positioning, selection highlighting, etc for
free. But I have to intercept things like copy/paste/etc to ensure that the
actual data being passed out of the control is actually the raw bytes, not
the hex representation (along with corresponding spaces between bytes). And
I really wanted it to work with "big" ranges of bytes, and the text editor
approach means I need 3*n bytes of storage.
> It seems possible, though, that if you wish to create a hex editor, you
> could do something with the Cocoa NSData class to read in a file and
> convert the bytes to raw hex.
Reading the data in is not a problem. Displaying it on-screen and allowing
the user to manipulate it is.
_______________________________________________
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