<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 6, 2016, at 11:25 AM, Etan Kissling via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I now bind such en object to an NSObjectController,&nbsp;</div><div class="" style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">and bind the<span class="Apple-converted-space">&nbsp;</span><i class="">value</i>&nbsp;binding of an NSTextField to the object controller's<span class="Apple-converted-space">&nbsp;</span><i class="">selection.someNumber</i>&nbsp;key path.</div></div></blockquote></div><br class=""><div class="">This is a Cocoa question, not a Swift question; a better place to ask is Apple’s cocoa-dev mailing list at <a href="http://lists.apple.com" class="">http://lists.apple.com</a>, or Apple’s developer forums.</div><div class=""><br class=""></div><div class="">(The quick answer is that NSTextField’s ‘value’ binding is by default an NSString, not an NSNumber. If you want it to be an NSNumber, you’ll need to attach a numeric NSFormatter to the text field. If you have further questions about this, send them to me off-list since this is an off-topic thread.)</div><div class=""><br class=""></div><div class="">—Jens</div></body></html>