Search:
Calendar:
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 |
Subscribe:
Archives By Subject:
AIR (6) [RSS]
Ajax (3) [RSS]
Buzzword (1) [RSS]
CFUG (39) [RSS]
ColdFusion (65) [RSS]
Flash (5) [RSS]
Flex (37) [RSS]
Frameworks (2) [RSS]
Free Software (2) [RSS]
FXUG (21) [RSS]
General (33) [RSS]
JpgMetadataReader (3) [RSS]
jQuery (1) [RSS]
Mac (2) [RSS]
Off Topic (13) [RSS]
OpenSource (13) [RSS]
PaperVision (10) [RSS]
Spry (2) [RSS]
Tags:
Recent Entries:
Top Posts:
- [9361] Paper Vision 3D Sphere - Carousels on Steroids!
- [5119] PaperVision Carousel0.3 - one step closer to the master plan!
- [5013] Carousel v0.2 - source code
- [4956] PaperVision3D/Flex2 Carousel v0.2
- [4930] Simple PaperVision3D Blurring example
- [4502] Saving images from Flex using ColdFusion: Simple Example with source code
- [4412] PaperVision3D is good for cubes! - a "geek" gift
- [3925] Simple Dynamic Cursor Example in Flex2: With source code
- [3842] Simple PaperVision3D Blurring example : source code
- [3628] PaperVision, Flex2 and my daughter all playing together!
Recent Comments:
- Adventures in jQuery
Joe Roberts said: I'm glad you are finding the project useful. I agree, I find it quite liberating to be able to fill ... [More] - Adventures in jQuery
Ben Nadel said: David, Good point. White space does add overhead unlike in a ColdFusion file which is compiled on t... [More] - Adventures in jQuery
David said: Hi Ben, I too have a coding style that works for me. Laying out the code in a consistent manner sur... [More] - Adventures in jQuery
Ben Nadel said: jQuery is awesome. One of the biggest hurdles for me initially was coming up with a tabbing / line-... [More] - Trace log not working on Flash Player 9,0,28,0
Mr-Yellow said: This log folder no longer exists on my player. [More]
Top Commenters:
- [8] Campbell
- [8] Ben Nadel
- [6] Mark Flewellen
- [6] Steve Bryant
- [4] barry.b
- [4] Raymond Camden
- [3] Peter Bell
- [2] Dan Wilson
- [2] carlos
- [2] riabook
My Links:
RSS:
cfpresentation and "attributeCollection" issue
I've just been working with the new cfpresentation and cfpresentationslide tags.
These tags allow you to create dynamic, online presentations.
These tags allow you to use "attributeCollection" to pass in attributes, as do many (all?) of the tags in CF8 let you.
EG: Rather than
<cfpresentationslide title="This Slide" duration="15" ...[etc]... >
you can do this:
<cfset stAtts.title = "This Slide">
<cfset stAtts.duration = "15"
...[etc]...
<cfpresentationslide attributeCollection="#stAtts#" >
What is great about this is that you can have conditional logic when defining the attributes, and only call the tag once.
Example: Without attributeCollection
<cfif isDefined("audio")>
<cfpresentationslide title="slide one" audio="#audio#">
....[content of slide here]...
</cfpresentationslide>
<cfelse>
<cfpresentationslide title="slide one" duration="15">
....[content of slide here]...
</cfpresentationslide>
</cfif>
</cfpresentation>
With attributeCollection
<cfset stAtts = structNew()>
<cfset stAtts.title = "Slide One">
<cfif isDefined("audio")>
<cfset stAtts.audio = audio>
<cfelse>
<cfset stAtts.duration = 15>
</cfif>
<cfpresentationslide attributeCollection = "#stAtts#">
....[content of slide here]...
</cfpresentationslide>
</cfpresentation>
Now, the issue: If you are looping over a query and use attributeCollection, and in the first slide have audio, and every slide after that, have no audio, the audio from the first slide is played on every slide afterwards.
This Code produces the issue:
<cfset qThisQuery = queryNew( "title,duration,audio" )>
<!--- First row has MP3 and no duration --->
<cfset queryAddRow( qThisQuery )>
<cfset querySetCell( qThisQuery , "title" , "Slide 1")>
<cfset querySetCell( qThisQuery , "audio" , "cannedlaugh.mp3")>
<!--- Next rows have no audio, but a duration --->
<cfset queryAddRow( qThisQuery )>
<cfset querySetCell( qThisQuery , "title" , "Slide 2")>
<cfset querySetCell( qThisQuery , "duration" , "15")>
<cfset queryAddRow( qThisQuery )>
<cfset querySetCell( qThisQuery , "title" , "Slide 3")>
<cfset querySetCell( qThisQuery , "duration" , "15")>
<cfpresentation title="Example">
<cfoutput query="qThisQuery">
<!--- Create an empty struct and populate it with data for attributeColluection--->
<cfset stAtts = structNew()>
<cfset stAtts.title = qThisQuery.title>
<cfif len( qThisQuery.audio )><!--- We have a value here, so use it --->
<cfset stAtts.audio = qThisQuery.audio >
<cfelse>
<cfset stAtts.duration = qThisQuery.duration >
</cfif>
<cfpresentationslide attributeCollection="#stAtts#" >
<h1>#stAtts.title#</h1>
<p>
Here is the content of the presentation
</p>
</cfpresentationslide>
</cfoutput>
</cfpresentation>
Attached is a zip that can be put in a CF8 instance and run to see the issue happening. :-)
The main reason for this blog is so I can refer to it when I log the issue with Adobe.
[Update] As per the comment below from Rupesh, the issue is logged as bug 70594

Yes I did.
Two reasons for this entry was:
1. the area for the bug info it quite small
2. You can't attach files when logging the issue.
So I did it here and put a link to this blog in the report.
Is it normal to get an issue number if they decide it *is* a bug?
If they do, I'll add it here :-)
This is indeed a bug. I have logged bug no 70594. Thanks for bringing this to our attention.
Rupesh
Adobe ColdFusion Team
Thanks for the update :-)
Thanks for taking the time to comment.
I can't say that I did try what you suggested, but don't think it would make any difference.
As you pointed out, I am working with a new struct, do the "audio" key will not exist...
Cheers,
David