Re: Bindings and Quartz Composer
Re: Bindings and Quartz Composer
- Subject: Re: Bindings and Quartz Composer
- From: Bob Ippolito <email@hidden>
- Date: Mon, 16 May 2005 19:12:42 -0400
forKeyPath: ..
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ƒ³Ís%
76´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:
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