> It's easy enough on an NSTextField (whether it's set up as a static label, > or as a data-entry-type field), but where's the .text property of an > NSTextArea? > Also, what would be the easiest way to implement a view that showed a memory > dump? i.e. The easiest way is to find out what you really mean by NSTextArea... If you mean NSTextView you have a lot of reading you should do on the Cocoa Text System first. It is one of the most sophisticated parts of Cocoa. NSTextView is one of the richest classes with a great deal happening along with other classes. The first hint is you will need to know about NSAttributedString and NSTextStorage. That's scratching the surface. > > <given some start address in an unsigned char [] buffer = 0xnnnn> Doesn't necessarily work quite that simply with Unicode and NSString and its family. >From a file that is ASCII data you could create a C array like that ...
> > nnnn:hh hh hh hh hh hh hh hh ........ <- ASCII printable characters for > bytes with values from 0x20..0x7F, others map to '.' char. > nnnn+8:hh hh hh hh hh hh hh hh ........ > ... > > and so on for some number of lines, where 'hh' is a 2-character hex > representation of the byte at offset 0..7+nnnn on each line. Would an > NSTextArea be better for this, or an NSTableView? Note that this is a > read-only view, the user won't edit the values from here (at least not in > version 1.0 of my program... maybe 3.0... :) ) Are you sure it is ASCII ...? Internally to NSString and friends it likely is not. It's best to forget much of what you think you know in assuming things are ASCII. It's a bad habit that can be hard to break but can cause a lot of trouble. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
