Skip to content


Swiff Can use String.generateUID() #26

wants to merge 1 commit into from

3 participants

MooTools member

No description provided.

MooTools member

Let's not mess around with adding unnecessary dependencies to something that is going to be leaving Core soon anyway.

Do not want.

MooTools member

Yeah, let's ignore this one

MooTools member


MooTools member
MooTools member

It turns out that the id variable was already used in the initialize method, so when creating more instances of Swiff the id variable became NaN and stopped working, see ticket #1040

Since String.generateUID has been changed in just String.uniqueID() I recommitted this:

MooTools member

See line:

We can rename the variable to sid or something, but just using String.uniqueID is just as easy and it doesn't come with extra dependencies since String.uniqueID is in Core.js

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 11, 2010
  1. @arian
Showing with 1 addition and 3 deletions.
  1. +1 −3 Source/Utilities/Swiff.js
4 Source/Utilities/Swiff.js
@@ -19,8 +19,6 @@ provides: Swiff
-var id = 0;
var Swiff = this.Swiff = new Class({
Implements: Options,
@@ -46,7 +44,7 @@ var Swiff = this.Swiff = new Class({
initialize: function(path, options){
- this.instance = 'Swiff_' + id++;
+ this.instance = 'Swiff_' + String.generateUID();
options = this.options;
Something went wrong with that request. Please try again.