FROM : Jeremy
DATE : Fri Feb 29 17:22:08 2008
John,
I guess I forgot to send an e-mail saying Andrew Merenbach helped me
out on this one. He found a small error in my code. :)
Jeremy
"For a long time it puzzled me how something so expensive, so leading
edge, could be so useless, and then it occurred to me that a computer
is a stupid machine with the ability to do incredibly smart things,
while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match." - Bill
Bryson
On Feb 29, 2008, at 10:47 AM, Jonathan Dann wrote:
> Jeremy,
>
> Send it this way mate. I'll have a look. You on iChat? I'll screen
> share it with you if you run leopard. Might solve your problem
> quicker! jonathan.<email_removed>
>
> Jonathan Dann
>
> On 29 Feb 2008, at 00:55, Jeremy <<email_removed>> wrote:
>
>> OK. Now with connecting it in IB it stills seems to be not working.
>> I have made those changes that you said and nick also stated. :)
>> But I am still getting a blank NSTableView. If those changes make
>> it so that my code SHOULD work, I have no Idea why it isn't
>> working... If you would like a copy of my project just send me a
>> direct e-mail and I will send it.
>>
>> Jeremy
>> "For a long time it puzzled me how something so expensive, so
>> leading edge, could be so useless, and then it occurred to me that
>> a computer is a stupid machine with the ability to do incredibly
>> smart things, while computer programmers are smart people with the
>> ability to do incredibly stupid things. They are, in short, a
>> perfect match." - Bill Bryson
>>
>>
>> On Feb 28, 2008, at 7:52 PM, Andrew Merenbach wrote:
>>
>>> Hi, Jeremy,
>>>
>>> You appear to have a few corrections that need to be made with
>>> your code. To resolve these will help you on your way. You
>>> should make the following changes before you try to get things
>>> working:
>>>
>>> 1. Remove the extraneous retain from your categoriesArray
>>> instantiation -- -alloc and -init produce a retained object.
>>> 2. Change:
>>>
>>>> NSString *string;
>>>> string = [NSString init];
>>>> string = @"Main Category";
>>>
>>> to
>>>
>>> NSString *string = @"Main Category";
>>>
>>> or
>>>
>>> NSString *string = [NSString stringWithString:@"Main Category"];
>>>
>>> 3. Also note that [NSString init] is improper; you need [[NSString
>>> alloc] init] or [NSString string] -- but no matter what, it's a
>>> waste if you immediately set string to @"Main Category".
>>>
>>> 4. Is your controller class with the code that you gave all set up
>>> as the dataSource for the table view? You'll need to connect that
>>> in Interface Builder.
>>>
>>> If I can be of any more service, let me know.
>>>
>>> Cheers,
>>> Andrew
>>>
>>> On Feb 28, 2008, at 4:41 PM, Jeremy wrote:
>>>
>>>> This is how I am attempting to do it...
>>>>
>>>> In awakeFromNib:
>>>>
>>>> categoriesArray = [[[NSMutableArray alloc] init] retain];
>>>> NSString *string;
>>>> string = [NSString init];
>>>> string = @"Main Category";
>>>> [categoriesArray addObject:string];
>>>> [categories selectRow:1 byExtendingSelection:NO];
>>>> [categories scrollRowToVisible:1];
>>>>
>>>> And my informal protocols:
>>>>
>>>> - (int)numberOfRowsInTableView:(NSTableView *)aTableView
>>>> {
>>>> return [categoriesArray count];
>>>> }
>>>>
>>>> - (id)tableView:(NSTableView *)aTableView objectValueForColumn:
>>>> (NSTableColumn *)aTableColumn row:(int)row
>>>> {
>>>> return [categoriesArray objectAtIndex:row];
>>>> }
>>>>
>>>> The NSTableView is not being populated at all... No rows, and
>>>> nothing else....
>>>>
>>>> Jeremy
>>>> "For a long time it puzzled me how something so expensive, so
>>>> leading edge, could be so useless, and then it occurred to me
>>>> that a computer is a stupid machine with the ability to do
>>>> incredibly smart things, while computer programmers are smart
>>>> people with the ability to do incredibly stupid things. They are,
>>>> in short, a perfect match." - Bill Bryson
>>>>
>>>>
>>>> On Feb 28, 2008, at 7:39 PM, Hamish Allan wrote:
>>>>
>>>>> On Fri, Feb 29, 2008 at 12:34 AM, Jeremy
>>>>> <<email_removed>> wrote:
>>>>>
>>>>>> I am trying to figure NSTableViews out. I have two table views
>>>>>> inside
>>>>>> of my window. The code I have is completely useless and not
>>>>>> working.
>>>>>> Can anyone explain how to populate an NSTableView using arrays?
>>>>>> If you
>>>>>> could that would be greatly appreciated.
>>>>>
>>>>> You should explain how what you are trying to do differs from
>>>>> what is
>>>>> covered in the various basic tutorials for using NSTableViews;
>>>>> otherwise we will not know how to address your question.
>>>>>
>>>>> Hamish
>>>>
>>>> _______________________________________________
>>>>
>>>> Cocoa-dev mailing list (<email_removed>)
>>>>
>>>> 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:
>>>> http://lists.apple.com/mailman/options/cocoa-dev/andrew.<email_removed>
>>>>
>>>> This email sent to andrew.<email_removed>
>>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (<email_removed>)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/j.p.<email_removed>
>>
>> This email sent to j.p.<email_removed>
DATE : Fri Feb 29 17:22:08 2008
John,
I guess I forgot to send an e-mail saying Andrew Merenbach helped me
out on this one. He found a small error in my code. :)
Jeremy
"For a long time it puzzled me how something so expensive, so leading
edge, could be so useless, and then it occurred to me that a computer
is a stupid machine with the ability to do incredibly smart things,
while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match." - Bill
Bryson
On Feb 29, 2008, at 10:47 AM, Jonathan Dann wrote:
> Jeremy,
>
> Send it this way mate. I'll have a look. You on iChat? I'll screen
> share it with you if you run leopard. Might solve your problem
> quicker! jonathan.<email_removed>
>
> Jonathan Dann
>
> On 29 Feb 2008, at 00:55, Jeremy <<email_removed>> wrote:
>
>> OK. Now with connecting it in IB it stills seems to be not working.
>> I have made those changes that you said and nick also stated. :)
>> But I am still getting a blank NSTableView. If those changes make
>> it so that my code SHOULD work, I have no Idea why it isn't
>> working... If you would like a copy of my project just send me a
>> direct e-mail and I will send it.
>>
>> Jeremy
>> "For a long time it puzzled me how something so expensive, so
>> leading edge, could be so useless, and then it occurred to me that
>> a computer is a stupid machine with the ability to do incredibly
>> smart things, while computer programmers are smart people with the
>> ability to do incredibly stupid things. They are, in short, a
>> perfect match." - Bill Bryson
>>
>>
>> On Feb 28, 2008, at 7:52 PM, Andrew Merenbach wrote:
>>
>>> Hi, Jeremy,
>>>
>>> You appear to have a few corrections that need to be made with
>>> your code. To resolve these will help you on your way. You
>>> should make the following changes before you try to get things
>>> working:
>>>
>>> 1. Remove the extraneous retain from your categoriesArray
>>> instantiation -- -alloc and -init produce a retained object.
>>> 2. Change:
>>>
>>>> NSString *string;
>>>> string = [NSString init];
>>>> string = @"Main Category";
>>>
>>> to
>>>
>>> NSString *string = @"Main Category";
>>>
>>> or
>>>
>>> NSString *string = [NSString stringWithString:@"Main Category"];
>>>
>>> 3. Also note that [NSString init] is improper; you need [[NSString
>>> alloc] init] or [NSString string] -- but no matter what, it's a
>>> waste if you immediately set string to @"Main Category".
>>>
>>> 4. Is your controller class with the code that you gave all set up
>>> as the dataSource for the table view? You'll need to connect that
>>> in Interface Builder.
>>>
>>> If I can be of any more service, let me know.
>>>
>>> Cheers,
>>> Andrew
>>>
>>> On Feb 28, 2008, at 4:41 PM, Jeremy wrote:
>>>
>>>> This is how I am attempting to do it...
>>>>
>>>> In awakeFromNib:
>>>>
>>>> categoriesArray = [[[NSMutableArray alloc] init] retain];
>>>> NSString *string;
>>>> string = [NSString init];
>>>> string = @"Main Category";
>>>> [categoriesArray addObject:string];
>>>> [categories selectRow:1 byExtendingSelection:NO];
>>>> [categories scrollRowToVisible:1];
>>>>
>>>> And my informal protocols:
>>>>
>>>> - (int)numberOfRowsInTableView:(NSTableView *)aTableView
>>>> {
>>>> return [categoriesArray count];
>>>> }
>>>>
>>>> - (id)tableView:(NSTableView *)aTableView objectValueForColumn:
>>>> (NSTableColumn *)aTableColumn row:(int)row
>>>> {
>>>> return [categoriesArray objectAtIndex:row];
>>>> }
>>>>
>>>> The NSTableView is not being populated at all... No rows, and
>>>> nothing else....
>>>>
>>>> Jeremy
>>>> "For a long time it puzzled me how something so expensive, so
>>>> leading edge, could be so useless, and then it occurred to me
>>>> that a computer is a stupid machine with the ability to do
>>>> incredibly smart things, while computer programmers are smart
>>>> people with the ability to do incredibly stupid things. They are,
>>>> in short, a perfect match." - Bill Bryson
>>>>
>>>>
>>>> On Feb 28, 2008, at 7:39 PM, Hamish Allan wrote:
>>>>
>>>>> On Fri, Feb 29, 2008 at 12:34 AM, Jeremy
>>>>> <<email_removed>> wrote:
>>>>>
>>>>>> I am trying to figure NSTableViews out. I have two table views
>>>>>> inside
>>>>>> of my window. The code I have is completely useless and not
>>>>>> working.
>>>>>> Can anyone explain how to populate an NSTableView using arrays?
>>>>>> If you
>>>>>> could that would be greatly appreciated.
>>>>>
>>>>> You should explain how what you are trying to do differs from
>>>>> what is
>>>>> covered in the various basic tutorials for using NSTableViews;
>>>>> otherwise we will not know how to address your question.
>>>>>
>>>>> Hamish
>>>>
>>>> _______________________________________________
>>>>
>>>> Cocoa-dev mailing list (<email_removed>)
>>>>
>>>> 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:
>>>> http://lists.apple.com/mailman/options/cocoa-dev/andrew.<email_removed>
>>>>
>>>> This email sent to andrew.<email_removed>
>>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (<email_removed>)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/j.p.<email_removed>
>>
>> This email sent to j.p.<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Jeremy | Feb 29, 01:34 | |
| Hamish Allan | Feb 29, 01:39 | |
| Jeremy | Feb 29, 01:41 | |
| Nick Zitzmann | Feb 29, 01:49 | |
| Jeremy | Feb 29, 01:51 | |
| Andrew Merenbach | Feb 29, 01:52 | |
| Jeremy | Feb 29, 01:55 | |
| Kyle Sluder | Feb 29, 02:23 | |
| Jeremy | Feb 29, 17:22 |






Cocoa mail archive

