Hello, yes in fact, that was what I did, I set up a NSImage instance variable so once dragged to the other View I just used the info of the NSImage to recreate the layer.

Thanks for your help



On 14.12.2008, at 0:06, Michael Ash wrote:

On Sat, Dec 13, 2008 at 5:02 AM, Gustavo Pizano
<gustavxcodepic...@gmail.com> wrote:
Hi, I tried to encode the CAlayer, but when decoding, all the info of the
layer its lost.
dunno what happened, the other info of the object it's good.

Could be that CALayer doesn't support NSCoding very well. This would
be kind of strange, but not too surprising, as it's a pretty complex
object with a lot of ties to the window server.

In that case you'll have to encode enough information to re-create the
layer instead. You're creating it at some point, so think about how
you do that and what information you use to do it. Encode that
information, and then in your -initWithCoder: you can get all of the
base information back out and use it to create a new CALayer that
matches the old one.

Mike
_______________________________________________

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/gustavxcodepicora%40gmail.com

This email sent to gustavxcodepic...@gmail.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

Reply via email to