• 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: Bindings and Quartz Composer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings and Quartz Composer


  • Subject: Re: Bindings and Quartz Composer
  • From: Bob Ippolito <email@hidden>
  • Date: Tue, 17 May 2005 14:31:25 -0400

However, forKeyPath: always works, even for direct attributes. Using forKey: is simply an "optimization" to save it the trouble of splitting on .

-bob

On May 17, 2005, at 11:16 AM, Scott Ahten wrote:

As a follow up...

You needed to use forKeyPath: here because you were indirectly accessing an object's property using a key path. In this case, the value of the XML published port of the QC patch managed by your QCController. If you are directly setting a property on the receiver, such as changing the QC patch managed by your QCController, you would use forKey: instead.

- Scott


On May 16, 2005, at 7:14 PM, Julian wrote:

Cool, forKeyPath:@"patch.XML.value" Works!

Thanks all!

~J

On May 16, 2005, at 7:08 PM, Aaron Tuller wrote:

forKey:@"patch.XML.value"

-aaron

At 6:58 PM -0400 5/16/05, Julian wrote:
hum, I see. Using:
[_quartzController setValue:theData forKey:@"XML"];

Throws:
Tracker Monitor[7402] [<QCPatchController 0x3fb4a0> setValue:forUndefinedKey:]: this class is not key value coding- compliant for the key XML.


~J

On May 16, 2005, at 6:49 PM, Scott Ahten wrote:

The String object you've created from the URL isn't observable in the sense of key value observing (KVO). If you want your QCController to automatically update when a new URL is fetched, you'll need to create an object that represents your XML source and create a observable XML property which you can bind to your QCController object. See...

http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueObserving/index.html

However, it looks like you really just want to update the property manually. If so, you would use..

[_quartzController setValue:theData forKey:@"XML"];

Also, as of 10.4, initWithContentsOfURL is depreciated. You should use...

+ (id)stringWithContentsOfURL:(NSURL *)url usedEncoding: (NSStringEncoding *)enc error:(NSError **)error

instead.

- Scott

On May 16, 2005, at 6:13 PM, Julian wrote:

Hi,
ok I have a qtz with a published port key named "XML". ALl is good and if I bind that to an NSTextField I can past my xml data and press enter and the rendering updates. However this is not the case I wish to use. I am fetching data from a url, so my question is, how can I bind an NSString to this input? Here is what I have so far.



NSURL *theURL = [[NSURL alloc] initWithString:@"http:// blah.com:4321/debug?hash_info=º þ¢„Hƒ³Í% 73v´RŸÔ…•GÁ"];
NSString *theData = [[NSString alloc] initWithContentsOfURL:theURL];
[theURL release];
/** here is where I would like to bind the data to an nsstring and update the rendering */
//[theData bind:@"value" toObject:_quartzController withKeyPath:@"XML.value" options:nil];
[theData release];


Thanks in advances,
~J
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40pixelfreak.net


This email sent to email@hidden

- - - :: email@hidden :: http://www.pixelfreak.net - - -



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40olywa.net


This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40pixelfreak.net


This email sent to email@hidden

- - - :: email@hidden :: http://www.pixelfreak.net - - -

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Bindings and Quartz Composer (From: Julian <email@hidden>)
 >Re: Bindings and Quartz Composer (From: Scott Ahten <email@hidden>)
 >Re: Bindings and Quartz Composer (From: Julian <email@hidden>)
 >Re: Bindings and Quartz Composer (From: Aaron Tuller <email@hidden>)
 >Re: Bindings and Quartz Composer (From: Julian <email@hidden>)
 >Re: Bindings and Quartz Composer (From: Scott Ahten <email@hidden>)

  • Prev by Date: Re: Windows above the menu bar?
  • Next by Date: Re: Sharing instances between NIB's?
  • Previous by thread: Re: Bindings and Quartz Composer
  • Next by thread: combobox no tabbing when not editable?
  • Index(es):
    • Date
    • Thread