Re: cfc scenario help

2008-09-06 Thread Nathan Strutz
Hey richard,
I think it sounds like you're doing a good job so far. What I would do from
here is, in your test object, add a getProjects() method and in the project
object, add a getTests() method. Each of these would probably call the
associated GW and return a query of all the found items based on that
linking table.

You can do this because when you have an instance of the test cfc, a test
object, it represents one single test. That test has properties and methods,
and also linked data, so it makes sense that it's all linked directly from
that test object.

This approach is pretty generic and you will find it out in the wild here 
there, such as in the Reactor ORM, which creates these methods for you based
on the relationships you define in your xml config file.

To get ALL your tests, or ALL your projects, drop methods in your services,
TestService.getAllTests() and ProjectService.getAllProjects(), each would
call the respective GW and return a query.

HTH.

nathan strutz
http://www.dopefly.com/


On Fri, Sep 5, 2008 at 2:44 PM, Richard White [EMAIL PROTECTED] wrote:

 Hi,

 we have been doing alot of work on understanding OO development using CFC's
 and model glue.

 we have one issue that we don't quite understand and hope someone can help

 to simplify the problem: we have 2 objects: projects, and tests

 we have ensured that each of these objects have a DAO cfc for single db
 record access. and a GW for multiple db record access. we also have a
 service cfc for each of these objects.

 this is good as projects can be created, removed, searched etc... and the
 same with tests

 however tests can be linked to projects. there is a table in the database
 that is called projecttests and contains the projectID and testID as primary
 keys and foreign keys.

 the problem comes when understanding how to link this in the cfc's - where
 exactly will this fit in?

 would it fit into the projects cfc - so it could appear as
 project.linktest(#testobject#) - but then i would also need functions such
 as project.getAllTests(#projectobject#) etc...

 i am a little confused and would really appreciate any help in
 understanding how to best achieve this

 thanks

 richard

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312109
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfc scenario help

2008-09-06 Thread Richard White
thanks Nathan, the way you explained it is so understandable. very much 
appreciated and glad to know we are on the right track :)




Hey richard,
I think it sounds like you're doing a good job so far. What I would do from
here is, in your test object, add a getProjects() method and in the project
object, add a getTests() method. Each of these would probably call the
associated GW and return a query of all the found items based on that
linking table.

You can do this because when you have an instance of the test cfc, a test
object, it represents one single test. That test has properties and methods,
and also linked data, so it makes sense that it's all linked directly from
that test object.

This approach is pretty generic and you will find it out in the wild here 
there, such as in the Reactor ORM, which creates these methods for you based
on the relationships you define in your xml config file.

To get ALL your tests, or ALL your projects, drop methods in your services,
TestService.getAllTests() and ProjectService.getAllProjects(), each would
call the respective GW and return a query.

HTH.

nathan strutz
http://www.dopefly.com/




 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312110
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Trying to use cfexecute to run batch file...

2008-09-06 Thread Rick Faircloth
Trying the cfexecute this way didn't work, either:

cfexecute
 name=c:\windows\systems32\cmd.exe
 arguments=/c e:\adobe_site\getfiles.bat
 timeout=30
 /cfexecute

???

Thanks,

Rick

 -Original Message-
 From: Rick Faircloth [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 05, 2008 11:55 PM
 To: CF-Talk
 Subject: Trying to use cfexecute to run batch file...
 
 I'm trying to use cfexecute to run this bath file content:
 
 ftp -s:getfiles.txt
 
 The batch file reads its commands from getfiles.txt, which
 has the following code:
 
 open datalink.interealty.com
 [username]
 [password]
 cd /DataLinkOutput/SAV/SAV_119201
 prompt
 mget *.*
 bye
 
 I can run the batch file manually and all is well.
 
 However, I can't get any results except a timeout when I use
 cfexecute to run the batch file.
 
 I've googled and tried everything I can think of, but obviously
 something's not right.
 
 Here's the cfexecute code:
 
 cfexecute name=e:\adobe_site\getfiles.bat
timeout=60
 
 But that's not working.
 
 Suggestions?
 
 Thanks,
 
 Rick
 
 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312111
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


extracting numbers from a string

2008-09-06 Thread Matthew Smith
I am parsing a paypal history(csv) to update records in a databse.

Here is an example of one of the values from one line of the csv:
#47-Pepper - 10 votes

The first number is the primary key from the db. I can parse it, but I am 
limited to 4 digits long with my solution, and it is not very elegant.  Here's 
what I have:

cfset primarykey = mid(detail, 3, 1)
cfif isnumeric(mid(detail, 4, 1))
   cfset primarykey = primarykey  mid(detail, 4, 1)
/cfif
cfif isnumeric(mid(detail, 5, 1))
   cfset primarykey = primarykey  mid(detail, 5, 1)
/cfif   
cfif isnumeric(mid(detail, 6, 1))
   cfset primarykey = primarykey  mid(detail, 6, 1)
/cfif

Is there a better way to do what I am trying to do?

Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312112
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


using delimiters for a list function

2008-09-06 Thread Matthew Smith
I am trying to access a string as a list to get the second half of it.

Here is the string:
#7-Bodi - 25 votes

Here is the code, but it throws an error:

cfset votestring = listgetat(detail, 2, '-')

Thanks.



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312113
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Trying to use cfexecute to run batch file...

2008-09-06 Thread Jim Wright
On Sat, Sep 6, 2008 at 8:17 AM, Rick Faircloth [EMAIL PROTECTED] wrote:
 Trying the cfexecute this way didn't work, either:

 cfexecute
 name=c:\windows\systems32\cmd.exe
 arguments=/c e:\adobe_site\getfiles.bat
 timeout=30
 /cfexecute


I'm guessing the context of the cfexecute is some other directory than
what you actually want it to be.  Change your directory in your batch
file with:

cd c:\adobe_site

That way it can find the ftp command file.  Alternatively, you can put
in the full path to the ftp command file:

ftp -s:c:\adobe_site\getfiles.txt

and within that command file you could change your the local directory
to wherever you want the files dumped:

lcd c:\somedirectorywhereiwantthefiles\

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312114
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: using delimiters for a list function

2008-09-06 Thread Weidler, Wilfred C.
The problem is the # in your string.  I'm assuming you are testing
something like this.

cfset detail = '#7-Bodi - 25 votes'

cfset votestring = listgetat(detail, 2, -)

I'm also assuming that in the real solution you are reading the value
from a file.  If this is the case then this will work.

cffile action=read file=#ExpandPath('.')#\text.txt
variable=myOutPut

cfset detail = myOutPut

cfset votestring = listgetat(detail, 2, -)

cfoutput
#votestring#
/cfoutput

Let me know if I'm way off base here with the second assumption.

Chuck

-Original Message-
From: Matthew Smith [mailto:[EMAIL PROTECTED] 
Sent: Saturday, September 06, 2008 10:55 AM
To: CF-Talk
Subject: using delimiters for a list function

I am trying to access a string as a list to get the second half of it.

Here is the string:
#7-Bodi - 25 votes

Here is the code, but it throws an error:

cfset votestring = listgetat(detail, 2, '-')

Thanks.





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312115
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: extracting numbers from a string

2008-09-06 Thread Barney Boisvert
Regular expressions are what you need.  Check out REFind in the docs,
specifically the subexpression stuff.  That'll let you build a generic
and flexible mask fir you strings, and the dissect them all with a
single process.

cheers,
barneyb


On 9/6/08, Matthew Smith [EMAIL PROTECTED] wrote:
 I am parsing a paypal history(csv) to update records in a databse.

 Here is an example of one of the values from one line of the csv:
 #47-Pepper - 10 votes

 The first number is the primary key from the db. I can parse it, but I am
 limited to 4 digits long with my solution, and it is not very elegant.
 Here's what I have:

 cfset primarykey = mid(detail, 3, 1)
 cfif isnumeric(mid(detail, 4, 1))
cfset primarykey = primarykey  mid(detail, 4, 1)
 /cfif
 cfif isnumeric(mid(detail, 5, 1))
cfset primarykey = primarykey  mid(detail, 5, 1)
 /cfif
 cfif isnumeric(mid(detail, 6, 1))
cfset primarykey = primarykey  mid(detail, 6, 1)
 /cfif

 Is there a better way to do what I am trying to do?

 Thanks.


 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312116
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Trying to use cfexecute to run batch file...

2008-09-06 Thread Dave Watts
 I'm trying to use cfexecute to run this bath file content:
 
 ftp -s:getfiles.txt

Specify the full path to getfiles.txt.

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312117
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Trying to use cfexecute to run batch file...

2008-09-06 Thread Justin D. Scott
 However, I can't get any results except a timeout when I use
 cfexecute to run the batch file.
 
 cfexecute name=e:\adobe_site\getfiles.bat
timeout=60

Based on the file sized that you're likely dealing with, the timeout is too
low.  I run my CDEXECUTE with a timeout of 10800 for IDX downloads...

cfsetting requesttimeout=10800 /
cfexecute name=#expandPath('.\FTPBatch.cmd')# timeout=10800 /

FTPBatch.cmd is in the same folder as the calling script and has all of the
commands needed to get to the proper folder and run the ftp command line:

@echo off
e:
cd \inetpub\wwwroot\mls\imports
ftp -n -s:..\FTPScript.txt

FTPScript.txt is also in the same folder as the calling script and has the
actual FTP commands to execute (connect, user, pass, get, etc.).  In my case
the imports folder is directly below the folder where all the scripts and
such are located.


--
Justin Scott, http://www.tlson.com/


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312118
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


cfgrid bind component path not working

2008-09-06 Thread Brad Wood
I experimenting with binding an HTML cfgrid to a CFC and I'm having troubles.  

 cfgrid format=html name=grd_list_users 
bind=cfc:com.myapp.www.DAOs.userDAO.getAllUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})

The cfc is web-accessible in the following path:  
www.myserver.com/com/myapp/www/DAOs/userDAO.cfc

The docs say: The componentPath value must be a dot-delimited path from the 
web root or the directory that contains the current page.

However, when the page loads, I get this error in my cfdebug window:
http: Error invoking CFC /userDAO.cfc : Not Found

ColdFusion seems to just be chopping off all those directories and simply 
looking for the CFC in the web root.  Why the heck would it do that?

I can't find anything in the docs that explain it, and what is killing me is 
EVERY single example I can find always just uses the cfc in the web root, or in 
the same location as the main file.  It's the curse of the abundance of 
over-simplified examples...  I must be missing something obvious.

~Brad

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312119
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: using delimiters for a list function

2008-09-06 Thread Matthew Smith
Thanks for the reply.

It turns out the first line was causing the problem.  The csv first line has 
header(?) ingo and the list function saw it as a list with one element.

Thank you for the help. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312120
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: extracting numbers from a string

2008-09-06 Thread Andy Matthews
If you're looking to get the number at the beginning of the string:

cfset primayKey = REMatchNoCase('^#[0-9]+',str)

That will return an array with, using your current string, a single index.

If you're wanting to get ALL numbers from the string:

cfset primayKey = REMatchNoCase('[0-9]+',str)

That returns the same array with, using your current string, two indexes.

-Original Message-
From: Matthew Smith [mailto:[EMAIL PROTECTED] 
Sent: Saturday, September 06, 2008 9:45 AM
To: CF-Talk
Subject: extracting numbers from a string

I am parsing a paypal history(csv) to update records in a databse.

Here is an example of one of the values from one line of the csv:
#47-Pepper - 10 votes

The first number is the primary key from the db. I can parse it, but I am
limited to 4 digits long with my solution, and it is not very elegant.
Here's what I have:

cfset primarykey = mid(detail, 3, 1)
cfif isnumeric(mid(detail, 4, 1))
   cfset primarykey = primarykey  mid(detail, 4, 1) /cfif cfif
isnumeric(mid(detail, 5, 1))
   cfset primarykey = primarykey  mid(detail, 5, 1)
/cfif   
cfif isnumeric(mid(detail, 6, 1))
   cfset primarykey = primarykey  mid(detail, 6, 1) /cfif

Is there a better way to do what I am trying to do?

Thanks.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312121
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Hi everyone

2008-09-06 Thread Adrian Lynch
AdBrite eh? We'll be hitting you up for some advertising info then l;O)

Oh look, a smilie with a new hair cut...

A

-Original Message-
From: Philip Kaplan [mailto:[EMAIL PROTECTED]
Sent: 05 September 2008 22:42
To: CF-Talk
Subject: Hi everyone


Hi everyone,

After what seems like 100 years reading the archives, I just joined the
mailing list and wanted to introduce myself.

My name is Philip Kaplan and I've been a ColdFusion programmer since around
1996.  I'm sure others discovered CF this way -- IIS hadn't yet been
invented  so I was using a web server called Orielly Website Pro, which
happened to come with ColdFusion built-in.  I was in college on a summer
internship (at Booz Allen  Hamilton) and my employer (thank goodness) told
me to learn it.

I've built a lot of sites in ColdFusion since then.  The most well-known was
a site called Fuckedcompany.com that tracked the collapse of the (first?)
dot-com bust.  One of the newer CF sites I built is a photo-sharing social
network at www.mobog.com.  It's the first CF site I've load balanced across
multiple servers, which is fun.  Incidentally it's hosted on
www.gogrid.comwhich is a could-hosting thingamajig.  Happy to share my
(mostly positive,
some negative) experiences with it.

For a living, I'm the founder and president of an ad network called
AdBrite.  AdBrite was initially developed by my business partner, a PHP guy,
so no CF there.  We have about 115 employees and are based in San
Francisco.  I still get to use CF at the day-job to prototype stuff and
build some internal reporting tools.

Anyway, hello everyone!

Philip


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312122
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFC and MG2 where does validation fit in?

2008-09-06 Thread Richard White
Hi

we have hit a little sticking point with CFC's and model glue 2.

we have an object named subject.

we have created a DAO to handle single record db work and a GW to handle all 
multiple record db work. we also have a service cfc to handle the DAO and GW 
CFC's. 

we also have a controller for the interface which listens for events on that 
interface. One of the events listens for the user to edit subject details. the 
listener calls a function in the controller named validateAndSave which is 
where the problem arises:

we want to validate the subject details but we dont want to validate them in 
this controller as there will also be other interfaces in our system where we 
might want to validate the same details, so this defeats the object of the 
cfc's.

so we thought that we could add functions such as validateFirstName, 
validateLastName in the subject services cfc. alterntaively we can create a 
whole new cfc called subject validation cfc and add all validation functions in 
there. 

this way, other interfaces can also call these validation functions easily and 
makes logical sense.

we would really appreciate your feedback on what you guys think would be the 
best route, and how you do this?

thanks

richard 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312123
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: extracting numbers from a string

2008-09-06 Thread Matthew Smith
cfset primayKey = REMatchNoCase('^#[0-9]+',str)

I get an error when running that.  I tried:
cfset primayKey = REMatchNoCase('^##[0-9]+',str)
but that just results in an empty array. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312124
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Hi everyone

2008-09-06 Thread Andrew Grosset
Welcome!

I like http://www.mobog.com/, very fast, any advice/info on your server setup 
would be interesting.

Andrew. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312125
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Trying to use cfexecute to run batch file...

2008-09-06 Thread Rick Faircloth
Thanks, everyone, for the suggestions.

Here's the final solution:

cfexecute code:

cfexecute
 name=C:\WINDOWS\system32\cmd.exe
 arguments=/c 
e:\inetpub\webroot\real_estate_data\smlc\daily_downloads\zip_files\getfiles.bat
 timeout=10800
/cfexecute


batch file:

ftp 
-s:e:\inetpub\webroot\real_estate_data\smlc\daily_downloads\zip_files\getfiles.txt


ftp commands file:

open datalink.interealty.com
anonymous
IDX292A
prompt
cd /DataLinkOutput/SAV/SAV_119201
lcd e:\inetpub\webroot\real_estate_data\smlc\daily_downloads\zip_files
mget *.*
bye

Glad that's working!  Got to move forward with this app!

@Justin:  I think I'm going to have to get a second account with MLXchange, too.
I don't see how the data-handling can be done when I'm just sent incremental 
data
each day, but don't know whether those files are for insertion, deletion, or 
updating!


Rick


 -Original Message-
 From: Justin D. Scott [mailto:[EMAIL PROTECTED]
 Sent: Saturday, September 06, 2008 12:54 PM
 To: CF-Talk
 Subject: RE: Trying to use cfexecute to run batch file...
 
  However, I can't get any results except a timeout when I use
  cfexecute to run the batch file.
 
  cfexecute name=e:\adobe_site\getfiles.bat
 timeout=60
 
 Based on the file sized that you're likely dealing with, the timeout is too
 low.  I run my CDEXECUTE with a timeout of 10800 for IDX downloads...
 
 cfsetting requesttimeout=10800 /
 cfexecute name=#expandPath('.\FTPBatch.cmd')# timeout=10800 /
 
 FTPBatch.cmd is in the same folder as the calling script and has all of the
 commands needed to get to the proper folder and run the ftp command line:
 
 @echo off
 e:
 cd \inetpub\wwwroot\mls\imports
 ftp -n -s:..\FTPScript.txt
 
 FTPScript.txt is also in the same folder as the calling script and has the
 actual FTP commands to execute (connect, user, pass, get, etc.).  In my case
 the imports folder is directly below the folder where all the scripts and
 such are located.
 
 
 --
 Justin Scott, http://www.tlson.com/
 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312126
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


rematchnocase not working

2008-09-06 Thread Matthew Smith
I have my script working locally, which is cf8, but when I upload to 
crystaltech, i get this:
Variable REMATCHNOCASE is undefined.

This is the code it points to:
cfset votearray = rematchnocase([0-9]+,detail)

Is there any way I can get this working on cf 7? 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312127
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


CFHTTP call in CFC, returning content fails

2008-09-06 Thread Kris Jones
I've got a function in a cfc, that is doing a soap request via CFHTTP.
I've enabled output on the function, and can dump the
CFHTTP.filecontent successfully after the cfhttp call. I then return
that result from the function. However, in the calling cfm template,
the return variable on the function is coming up not defined.

So, I see the dump from inside the function, then an error that
Variable XXX is undefined.
Been fooling around with this for too long. Have tried moving logic
from function into CFM page, and I'm having different issues with the
results -- like being unable to do any xmlsearch calls on the results
at all, although I can reference individual node values with dot
notation.

Anybody got an idea what I'm missing here? I'm using similar structure
on other calls, and can't see the problem.

Thanks, Kris

---

CFM template has:

cfinvoke component=#oComp# method=myfunc returvariable=xxx
cfinvokeargument name=arga value=somevalue /
cfinvokeargument name=argb value=someothervalue /
/cfinvoke

cfdump var=#xxx#cfabort /



CFC Function looks something like:

cffunction name=myfunc access=public returntype=any output=true
cfargument name=arga type=string required=yes
cfargument name=argb type=string required=yes

cfset var myresult =  /
cfset var mypacket =  /

cfsavecontent variable=nfws_soappacket
cfoutput
.[soap description here]
/cfoutput
/cfsavecontent

cfhttp url=someaddress method=POST
param
param
/cfhttp

cfset myresult = xmlParse(cfhttp.FileContent) /
cfdump var=#myresult# /

cfreturn myresult /
/cffunction

---

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312128
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFHTTP call in CFC, returning content fails

2008-09-06 Thread Kris Jones
Sorry, the function contents had stupid typo (I never have been good
at obscuring/genericizing my actual code before posting). Here is what
I meant to write:

---

CFM template has:

cfinvoke component=#oComp# method=myfunc returvariable=xxx
   cfinvokeargument name=arga value=somevalue /
   cfinvokeargument name=argb value=someothervalue /
/cfinvoke

cfdump var=#xxx#cfabort /



CFC Function looks something like:

cffunction name=myfunc access=public returntype=any output=true
cfargument name=arga type=string required=yes
cfargument name=argb type=string required=yes

cfset var myresult =  /
cfset var mypacket =  /

cfsavecontent variable=mypacket
   cfoutput
   .[soap description here]
   /cfoutput
/cfsavecontent

cfhttp url=someaddress method=POST
param
param
/cfhttp

cfset myresult = xmlParse(cfhttp.FileContent) /
cfdump var=#myresult# /

cfreturn myresult /
/cffunction

---

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312129
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: rematchnocase not working

2008-09-06 Thread Barney Boisvert
REMatch was added in CF 8, so your stuck on CF 7.  However, you should
be able to synthesize it with REFind.

cheers,
barneyb


On 9/6/08, Matthew Smith [EMAIL PROTECTED] wrote:
 I have my script working locally, which is cf8, but when I upload to
 crystaltech, i get this:
 Variable REMATCHNOCASE is undefined.

 This is the code it points to:
 cfset votearray = rematchnocase([0-9]+,detail)

 Is there any way I can get this working on cf 7?

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312130
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: rematchnocase not working

2008-09-06 Thread Dawson, Michael
Use REFindNoCase() for CF7.  Note the differences in syntax.
 
mike

  _  

From: Matthew Smith [mailto:[EMAIL PROTECTED]
Sent: Sat 9/6/2008 4:51 PM
To: CF-Talk
Subject: rematchnocase not working



I have my script working locally, which is cf8, but when I upload to 
crystaltech, i get this:
Variable REMATCHNOCASE is undefined.

This is the code it points to:
cfset votearray = rematchnocase([0-9]+,detail)

Is there any way I can get this working on cf 7?



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312131
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Auto-append params

2008-09-06 Thread Darren Houle
I have files in a subdir under an application.cfc.

I'd like to automatically append a specific myvar=somevalue to every hyperlink 
on these pages. Is there a way I can use onRequest and regular expressions to 
re-write paths before they're output back to the browser?

For instance, in a template I have:

a href=myfile.cfmclick here/a

but after parsing through onRequest (or something similar) it would look like:

a href=myfile.cfm?myvar=somevalueclick here/a

And I wouldn't have to remember to code that into every hyperlink on every page 
myself.

The parser/re-writer should add the ? if it's not there and keep it if it is, 
ignore other params if they exist, add an  if needed, etc. Anyone know of such 
thing out there?

In case you're wondering why, I'm following Philip Chalmers suggestion 
(http://coldfusion.sys-con.com/node/41749) about adding random numbers to url 
params and form actions so proxy servers never cache dynamic pages.

Thanks! 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312132
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Auto-append params

2008-09-06 Thread Dave Watts
 I have files in a subdir under an application.cfc.
 
 I'd like to automatically append a specific myvar=somevalue 
 to every hyperlink on these pages. Is there a way I can use 
 onRequest and regular expressions to re-write paths before 
 they're output back to the browser?

Yes, you can. You'd have something like this:

cffunction name=onRequest
cfargument name=targetPage
cfsavecontent var=page
cfinclude template=#Arguments.targetPage#
/cfsavecontent
!--- your regex stuff goes here ---
cfoutput#page#/cfoutput
/cffunction

Alternatively, you could append data to links with JavaScript. This is very
easy to do, since all the links are in the document.links array. This would
perform better, but would obviously only work for clients that have
JavaScript enabled.

 In case you're wondering why, I'm following Philip Chalmers 
 suggestion (http://coldfusion.sys-con.com/node/41749) about 
 adding random numbers to url params and form actions so proxy 
 servers never cache dynamic pages.

I don't recommend you do this, actually. While it may have been a problem in
2002 when that article was written, it really isn't a common problem today.
For that matter, I don't think it was all that common a problem in 2002. But
anyway, nowadays, proxy servers tend to be well-behaved; if you don't want a
file to be cached, there are all sorts of META tags you can embed in the
page to instruct proxies.

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312133
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Auto-append params

2008-09-06 Thread Darren Houle
Thanks Dave, I was kinda thinking the same thing... you just saved me some work!

Darren




 I have files in a subdir under an application.cfc.
 
 I'd like to automatically append a specific myvar=somevalue 
 to every hyperlink on these pages. Is there a way I can use 
 onRequest and regular expressions to re-write paths before 
 they're output back to the browser?

Yes, you can. You'd have something like this:

cffunction name=onRequest
   cfargument name=targetPage
   cfsavecontent var=page
   cfinclude template=#Arguments.targetPage#
   /cfsavecontent
   !--- your regex stuff goes here ---
   cfoutput#page#/cfoutput
/cffunction

Alternatively, you could append data to links with JavaScript. This is very
easy to do, since all the links are in the document.links array. This would
perform better, but would obviously only work for clients that have
JavaScript enabled.

 In case you're wondering why, I'm following Philip Chalmers 
 suggestion (http://coldfusion.sys-con.com/node/41749) about 
 adding random numbers to url params and form actions so proxy 
 servers never cache dynamic pages.

I don't recommend you do this, actually. While it may have been a problem in
2002 when that article was written, it really isn't a common problem today.
For that matter, I don't think it was all that common a problem in 2002. But
anyway, nowadays, proxy servers tend to be well-behaved; if you don't want a
file to be cached, there are all sorts of META tags you can embed in the
page to instruct proxies.

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information! 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312134
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfgrid bind component path not working

2008-09-06 Thread Brad Wood
An update:  This does work if I use the following syntax:
bind=url:/com/myapp/www/DAOs/userDAO.CFC?method=getAllUsersetc...

I never did figure out how to use the cfc: syntax since Ajax calls that CF 
created kept looking in the root folder for the CFC.

I would still like someone to explain that one to me.

~Brad

- Original Message - 
From: Brad Wood [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Saturday, September 06, 2008 12:42 PM
Subject: cfgrid bind component path not working


I experimenting with binding an HTML cfgrid to a CFC and I'm having 
troubles.

 cfgrid format=html name=grd_list_users 
 bind=cfc:com.myapp.www.DAOs.userDAO.getAllUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})

 The cfc is web-accessible in the following path: 
 www.myserver.com/com/myapp/www/DAOs/userDAO.cfc

 The docs say: The componentPath value must be a dot-delimited path from 
 the web root or the directory that contains the current page.

 However, when the page loads, I get this error in my cfdebug window:
 http: Error invoking CFC /userDAO.cfc : Not Found

 ColdFusion seems to just be chopping off all those directories and simply 
 looking for the CFC in the web root.  Why the heck would it do that?

 I can't find anything in the docs that explain it, and what is killing me 
 is EVERY single example I can find always just uses the cfc in the web 
 root, or in the same location as the main file.  It's the curse of the 
 abundance of over-simplified examples...  I must be missing something 
 obvious.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312135
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfgrid bind component path not working

2008-09-06 Thread Azadi Saryev
is any of the directories in the path to your cfc a CF mapping or a
virtual dir?
i had trouble binding to components in a virtual dir path - had to move
them to a dir physically under web root... and components in a cf mapped
dir do not bind.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Brad Wood wrote:
 An update:  This does work if I use the following syntax:
 bind=url:/com/myapp/www/DAOs/userDAO.CFC?method=getAllUsersetc...

 I never did figure out how to use the cfc: syntax since Ajax calls that CF 
 created kept looking in the root folder for the CFC.

 I would still like someone to explain that one to me.

 ~Brad

 - Original Message - 
 From: Brad Wood [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 Sent: Saturday, September 06, 2008 12:42 PM
 Subject: cfgrid bind component path not working


   
 I experimenting with binding an HTML cfgrid to a CFC and I'm having 
 troubles.

 cfgrid format=html name=grd_list_users 
 bind=cfc:com.myapp.www.DAOs.userDAO.getAllUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})

 The cfc is web-accessible in the following path: 
 www.myserver.com/com/myapp/www/DAOs/userDAO.cfc

 The docs say: The componentPath value must be a dot-delimited path from 
 the web root or the directory that contains the current page.

 However, when the page loads, I get this error in my cfdebug window:
 http: Error invoking CFC /userDAO.cfc : Not Found

 ColdFusion seems to just be chopping off all those directories and simply 
 looking for the CFC in the web root.  Why the heck would it do that?

 I can't find anything in the docs that explain it, and what is killing me 
 is EVERY single example I can find always just uses the cfc in the web 
 root, or in the same location as the main file.  It's the curse of the 
 abundance of over-simplified examples...  I must be missing something 
 obvious.
 


 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312136
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfgrid bind component path not working

2008-09-06 Thread Brad Wood
They are not virtual directories.  They are bona fide, honest-to-goodness 
directories.

~Brad

- Original Message - 
From: Azadi Saryev [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Saturday, September 06, 2008 11:49 PM
Subject: Re: cfgrid bind component path not working


 is any of the directories in the path to your cfc a CF mapping or a
 virtual dir?
 i had trouble binding to components in a virtual dir path - had to move
 them to a dir physically under web root... and components in a cf mapped
 dir do not bind.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312137
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfgrid bind component path not working

2008-09-06 Thread Azadi Saryev
hmm... can;t recall now if you must have access=remote set in the
function you are binding to or not...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Brad Wood wrote:
 They are not virtual directories.  They are bona fide, honest-to-goodness 
 directories.

 ~Brad

 - Original Message - 
 From: Azadi Saryev [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 Sent: Saturday, September 06, 2008 11:49 PM
 Subject: Re: cfgrid bind component path not working


   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312138
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfgrid bind component path not working

2008-09-06 Thread Brad Wood
Yeah, you do.  It throws an error if you don't.
Here's the thing though-- the whole access of the function/CFC doesn't even 
come into play if your Ajax call can't find it in the first place.

I am telling CF exactly where my CFC is, but CF is ignoring the component 
path I give it and creating JavaScript that attempts to find the CFC in the 
web root like so:
/userDAO.cfc

~Brad


- Original Message - 
From: Azadi Saryev [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Saturday, September 06, 2008 11:57 PM
Subject: Re: cfgrid bind component path not working


 hmm... can;t recall now if you must have access=remote set in the
 function you are binding to or not...
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312139
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfgrid bind component path not working

2008-09-06 Thread Azadi Saryev
strange indeed... where is you calling page located in relation to the
path you specify to your cfc?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Brad Wood wrote:
 Yeah, you do.  It throws an error if you don't.
 Here's the thing though-- the whole access of the function/CFC doesn't even 
 come into play if your Ajax call can't find it in the first place.

 I am telling CF exactly where my CFC is, but CF is ignoring the component 
 path I give it and creating JavaScript that attempts to find the CFC in the 
 web root like so:
 /userDAO.cfc

 ~Brad

   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312140
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfgrid bind component path not working

2008-09-06 Thread Brad Wood
It is located in the root directory:  /index.cfm

I think that might be why it is looking there even though it doesn't make 
sense.

What is funny is that I KNOW ColdFusion understands the component path, 
because if I misspell anything, I get a runtime CF error that it couldn't 
find the component.  Yet, as soon as CF begins generating the cfgrid stuff, 
it seems to forget.  Nowhere in any of the docs have I found a statement 
saying Your CFC must be in the same directory as the calling page.

~Brad

- Original Message - 
From: Azadi Saryev [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Sunday, September 07, 2008 12:08 AM
Subject: Re: cfgrid bind component path not working


 strange indeed... where is you calling page located in relation to the
 path you specify to your cfc?


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312141
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfgrid bind component path not working

2008-09-06 Thread Azadi Saryev
Brad Wood wrote:
 Nowhere in any of the docs have I found a statement 
 saying Your CFC must be in the same directory as the calling page.

 ~Brad
   


it does not have to be in the same dir, that's for sure.
i just ran some quick tests and was able to bind a grid to a cfc no
matter where i put it, or where the calling page was located in relation
to it...
so something else must be at play here... some sort of caching maybe?

Azadi

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312142
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4