Except that I am not calling the mentioned code within awakeFRomNib the first time - I am calling it from within my own show window routine - and after animation the two views are in the same locations as they were the first time
ERG On Apr 29, 2009, at 11:35 AM, Benjamin Stiglitz <s...@apple.com> wrote: On Tue, Apr 28, 2009 at 02:49:23PM -0700, Erg Consultant wrote: I have two standard Cocoa objects in my window that I animate using CA's AppKit -animator method. When my nib loads, I get the original NSRects of the two items by sending them the -frame message. I then recalc the rects to move the two views offscreen. When I show my window, I animate both views back into the window thusly: [ [ oudWindowIconView animator ] setFrame:destGameIconRect ]; [ [ oudWinowLogoImage animator ] setFrame:destLogoRect ]; This works fine - the first time. The next time I show my window and the same code runs, the two items are not visible in the window. The dest rects of the reanimated views are the same as the original view rects when the nib loads. So why does the animation work only the first time? -awakeFromNib will only be called once, when the window is loaded from the NIB. You need to reset the view positions in the code that actually displays the window. -Ben _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/erg_consultant%40yahoo.com This email sent to erg_consult...@yahoo.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com