Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-29-2010, 07:55 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 45
wardyfloyd is on a distinguished road
Default NSObject help

I am trying to create an NSObject that has a list of buttons in it. here is the code in my .h

@interface buttonarray : NSObject {

UIButton button;
UIButton button1;

}

but when i try this i get the error

error: expected specifier-qualifier-list before 'interface'

Can i get some help please.
wardyfloyd is offline   Reply With Quote
Old 03-29-2010, 08:37 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2008
Posts: 192
Abel is on a distinguished road
Default

Just a heads up, making a class to be a container to a couple of buttons is probably a bad idea, why don't you use NSMutableArray ? (Speaking from an application design point of view, if you do everything right since the beginning you won't have to change your principles when you get more experienced)
__________________
GoFax - Mobile faxing
Tipper
ShareIt
Abel is offline   Reply With Quote
Old 03-29-2010, 08:48 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 45
wardyfloyd is on a distinguished road
Default

Well I tried this

NSMutableArray *buttonarray = [[NSMutableArray alloc] initWithCapacity:40] ;

and put it in my .m but I get the error

error: initializer element is not constant
wardyfloyd is offline   Reply With Quote
Reply

Bookmarks

Tags
button, nsobject, object, uibutton

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 350
13 members and 337 guests
akacaj, c2matrix, cgokey, esoteric, GHuebner, givensur, HemiMG, Mirotion22, mjnafjke, Pudding, SLIC, Sonuye857, Techgirl-52
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,652
Threads: 94,115
Posts: 402,887
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Sonuye857
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:18 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0