Re: Wait for File to Get Written

2012-05-30 Thread Jochem van Dieten

On Wed, May 30, 2012 at 1:03 AM, Mary Jo Sminkey wrote:
 Basically I have situations where I need to wait for ColdFusion to finish 
 creating a file before displaying it. The legacy code I'm working with using 
 a cfexecute to run an executable file, and it uses this code snippet:
 cfloop condition=NOT FileExists(theFileName)/cfloop
 cfinclude template=viewFile.cfm

If you just add a timeout to your cfexecute, CF will wait and continue
when the legacy program is ready.

Jochem

-- 
Jochem van Dieten
http://jochem.vandieten.net/

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


ColdFusion Developer Week - 4th and 8th June, 2012

2012-05-30 Thread Rakshith N

Hi All,
  
 We are conducting the 2nd ColdFusion Developer week happening from 4th – 8th 
June 2012. (Register here: http://adobe.com/go/cfdeveloperweek )
 
 With the launch of ColdFusion 10, we are back with the 2nd ColdFusion 
Developer Week, a series of free, live webinars hosted by seasoned ColdFusion 
experts. The webinars cover a wide range of topics, from what ColdFusion is and 
how to code it, to more in-depth topics related to CF10- HTML5, REST, ORM, 
Security enhancements and more. 
 
 If you are a new developer, someone with little or no ColdFusion experience, 
or even if you have been using ColdFusion all your life, these sessions are 
ideal for you. The ColdFusion Developer Week provides something for everyone so 
sign up now (http://adobe.com/go/cfdeveloperweek)

Thanks,
Rakshith Naresh
Product Manager - ColdFusion
Twitter: @rakshithn
Blog: http://blogs.coldfusion.com

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351362
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Wait for File to Get Written

2012-05-30 Thread Mary Jo Sminkey

maybe use cfdirectory and look at 'dateLastModified' to wait for it to be
2~5 old (so you know it has finished writing to it)

Well, not sure that has any benefit by itself versus just checking if the file 
exists. 


I would make a retry loop, say 5 times with a sleep in between
and break out if file found

Okay, yeah this is more the piece I was looking for, a way to find the file 
quickly if it is there, while also ensuring that the page won't hang waiting 
for it if it doesn't complete. Yeah, this should work nicely, thanks!

Mary Jo




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351363
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Wait for File to Get Written

2012-05-30 Thread Mary Jo Sminkey

 If you just add a timeout to your cfexecute, CF will wait and 
 continue
 when the legacy program is ready.

Cool, yeah that looks like a good addition to this particular process. 


Mary Jo 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351364
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Wait for File to Get Written

2012-05-30 Thread Judah McAuley

You could also use cfthread. Spawn the execution off into another
thread, then use the cfthread join action to make current processing
wait until the child thread is finished and rejoined. Put your logic
to check for file existence in the child thread where the execution of
the external app is. Then you have a timeout on the join so that it
won't wait around forever. Might be a bit cleaner separation.

Judah

On Wed, May 30, 2012 at 9:55 AM, Mary Jo Sminkey mary...@cfwebstore.com wrote:

maybe use cfdirectory and look at 'dateLastModified' to wait for it to be
2~5 old (so you know it has finished writing to it)

 Well, not sure that has any benefit by itself versus just checking if the 
 file exists.


I would make a retry loop, say 5 times with a sleep in between
and break out if file found

 Okay, yeah this is more the piece I was looking for, a way to find the file 
 quickly if it is there, while also ensuring that the page won't hang waiting 
 for it if it doesn't complete. Yeah, this should work nicely, thanks!

 Mary Jo




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Another CFDOCUMENT SUCK?

2012-05-30 Thread Igor Ilyinsky

CFDOCUMENT has been the bane of my existence for years. Check out this simple 
dynamic PDF packaging code which should work...

CFSET PAGEARRAY = [] /
CFLOOP from=1 to=3 index=i
CFDOCUMENT FORMAT=PDF NAME=PDFPAGE
htmlbodydiv 
style=background:url(http://www.houseoffusion.com/_/hof120.gif)BRnbsp;/div/body/html
/CFDOCUMENT
cfset arrayappend(PAGEARRAY,PDFPAGE) /  
/CFLOOP
CFDOCUMENT FORMAT=PDF NAME=PDFPAGE
htmlbodydiv 
style=background:url(http://www.houseoffusion.com/_/hof120.gif)BRnbsp;/div/body/html
/CFDOCUMENT
cfset arrayappend(PAGEARRAY,PDFPAGE) /  
CFPDF action=merge name=FINALPDF
 cfloop from=1 to=#arraylen(PAGEARRAY)# index=i  
   cfset pointer = PAGEARRAY[i]/  
   cfpdfparam source=pointer
 /cfloop
/CFPDF
cfcontent type=application/pdf variable=#tobinary(FINALPDF)#


If you run this (on CF8 or CF9 - not tried 10) you will notice that the image 
appears only on the first and last page! Why? Because CFDocument ignores 
background images after the first call when in a loop. I was able to prove this 
by putting the call into a CFINCLUDE inside the loop. But then, if you add a 
CFDOCUMENTITEM to it, it throws an error: Routines cannot be declared more 
than once. According to Adobe there was a hotfix for this in CF8, although it 
did not work for me.

Anyone know CFDoc well enough to present another solution?

TIA,
Igor


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351366
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Another CFDOCUMENT SUCK?

2012-05-30 Thread Raymond Camden

Why not use one cfpdf with pagebreaks instead?

On Wed, May 30, 2012 at 3:19 PM, Igor Ilyinsky i...@maverickmaven.com wrote:

 CFDOCUMENT has been the bane of my existence for years. Check out this simple 
 dynamic PDF packaging code which should work...

 CFSET PAGEARRAY = [] /
 CFLOOP from=1 to=3 index=i
 CFDOCUMENT FORMAT=PDF NAME=PDFPAGE
 htmlbodydiv 
 style=background:url(http://www.houseoffusion.com/_/hof120.gif)BRnbsp;/div/body/html
 /CFDOCUMENT
 cfset arrayappend(PAGEARRAY,PDFPAGE) /
 /CFLOOP
 CFDOCUMENT FORMAT=PDF NAME=PDFPAGE
 htmlbodydiv 
 style=background:url(http://www.houseoffusion.com/_/hof120.gif)BRnbsp;/div/body/html
 /CFDOCUMENT
 cfset arrayappend(PAGEARRAY,PDFPAGE) /
 CFPDF action=merge name=FINALPDF
  cfloop from=1 to=#arraylen(PAGEARRAY)# index=i
   cfset pointer = PAGEARRAY[i]/
   cfpdfparam source=pointer
  /cfloop
 /CFPDF
 cfcontent type=application/pdf variable=#tobinary(FINALPDF)#


 If you run this (on CF8 or CF9 - not tried 10) you will notice that the image 
 appears only on the first and last page! Why? Because CFDocument ignores 
 background images after the first call when in a loop. I was able to prove 
 this by putting the call into a CFINCLUDE inside the loop. But then, if you 
 add a CFDOCUMENTITEM to it, it throws an error: Routines cannot be declared 
 more than once. According to Adobe there was a hotfix for this in CF8, 
 although it did not work for me.

 Anyone know CFDoc well enough to present another solution?

 TIA,
 Igor


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351367
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Another CFDOCUMENT SUCK?

2012-05-30 Thread Igor Ilyinsky

Why not use one cfpdf with pagebreaks instead?




Ray, this was a simple example to show the suckage. For the app, the data for 
various documents is coming from a database, and each one has different headers 
and footers. We already have all of the code which constructs the individual 
CFDocs successfully, and are merely trying to wrap it in a loop to stick them 
together into a single PDF. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351368
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cflayout and CKEditor don't play well together...sometimes.

2012-05-30 Thread David Moore

I am using CF 9.1 on a Windows 2008 Web Server and have noticed another issue 
with cflayout(area). This (of course) only occurs in IE9. It works fine in 
Firefox. 

Let's say I build a cflayout page with 3 cflayoutareas (tabs). If I place a 
rich cftextarea (CKEditor) within tab 2 or 3 it does not display correctly. If 
I place the CKEditor in the first tab (or cflayoutarea) it displays and 
functions correctly?

Besides the obvious, don't use cflayout and use jQuery libraries instead, does 
anyone have an idea of what is going on with the first cflayoutarea so that 
CKEditor works and force that to allow CKEditor to work in every cflayoutarea. 
Can anyone else dulicate the error and am I just missing something. According 
to a technical support email I got from Adobe they are aware of the issue(s) 
with cflayout and CKEditor.

I just get so frustrated when cf tags don't work as they are promoted. I don't 
know of any other Adobe product where having broken features is acceptable: 
Photoshop, Illustrator, etc. Why is it Adobe allows ColdFusion to be sold 
knowing there are going to be problems with features. Then when they are made 
aware of them, don't fix all of them on an update release. While they do fix 
some, they ignore others. Then tell us it will be fixed in the next version I 
have to now pay for to solve their problemonly to find, as in past 
experiences, something else will break. I am getting very frustrated with 
Adobe's seeming lack of attention to ColdFusion and providing a totally clean 
product. I am also tired of the excuse that I get in emails from their support 
that we get the code for that feature from someone else and that's where the 
real problem lies. Really? Really!

Rant over. Feedback welcome. And hopeful for a solution to my cflayout issue 
from all the experts in this group!

David 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351369
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Another CFDOCUMENT SUCK?

2012-05-30 Thread Dave Watts

 CFDOCUMENT has been the bane of my existence for years. Check out this simple 
 dynamic PDF packaging code which should work...

 CFSET PAGEARRAY = [] /
 CFLOOP from=1 to=3 index=i
 CFDOCUMENT FORMAT=PDF NAME=PDFPAGE
 htmlbodydiv 
 style=background:url(http://www.houseoffusion.com/_/hof120.gif)BRnbsp;/div/body/html
 /CFDOCUMENT
 cfset arrayappend(PAGEARRAY,PDFPAGE) /
 /CFLOOP
 CFDOCUMENT FORMAT=PDF NAME=PDFPAGE
 htmlbodydiv 
 style=background:url(http://www.houseoffusion.com/_/hof120.gif)BRnbsp;/div/body/html
 /CFDOCUMENT
 cfset arrayappend(PAGEARRAY,PDFPAGE) /
 CFPDF action=merge name=FINALPDF
  cfloop from=1 to=#arraylen(PAGEARRAY)# index=i
   cfset pointer = PAGEARRAY[i]/
   cfpdfparam source=pointer
  /cfloop
 /CFPDF
 cfcontent type=application/pdf variable=#tobinary(FINALPDF)#

 If you run this (on CF8 or CF9 - not tried 10) you will notice that the image 
 appears only on the first and last page! Why?
 Because CFDocument ignores background images after the first call when in a 
 loop. I was able to prove this by putting
 the call into a CFINCLUDE inside the loop. But then, if you add a 
 CFDOCUMENTITEM to it, it throws an error: Routines
 cannot be declared more than once. According to Adobe there was a hotfix for 
 this in CF8, although it did not work for me.

 Anyone know CFDoc well enough to present another solution?

I would expect you can solve this problem by using unique names within
your loop:

cfloop from=1 to=3 index=i
 cfdocument ... name=pdfpage_01_#i#.../cfdocument
 ...
 cfdocument ... name=pdfpage_02_#i#.../cfdocument
 ...
/cfloop

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or ons

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351370
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Another CFDOCUMENT SUCK?

2012-05-30 Thread Igor Ilyinsky

 
 I would expect you can solve this problem by using unique names 
 within
 your loop:
 
 cfloop from=1 to=3 index=i
 
 cfdocument ... name=pdfpage_01_#i#.../cfdocument
 ... 
 cfdocument ... name=pdfpage_02_#i#.../cfdocument
 ...
 
 /cfloop
 

We tried that Dave, it did not do the trick. Any other ideas?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351371
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cflayout and CKEditor don't play well together...sometimes.

2012-05-30 Thread Gerald Guido

FWIW JavaScript is notorious for being temperamental and causing problems
when you start mixing JS libraries. You are using third party JS libraries
along with the libraries used by CF. And practically speaking it is
impossible to foresee and eliminate all possible conflicts when using
multiple JS libraries at the same time, with or without ColdFusion. This is
par for the course. I cannot tell you how many times I have run into
problems when using multiple JS libraries/apps/plugins.

Seriously though, comparing front end web development to Photoshop or
Illustrator, where Adobe can control all aspects of the users/developers
experience, is moot. Adobe has no way of foreseeing what you use in a web
development project, let alone being able to find work-a-rounds for them.
A lot of time the latest versions of popular JS apps come out after CF is
released.

Believe me, I understand your frustration... I wrestle with it on a regular
basis.

Just sayin'...

G!


On Wed, May 30, 2012 at 6:49 PM, David Moore dgmoor...@hotmail.com wrote:


 I am using CF 9.1 on a Windows 2008 Web Server and have noticed another
 issue with cflayout(area). This (of course) only occurs in IE9. It works
 fine in Firefox.

 Let's say I build a cflayout page with 3 cflayoutareas (tabs). If I place
 a rich cftextarea (CKEditor) within tab 2 or 3 it does not display
 correctly. If I place the CKEditor in the first tab (or cflayoutarea) it
 displays and functions correctly?

 Besides the obvious, don't use cflayout and use jQuery libraries instead,
 does anyone have an idea of what is going on with the first cflayoutarea so
 that CKEditor works and force that to allow CKEditor to work in every
 cflayoutarea. Can anyone else dulicate the error and am I just missing
 something. According to a technical support email I got from Adobe they are
 aware of the issue(s) with cflayout and CKEditor.

 I just get so frustrated when cf tags don't work as they are promoted. I
 don't know of any other Adobe product where having broken features is
 acceptable: Photoshop, Illustrator, etc. Why is it Adobe allows ColdFusion
 to be sold knowing there are going to be problems with features. Then when
 they are made aware of them, don't fix all of them on an update release.
 While they do fix some, they ignore others. Then tell us it will be fixed
 in the next version I have to now pay for to solve their problemonly to
 find, as in past experiences, something else will break. I am getting very
 frustrated with Adobe's seeming lack of attention to ColdFusion and
 providing a totally clean product. I am also tired of the excuse that I get
 in emails from their support that we get the code for that feature from
 someone else and that's where the real problem lies. Really? Really!

 Rant over. Feedback welcome. And hopeful for a solution to my cflayout
 issue from all the experts in this group!

 David

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351372
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Coldfusion and JQuery Toxeninput

2012-05-30 Thread Maureen

Are any of you using the jQuery Toxeninput plugin with Coldfusion, and
if so do you have any code you could share on passing the JSON back
and forth?  I've read the instructions till my eyes are blurred with
no success.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351373
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm