Brooks-

Interesting - just tested on 8 and it looks like CF8 is not
(re)counting the struct members of the URL scope properly on CF8 at
least.  This may be a bug in CF, but I would generally frown on
*creating* URL structures since they are reserved and used for another
purpose in CF already.  That may have just been there so you could
make your example to work though.

Likewise, it's a little weird to be deleting keys too, since
technically they do still exist in the URL and the HTTP header even if
you delete them from the URL scope.

However, if you really want to delete them and have a good count of
structure members, try this as a workaround
#listLen(structKeyList(url))#.

-Cameron

On Thu, Sep 4, 2008 at 2:21 PM,  <[EMAIL PROTECTED]> wrote:
>
> Does anyone know of a difference between CF7 and CF8 concerning structCount
> and structDelete? The following code snippet performs differently in CF7 and
> CF8:
>
> <cfset url=structNew()/>
> <cfset url.one = 1/>
> <cfset url.two = 2/>
> <cfset url.three = 3/>
>
> <cfdump var="#structCount(url)#"/>
> <cfdump var="#url#"/>
>
> <cfset structDelete(url,'three')/>
>
> <cfdump var="#structCount(url)#"/>
> <cfdump var="#url#"/>
>
> When you run the above code snippet in CF7 the structCount(url) return 3
> then 2 (after the delete). But in CF8 it returns 3 and 3 again.
>
> Interestingly the problem seems to manifest itself when using the 'url'
> structure name (variable scope).
>
> Please let me know if this is a known 'behavior' and if so - does Adobe have
> any documentation on it.
>
> Sincerely,
>
> Brooks Wilson
>
> Assert your right to make a few mistakes. If people can't accept your
> imperfections, that's their fault. - Dr David M Burns
>
>  Federal Reserve Bank of Atlanta · 1000 Peachtree Street, N.E. · Atlanta
> Georgia 30309-4470
> 404.498.8178 · fax 404.498.8239 · [EMAIL PROTECTED]
>
>



-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell: 678.637.5072
aim: cameroncf
email: [EMAIL PROTECTED]


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to