[Drawkit] [self selectedAvailableObjects] empty!??
James Maxwell
jbmaxwell at rubato-music.com
Thu Jul 17 14:29:45 PDT 2008
The Cocoa-dev folks helped me out... I was using a vanilla NSObject
for my controller.
Switching that to an NSDocumentController subclass made life much
easier!
J.
On 17-Jul-08, at 11:10 AM, James Maxwell wrote:
> Hi All,
>
> I'm using a basic AppController type class to add some custom key
> commands from IB to my drawkit-based app.
> I have a first command working, and it's calling a method from my
> DKObjectDrawingLayer subclass. But when I try to iterate over the
> selected objects using "[self selectedAvailableObjects];", the
> selection is empty. What's making me crazy is that the moveUp: and
> moveDown: methods work fine, suggesting that -
> selectedAvailableObjects: is obviously returning what it should be
> returning (since moveUp/Down rely on -selectedAvailableObjects:).
>
> Also, overriding -addObjectToSelection: in my DKObjectDrawingLayer
> subclass, and putting an NSLog in:
>
> NSLog(@"Selected objects? %i", [self
> countOfSelectedAvailableObjects]);
>
> reveals the expected count... Meaning, I assume, that the selection
> definitely is NOT empty...
>
> I'm stumped.
>
> J.
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20080717/41f55fe0/attachment.htm>
More information about the Drawkit
mailing list