Re: variables.whatever isn't defined in CFC

2008-06-23 Thread James Holmes
You need to write a static wrapper CFC that has inside it a reference
to your application scoped CFC. It mirrors the methods and proxies the
calls to your app scoped object.

On Tue, Jun 24, 2008 at 1:22 PM, Ian Rutherford
<[EMAIL PROTECTED]> wrote:
> Okay, I figured out the problem but don't know the answer. I am getting this 
> problem when I try to bind the cfc in a grid because the grid is binding a 
> new copy of the cfc instead of the one created in the application scope:
>
>  selectmode="row"
>
> bind="cfc:cfcs.coupon.getCouponList({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},{active})">
>
> It works if I call it through an invoke command.
>
> The problem I have now is, how can I bind a cfc in a scope?
>
> 

~|
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:308030
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Ian Rutherford
Okay, I figured out the problem but don't know the answer. I am getting this 
problem when I try to bind the cfc in a grid because the grid is binding a new 
copy of the cfc instead of the one created in the application scope:



It works if I call it through an invoke command.

The problem I have now is, how can I bind a cfc in a scope? 

~|
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:308029
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Anybody using POIUtility.cfc to import from Excel?

2008-06-23 Thread Tyler Fitch
There's a version of the POI library buried in the CF installation and you
could replace it with the newer version from the Apache group.  But I
wouldn't recommend that as it could unexpectedly break some of CF in built
functionality.  Personally I've used Mark Mandel's JavaLoader to reference
the newer version 3.0 version of the POI lib.  This requires a little
tweaking of Ben Nadel's POIUtility.cfc's instantiation of the POI Java
classes, but it gives you ability to read the latest and greatest Excel
files which was worth it to me.

The good news is that I was talking with some engineers from the CF team at
CFUnited last week and they've already updated the POI library that comes
with CF to be the latest and greatest.  So in the future this will be less
of a problem, but that's the future and not now.

t

On Mon, Jun 23, 2008 at 8:12 PM, Les Mizzell <[EMAIL PROTECTED]> wrote:

> >>  After upgrading to the newer 3.0.2 version I had less issues.
>
>
> Heh - gotta love this:
>
> "The Jakarta POI (Poor Obfuscation Implementation) API is a fantastic
> way for Java programmers to access Microsoft document formats. The most
> mature API from Jakarta POI is the HSSF (Horrible Spreadsheet Format)
> API, which accesses Microsoft Excel documents."
>
> If I can figure out how to upgrade/install/whatever files on the server
> (CF7 running on IIS), maybe I'm in business.
>
> I'm still Googling, but if anybody has a good reference on how to
> install this, point me in the direction...
>
> 

~|
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:308028
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Why do I need getters/setters?

2008-06-23 Thread Dave Watts
> One thing that's messin' up my head is, these cfc's are 
> usually stored in application scope. This information looks 
> more like personalized info, which is usually stored in 
> session scope. 
> 
> I'm not understanding how info doesn't get crossed up between 
> users. lol!

Well, the example I created was pulled right out of my ... imagination. But
if you create different object instances for each user, and store those in
each user's session, the fact that you have the same structure for each of
those instances doesn't matter at all.

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:308027
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Ian Rutherford
That was a typo. I need the argument because I feed in the ds name when I run 
the init code. 

~|
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:308026
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Ian Rutherford
OnApplicationStart 

~|
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:308024
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Why do I need getters/setters?

2008-06-23 Thread Will Tomlinson
>
>
>
>   
>   
>   
>   
>   
>
>

Thanks dave! Oops Dave (ahemm)

One thing that's messin' up my head is, these cfc's are usually stored in 
application scope. This information looks more like personalized info, which is 
usually stored in session scope. 

I'm not understanding how info doesn't get crossed up between users. lol! 

Thanks,
Will 

~|
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:308025
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Ian Rutherford
Yep, it is defined there. 

~|
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:308023
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Will Tomlinson
> I'm just beginning to work with CFC's, so I'm in no position
> to be able to validate your code, however (and it's probably
> just a typo in your email), I did notice a missing ">" at the
> end of this line:

Hey Rick, I started playin around with Coldbox today. Man you gotta give it a 
whirl. It kicks *ss!!

Will 

~|
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:308022
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread James Holmes
Further to this, in which method in Application.cfc is this code being run?

On Tue, Jun 24, 2008 at 12:04 PM, James Holmes <[EMAIL PROTECTED]> wrote:
> You've dumped application.admin.ds to make sure something is in that?
>
> On Tue, Jun 24, 2008 at 11:55 AM, Ian Rutherford
> <[EMAIL PROTECTED]> wrote:
>> I restarted CF several times to make sure.
>
> --
> mxAjax / CFAjax docs and other useful articles:
> http://www.bifrost.com.au/blog/
>



-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
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:308021
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread James Holmes
You've dumped application.admin.ds to make sure something is in that?

On Tue, Jun 24, 2008 at 11:55 AM, Ian Rutherford
<[EMAIL PROTECTED]> wrote:
> I restarted CF several times to make sure.

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
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:308020
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: variables.whatever isn't defined in CFC

2008-06-23 Thread Rick Faircloth
I'm just beginning to work with CFC's, so I'm in no position
to be able to validate your code, however (and it's probably
just a typo in your email), I did notice a missing ">" at the
end of this line:

 line.

Just a guess...

Rick

> -Original Message-
> From: Ian Rutherford [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 23, 2008 11:35 PM
> To: CF-Talk
> Subject: variables.whatever isn't defined in CFC
> 
> I'm trying to create a cfc in my application scope but the variables I set in 
> the init method
don't seem
> to be persistent.
> 
> Here is the init method:
> 
> 
> 
>returntype="coupon">
>  
>   
>   
> 
> Here's the call in the Application.cfc
> 
>  "coupon").init(application.admin.ds)>
> 
> Here is the method that throws the "variables.ds not defined error"
> 
>  debug="Yes">
>dbvarname="@Active"
> value="#arguments.Active#" null="No">
>dbvarname="@Sort"
> value="#arguments.gridSortColumn#" null="No">
>   
>   
> 



~|
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:308019
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Will Tomlinson
>I restarted CF several times to make sure.

I don't know that I've ever had a problem with this, other than forgetting to 
restart it. 

You can try this. Setup a method like so

  
  


Run it from a page and see if your dsn is there:

 

~|
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:308018
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Ian Rutherford
I restarted CF several times to make sure. 

~|
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:308017
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Will Tomlinson
>The cfc is in the application scope. How can I tell if variables.ds is 
>persistent?

Have you made sure the app was restarted after any changes you may have made? 
You either need to restart cf, run onApplicationStart() again, etc. 

If you make changes and don't restart your app, you'll get undefined errors 
like that. 



~|
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:308016
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Ian Rutherford
The cfc is in the application scope. How can I tell if variables.ds is 
persistent? 

~|
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:308015
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: variables.whatever isn't defined in CFC

2008-06-23 Thread Will Tomlinson
> I'm trying to create a cfc in my application scope but the variables I 
> set in the init method don't seem to be persistent.
> 

Start dumping everything. Dump application scope, etc. see what's in there.

Will 

~|
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:308014
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


variables.whatever isn't defined in CFC

2008-06-23 Thread Ian Rutherford
I'm trying to create a cfc in my application scope but the variables I set in 
the init method don't seem to be persistent.

Here is the init method:








Here's the call in the Application.cfc 



Here is the method that throws the "variables.ds not defined error"





 

~|
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:308013
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Anybody using POIUtility.cfc to import from Excel?

2008-06-23 Thread Les Mizzell
>>  After upgrading to the newer 3.0.2 version I had less issues.


Heh - gotta love this:

"The Jakarta POI (Poor Obfuscation Implementation) API is a fantastic 
way for Java programmers to access Microsoft document formats. The most 
mature API from Jakarta POI is the HSSF (Horrible Spreadsheet Format) 
API, which accesses Microsoft Excel documents."

If I can figure out how to upgrade/install/whatever files on the server 
(CF7 running on IIS), maybe I'm in business.

I'm still Googling, but if anybody has a good reference on how to 
install this, point me in the direction...

~|
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:308012
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Anybody using POIUtility.cfc to import from Excel?

2008-06-23 Thread Les Mizzell
Tyler Fitch wrote:
> Hi Les,
> 
> Are you working with Excel 2007 files?  

Yea, darnit! Weird - one file will import fine, the next will toss an 
error.  I can create all the spreedsheet files I want in Open Office, 
save them as Excel files and every single one of them works. Go figure.

Client has been importing huge list, and this one list with only 10 rows 
throws an error. Sheesh...

I though about attempting a utility that would let SQL Server do the 
work, but I'm not that great with complex SQL Server stuff and don't 
think I could pull it off. Plus, the formatting of the Excel sheets 
*vary*, and I've got CF code that accounts for that.

Today was the first sheet they couldn't import. Once they gave it to me, 
I got it to work by just putting "something" in the blank cells (spaces).


> I've had issues with reading the
> latest version of Excel files using the version of the POI library included
> in CF.  After upgrading to the newer 3.0.2 version I had less issues.

I can upgrade the library? Not my server, but I have access. I'll check 
that out.

~|
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:308011
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Why do I need getters/setters?

2008-06-23 Thread Dave Watts
> I'm just not understanding why I'd need a getter and a setter 
> in my cfc. 
> 
> ...
>
> What is the value of keeping each value in its own variables 
> scoped variable? Where does it come in handy? Where are you 
> supposed to use it?

As many people have mentioned, you don't need getters and setters. However,
they do provide a potential value.

If you're creating a value object - an object whose sole purpose is to map
to a specific database record, generally - you don't want to embed business
logic in that object. So, you could create something like this:












Those variables, being public, could then be manipulated by users of the
value object:



 ...

And, honestly, in many environments that might be sufficient. However, what
if you want to provide basic validation within your value object? Or what if
you want to ensure that the values you retrieve from your value object are
the right datatype? You won't be able to do that with public variables;
instead, you'd need getters and setters:





















...



In the above example, the object is in charge of setting its own internal
values, and can validate inputs to do so.

