Code from CFUG Presentation
Jan 31
As promised, here is the code from my 1/31/08 presentation to the online CFUG. The code does contain CF8 functions so be careful if you are going to run the code in previous versions.
Till next time,
--Dave
As promised, here is the code from my 1/31/08 presentation to the online CFUG. The code does contain CF8 functions so be careful if you are going to run the code in previous versions.
Till next time,
--Dave
This entry was posted on January 31, 2008 at 12:56 PM and has received 1731 views. There are currently 2 comments. Print this entry.
My new adventure
Phillip Senn said: Dave,
Thanks for carrying the torch with cfhour. I am a regular listener, although I haven't been ...
[More]
My new adventure
Carl Von Stetten said: Dave, congratulations on the new gig! I can understand the trepidation you felt leaving the big &q...
[More]
Dynamic CFWINDOWs and close action override
Andy said: I want to refresh the window where the cfwindow was opened from when I close the cfwindow. How do I...
[More]
CFWINDOW change modal mask color
Andy said: Thank you for the cf9 code. Now... how do I change the color of the X in the upper right (closes wi...
[More]
How I got started in ColdFusion
Justin Scott said: @Mike hey dude, long time no see! I hope all is well with you and whatever you're working on these ...
[More]
#1 by Tom Jordahl on 2/20/08 - 12:37 PM
Just listened to your Directory Watcher talk from 1/31/08. Nice job. I wanted to clarify a few things about the Directory Watcher and the Event Gateway system in CF
1. Out count is always 0 - this is the number of messages/events that the gateway has sent, well, out. For instance how many times SendGatewayMessage() was called for this gateway. Since the DW doesn't do outgoing messages, this count will of course always be zero.
2. Return values from the gateway
I filed a bug on this for you (#71311). The problem is that as a convenience the gateway system will take the return value and send that "out" to the gateway. For instance if you receive an SMS or IM message to one of those gateways, you can return a Struct with a reply message and the system will (in effect) call SendGatewayMessage() on that gateway with that struct.
Since you are returning a simple value (i.e. "1") CF tries to make that a Struct, fails and reports the strange error. It *should* ignore that return value and log a warning (in the eventgateway.log) that it is doing this. Sorry for the confusion.
3. Timeouts
Event Gateway CFC function calls are subject to the same timeout value as ColdFusion requests. A gateway can override this value (in the Java code) by calling CFEvent.setCfcTimeOut(). Otherwise the timeout is the same as for "regular" CFML page requests.
4. Renaming a file
The Directory watcher does in fact report an ADD and a DELETE event when you change the name of a file. This is by design and I verified this on ColdFusion 7 and 8.
Hope this info helps, I will also post this to my blog with a pointer to your session.
#2 by Dave Ferguson on 2/20/08 - 1:11 PM
Thanks for the clarification and the filing of the bug.
--Dave