Re: strange horizontal line in scroll view
Re: strange horizontal line in scroll view
- Subject: Re: strange horizontal line in scroll view
- From: Graham Cox <email@hidden>
- Date: Mon, 2 Aug 2010 03:02:54 +1000
On 02/08/2010, at 2:19 AM, Nick Rogers wrote:
> - (id)prototype
> {
> HexCell *aCell = [[ HexCell alloc] init];
> [aCell setEnabled:YES];
> [aCell setStringValue:@"00"];
> [aCell setFont:[NSFont systemFontOfSize:10.0]];
> return aCell;
> }
You really don't want to be doing this (regardless of fixing your problem/design). This is creating and leaking a new cell every time it is called, which it is for every cell that the matrix displays, which it then copies. That could easily be thousands of objects.
> I know its a crude and inefficient way to make a hex viewer
Yup.
I don't see what the problem is offhand, there probably isn't enough information - like how your nib is set up, are your views transparent, what sort of window background you have and so on.
But the whole design is so horrible my advice is to throw it away and start over - seriously, it shouldn't take that long and trying to bend an inappropriate class to your will WILL end up taking more time, even if you're under the illusion that having it all work is just around the corner.
For example, one thing your approach can never do is to select a block of memory for editing, you can only select single cells at a time. Straight away that's a good reason to reject NSMatrix out of hand for this task. Setting up NSTextView with a text table using a monospaced font should be straightforward and is likely to actually work. Or, just download this and get on with your life: http://ridiculousfish.com/hexfiend/
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden