[Flashcoders] aslib HashTable key

2006-08-14 Thread Darren Bowers
I am trying to get my head around HashTables and how to create the unique key reference. basically, I have an object that has two properties id (String) and href (String) and i want to create a HashTable keyed on id. However the HashTable object can only be a Number type. What is the best way

RE: [Flashcoders] aslib HashTable key

2006-08-14 Thread Darren Bowers
len) { // (hash5)-hash always = 31 (prime#) hash = (hash5)-hash + str.charCodeAt(offset++); } return hash; } any thoughts or should I just run with it? _ From: Darren Bowers Sent: Mon 14/08/2006 5:06 PM To: 'flashcoders@chattyfig.figleaf.com' Subject: [Flashcoders] aslib

Re: [Flashcoders] aslib HashTable key

2006-08-14 Thread Ian Thomas
+ str.charCodeAt(offset++); } return hash; } any thoughts or should I just run with it? _ From: Darren Bowers Sent: Mon 14/08/2006 5:06 PM To: 'flashcoders@chattyfig.figleaf.com' Subject: [Flashcoders] aslib HashTable key I am trying to get my head around HashTables and how to create the unique

RE: [Flashcoders] aslib HashTable key

2006-08-14 Thread Darren Bowers
yeah, I see what you are saying. I will have a play and see how it goes. thanks, Darren _ From: Ian Thomas [mailto:[EMAIL PROTECTED] Sent: Mon 14/08/2006 11:48 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] aslib HashTable key Hi Darren, What are you creating