• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IBOutlets or property + binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBOutlets or property + binding


  • Subject: Re: IBOutlets or property + binding
  • From: Christian Ziegler <email@hidden>
  • Date: Fri, 20 Nov 2009 21:03:38 +0100

You got it right :-). That's what I've been doing. I was just wondering whether people would use binding in that case. thanks a lot for clarification.

Cheers
Chris

On 20.11.2009, at 20:02, Karolis Ramanauskas <email@hidden> wrote:

Let me see.

The way I understand what you want to do is this:

You have some controls in your window: c1, c2, c3, c4...

You don't care to be notified when they change. Only thing you care about is to read their values when you click a button. I thing the best thing to do here is just create a bunch of IBOutleted ivars:

IBOutlet NS... * c1
IBOutlet NS... * c2
IBOutlet NS... * c3
IBOutlet NS... * c4

Then in you simply have one method that responds to a click:

(IBAction)buttonClicked:(id)sender

{
        NSInteger var1 = [c1 intValue];
        NSInteger var2 = [c2 ...

        do whatever...
}

So in this method you read the values, do something with them and you're done!

Peace,
Karolis
_______________________________________________

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


References: 
 >IBOutlets or property + binding (From: Christian Ziegler <email@hidden>)
 >Re: IBOutlets or property + binding (From: Karolis Ramanauskas <email@hidden>)
 >Re: IBOutlets or property + binding (From: Christian Ziegler <email@hidden>)
 >Re: IBOutlets or property + binding (From: Keary Suska <email@hidden>)
 >Re: IBOutlets or property + binding (From: Christian Ziegler <email@hidden>)
 >Re: IBOutlets or property + binding (From: Keary Suska <email@hidden>)
 >Re: IBOutlets or property + binding (From: Karolis Ramanauskas <email@hidden>)

  • Prev by Date: Re: question about informal protocols
  • Next by Date: CoreData/NSPersistentDocument initialization
  • Previous by thread: Re: IBOutlets or property + binding
  • Next by thread: Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document?
  • Index(es):
    • Date
    • Thread