Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Swiff Can use String.generateUID() #26

Closed
wants to merge 1 commit into from

3 participants

@arian
Owner

No description provided.

@subtleGradient

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

Do not want.

@cpojer
Owner

Yeah, let's ignore this one

@arian
Owner

oki

@arian
Owner

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

https://mootools.lighthouseapp.com/projects/2706/tickets/1040

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

http://github.com/arian/mootools-core/commit/4c4aabdfe6f6178b2d7789516cbdbb966296fdf3

@arian
Owner

See line: http://github.com/mootools/mootools-core/blob/master/Source/Utilities/Swiff.js#L53

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
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 3 deletions.
  1. +1 −3 Source/Utilities/Swiff.js
View
4 Source/Utilities/Swiff.js
@@ -19,8 +19,6 @@ provides: Swiff
(function(){
-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();
this.setOptions(options);
options = this.options;
Something went wrong with that request. Please try again.