Now, honestly, in many cases people don't bother doing that, or there aren't
any meaningful validation tests to perform, so people build the simplest
possible getters and setters, and they don't do anything beyond providing
encapsulation. But still, this can be valuable, as you can add validation at
any time without breaking the use of those components.

The value of getters and setters is a little more obvious in languages like
Java and ActionScript 3, which let you provide method names that can be
invoked as if they were the actual properties themselves:

private var name:String;

private function set name(newName):String
{
name = newName;
}



myObj.name = "Dave"; // this would call the method described above

If you want to provide the encapsulation, but don't want to bother writing
the code, there are a couple of approaches you can take. In CF8, you can use
onMissingMethod to write one generic method that would respond to calls for
specific getters and setters that don't actually exist. Or, better yet (in
my own personal opinion) you could use one of the many, many code generators
that let you point to a database table and generate value objects (and DTOs,
gateway/assembler objects, etc). Since you can use these to reduce your time
spent to nearly zero, there isn't much reason not to.

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:308010
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: How to select an entry from an array

2008-06-23 Thread C S
>Just remember to add 1 to the result.

And remember java will perform a case sensitive search. So indexOf("XYZ") may 
return different results than indexOf("xyz").






index1 = #index1#
index2 = #index2#
 

~|
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:308009
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How to select an entry from an array

2008-06-23 Thread Fred Anderson
I am still interested to hear back from Nic on what the original
problem/task was. Is the Array something in session or is it value that
needs to be passed through the form?

Fred

On Mon, Jun 23, 2008 at 8:26 PM, James Holmes <[EMAIL PROTECTED]>
wrote:

> You can also use the underlying Java object's indexOf() method:
>
> 
>
> Just remember to add 1 to the result.
>
> On Tue, Jun 24, 2008 at 6:08 AM, Bobby Hartsfield <[EMAIL PROTECTED]>
> wrote:
> > This will either return 0 if the string isn't found or the array position
> in
> > which it was found
> >
> > 
> > function searchArray(arr,str)
> > {
> >var retVal = 0;
> >for(i=1; i lte arraylen(arr); i=i+1)
> >{
> >if (arr[i] is str)
> >{
> >retVal = i;
> >break;
> >}
> >}
> >return retVal;
> > }
> > 
> >
> > Just use it like
> >
> > #searchArray(myArray,'XYZ')#
>
> --
> mxAjax / CFAjax docs and other useful articles:
> http://www.bifrost.com.au/blog/
>
> 

~|
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:308008
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Why do I need getters/setters?

2008-06-23 Thread s. isaac dealey
> Just to be difficult,

You mean like this: 

















-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 617.365.5732

http://onTap.riaforge.org/blog



~|
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:308007
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How to select an entry from an array

2008-06-23 Thread James Holmes
You can also use the underlying Java object's indexOf() method:



Just remember to add 1 to the result.

On Tue, Jun 24, 2008 at 6:08 AM, Bobby Hartsfield <[EMAIL PROTECTED]> wrote:
> This will either return 0 if the string isn't found or the array position in
> which it was found
>
> 
> function searchArray(arr,str)
> {
>var retVal = 0;
>for(i=1; i lte arraylen(arr); i=i+1)
>{
>if (arr[i] is str)
>{
>retVal = i;
>break;
>}
>}
>return retVal;
> }
> 
>
> Just use it like
>
> #searchArray(myArray,'XYZ')#

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
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:308006
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Help with Flash Remoting with AS3/Flash/CF

2008-06-23 Thread Jo�o_Fernandes
Tom,
If your only need is to have clients in sync but with no data-conflict 
resolution, you can try BlazeDS which provides you messaging support 
using an AMF channel. With Messaging you can push changes to clients and 
with some logic at the client, you could update your application and get 
the desired behavior.
Messaging classes are also Flex related so you might have to import them 
to the Flash IDE.


-- 

João Fernandes

