Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Clientcide: TabSwapper
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Philip Thompson  
View profile  
 More options Nov 11 2012, 11:37 pm
From: Philip Thompson <philthath...@gmail.com>
Date: Sun, 11 Nov 2012 22:37:38 -0600
Local: Sun, Nov 11 2012 11:37 pm
Subject: Clientcide: TabSwapper
Hi. I am having some issues with TabSwapper. I can add tabs successfully, but once I remove one, I can no longer add any more tabs. There are some errors that occur - see the console when adding/removing tabs. Any insight as to what's going on?

http://jsfiddle.net/philthathril/ZmY5k/

Also, it appears as though the "show" method doesn't work (when the remove button is clicked).

Thanks in advance,
~Philip


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johnny Fuery  
View profile  
 More options Nov 11 2012, 11:48 pm
From: Johnny Fuery <john...@gmail.com>
Date: Sun, 11 Nov 2012 20:48:00 -0800
Subject: Re: [Moo] Clientcide: TabSwapper

Your indexes are messed up. A zero-indexed array with length x has an index
of zero through (index - 1). You're trying to access the tabs array with an
index that is out of bounds.

Every place where you are trying to access array[array.length], use
array[array.length - 1] and you should be good to go.

Johnny Fuery
President/Principal Engineer
Fuery Solutions -- makers of MerusCase
1736 Franklin Street, Suite 350
Oakland, CA 94612
510.550.5000 Main
925.997.3878 Mobile
510-836-0915 Fax
j...@fuery.com

On Sun, Nov 11, 2012 at 8:37 PM, Philip Thompson <philthath...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Thompson  
View profile  
 More options Nov 11 2012, 11:52 pm
From: Philip Thompson <philthath...@gmail.com>
Date: Sun, 11 Nov 2012 22:52:28 -0600
Local: Sun, Nov 11 2012 11:52 pm
Subject: Re: [Moo] Clientcide: TabSwapper

Ok, good catch. Silly me. That explains the removing. But what about the error that's thrown when adding a tab after removing one?

"TypeError: element is null"
"var parent = element.parentNode"

Thanks
~Philip

On Nov 11, 2012, at 10:48 PM, Johnny Fuery <john...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Thompson  
View profile  
 More options Nov 12 2012, 12:19 am
From: Philip Thompson <philthath...@gmail.com>
Date: Sun, 11 Nov 2012 23:18:53 -0600
Local: Mon, Nov 12 2012 12:18 am
Subject: Re: [Moo] Clientcide: TabSwapper

Figured this out. The tabs property on the TabSwapper is not getting updated when a tab is removed. I added this line to get around this...

ts.tabs.erase(ts.tabs[index-1]);

The updated fiddle: http://jsfiddle.net/philthathril/ZmY5k/2/

This *seems* like a bug to me, but I'll let Aaron determine that.

Thanks,
~Philip

On Nov 11, 2012, at 10:52 PM, Philip Thompson <philthath...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Newton  
View profile  
 More options Nov 12 2012, 12:33 am
From: Aaron Newton <anut...@gmail.com>
Date: Sun, 11 Nov 2012 21:33:02 -0800
Local: Mon, Nov 12 2012 12:33 am
Subject: Re: [Moo] Clientcide: TabSwapper

I ♥ pull requests.

On Sun, Nov 11, 2012 at 9:18 PM, Philip Thompson <philthath...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »