update examples (concat, slice)

This commit is contained in:
rolux 2012-05-24 12:20:24 +02:00
parent 64c01e385d
commit 2f507feeee
2 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ Ox.load('Image', function() {
asynchronous and take a callback function. asynchronous and take a callback function.
*/ */
if (fn == 'src' || fn == 'encode') { if (fn == 'src' || fn == 'encode') {
image[fn].apply(null, Ox.merge(args, function(image) { image[fn].apply(null, args.concat(function(image) {
$image.attr({src: image.src()}); $image.attr({src: image.src()});
})); }));
/* /*
@ -73,7 +73,7 @@ Ox.load('Image', function() {
function gets passed a string. function gets passed a string.
*/ */
} else if (fn == 'decode') { } else if (fn == 'decode') {
image[fn].apply(null, Ox.merge(args, function(str) { image[fn].apply(null, args.concat(function(str) {
alert(str); alert(str);
})); }));
/* /*

View file

@ -63,7 +63,7 @@ Ox.load('UI', function() {
.addClass('OxGrid symbol') .addClass('OxGrid symbol')
.append( .append(
$('<img>').attr({src: Ox.UI.getImageURL( $('<img>').attr({src: Ox.UI.getImageURL(
'symbol' + symbol[0].toUpperCase() + symbol.substr(1)) 'symbol' + symbol[0].toUpperCase() + symbol.slice(1))
}) })
) )
.appendTo($symbols); .appendTo($symbols);