http://www.onflexwithcf.org
http://www.riapt.org
Portugal Adobe User Group (http://aug.riapt.org)



~|
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:308005
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Help with Flash Remoting with AS3/Flash/CF

2008-06-23 Thread Tom Smith
Thats the macro/polo version. Problem I had with bringing in variables that way 
is they don't compare properly. My if statements will not properly compare them 
so I can actually do something with them. Like i could set 
value1=mystring&value2=mystring, and try to compare them if (value1==value2) 
and it couldn't figure out that they were indeed equal. I actually brought this 
issue to MAX tried to stir up some answers, and the only version that actually 
worked was to pass them as a url query. That won't work now though cause I need 
to send/recieve every 5 seconds. I even went to the after hours Flash feedback 
session with the ppl that made it, and they couldn't help me. They just seem to 
write off Flash remoting as the solution. Yeah well lot of good that does me 
now. Funny they seemed to push AS3 so hard, yet it seems like a very rushed 
language. No documentation on handling extrenal data, nobody there could 
"figure it out", more than half their components don't function in AS3. I look 
forward to revisiting it at MAX 08. But in the meantime I still have to get 
this done. Here is what I need to accomplish

Query a datapage every 5 seconds so I can compare variables, retereived from a 
database. Mimic real-time swf changes based off these variable results. They 
have to be able to compare proerly. For example if 50 ppl have the same swf 
open, and I make a change to the DB, it needs to make a swf change based off 
that info. End result, all 50 ppl see the new swf within 5 seconds of the DB 
change.

Any ideas?

~|
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:308004
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Help with Flash Remoting with AS3/Flash/CF

2008-06-23 Thread Tom Smith
Thats the macro/polo version. Problem I had with bringing in variables that way 
is they don't compare properly. My if statements will not properly compare them 
so I can actually do something with them. Like i could set 
value1=mystring&value2=mystring, and try to compare them if (value1==value2) 
and it couldn't figure out that they were indeed equal. I actually brought this 
issue to MAX tried to stir up some answers, and the only version that actually 
worked was to pass them as a url query. That won't work now though cause I need 
to send/recieve every 5 seconds. I even went to the after hours Flash feedback 
session with the ppl that made it, and they couldn't help me. They just seem to 
write off Flash remoting as the solution. Yeah well lot of good that does me 
now. Funny they seemed to push AS3 so hard, yet it seems like a very rushed 
language. No documentation on handling extrenal data, nobody there could 
"figure it out", more than half their components don't function in AS3. I look 
forward to revisiting it at MAX 08. But in the meantime I still have to get 
this done. Here is what I need to accomplish

Query a datapage every 5 seconds so I can compare variables, retereived from a 
database. Mimic real-time swf changes based off these variable results. They 
have to be able to compare proerly. For example if 50 ppl have the same swf 
open, and I make a change to the DB, it needs to make a swf change based off 
that info. End result, all 50 ppl see the new swf within 5 seconds of the DB 
change.

Any ideas? and thanks for your help thus far.

~|
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:308003
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: How to select an entry from an array

2008-06-23 Thread Bobby Hartsfield
This will either return 0 if the string isn't found or the array position in
which it was found


function searchArray(arr,str)
{
var retVal = 0;
for(i=1; i lte arraylen(arr); i=i+1)
{
if (arr[i] is str)
{
retVal = i;
break;
}
}
return retVal;
}


Just use it like

#searchArray(myArray,'XYZ')#
 
..:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-Original Message-
From: nic olai [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 8:54 AM
To: CF-Talk
Subject: How to select an entry from an array

Hi all,

i want to send data with a post form. In the next step i want to check which
entry of an array includes the selected data. 

For example:
In the form the user selected the 2nd entry which includes XYZ in an
dropdown (select) field and submit the form. 
How can i check which entry of the array myarraytest[] includes the data
XYZ.

Thank you & best regards
nic. 



~|
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:308002
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: "Accept-Encoding" missing from GetHttpRequestData()

2008-06-23 Thread Dave Watts
> Thanks Dave, I see that now ... So it's not a CF problem, 
> that part is good.  If only I could track down where it's 
> coming from.  I think it's from McAfee, but I have no "Proxy" 
> settings in McAfee & I just tried turning it all off and 
> still get the "X-McProxyFilter" header.  I'm heading out into 
> the non-CF world to keep looking for answers -- if any of you 
> know any more, please let me know.

http://discuss.joelonsoftware.com/default.asp?joel.3.440550.5

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:308001
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: "Accept-Encoding" missing from GetHttpRequestData()

2008-06-23 Thread TechInfo
Dave Watts wrote:
>> I was about to try some gzip compression of CSS files, but 
>> found that CF's GetHttpRequestData().headers doesn't include 
>> the "Accept-Encoding" 
>> field when I hit the page from windows with Firefox (2 or 3) 
>> or IE7, but when I use Firefox Add-on "Live Http Headers", I 
>> see "Accept-Encoding: 
>> gzip,deflate"
>>
>> Does anyone know why the "Accept-Encoding" field is missing from
>> GetHttpRequestData() ??
>>
>> Here's my test page, where I call GetHttpRequestData() then 
>>  the result.
>>
>> http://dragonflygirl.com/testgzip.cfm
>> 
>
> When I go to your URL, it shows up for me (FF3). In your screenshot, there's
> an "X-McProxyFilter" header, which may be removing the value.
>   
Yes -- it was McAfee Redirector Service causing the trouble.  I turned 
that off and all is well now, thanks.

But it DOES mean that anyone who has this service running won't get my 
new compressed CSS either, which is too bad.

Jevo

~|
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:308000
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: "Accept-Encoding" missing from GetHttpRequestData()

2008-06-23 Thread TechInfo
Dave Watts wrote:
>> I was about to try some gzip compression of CSS files, but 
>> found that CF's GetHttpRequestData().headers doesn't include 
>> the "Accept-Encoding" 
>> field when I hit the page from windows with Firefox (2 or 3) 
>> or IE7, but when I use Firefox Add-on "Live Http Headers", I 
>> see "Accept-Encoding: 
>> gzip,deflate"
>>
>> Does anyone know why the "Accept-Encoding" field is missing from
>> GetHttpRequestData() ??
>>
>> Here's my test page, where I call GetHttpRequestData() then 
>>  the result.
>>
>> http://dragonflygirl.com/testgzip.cfm
>> 
>
> When I go to your URL, it shows up for me (FF3). In your screenshot, there's
> an "X-McProxyFilter" header, which may be removing the value.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
>   
Thanks Dave, I see that now ... So it's not a CF problem, that part is 
good.  If only I could track down where it's coming from.  I think it's 
from McAfee, but I have no "Proxy" settings in McAfee & I just tried 
turning it all off and still get the "X-McProxyFilter" header.  I'm 
heading out into the non-CF world to keep looking for answers -- if any 
of you know any more, please let me know.

Thanks,
Jevo


~|
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:307999
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Help with Flash Remoting with AS3/Flash/CF

2008-06-23 Thread Dave Watts
> You need to work with your interaction as form data and 
> strings.

I don't think that's Flash Remoting (RemoteObject).

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:307998
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: "Accept-Encoding" missing from GetHttpRequestData()

2008-06-23 Thread Dave Watts
> I was about to try some gzip compression of CSS files, but 
> found that CF's GetHttpRequestData().headers doesn't include 
> the "Accept-Encoding" 
> field when I hit the page from windows with Firefox (2 or 3) 
> or IE7, but when I use Firefox Add-on "Live Http Headers", I 
> see "Accept-Encoding: 
> gzip,deflate"
> 
> Does anyone know why the "Accept-Encoding" field is missing from
> GetHttpRequestData() ??
> 
> Here's my test page, where I call GetHttpRequestData() then 
>  the result.
> 
> http://dragonflygirl.com/testgzip.cfm

When I go to your URL, it shows up for me (FF3). In your screenshot, there's
an "X-McProxyFilter" header, which may be removing the value.

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:307997
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Anybody using POIUtility.cfc to import from Excel?

2008-06-23 Thread Tyler Fitch
Hi Les,

Are you working with Excel 2007 files?  I've had issues with reading the
latest version of Excel files using the version of the POI library included
in CF.  After upgrading to the newer 3.0.2 version I had less issues.

HTH,

t

On Mon, Jun 23, 2008 at 1:46 PM, Les Mizzell <[EMAIL PROTECTED]> wrote:

> I've got it working pretty darned good - except for one problem. If
> there's a NULL cell in the Excel sheet, it's throwing an error
>
> "Element CELL is undefined in LOCAL."
>
> LOCAL.CellType = LOCAL.Cell.GetCellType();
>
>
> If I go into my Excel sheet and just enter a space in the cells, no error.
>
> So, I'm trying a try/catch block to force the cell type to string (1),
> if it's NULL since I know that's what all the values are in the sheets
> being used anyway:
>
> for (
>LOCAL.ColumnIndex = 0 ;
>LOCAL.ColumnIndex LT LOCAL.ColumnCount ;
>LOCAL.ColumnIndex = (LOCAL.ColumnIndex + 1)
> ){
>
>   LOCAL.Cell = LOCAL.Row.GetCell( JavaCast( "int", LOCAL.ColumnIndex ));
>
>
> // Get the type of data in this cell.
>
> try {
> LOCAL.CellType = LOCAL.Cell.GetCellType();
>  } catch(any excpt)
>  {
>LOCAL.CellType = 1
>  }
>
>
> But, that doesn't seem to be working either.
>
> Anybody got a clue?
>
> 

~|
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:307996
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


"Accept-Encoding" missing from GetHttpRequestData()

2008-06-23 Thread TechInfo
I was about to try some gzip compression of CSS files, but found that 
CF's GetHttpRequestData().headers doesn't include the "Accept-Encoding" 
field when I hit the page from windows with Firefox (2 or 3) or IE7, but 
when I use Firefox Add-on "Live Http Headers", I see "Accept-Encoding: 
gzip,deflate"

Does anyone know why the "Accept-Encoding" field is missing from 
GetHttpRequestData() ??

Here's my test page, where I call GetHttpRequestData() then  the 
result.

http://dragonflygirl.com/testgzip.cfm

FYI, This is Windows 2003 server, CF 8.0.0.175276

Thanks in advance,
Jevo (Jann VanOver)

~|
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:307995
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Anybody using POIUtility.cfc to import from Excel?

2008-06-23 Thread Les Mizzell
I've got it working pretty darned good - except for one problem. If 
there's a NULL cell in the Excel sheet, it's throwing an error

"Element CELL is undefined in LOCAL."

LOCAL.CellType = LOCAL.Cell.GetCellType();


If I go into my Excel sheet and just enter a space in the cells, no error.

So, I'm trying a try/catch block to force the cell type to string (1), 
if it's NULL since I know that's what all the values are in the sheets 
being used anyway:

for (
LOCAL.ColumnIndex = 0 ;
LOCAL.ColumnIndex LT LOCAL.ColumnCount ;
LOCAL.ColumnIndex = (LOCAL.ColumnIndex + 1)
 ){

   LOCAL.Cell = LOCAL.Row.GetCell( JavaCast( "int", LOCAL.ColumnIndex ));


// Get the type of data in this cell.

try {
 LOCAL.CellType = LOCAL.Cell.GetCellType();
  } catch(any excpt)
  {
LOCAL.CellType = 1
  }


But, that doesn't seem to be working either.

Anybody got a clue?

~|
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:307994
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Webservice 2 WSDL's Overwriting Class Files...

2008-06-23 Thread jonese
Hey everyone i need some help.

I'm currently interfacing with the NCBI Entrez Utilities Web Service
(version 1.5) -
http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html.
I've tried to implement the 2.0 version but they broke out the eutili
and efetch functionality. So for version 2.0 I'm accessing the eutil
wsdl and then using data from that accessing the efetch_pubmed wsdl.
I'm accessing these WSDL's (as well as 1.5) using the JAVA classes
directly (I've moved the files from the stubs folder to their
respective position under lib).

The issue is that when i call the eutil and CF runs the WSDL2JAVA it
generates code with a path of "gov.nih.nlm.ncbi.www.soap.eutils" THEN
when i run the efetch_pubmed it ALSO generates a pathing of
"gov.nih.nlm.ncbi.www.soap.eutils" The difference here is it adds a
subfolder called efetch_pubmed BUT it also overwrites the
"EUtilsServiceSoap.class" AND "EUtilsServiceSoapStub.class". I figured
this was OK but upon further inspection i see that the methods in the
"EUtilsServiceSoapStub.class" CHANGE between the eutils wsdl and the
efetch_pubmed wsdl.

Anyone have any idea how i can get this to work? I've tried those two
files but then CF gives me some error about interfaces etc.

Thanks in advance!

jonese
http://www.jonese.us
http://twitter.com/jonese

~|
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:307993
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Help with Flash Remoting with AS3/Flash/CF

2008-06-23 Thread Robert Harrison
You need to work with your interaction as form data and strings. If you are
outputting data to a CF query, submit the flash strings to your cfquery as
form.variables. 

If you are outputting CF data to Flash, output your data to a string, like
this:
&portfolio_id=1|3|4|5&portfolio_ico=Name1|Name3|Name4|Name5&portfolio_name=i
con1.jpg|icon3.jpg|icon4.jpg|icon5.jpg&c_name=Bay Fireworks|Provident
Bank|Bronx-Lebanon Hospital|Intrepid Sea Air %26#38; Space Museum

Above, the | is a delimiter. 

You'll need to do some special character handling too, as flash chokes on
some characters. Before you output to flash be sure to replace the
following:

% as %26#37;
& as %26#38;
+ as %26#43;
< as %26#60;
> as %26#62;
| as %26#124;
Carriage Return as 

Here's an example of a cfquery that builds a suitable flash string:




select bio_id, name, title, icon1, icon2
from tbl_bios
where display=1















&nme=#nme#&ttl=#ttl#&ico1=#ico1#&ico2=#ico2#&id=#id#


Hope this helps, at least some...

Robert B. Harrison
Director of Interactive services
Austin & Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.231.6600 Ext. 119 
F : 631.434.7022
www.austin-williams.com

Great advertising can't be either/or... It must be &.



~|
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:307992
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Odd results with error - ideas?

2008-06-23 Thread Les Mizzell
> If you are using querynew() and you are on CF7 or later, use the second
> attribute which is a comma-separated list of data types.


That fixed it. I didn't realize the CF would *guess* a datatype!

So, that's why queries that returned only a few record sets would work! 
Not enough info to "guess" wrong.

Jezz, I was about to rip out my last few strands of hair too! 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:307991
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Odd results with error - ideas?

2008-06-23 Thread Brad Wood
Yeah, change this line here:


Read up here:
http://livedocs.adobe.com/coldfusion/7/htmldocs/0600.htm

Change the line to:


See if that helps keep ColdFusion straight.

(Again, note this was added in CF7)

~Brad

-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 1:57 PM
To: CF-Talk
Subject: Re: Odd results with error - ideas?

Brad Wood wrote:
> I think your problem may stem from the old behavior of ColdFusion
query
> columns guessing what type they are based on values in the first
several
> rows.



Ugly because of line breaks, but here ya go:


~|
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:307990
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Why do I need getters/setters?

2008-06-23 Thread Will Tomlinson
Thank you all for the info. It's most helpful!


Will 

~|
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:307989
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Odd results with error - ideas?

2008-06-23 Thread Les Mizzell
Brad Wood wrote:
> I think your problem may stem from the old behavior of ColdFusion query
> columns guessing what type they are based on values in the first several
> rows.



Ugly because of line breaks, but here ya go:












   
   
   

   
   
   
   
   
   
   
   
   
   



~|
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:307988
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Odd results with error - ideas?

2008-06-23 Thread Brad Wood
I think your problem may stem from the old behavior of ColdFusion query
columns guessing what type they are based on values in the first several
rows.

If the first few records lead CF to believe that a column is an integer,
things can blow up later when it encounters letters in that column.
If the data in the column differs based on the search criteria that can
lead to "occasional" errors.

Please show us the code that creates the q_atty variable.

If you are using querynew() and you are on CF7 or later, use the second
attribute which is a comma-separated list of data types.

~Brad

-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 1:44 PM
To: CF-Talk
Subject: Re: Odd results with error - ideas?

 > I am not sure why you would put both an integer and UUID in the
 > same column

The former owner of the database had an id (integer - auto increment) 
column, and an atty_id column that had integers in it, but was type 
varCHAR. No idea why he did that. In reprogramming the site, I had no 
choice but to keep the data structure, but the varCHAR field was already

set large enough to hold a UUID - so I switched to UUID's at that point.

This shouldn't make any difference that I can see.

> 
> 

It's coming out of the original query from the database as varCHAR, as 
it should be. So, it should be going into the query object as varCHAR 
too, correct?

> especially since you are attempting to perform a sort later on the
same colums.

I'm not doing a sort on the atty_id column. Just the calculated keyCOUNT

value (total number of times the search term appears in a particular 
field), then first_name, last_name.

What I don't understand at all, is that some searches that return a 
small amount of results work fine. A larger returned set of results, 
that could contain the SAME results from the smaller search, will error 
on the atty_id field or a record it didn't error on in the previous 
search. If it *always* errored on the atty_id field when it was a UUID, 
I'd have a better understanding of what was going on.

~|
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:307987
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Coldfusion 8 install question

2008-06-23 Thread Cutter (CFRelated)
Thanks Qing. We just went through a major datacenter migration, brought 
on by growing pains (all outlined in my most recent blog post), so I've 
learned more about CF, JRun, and the JVM in the last nine months than I 
ever thought I would need to know. Mike Brunt's blog postings, on the 
Alagad site, have been an invaluable resource, as have posts from Steven 
Erat, and Sarge Seargent. Takes a little searching, and a lot of testing 
for what works best for your applications, but it is well worth the effort.

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Qing Xia wrote:
> Wow! This is advanced stuff! I have not done anything for the JVM tuning
> yet--so I imagine everything is at its default value now.  Time to dig in
> and see what I can do with them... We have 4 CF 8 instances running on one
> (pretty powerful) virtual server.  So far there has been no performance
> issues, but I am sure there is room for improvement!
> 
> Thanks for the info. :-)
> 
> 
> 
> On Mon, Jun 23, 2008 at 12:38 PM, Cutter (CFRelated) <
> [EMAIL PROTECTED]> wrote:
> 
>> Qing brings up some very good points. You must treat each individual
>> instance of CF as an individual server, and as such upgrades and changes
>> to one will typically not be automatically applied to another. One
>> advantage is that each instance also gets it's own JVM instance, but you
>> must think about this in line with your JVM tuning as well. If your
>> physical server only has 3 GB of RAM, and you're running two instances
>> of CF, then you'll want to make sure that you don't try to allocate a
>> full 1024 MB of memory to your JVM per instance, as you'll want a little
>> more wiggle room for the OS to use. JRun JVM tuning is done directly in
>> the Jrun4\bin\jvm.config, and it's arguments will apply to all JVM
>> instances, unlike the thread tuning arguments you can control within
>> each instance's jrun.xml.
>>
>> Steve "Cutter" Blades
>> Adobe Certified Professional
>> Advanced Macromedia ColdFusion MX 7 Developer
>> _
>> http://blog.cutterscrossing.com
>>
>>  Qing Xia wrote:
>>> Since we are talking about multiple instances, I thought I'd pass along a
>>> couple of things that have caused me much grief:
>>>
>>> 1) Be sure that IIS sites need to be assigned to CF instances using the
>> Web
>>> Server Configuration tool (installation driver\JRun4\bin\wsconfig.exe)
>>>
>>> 2) When you apply CF hot fixes, each instance needs to have the hot fixes
>>> installed for it individually.
>>>
>>>
>>> On Mon, Jun 23, 2008 at 12:11 PM, John P <[EMAIL PROTECTED]> wrote:
>>>
 Thank you both for the info.

 John




> You need to add the data sources into each instance if you plan on
> actually using them.
>
> Unless you have a site using the default instance, you shouldn't need
> any data sources set up there.
>
> I may be wrong, but I seemed to remember if you added data sources to
> your base instance BEFORE creating the other instances, the data
>> sources
> will copy over at the time they are created.
>
> If you are looking for a magical way to have the data sources
> automatically add to all instances at once, try Railo.  :)
>
> Our server admin has set up CF8 with 4 instances. When adding data
> sources I have to add them to the root cfide/administrator rather than
> within the instance example:
> http:mysite.com/:portNumber/cfide/administrator.
>
> Seems like the install might be configured incorrectly, does anyone
>> have
> any experience with setting up multiple instance data sources? Do they
> just go in the root cfide?
>
> Thanks,
>
> John
>>>
>>
> 
> 

~|
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:307986
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Odd results with error - ideas?

2008-06-23 Thread Les Mizzell
 > I am not sure why you would put both an integer and UUID in the
 > same column

The former owner of the database had an id (integer - auto increment) 
column, and an atty_id column that had integers in it, but was type 
varCHAR. No idea why he did that. In reprogramming the site, I had no 
choice but to keep the data structure, but the varCHAR field was already 
set large enough to hold a UUID - so I switched to UUID's at that point. 
This shouldn't make any difference that I can see.

> 
> 

It's coming out of the original query from the database as varCHAR, as 
it should be. So, it should be going into the query object as varCHAR 
too, correct?

> especially since you are attempting to perform a sort later on the same 
> colums.

I'm not doing a sort on the atty_id column. Just the calculated keyCOUNT 
value (total number of times the search term appears in a particular 
field), then first_name, last_name.

What I don't understand at all, is that some searches that return a 
small amount of results work fine. A larger returned set of results, 
that could contain the SAME results from the smaller search, will error 
on the atty_id field or a record it didn't error on in the previous 
search. If it *always* errored on the atty_id field when it was a UUID, 
I'd have a better understanding of what was going on.


~|
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:307985
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Help with Flash Remoting with AS3/Flash/CF

2008-06-23 Thread Dave Watts
> I've been searching everywhere for a Flash Remoting solution 
> that uses AS3 in Flash using Coldfusion. So far I've struck 
> out on solutions. Seems like all the tutorials/examples on 
> the web all use AS2 and the methods are very different. I 
> can't use AS2 cause the flash movie is very processor heavy 
> as it involves videos, so it needs the AS3 performance boast. 
> The flash documentation is poor as well as the web tutorials 
> out there on a start to finish solution. Any AS3 out there 
> seems to be Flex solutions, and I can't use flex for this. 
> All the AS3 books I have don't even cover it or doesn't cover 
> how you recover the variables. It'd be greatly appericated if 
> someone can help me out here.

There's no AS3 class for RemoteObject. It's only provided with Flex. This is
a known issue. Conceivably, you might be able to import the appropriate Flex
class library into your AS3 code.

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:307984
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


How do I export a verity collection?

2008-06-23 Thread Matthew Williams
I hate verity, for so many reasons.  Mostly because it's a pain to administer.  
I'm setting up some CF8 instances for our customers to start testing on, but 
I'm again having issues moving verity collections.  Is there some secret that 
I'm missing when exporting verity collections?  It looks like the CAR file save 
correctly, and it starts to restore correctly, but then it fails.  


Matthew Williams
Geodesic GraFX 

~|
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:307983
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Help with Flash Remoting with AS3/Flash/CF

2008-06-23 Thread Tom Smith
I've been searching everywhere for a Flash Remoting solution that uses AS3 in 
Flash using Coldfusion. So far I've struck out on solutions. Seems like all the 
tutorials/examples on the web all use AS2 and the methods are very different. I 
can't use AS2 cause the flash movie is very processor heavy as it involves 
videos, so it needs the AS3 performance boast. The flash documentation is poor 
as well as the web tutorials out there on a start to finish solution. Any AS3 
out there seems to be Flex solutions, and I can't use flex for this. All the 
AS3 books I have don't even cover it or doesn't cover how you recover the 
variables. It'd be greatly appericated if someone can help me out here. 

~|
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:307982
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Odd results with error - ideas?

2008-06-23 Thread Bilal Soylu
Les,

the datatyping may occur in your first query, especially if you are building on 
to a query that initially retrieves records from the database.
If you are specifically creating a query and have a combination of 
numeric/alpha being returned, you should attempt to type the query columns 
yourself when declaring the Query via a QueryNew().

To check how CF interprets the datatypes do this:




I am not sure why you would put both an integer and UUID in the same column 
especially since you are attempting to perform a sort later on the same colums. 
This would throw off the sort wouldn't it. 
Maybe you might want to determine a constant integer value for any UUID so that 
you can consistently sort by the secondary sort option (name). You could check 
input for correct type with something like IsNumeric(), then insert a constant 
for UUID and the returned number otherwise.

Cheers,
-Bilal
 

~|
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:307981
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Odd results with error - ideas?

2008-06-23 Thread Les Mizzell
> "The value "3C26C422-BCD2-35D3-DDB3F69250F4848F" cannot be converted to 
> a number"


Still scratching my head over this.

Two questions that may or may not have anything to do with my odd problem:

1. What happens if "Descript" below is a NULL value?


2. Can you define the data type in any way for QuerySetCell? (not that I 
can see in the docs...)

~|
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:307980
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Why do I need getters/setters?

2008-06-23 Thread Brian Kotek
As others have pointed out, getters and setters are there for encapsulation.
For example, if you have a getPrice() method on a Product, right now it
might return just a price instance variable. But later you may need to add
in much more complex logic such as tiered pricing for certain customers,
sales, etc. If you weren't using a getter but were instead directly
accessing the "price" instance variable, you'd have problems.

That said, in general getters and setters are evil and I feel they are
overused in may cases. They promote a more procedural programming approach
and fly in the face of good OOP. One should normally not be asking an object
for data, but should be telling the object to DO something based on its
data. Getters and setters do offer encapsulation, but they are actually only
slightly less brittle than direct variable references. The more one
interrogates an object to get at its data, but more one drifts towards a
procedural approach. OO is about telling objects to do something with the
data they contain, not asking them for their data. This is the root of the
saying "Tell, don't ask" in OOP.

In practice about the only time I use a getter is if I have an object and I
am actually outputting its data to the view. And even that is a potentially
strong argument for allowing objects to render themselves instead (through a
composed rendering object of course, the object itself shoudn't know or care
about how it may eventually be presented). I'm still on the fence in that
regard but the idea has a number of advantages. That might be a subject for
another thread though.

