<div style="font-family: Helvetica; font-size: 13px; ">Hey Patrick,<div><br></div><div>Just wanted to follow up on this…did you manage to resolve the issue? If not, could you make sure you log this bug with Trac (<a href="https://www.macruby.org/trac/report">https://www.macruby.org/trac/report</a>)?</div><div><br></div><div>Thanks!</div><div><br></div><div>- Josh</div></div>
<div></div>
<p style="color: #A0A0A8;">On Thursday, November 17, 2011 at 3:44 PM, Patrick Rogers wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div>Hi everyone,<div><br></div><div>I'm trying to automatically generate the KVC-compliant methods for indexed to-many relationships. </div><div><br></div><div>Here's my current attempt, <a href="https://gist.github.com/1374142">https://gist.github.com/1374142</a>, which borrows from hotcocoa's kvo_array (I couldn't get `kvo_array` to work and I wanted something that could just automatically be backed by an Array).</div><div><br></div><div>Anyways, countOf<Key> and objectIn<Key>AtIndex: are both generated and work.</div><div><br></div><div>However, when I try and use valueForKey(<key>) on my generated keys, MacRuby crashes with:</div><div><br></div><div><blockquote type="cite"><div><div>unknown: [BUG] unknown Objective-C immediate: 0x1 (nil)</div><div><br></div><div>MacRuby 0.11 (ruby 1.9.2) [universal-darwin10.0, x86_64]</div><div><br></div><div>[1] 26123 abort macruby kvo_array.rb</div></div></blockquote></div><div><br></div><div>It is my understanding this should return an array based on my countOf<Key> and objectIn<Key>AtIndex: methods.</div><div><br></div><div>On the other hand, when I use the manually defined methods, valueForKey(...) works as expected.</div><div><br></div><div>Is there an issue with my code/approach or is this a MacRuby bug?</div><div><br></div><div>Thanks,<br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Patrick</div></div></div></div><div><div>_______________________________________________</div><div>MacRuby-devel mailing list</div><div><a href="mailto:MacRuby-devel@lists.macosforge.org">MacRuby-devel@lists.macosforge.org</a></div><div><a href="http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel">http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>