Can't insert into a Snapshot?

OK maybe I’m completely misunderstanding Snapshots or I just need more coffee but shouldn’t I be able to insert display objects into them? Or am I wrong here?

local snapshot = display.newSnapshot( 200, 200 ) local rect = display.newRect( 0, 0, 50, 50 ) rect:setFillColor( 255, 0, 0 ) rect.x = display.contentCenterX rect.y = display.contentCenterY snapshot:insert( rect )

This fails on the insert call as ‘insert’ is nil? 

This is with build 120

I was bit by this one too :slight_smile:

As of build #116 you’ll need to do:

snapshot.group:insert(rect)

From their release log:

Tachyon: Move group functionality (insert, remove, numChildren, etc) of snapshots into a property, e.g. snapshot:insert() => snapshot.group:insert()

That’ll teach me for not looking through all the release docs. Thanks!

Yea, sorry about that. The docs should be updated now.

No worries, I appreciate that it’s going to be pretty difficult to keep the docs up to date with every change while it’s still in beta.

Just out of curiosity, why the change?

Before this, groups, containers and snapshots were pretty much interchangeable, but now snapshot is forever alone.

I was bit by this one too :slight_smile:

As of build #116 you’ll need to do:

snapshot.group:insert(rect)

From their release log:

Tachyon: Move group functionality (insert, remove, numChildren, etc) of snapshots into a property, e.g. snapshot:insert() => snapshot.group:insert()

That’ll teach me for not looking through all the release docs. Thanks!

Yea, sorry about that. The docs should be updated now.

No worries, I appreciate that it’s going to be pretty difficult to keep the docs up to date with every change while it’s still in beta.

Just out of curiosity, why the change?

Before this, groups, containers and snapshots were pretty much interchangeable, but now snapshot is forever alone.