Regards,

Brian


On Mon, Jun 23, 2008 at 12:46 PM, Will Tomlinson <[EMAIL PROTECTED]>
wrote:

> I'm just not understanding why I'd need a getter and a setter in my cfc.
>
> My app works just fine without setting anything in the variables scope of
> my cfcs. You submit a form, it adds the values to my db. You run a query and
> get all the values back out.
>
> What is the value of keeping each value in its own variables scoped
> variable? Where does it come in handy? Where are you supposed to use it?
>
> Here's a few lines from the legacy samples.
>
> 
>
>
> 
>  output="false">
>  
> 
>
> Guess I'm missing something since I don't have an OO background. Googled a
> little but still confused.
>
> Thanks,
> Will
>
> 

~|
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:307979
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Why do I need getters/setters?

2008-06-23 Thread Rich Kroll
Will,
Many of the ideas within OO are to promote encapsulation, easy reuse, and
increased maintainabilty.  In your example, it may be much easier to submit
a form to a page that takes those values and adds them to the database.  But
for example lets say you are storing a "customer", and that you must ensure
that there are no illeagal characters in their name.  In your example, this
can easily be done inline in the page, but what if you have multiple places
where a customer can be entered?  What about the SQL necessary to store this
customer?  Using OO, each of these operations is in exactly one place, and
all your other code leverages that single place.  This is one of a myrid of
problems that OO attempts to solve.  You gain flexibility and
maintainability but at the cost of an increased learning curve and
additional complexity.

HTH,
Rich


~|
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:307978
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Why do I need getters/setters?

2008-06-23 Thread Alan Rother
Just to be difficult,

>>>
You cannot set or get the variables scope directly, so you need the getter
and setter to do this.
>>>

Actually, in Coldfusion you can. Of course, you have to reference them
somewhere else in you CFC if you want to access them from outside your CFC,
but it doesnt HAVE to be specific getter and setter methods. Using G/S
methods is just the right way to do it, from a best practices standpoint.


=]


-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


~|
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:307977
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Why do I need getters/setters?

2008-06-23 Thread Josh Nathanson
One word: encapsulation.

The variables scope allows you to have instance data that is specific to a 
particular instantiation of an object.  So does the "this" scope, but this 
is less preferred, as it makes the properties directly available outside the 
CFC.

You cannot set or get the variables scope directly, so you need the getter 
and setter to do this.

It sounds like maybe you are talking about singletons, where you only have 
one instance of an object.  In this case you don't need getters and setters, 
since you are not setting instance data, other than perhaps a datasource 
name, which can be set the init method.

In your example below with the LastName getter and setter, you might have a 
Person class which has those getters and setters.  So you might do this:







#person1.getLastName()#, #person2.getLastName()# --  
outputs "Jones, Smith"

Now, you might want to get fancy and "do something" with the last name, for 
example remove any commas so it won't break a cfmail.  You can then do this 
in your getter:


 


This will be done for all and any last names, and you never have to worry 
about it again.

-- Josh



- Original Message - 
From: "Will Tomlinson" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Monday, June 23, 2008 9:46 AM
Subject: Why do I need getters/setters?


> I'm just not understanding why I'd need a getter and a setter in my cfc.
>
> My app works just fine without setting anything in the variables scope of 
> my cfcs. You submit a form, it adds the values to my db. You run a query 
> and get all the values back out.
>
> What is the value of keeping each value in its own variables scoped 
> variable? Where does it come in handy? Where are you supposed to use it?
>
> Here's a few lines from the legacy samples.
>
> 
> 
> 
> 
>  output="false">
>  
> 
>
> Guess I'm missing something since I don't have an OO background. Googled a 
> little but still confused.
>
> Thanks,
> Will
>
> 

~|
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:307976
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Why do I need getters/setters?

2008-06-23 Thread Brad Wood
The theory behind getters and setters is abstraction. You are not
"supposed" to deal with the data directly nor are you "supposed" to know
how the data is stored and how the object works.  You create an object
and let it do the work for you.  Getters and Setters hide implementation
details of the object from the user.  They don't always have to be a
simple example.  What about a getter called getNextToLastItem().  Does
the object store the items as a list, an array, or a struct?  If you use
the getter, you don't have to know, nor will your code become dependant
upon the implantation of the CFC.

There are several theories on getters and setters, and not everyone
agrees on their usefulness.  I've found some of the more advanced levels
of Object Orientedness seem to lose their value, the smaller your
programming team is.  For instance, if you are responsible for writing
the CFC AND using it, you have to know its inner workings anyway so
abstraction might not be that big of a deal to you.  (Not to say it
still couldn't provide usefulness at some level).

Regardless, design patters (like getters and setters) do not exist
because your code will not work otherwise.  They exist to accommodate
and encourage good coding practices.  YMMV.

~Brad

-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 11:46 AM
To: CF-Talk
Subject: Why do I need getters/setters?

I'm just not understanding why I'd need a getter and a setter in my 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:307975
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Why do I need getters/setters?

2008-06-23 Thread Andy Matthews
I think the primary reason for using get/set is to extract the specific
variable from the larger picture. This way, if something even happens to
your code and you change the source location of the variable's value, you
only have to change it in one place.

I personally don't use get/set as I don't see much value in it, but then I'm
self taught and OO isn't really a big concern for me ATM. I can easily see
this changing over time though. 

-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 11:46 AM
To: CF-Talk
Subject: Why do I need getters/setters?

I'm just not understanding why I'd need a getter and a setter in my cfc. 

My app works just fine without setting anything in the variables scope of my
cfcs. You submit a form, it adds the values to my db. You run a query and
get all the values back out. 

What is the value of keeping each value in its own variables scoped
variable? Where does it come in handy? Where are you supposed to use it? 

Here's a few lines from the legacy samples. 



 

  


Guess I'm missing something since I don't have an OO background. Googled a
little but still confused. 

Thanks,
Will 



~|
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:307974
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Coldfusion 8 install question

2008-06-23 Thread Qing Xia
Wow! This is advanced stuff! I have not done anything for the JVM tuning
yet--so I imagine everything is at its default value now.  Time to dig in
and see what I can do with them... We have 4 CF 8 instances running on one
(pretty powerful) virtual server.  So far there has been no performance
issues, but I am sure there is room for improvement!

Thanks for the info. :-)



On Mon, Jun 23, 2008 at 12:38 PM, Cutter (CFRelated) <
[EMAIL PROTECTED]> wrote:

> Qing brings up some very good points. You must treat each individual
> instance of CF as an individual server, and as such upgrades and changes
> to one will typically not be automatically applied to another. One
> advantage is that each instance also gets it's own JVM instance, but you
> must think about this in line with your JVM tuning as well. If your
> physical server only has 3 GB of RAM, and you're running two instances
> of CF, then you'll want to make sure that you don't try to allocate a
> full 1024 MB of memory to your JVM per instance, as you'll want a little
> more wiggle room for the OS to use. JRun JVM tuning is done directly in
> the Jrun4\bin\jvm.config, and it's arguments will apply to all JVM
> instances, unlike the thread tuning arguments you can control within
> each instance's jrun.xml.
>
> Steve "Cutter" Blades
> Adobe Certified Professional
> Advanced Macromedia ColdFusion MX 7 Developer
> _
> http://blog.cutterscrossing.com
>
>  Qing Xia wrote:
> > Since we are talking about multiple instances, I thought I'd pass along a
> > couple of things that have caused me much grief:
> >
> > 1) Be sure that IIS sites need to be assigned to CF instances using the
> Web
> > Server Configuration tool (installation driver\JRun4\bin\wsconfig.exe)
> >
> > 2) When you apply CF hot fixes, each instance needs to have the hot fixes
> > installed for it individually.
> >
> >
> > On Mon, Jun 23, 2008 at 12:11 PM, John P <[EMAIL PROTECTED]> wrote:
> >
> >> Thank you both for the info.
> >>
> >> John
> >>
> >>
> >>
> >>
> >>> You need to add the data sources into each instance if you plan on
> >>> actually using them.
> >>>
> >>> Unless you have a site using the default instance, you shouldn't need
> >>> any data sources set up there.
> >>>
> >>> I may be wrong, but I seemed to remember if you added data sources to
> >>> your base instance BEFORE creating the other instances, the data
> sources
> >>> will copy over at the time they are created.
> >>>
> >>> If you are looking for a magical way to have the data sources
> >>> automatically add to all instances at once, try Railo.  :)
> >>>
> >>> Our server admin has set up CF8 with 4 instances. When adding data
> >>> sources I have to add them to the root cfide/administrator rather than
> >>> within the instance example:
> >>> http:mysite.com/:portNumber/cfide/administrator.
> >>>
> >>> Seems like the install might be configured incorrectly, does anyone
> have
> >>> any experience with setting up multiple instance data sources? Do they
> >>> just go in the root cfide?
> >>>
> >>> Thanks,
> >>>
> >>> John
> >>
> >
> >
>
> 

~|
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:307973
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


JExcelAPI and grouping

2008-06-23 Thread Richard White
hi

we are using the JExcelAPI to populate a spreadsheet and wondering if anyone 
knows how to group rows using the group and outline function in ms excel 
through the JExcelAPI. 

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:307972
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Why do I need getters/setters?

2008-06-23 Thread Alan Rother
Short answer... You don't

You CAN build CFCs pretty much anyway you want to. Frankly, in CF if it
works, and you like how it works, then it's perfect.


Using getters and setters is really more of an OO habit than anything else
in CF.

-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


~|
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:307971
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 confusion. please help!

2008-06-23 Thread Tom McNeer
One of the things that the other posters (particularly Matt) were getting at
is that many times when you return a query object with a number of records,
you're not looking to manipulate any of the records (yet).

You're often listing records from the database so that one can be chosen for
manipulation. And since in these cases, you generally need the ID of the
record (so that you can choose it) and certain other fields (so the user can
identify the record s/he wants), having something like an array of true
objects is not really necessary. So the expense of all the object generation
may not be justified.

