• 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: core data and IB outlet binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core data and IB outlet binding


  • Subject: Re: core data and IB outlet binding
  • From: Torsten Curdt <email@hidden>
  • Date: Fri, 11 Apr 2008 00:14:04 +0200


On Apr 10, 2008, at 17:51, Keary Suska wrote:
on 4/10/08 4:30 AM, email@hidden purportedly said:

Here is a small screenshot of the bindings

http://vafer.org/pub/bindings.png

As the button binding is working so should the NSTextField binding ...one
would think. But just to verify I've also added the awakeFromNib. As expected
it also gets called.


Is there a way to get more information on the NIB startup?

I did get to the correct Core Data value via representedObject

- (IBAction) applyFilter:(id)sender
{
    NSString *expression = [[self representedObject] Expression];

...but that still doesn't really help with the normal bindings :-(

Just to be clear, "binding" is a specific technology that has nothing to do
with outlet setting. Better to use proper terminology or suggestions may not
be correct.

Uh ...OK. Sorry, I thought that would also be referred to as binding. But apparently it's just called a "connection".


Anyway, in your original post, you say:

When the button is pressed it turns out that filterExpression (and
therefor also the stringValue of it) is nil.

Are you certain that filterExpression is nil? Just because it's string value
is nil, doesn't mean the outlet is nil.

I"ve tested with a

if (filterExpression == nil) NSLog(...)

and by running it through the debugger stopping at a breakpoint in that function.

But anyway ...that NSTextField is nil although the connection is set in IB.
Which I can only assume has something to do it being a NSCollectionViewItem.


It just means the field thinks that
it's empty. If it *isn't* nil, then make sure that the field editor has
committed changes. Remember that in the UI, when editing a text field, you
aren't editing the text field, but the field editor. Edits aren't normally
committed until either the field is exited or effected by certain binding
options (such as 'continuously updates value").

Yeah ...that's clear.

cheers
--
Torsten
_______________________________________________

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: 
 >Re: core data and IB outlet binding (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: System Preferences window is wider in Leopard? How do you make a Tiger compatible UI?
  • Next by Date: Re: Tight loop processing
  • Previous by thread: Re: core data and IB outlet binding
  • Next by thread: Re: core data and IB outlet binding
  • Index(es):
    • Date
    • Thread