Re: Xcode3 vs Xcode2 - two problems
Re: Xcode3 vs Xcode2 - two problems
- Subject: Re: Xcode3 vs Xcode2 - two problems
- From: Bill Bumgarner <email@hidden>
- Date: Fri, 18 Jul 2008 10:22:12 -0700
On Jul 18, 2008, at 10:16 AM, Joeles Baker wrote:
i just tried the following with Xcode3:
1)
read a plist in awakeFromNib
store its content in an array
NSArray* myArray = [NSPropertyListSerialization ........
2)
tried to setup my tableview like so:
- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section {
return [myArray count];
}
3)
but in 2) i get an error telling me, that myArray is undeclared (it
was declared in awakeFromNib)
What did i forget?
If a variable is declared in a method, then the variable is local to
that method. Turn it into an instance variable.
I would suggest reading this:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/chapter_1_section_1.html
Another thing:
I tried to drag the header file of the above to the interfacebuilder
windows which includes the tableview,
but no unlike in interfacebuilder2 nothing happens (no "datasource
box").
Whats wrong here?
In IB3, there is no need to drag the file into IB. If an outlet or
action isn't showing up in IB3, it is because you haven't declared it
correctly.
As for dragging connections, it is still ctrl-drag from source
(possibly an outlet) to destination (possibly an action). For
dataSource, you drag from the table view to the object that is
intended to be the data source.
b.bum
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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