You and your boss might, however, want to look at one of the CF ORM
frameworks, such as Transfer. Transfer mirrors some of the functionality
that your boss might be familiar with in Hibernate (although Mark Mandel,
the author, is very adamant about the fact that it is not a port of
Hibernate). Although Transfer has methods that let you return traditional CF
queries (listByQuery(), for instance), it mostly works with objects -- and
often, arrays of objects (for instance, a Person object related to multiple
Address objects). It also has caching mechanisms that help make working with
those objects somewhat less expensive.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


~|
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:307970
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Why do I need getters/setters?

2008-06-23 Thread Will Tomlinson
I'm just not understanding why I'd need a getter and a setter in my cfc. 

My app works just fine without setting anything in the variables scope of my 
cfcs. You submit a form, it adds the values to my db. You run a query and get 
all the values back out. 

What is the value of keeping each value in its own variables scoped variable? 
Where does it come in handy? Where are you supposed to use it? 

Here's a few lines from the legacy samples. 






  


Guess I'm missing something since I don't have an OO background. Googled a 
little but still confused. 

Thanks,
Will 

~|
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:307969
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Coldfusion 8 install question

2008-06-23 Thread Cutter (CFRelated)
Qing brings up some very good points. You must treat each individual 
instance of CF as an individual server, and as such upgrades and changes 
to one will typically not be automatically applied to another. One 
advantage is that each instance also gets it's own JVM instance, but you 
must think about this in line with your JVM tuning as well. If your 
physical server only has 3 GB of RAM, and you're running two instances 
of CF, then you'll want to make sure that you don't try to allocate a 
full 1024 MB of memory to your JVM per instance, as you'll want a little 
more wiggle room for the OS to use. JRun JVM tuning is done directly in 
the Jrun4\bin\jvm.config, and it's arguments will apply to all JVM 
instances, unlike the thread tuning arguments you can control within 
each instance's jrun.xml.

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Qing Xia wrote:
> Since we are talking about multiple instances, I thought I'd pass along a
> couple of things that have caused me much grief:
> 
> 1) Be sure that IIS sites need to be assigned to CF instances using the Web
> Server Configuration tool (installation driver\JRun4\bin\wsconfig.exe)
> 
> 2) When you apply CF hot fixes, each instance needs to have the hot fixes
> installed for it individually.
> 
> 
> On Mon, Jun 23, 2008 at 12:11 PM, John P <[EMAIL PROTECTED]> wrote:
> 
>> Thank you both for the info.
>>
>> John
>>
>>
>>
>>
>>> You need to add the data sources into each instance if you plan on
>>> actually using them.
>>>
>>> Unless you have a site using the default instance, you shouldn't need
>>> any data sources set up there.
>>>
>>> I may be wrong, but I seemed to remember if you added data sources to
>>> your base instance BEFORE creating the other instances, the data sources
>>> will copy over at the time they are created.
>>>
>>> If you are looking for a magical way to have the data sources
>>> automatically add to all instances at once, try Railo.  :)
>>>
>>> Our server admin has set up CF8 with 4 instances. When adding data
>>> sources I have to add them to the root cfide/administrator rather than
>>> within the instance example:
>>> http:mysite.com/:portNumber/cfide/administrator.
>>>
>>> Seems like the install might be configured incorrectly, does anyone have
>>> any experience with setting up multiple instance data sources? Do they
>>> just go in the root cfide?
>>>
>>> Thanks,
>>>
>>> John
>>
> 
> 

~|
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:307968
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: CFC confusion. please help!

2008-06-23 Thread Jason Durham
I'm definitely not the authority on ColdFusion and OO, however I have
asked lots and lots of questions.  The answer is almost always, 'it
depends.'  I return query objects all of the time.  Sometimes I'll
return a struct with a couple of variables and the query object inside.
Do what makes sense for your situation. 

-Original Message-
From: Lori Stone [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 8:36 AM
To: CF-Talk
Subject: CFC confusion. please help!

We are starting to build a new application.  We are having major
confusion issues regarding the use of cfc's.  My boss has a java
background but not a coldfusion background.  I have been using cfc's
since mx came out but not to their full advantage.  We have been reading
about setter/getter beans, gateway objects, and dao, etc.  We are trying
to figure out the best way to set up this application for reusability
and scaling.  Can someone please explain the use of setter/getter,
return types, and anything else you think would help with understanding
the new use of cfc's. I have always returned query objects but
apparently that is not the "best practice".  I don't understand the
problem with returning query objects.  I would love to understand the
reasoning and what the return type should be. 



~|
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:307967
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Coldfusion 8 install question

2008-06-23 Thread Qing Xia
Since we are talking about multiple instances, I thought I'd pass along a
couple of things that have caused me much grief:

1) Be sure that IIS sites need to be assigned to CF instances using the Web
Server Configuration tool (installation driver\JRun4\bin\wsconfig.exe)

2) When you apply CF hot fixes, each instance needs to have the hot fixes
installed for it individually.


On Mon, Jun 23, 2008 at 12:11 PM, John P <[EMAIL PROTECTED]> wrote:

> Thank you both for the info.
>
> John
>
>
>
>
> >You need to add the data sources into each instance if you plan on
> >actually using them.
> >
> >Unless you have a site using the default instance, you shouldn't need
> >any data sources set up there.
> >
> >I may be wrong, but I seemed to remember if you added data sources to
> >your base instance BEFORE creating the other instances, the data sources
> >will copy over at the time they are created.
> >
> >If you are looking for a magical way to have the data sources
> >automatically add to all instances at once, try Railo.  :)
> >
> >Our server admin has set up CF8 with 4 instances. When adding data
> >sources I have to add them to the root cfide/administrator rather than
> >within the instance example:
> >http:mysite.com/:portNumber/cfide/administrator.
> >
> >Seems like the install might be configured incorrectly, does anyone have
> >any experience with setting up multiple instance data sources? Do they
> >just go in the root cfide?
> >
> >Thanks,
> >
> >John
>
> 

~|
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:307966
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Clarification Required Concerning CFC...

2008-06-23 Thread Rick Faircloth
Sounds good, Jason.
Thanks for the overview and examples!
This is making more and more sense each hour!

Rick

> -Original Message-
> From: Jason Durham [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 23, 2008 11:55 AM
> To: CF-Talk
> Subject: RE: Clarification Required Concerning CFC...
> 
> As others have mentioned... don't fight OO. :)  It takes a bit of time
> to adjust but it will all come together and you'll be a more productive
> developer as a result.
> 
> As someone mentioned, the variable scope is local to the page (doesn't
> matter if the file ends in cfc or cfm).  You aren't *including* a
> component, you're creating a copy of it in memory.  When you initialize
> each of the objects, sometimes they require variables to function (DSN
> is a good example).  Take this as an example...
> 
> Let's say you want to group all of your data access (queries) functions
> into one CFC.  All of these functions merely get/insert/update based
> upon arguments sent to them.  While they may return different results,
> they are essentially 'reset' after they are executed.  Since you're
> going to have several methods that all depend on the same DSN, you can
> inject the DSN into the init() function and store the variable in a
> scope that is available to all methods on that 'page'.   Since this CFC
> merely returns queries, you could store this CFC in a scope that allows
> it to persist across many page requests.  For the purpose of learning,
> think about it this way...
> 
> 
> From Application.cfc...
> 
>  output="false">
> 
>
>
>
>
> 
>
> createObject("component","path.to.UserGateway").init(myDsn,myUser,myPwd)
> />
> createObject("component","path.to.UserGateway").init(myDsn,myUser,myPwd)
> />
> createObject("component","path.to.NewsletterGateway").init(myDsn,myUser,
> myPwd) />
> 
>... include any other application stuff you want ...
> 
> 
> 
> When you're application loads, you create variables to hold your DB
> credentials and DSN.  Then you inject variables into each of your CFCs
> that communicate with that DB.  Now let's look inside one of those
> Gateway objects.
> 
> From UserGateway.cfc...
> 
> 
>  returntype="UserGateway">
>
> hint="ColdFusion datasource's username." />
> hint="ColdFusion datasource's password." />
> 
>  
>  
>  
> 
>  
> 
> 
> 
>  returntype="query">
> default="false" hint="Limit results to users marked active in
> database."/>
> 
>
>
> 
>
> username="variables.dbUsr" password="variables.dbPwd">
>   SELECT *
>   FROM tbl_User
>   WHERE 0=0  AND is_Active = 1
>
> 
>
> 
> 
> There are a couple of OO practices going on here.  In Application.cfc,
> you have injected the DB config/credentials into the init() method.  The
> init() method simply passes those arguments into the variables scope
> when the object is created. All of the methods from within that
> component have access to the variables scope.  Therefore... all of them
> have access to the DB config/credentials. So now you've got a
> Application.oUserGateway object hanging around in memory for you to use
> to perform CRUD operations on Users.  When it's time for you to get a
> list of users, you can simply invoke the method on any template in the
> application by doing this...
> 
> From within XYC.cfm
> 
> 
> 
> 
> The  equivalent is this...
>  returnvariable="qActiveUsers" isActive="true" />
> 
> You see how much extra typing is involved with , which is why
> I prefer the cfset way to do it.  Anyway, that invocation is accessing
> the UserGateway from memory, running getUsers with an argument value of
> 'true'.  That may seem like quite a bit of typing just to get a user
> list huh?  The beauty is, you can reuse that UserGateway object on
> another app because it knows *nothing* about *anything* that hasn't been
> explicitly provided.  If your DB password changes, you make ONE change
> (onApplicationStart) and reload the app.  That is a basic form of
> encapsulation.  If application requires new user fields in the database,
> or is_active changes from Boolean to another datatype, it's much easier
> to search/replace/modify all of your queries in one place.
> 
> Setting up the OO model takes some time.  What works best for you might
> not work best for us.  This topic seems pretty popular and it doesn't
> seem to be too hard to get opinions on it.  Keep trying to work through
> it brotha. :)  Keep in mind, this example is just for general CRUD
> components.  You don't want to load every object into the Application
> scope (especially on a shared server).   Try to stay away from using
> CGI, session, request, application, or server scopes from within your
> components.  Instead, pass those values into a method via an argument.
> 
> 
> -Original Message-
> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 21, 2008 10:11 PM
> To: CF-Talk
> Subject: RE: Clarification Required Concerning CFC..

