objective c - How do i bind to a NSString? -


this question asked before, not answered.

i can bind objects so:

[[acellview textfield] bind:@"stringvalue"                                toobject:myobject                             withkeypath:@"text"                                 options:nil]]; 

this works easy because have myobject.text value. how bind nsstring?

[[acellview textfield] bind:@"stringvalue"                                toobject:astring                             withkeypath:@""  // should keypath be?                                 options:nil]]; 

you can bind individual objects, not temporaries. 1 of reasons why bind key paths have little more sense lifetime of variable, , therefore, binding. make astring property of calling object, , bind self astring key path:

[[acellview textfield] bind:nsvaluebinding toobject:self withkeypath:@"astring" options:@{}]; 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -