Vector.splice bug

Usually people complain about opensource projects because they lack of documentation ( that’s true most of the times.. ), but this doens’t happen only there…

Today I’ve spent a lot of time trying to understand why I was so stupid because I wasn’t able to concatenate 2 vectors of int using splice.
But for what you can read from the *official* Adobe documentation, which says (about the third parameter for the splice method):

… items — An optional list of one or more comma-separated values, **or a Vector**, to insert into the Vector at the position specified in the startIndex parameter.

Ok, that’s why I didn’t know why I couldn’t manage to make it work! This simple code gives wrong results:


var v1: Vector. = new Vector.();
v1.push(1);
v1.push(2);
v1.push(3);
v1.push(4);

var v2: Vector. = new Vector.();
v2.push(100);
v2.push(200);
v1.splice( 1, 1, v2 );

// Expected result: [1,100,200,3,4]
// Actual result: [1,0,3,4]

It seems that the third parameter is being casted into int and so only ‘0’ has been inserted into the first Vector!

I tried to look into Adobe jira bugbase and what I’ve found there is that it was a known bug since long time and it has been also moved to the tamarin bugbase.

The problem is that at the end they simply closed the bug as invalid bug because the documentation was wrong!

Funny

Awesome stuff from Aviary

It has been a lot of time since we started working on Aviary.

During the last months, a lot of guys have helped us with beta testing some of the tools we are working on, and they have been able to produce really awesome stuff!

I collected a bunch of images from the Aviary website to show you the power of the tools. Those images does not rappresent the best, but they are just a collection of good compositions made with Peacock, Phoenix and Raven (respectively a Computer algorithm-based pattern generator, an Image editor and a Vector editor ).

Here is the list of images I collected, grouped by tool. You can click on each image to go the to Aviary page and (if you have an account) start playing with it.

Phoenix

Phoenix is the Image Editor. It is quite similar to Photoshop, and has some advanced features for image editing.

Peacock

Peacock is a Computer algorithm-based pattern generator. Basically you generate an image assembling nodes that accept an input and produce an output. Combining this nodes may produce awesome stuff, and Peacock can be used for many purposes like advanced retouching effects or the creation of complex reusable filters (like the one used to transform a fish into bricks).

Raven

Raven is the Vector Editor. Actually it is in alpha stage but we are going to release a major update that adds really powerful tools.

From each image you can gather many useful information: the list of revision, the list of derivates, the list of sources, and other useful stuff. Each composition made with Aviary can be edited by any user to create a new revision, or can be used as a source for a brand new image. That makes some tools really useful an powerful: for instance you can build reusable filters in Peacock and use them on your Phoenix images.

There is much more on the Aviary website, and more images are added day by day.

I really suggest you to give Aviary a try; we are working hard to be able to go public soon, and outstanding new features will come in the near future. Post here if u want an invitation!

Have a good day 😉