Re: Coldfusion 8 install question

2008-06-23 Thread John P
Thank you both for the info. 

John




>You need to add the data sources into each instance if you plan on
>actually using them.
>
>Unless you have a site using the default instance, you shouldn't need
>any data sources set up there.
>
>I may be wrong, but I seemed to remember if you added data sources to
>your base instance BEFORE creating the other instances, the data sources
>will copy over at the time they are created.
>
>If you are looking for a magical way to have the data sources
>automatically add to all instances at once, try Railo.  :)
>
>Our server admin has set up CF8 with 4 instances. When adding data
>sources I have to add them to the root cfide/administrator rather than
>within the instance example:
>http:mysite.com/:portNumber/cfide/administrator. 
>
>Seems like the install might be configured incorrectly, does anyone have
>any experience with setting up multiple instance data sources? Do they
>just go in the root cfide?
>
>Thanks, 
>
>John 

~|
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:307964
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Clarification Required Concerning CFC...

2008-06-23 Thread Jason Durham
As others have mentioned... don't fight OO. :)  It takes a bit of time
to adjust but it will all come together and you'll be a more productive
developer as a result.

As someone mentioned, the variable scope is local to the page (doesn't
matter if the file ends in cfc or cfm).  You aren't *including* a
component, you're creating a copy of it in memory.  When you initialize
each of the objects, sometimes they require variables to function (DSN
is a good example).  Take this as an example...

Let's say you want to group all of your data access (queries) functions
into one CFC.  All of these functions merely get/insert/update based
upon arguments sent to them.  While they may return different results,
they are essentially 'reset' after they are executed.  Since you're
going to have several methods that all depend on the same DSN, you can
inject the DSN into the init() function and store the variable in a
scope that is available to all methods on that 'page'.   Since this CFC
merely returns queries, you could store this CFC in a scope that allows
it to persist across many page requests.  For the purpose of learning,
think about it this way...


>From Application.cfc...



   
   
   
   

   
   
   
   

   ... include any other application stuff you want ...



When you're application loads, you create variables to hold your DB
credentials and DSN.  Then you inject variables into each of your CFCs
that communicate with that DB.  Now let's look inside one of those
Gateway objects.

>From UserGateway.cfc...



   
   
   
  
 
 
 

 




   

   
   

   
   
  SELECT *
  FROM tbl_User
  WHERE 0=0  AND is_Active = 1
   

   


There are a couple of OO practices going on here.  In Application.cfc,
you have injected the DB config/credentials into the init() method.  The
init() method simply passes those arguments into the variables scope
when the object is created. All of the methods from within that
component have access to the variables scope.  Therefore... all of them
have access to the DB config/credentials. So now you've got a
Application.oUserGateway object hanging around in memory for you to use
to perform CRUD operations on Users.  When it's time for you to get a
list of users, you can simply invoke the method on any template in the
application by doing this...

>From within XYC.cfm




The  equivalent is this...
 

You see how much extra typing is involved with , which is why
I prefer the cfset way to do it.  Anyway, that invocation is accessing
the UserGateway from memory, running getUsers with an argument value of
'true'.  That may seem like quite a bit of typing just to get a user
list huh?  The beauty is, you can reuse that UserGateway object on
another app because it knows *nothing* about *anything* that hasn't been
explicitly provided.  If your DB password changes, you make ONE change
(onApplicationStart) and reload the app.  That is a basic form of
encapsulation.  If application requires new user fields in the database,
or is_active changes from Boolean to another datatype, it's much easier
to search/replace/modify all of your queries in one place.

Setting up the OO model takes some time.  What works best for you might
not work best for us.  This topic seems pretty popular and it doesn't
seem to be too hard to get opinions on it.  Keep trying to work through
it brotha. :)  Keep in mind, this example is just for general CRUD
components.  You don't want to load every object into the Application
scope (especially on a shared server).   Try to stay away from using
CGI, session, request, application, or server scopes from within your
components.  Instead, pass those values into a method via an argument.


-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 21, 2008 10:11 PM
To: CF-Talk
Subject: RE: Clarification Required Concerning CFC...

> That would make less sense. The Variables scope is the local scope for
any
> CF program. CFM and CFC files are both CF programs.

It just seems to make little sense to have two scopes named the same
thing
which have nothing to do with each other.  It would be like me creating
two variables with the same name, but having different values.  Now that
would
be confusing!

I could have variables.time in a cfc that is 4pm, but variables.time
outside
a cfc which has the value of 4am, right?

If so, a scope exclusive to cfc's would seem to make more sense.
cfcVariables.time vs variables.time... instantly recognizable.

That's just the way it seems as I get started with cfc's...

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:307963
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
htt

Re: CFC confusion. please help!

2008-06-23 Thread Matt Williams
On Mon, Jun 23, 2008 at 8:36 AM, Lori Stone <[EMAIL PROTECTED]> wrote:
> I have always returned query objects but apparently that is not the "best 
> practice".  I don't understand the problem with returning query
> objects.  I would love to understand the reasoning and what the return type 
> should be.

There is nothing wrong with returning queries. It really depends on
your use case. Typically, if I'm needing one record, I return a simple
object with getters/setters for each field. If I'm returning more than
one record, I return a query.

One issue with returning an array of objects instead of a query is
that if you're talking about lots of records, creating all those
objects can become processing and memory intensive.

However, one potential way around this is to use Peter Bell's
Iterating Business Object: http://ibo.riaforge.org/

-- 
Matt Williams
"It's the question that drives us."

~|
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:307962
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Column type to CF_SQL_TYPE map

2008-06-23 Thread Charlie Griefer
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_18.html

