ooooooh, i knew it was something quirky that was doing it wasn't sure what it exactly.

*red face*

I need a shorter key system, if i use CreateUUID() it basically puts the +13 when I 
convert the structure to a query :) for sorting purposes. If you have an alternative 
way of doing this btw, i'm open to suggestions

Thanks Sean.



-----Original Message-----
From: Sean A Corfield [mailto:[EMAIL PROTECTED]
Sent: Saturday, 14 June 2003 3:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Structs in a CFC not Quick enough?? (possible
bug?)


On Thursday, Jun 12, 2003, at 17:02 US/Pacific, Scott Barnes wrote:
> In my prototype testing I have noticed that coldfusion doesn't keep 
> track of the categories I add to the method, in that i instantiate the 
> object at the start of the page, and then add different categories 
> into different heirachies.. ie

The problem is that you use RandRange(10,99) to attempt to create 
unique keys - and you are getting key collisions. I modified your test 
page to print out the keys (catX.data.id) and after a few refreshes got 
this:


Navigation
Adding [navA] to root
Category Additon status true CAT13060310352522
Adding [navA-ChildA] to Branch navA
cat B CAT13060310352530
Adding [navA-ChildB] to Branch navA
cat C CAT13060310352530
Adding [navB] to root
cat D CAT13060310352528
Adding [navB-ChildA] to Branch navB
cat E CAT13060310352586

Folders
Adding [parentA] to root
Category Additon status true CAT13060310352568
Adding [parentA-ChildA] to Branch Fold-parentA
cat B CAT13060310352580
Adding [parentA-ChildB] to Branch Fold-parentA
cat C CAT13060310352512
Adding [parentB] to root
cat D CAT13060310352531
Adding [parentB-ChildA] to Branch parentB
cat E CAT13060310352534

See how catB and catC got the same key in the Navigation tree?

If you want unique keys, use UUIDs instead.

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).



Be seen on Australia's premier travel website - http://www.australia.com 
List your product on the Australian Tourism Data Warehouse.  
For further information: http://www.tq.com.au/atdw 

 

 ********************* Disclaimer ********************* 

The information contained in this email is intended only for the 
addressee and may contain privileged or confidential information. If 
you are not the addressee, you are notified that any transmission, 
distribution, downloading, printing or photocopying of the contents 
of this message or attachments is strictly prohibited. The privilege 
of confidentiality attached to this email is not waived, lost or 
destroyed by reason of mistaken delivery to you. If you receive this 
message in error please notify the sender by return e-mail or telephone. 

This email is also subject to copyright. No part of it should be 
reproduced, adapted or transmitted without the written consent of the 
copyright owner. 

This e-mail message has been checked for the presence of computer 
viruses.  However, Tourism Queensland provides no warranty that 
all possible viruses have been detected and cleaned during this process. 



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to