about 1/2 down the page.   smalldatetime is cf_sql_timestamp (i only
knew that one 'cuz it bit me in the ass a couple of weeks ago) :)

On Mon, Jun 23, 2008 at 8:33 AM, Adrian Lynch <[EMAIL PROTECTED]> wrote:
> Is there a definitive list of what CF SQL type goes with what column data
> type?
>
> I have a few I'm not sure of (CF_SQL_ below). Can anyone fill some of
> these in? These are all SQL 2005 data types.
>
> int CF_SQL_INTEGER
> nchar(10)   CF_SQL_CHAR
> ntext   CF_SQL_LONGVARCHAR
> numeric(18, 0)  CF_SQL_NUMERIC
> nvarchar(50)CF_SQL_VARCHAR
> nvarchar(MAX)   CF_SQL_
> realCF_SQL_REAL
> smalldatetime   CF_SQL_
> smallintCF_SQL_SMALLINT
> smallmoney  CF_SQL_
> sql_variant CF_SQL_
> textCF_SQL_LONGVARCHAR
> timestamp   CF_SQL_TIMESTAMP
> tinyint CF_SQL_TINYINT
> uniqueidentifierCF_SQL_
> varbinary(50)   CF_SQL_
> varbinary(MAX)  CF_SQL_
> varchar(50) CF_SQL_VARCHAR
> varchar(MAX)CF_SQL_
> xml CF_SQL_
> bigint  CF_SQL_BIGINT
> binary(50)  CF_SQL_
> bit CF_SQL_BIT
> char(10)CF_SQL_CHAR
> datetimeCF_SQL_DATE
> decimal(18, 0)  CF_SQL_DECIMAL
> float   CF_SQL_FLOAT
> image   CF_SQL_
> money   CF_SQL_MONEY
>
> I hope the formatting holds.
>
> I'd hazard a guess that for smallmoney you'd use CF_SQL_MONEY and the same
> for smalldatetime, CF_SQL_DATE.
>
> I've always used CF_SQL_LONGVARCHAR for text and ntext. Is this right?
>
> Thanks for any more insight.
>
> Adrian Lynch
> http://www.adrianlynch.co.uk/
>
>
> 

~|
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:307961
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Column type to CF_SQL_TYPE map

2008-06-23 Thread Adrian Lynch
Is there a definitive list of what CF SQL type goes with what column data
type?

I have a few I'm not sure of (CF_SQL_ below). Can anyone fill some of
these in? These are all SQL 2005 data types.

int CF_SQL_INTEGER
nchar(10)   CF_SQL_CHAR
ntext   CF_SQL_LONGVARCHAR
numeric(18, 0)  CF_SQL_NUMERIC
nvarchar(50)CF_SQL_VARCHAR
nvarchar(MAX)   CF_SQL_
realCF_SQL_REAL
smalldatetime   CF_SQL_
smallintCF_SQL_SMALLINT
smallmoney  CF_SQL_
sql_variant CF_SQL_
textCF_SQL_LONGVARCHAR
timestamp   CF_SQL_TIMESTAMP
tinyint CF_SQL_TINYINT
uniqueidentifierCF_SQL_
varbinary(50)   CF_SQL_
varbinary(MAX)  CF_SQL_
varchar(50) CF_SQL_VARCHAR
varchar(MAX)CF_SQL_
xml CF_SQL_
bigint  CF_SQL_BIGINT
binary(50)  CF_SQL_
bit CF_SQL_BIT
char(10)CF_SQL_CHAR
datetimeCF_SQL_DATE
decimal(18, 0)  CF_SQL_DECIMAL
float   CF_SQL_FLOAT
image   CF_SQL_
money   CF_SQL_MONEY

I hope the formatting holds.

I'd hazard a guess that for smallmoney you'd use CF_SQL_MONEY and the same
for smalldatetime, CF_SQL_DATE.

I've always used CF_SQL_LONGVARCHAR for text and ntext. Is this right?

Thanks for any more insight.

Adrian Lynch
http://www.adrianlynch.co.uk/


~|
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:307960
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: page self refresh whenever database gets new input

2008-06-23 Thread Brad Wood
This may be a hand grenade for your ant, but I've got to throw it out
there since no one else has.

Flex LiveCycle Data Services
(http://www.adobe.com/products/livecycle/dataservices/) allows the
server to "push" messages to the client which means a users page could
refresh data without having to be refreshed or "poll" the server.

I'm not sure how they do it, but it might be similar to how SeeFusion's
Flex interface will stream data to the client indefinitely by keeping a
TCP connection open and pushing XML down the pipe.

~Brad

-Original Message-
From: anthony tran [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 20, 2008 10:24 PM
To: CF-Talk
Subject: page self refresh whenever database gets new input

Hi,

I'm having a system that has two different consoles one for people input
data, and other for people view data. One isn't connected to the other.
Meaning, they work separatedly but at the same time. If there is a new
input, then the new input will show on the diplay console right away, no
need to hit any key nor button to refresh the page. The idea similar to
MS Outlook. Whenever a new mail comes, it just shows up by itself. Or
just like a stock reports with live feeding.

Is there any way to do this in cold fusion ? Database is MS Access.

Thanks

Anthony 

~|
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:307959
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: MG is so cool!

2008-06-23 Thread Rick Faircloth
I hear you, Will.

Now don't overload my rowboat with motorboat power!  :o)

Rick

> -Original Message-
> From: Will Tomlinson [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 23, 2008 10:44 AM
> To: CF-Talk
> Subject: MG is so cool!
> 
> Been playing more with my first model glue app and I realize how awesome it 
> is, just from
tinkering.
> 
> I built a reqUsername method that simply set a randRang() and tacked it onto 
> an email username,
just for
> the fun of it. I hard-coded those values in the randRange().
> 
> Then I thought hm, that's pretty dumb. Why not hard-code them into the event 
> handler and pass them
to
> the controller via some arguments. Worked fine!
> 
> Then thought, hm, this is still pretty dumb. Why not stick those values in my 
> AppConfig in
> coldspring.xml? Worked like a charm. Now, it's totally dynamic and lets you 
> set the values in your
> config.
> 
> Just messin around like this is a great way to learn these frameworks. 
> (AHEMMM RICK!)  :)
> 
> Here's some example code. Maybe it'll help folks just starting with MG.
> 
> Coldspring.xml:
> 
> 
> 
>   
> leroy
>   1000
>   2000
>   
> 
> 
> 
> Login.cfc:
> 
> output="false">
>  
> 
>   
>var startNum = variables.config.getConfigSetting("userStartNum");
>var endNum = variables.config.getConfigSetting("userEndNum");
>var result = "";
>result = listFirst(arguments.email, "@") & randRange(startNum, endNum);
>   
> 
> 
>
> 



~|
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:307958
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


MG is so cool!

2008-06-23 Thread Will Tomlinson
Been playing more with my first model glue app and I realize how awesome it is, 
just from tinkering. 

I built a reqUsername method that simply set a randRang() and tacked it onto an 
email username, just for the fun of it. I hard-coded those values in the 
randRange().

Then I thought hm, that's pretty dumb. Why not hard-code them into the event 
handler and pass them to the controller via some arguments. Worked fine!

Then thought, hm, this is still pretty dumb. Why not stick those values in my 
AppConfig in coldspring.xml? Worked like a charm. Now, it's totally dynamic and 
lets you set the values in your config.

Just messin around like this is a great way to learn these frameworks. (AHEMMM 
RICK!)  :)

Here's some example code. Maybe it'll help folks just starting with MG. 

Coldspring.xml:



  
leroy
1000
2000
   



Login.cfc:

   
 
 
  
   var startNum = variables.config.getConfigSetting("userStartNum"); 
   var endNum = variables.config.getConfigSetting("userEndNum"); 
   var result = "";   
   result = listFirst(arguments.email, "@") & randRange(startNum, endNum);  
  
  
  



~|
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:307957
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 confusion. please help!

2008-06-23 Thread Rich Kroll
Lori,
The reason that some people discourage the use of a query object as a return
type is due to the fact that it binds whatever uses that query object
directly to the database (more specifically, to the columns in the
database).

The use of setter/getter beans should be familiar to your boss; under the
java design pattern "Transfer Object", and are used as a mechanism to
transfer the data in an encapsulated fashion.  Return types are used in CFCs
to create a strongly typed system.  There are many debates on strong typing
variables within CF (see duck typing), so you will have decide what best
fits your team and development style.

"Gateway objects" refer to a design pattern that has grown within the CF
community, and refers to an object that manages all aggregate database
interaction, while a DAO (data access object) manages persisting a single
object.

Many of the problems that come up in traditional java OO application
development apply directly to CF and many can be solved using the same
solutions and design patterns.  Conversly, there are also new prolbems that
are introduced using CF that must be solved in much different ways.  A
concrete example would be in java it is typical to create large object
graphs (nested sets of objects), where in CF you must limit the depth of the
graph as there are high object instantiation costs.

Good luck!

Rich Kroll


~|
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:307956
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


CFC confusion. please help!

2008-06-23 Thread Lori Stone
We are starting to build a new application.  We are having major confusion 
issues regarding the use of cfc's.  My boss has a java background but not a 
coldfusion background.  I have been using cfc's since mx came out but not to 
their full advantage.  We have been reading about setter/getter beans, gateway 
objects, and dao, etc.  We are trying to figure out the best way to set up this 
application for reusability and scaling.  Can someone please explain the use of 
setter/getter, return types, and anything else you think would help with 
understanding the new use of cfc's. I have always returned query objects but 
apparently that is not the "best practice".  I don't understand the problem 
with returning query objects.  I would love to understand the reasoning and 
what the return type should be. 

~|
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:307955
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How to select an entry from an array

2008-06-23 Thread Fred Anderson
Hi Nic, are you trying to pass through the array used to create the select
box along with the selected item?
If so, you need to convert the array into text before you can send it. If I
am off base, please clarify the original problem maybe there is a better way
to solve it.



#listFindNoCase(form.myArray,form.favBeatle)#



myA = arrayNew(1);
myA[1] = "John";
myA[2] = "Paul";
myA[3] = "George";
myA[4] = "Ringo";






#name#






On Mon, Jun 23, 2008 at 7:53 AM, nic olai <[EMAIL PROTECTED]>
wrote:

> Hi all,
>
> i want to send data with a post form. In the next step i want to check
> which entry of an array includes the selected data.
>
> For example:
> In the form the user selected the 2nd entry which includes XYZ in an
> dropdown (select) field and submit the form.
> How can i check which entry of the array myarraytest[] includes the data
> XYZ.
>
> Thank you & best regards
> nic.
>
> 

~|
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:307954
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


How to select an entry from an array

2008-06-23 Thread nic olai
Hi all,

i want to send data with a post form. In the next step i want to check which 
entry of an array includes the selected data. 

For example:
In the form the user selected the 2nd entry which includes XYZ in an dropdown 
(select) field and submit the form. 
How can i check which entry of the array myarraytest[] includes the data XYZ.

Thank you & best regards
nic. 

~|
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:307953
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Waaahhhh! Why won't my CFC work!

2008-06-23 Thread Rick Faircloth
Yes, it looks like ColdSpring will a be a great addition!

Rick

> -Original Message-
> From: Mike Kear [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 22, 2008 10:52 PM
> To: CF-Talk
> Subject: Re: Waaa! Why won't my CFC work!
> 
> Oh and can i add, Rick , yes you DO want to use ColdSpring, but not
> just yet.You'll get to the point where you're bitching to yourself
> that all you seem to be doing is writing  createobject("component","Componentname").init() /> all the time and
> you're always forgetting the exact path to a cfc and what exactly it
> needs to instantiate it.
> 
> That's the time to start looking at ColdSpring.
> 
> You need to be ok with flying the Cessna 172 before you get in the
> cockpit of the F/18A Super Hornet.



~|
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:307952
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Waaahhhh! Why won't my CFC work!

2008-06-23 Thread Rick Faircloth
Thanks, Mike!  Looking forward to it!

Rick

> -Original Message-
> From: Mike Kear [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 22, 2008 10:47 PM
> To: CF-Talk
> Subject: Re: Waaa! Why won't my CFC work!
> 
> Rick, I havent forgotten my promise to get you a sample app.  I'm
> nearly finished it now.It's all working, but it's working on my
> SQLServer datasource. I want to make it work on Access, so i can zip
> it all up and supply the datasource to go with it.
> 
> For the others who might be interested, I'll be posting it somewhere,
> probably on my company's web site once i have the narrative written
> and checked.
> 
> Cheers
> Mike Kear
> Windsor, NSW, Australia
> Adobe Certified Advanced ColdFusion Developer
> AFP Webworks
> http://afpwebworks.com
> ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
> 



~|
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:307951
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Odd results with error - ideas?

2008-06-23 Thread Les Mizzell
I'm building a query object for a search page:




!--- Count the number of times the search keyword
  appears in our narrative --->
   


   
   
   
   
   





SELECT
   atty_id,
   first_name,
   middle_name,
   last_name,
   suffix,
   atty_type,
   bus_number,
   office_id,
   keycount
FROM q_atty
ORDER BY keycount desc, Last_Name asc, First_Name asc



The "atty_id" above is either a integer from an older version of the 
database or it's a UUID - both in the same varchar field. When running 
test searches, all seems well until I enter a term that returns a LOT of 
results. Then I get an error:

"The value "3C26C422-BCD2-35D3-DDB3F69250F4848F" cannot be converted to 
a number"

OK, that's a specific record. If I do a different search the returns 
less results which INCLUDE the specific record above, I get no error...

In fact, it seems that all searches that return a small amount of 
results with either a UUID or number ID return OK. Any search returning 
a large number of results, chokes on the first UUID it hits.

Doing a dump of my initial query "results" looks fine before it's read 
into the query object.

There's nowhere in my code that says the atty_id is a number. Don't 
understand why it's trying to convert it to start with. Any why only in 
large result sets, not small ones?

Try it: http://www.nmrs.com/test.cfm

Enter "mcguire" and then note the ID number on the attorney returned.
Back up and enter "trial", which should return about a bazillion 
results. There's Mcguire's ID causing the error.
Try one more - enter "FDCPA". There's McGuire again in the results, 
causing no error.

If you check the "dump" box, you'll get a CFDUMP of the initial results 
that are being read into the query object for analysis.

What the heck is going on? Ideas?



~|
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:307950
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4