RE: STICKY Application.datasource
You can most certainly store the datasource in an application variable. Assuming you have a whole bunch of app vars that you will be using throughout your application. Andrew is correct in what he is saying about using request scope as you don't need to lock the application scope EVERY time you want to use it. Instead you can use something like:- cflock scope=APPLICATION type=READONLY timeout=10 throwontimeout=Yes cfset Request.Application = duplicate(Application) /cflock Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Andrew Grosset [mailto:[EMAIL PROTECTED] Sent: 29 December 2004 05:16 To: CF-Talk Subject: Re: STICKY Application.datasource Unless it's really necessary I would try not to set datasource as an application variable, either: cfset datasource=CODAGenomics or cfset request.datasource=CODAGenomics Andrew. ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188919 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: shopping cart, session variables - best practices
I personally favour client variables. But bear in mind that you must be using a proper DB server, NOT access for this to work. SQL, MYSQl Etc. Additionally, in CF admin the client variables must be purged in a reasonable time if SQL disk space is in short supply or you get a billion hits a day. Use a structure for storing the basket contents by all means, however instead of session.basketContents, convert the structure to a WDDX object and store it as client.basketContents - That way you're not using precious RAM but cheap disk space. Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: mayo [mailto:[EMAIL PROTECTED] Sent: 29 December 2004 02:13 To: CF-Talk Subject: shopping cart, session variables - best practices I'm setting up a shopping cart for a jewelry store. I'm curious, what is performance limit for storing data in session variables? The following are lists: Item No (itemID used in check out) Item Qty (in case someone wants more than one) Item Price Item Description (most descriptions about 50 characters. ex: Ruby and gold drop-earrings) Most customers will not go above 3 or 4 items so I'm not concerned for this project. Just curious in general. At what point would storing data impact performance? Also, is updating session variables all that much quicker than updating a database. For example a customer wants two pairs of a particular earring instead of one. -- gil ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188920 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Question for Java people on this list: Converting a CF app to JS P
Hi, I was wondering if someone on this might have experience using the SWITCH statement in JSP. I am in the process of converting a CF app to JSP (Do not ask why -- company standards for the future) and in the CF page I make use of the CFSWITCH and I looked into JSP/Java and there is also a switch statement but I cannot get it to work correctly. Here is a CF example: cfswitch expression=#Trim(Department)# cfcase value=FAO cfset rate=.09 /cfcase cfcase value=CAO cfset rate=.19 /cfcase cfcase value=RES cfset rate=.39 /cfcase cfdefaultcase cfset rate=.09 /cfdefaultcase /cfswitch Does anyone know if this can be done with the SWITCh statement in JSP. Can switch be used on strings --- I have been told yes and no by different people but I cannot get past the problem. Thanks Mario ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188921 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: If your CFC takes a struct, can Flash provide one via remoting?
On Tue, 28 Dec 2004 15:24:36 -0500, Jeff Small [EMAIL PROTECTED] wrote: If one of the things you're looking forward to doing is using some methods with Flash Remoting down the line, and you made an insert() method say, that was looking for a struct (insert(myStruct) for instance) can Flash provide the method with the appropriate structure that ColdFusion (the CFC) is expecting? Yes, but... Be aware of single argument methods: I seem to recall that if Flash sees obj.method(singleArg) and singleArg is a struct, it treats it much like CF's argumentCollection and passes the elements of the struct as separate arguments I think. It's a special case with single argument methods. Okay, then this leads me to my next question. Do I need to change my CFC if I know down the line I'd like to use it with Flash Remoting? Let's say I was in the beginning stages of writing the CFC, but before I began I wanted to make sure it was remoting friendly...is there something I need to do now? Create an optional second parameter that's just sort of useless? (like maybe just pass in a 1 if it's a remoting call or something?) Right now I'm just using a struct to pass into the CFC for an INSERT query...that's all this would be doing, taking a struct populated with form data and inserting it...any special tricks? Just asking because I'm at that early stage now, and anything I can do that will make the transition over to remoting more painless would certainly be appreciated... ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188922 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Question for Java people on this list: Converting a CF app to JS P
Show the JSP example also. Matthew Small Web Developer American City Business Journals 704-973-1045 [EMAIL PROTECTED] -Original Message- From: Ciliotta, Mario [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 9:55 AM To: CF-Talk Subject: Question for Java people on this list: Converting a CF app to JS P Hi, I was wondering if someone on this might have experience using the SWITCH statement in JSP. I am in the process of converting a CF app to JSP (Do not ask why -- company standards for the future) and in the CF page I make use of the CFSWITCH and I looked into JSP/Java and there is also a switch statement but I cannot get it to work correctly. Here is a CF example: cfswitch expression=#Trim(Department)# cfcase value=FAO cfset rate=.09 /cfcase cfcase value=CAO cfset rate=.19 /cfcase cfcase value=RES cfset rate=.39 /cfcase cfdefaultcase cfset rate=.09 /cfdefaultcase /cfswitch Does anyone know if this can be done with the SWITCh statement in JSP. Can switch be used on strings --- I have been told yes and no by different people but I cannot get past the problem. Thanks Mario ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188923 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Setting Default Printer
Does anyone know how to set a default printer from a list of prints shown in a webpage? im using the tag CFX_EnumPrinters to enumerate the printers, but im not sure how to allow the user to pick the default. i found a script do this with vbscript, but i want to do it in a webpage: any help is appreciated! thank you in advance. :) Sub DefaultPrinter Dim Text, Title, i, j, tmp, printer Dim Network, oDevices ' Create a new Network object to access Network properties Set Network = CreateObject(WScript.Network) ' Read all printers Set oDevices = Network.EnumPrinterConnections Text = Available printers vbCRLF For i = 0 To oDevices.Count-1 Step 2 j = i Text = Text (i / 2) vbTab Text = Text oDevices(i) vbTab oDevices(i+1) vbCRLF Next ' Show all available printers and allow a user selection tmp = InputBox (Text,Set default printer,0) printer = oDevices(tmp * 2) ' select printer name ' Set the default printer Network.SetDefaultPrinter printer MsgBox Set Default printer to printer, _ vbOkonly + vbInformation, Title Set Network = Nothing End Sub DefaultPrinter ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188924 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: My Init() in my CFC...am I on the right track?
Personally I really hate the notion of chaining setter calls (but I can see way others may like it). I do find that much harder to read. But other chaining is great. Being able to chain the create and the init() together seems perfectly sound to me. As does any call which returns a CFC as a property then calls a property of that return as in something like this: cfset Name = Session.SessionCFC.getUserCFC().getName() / I agree. I was only referring to setter methods (though I may not have been very clear about that). In the above example, you're using getters. A getter's purpose is to return something. Conseqently, the purpose of the line above seems very clear to me. This is in contrast to an example posted by Sean in another thread: person.setFirstName(Sean).setLastName(Corfield) I find it more difficult to read. I would be very surprised if it were any faster than two lines of code. So, I was wondering if there were any other benefits or tricks that I'm missing. Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188925 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Question for Java people on this list: Converting a CF app to JS P
Mario Does anyone know if this can be done with the SWITCh statement in JSP. Can switch be used on strings --- I have been told yes and no by different people No, afaik the switch statement in Java needs a simple scalar type such as int or char. I suggest you use if...else if. Nick ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188926 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Question for Java people on this list: Converting a CF app to JS P
I forgot to paste it in: String dept = rset.getString(DEPARTMENT); from my Oracle Query switch(dept) { case FAO: out.println(It\'s FAO.); break; case CAO: out.println(It\'s CAO.); break; case RES: out.println(It\'s RES.); break; default: out.println(It is a different one.); } This is my first try at Java/JSP so this is only an example that I am trying to get working before I add the real logic to it. I figured out the query and the result set and looping over the result set -- sorry nothing beats CFQUERY but this SWITCH statement is confusing me. Thanks Mario -Original Message- From: Matthew Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 9:59 AM To: CF-Talk Subject: RE: Question for Java people on this list: Converting a CF app to JS P Show the JSP example also. Matthew Small Web Developer American City Business Journals 704-973-1045 [EMAIL PROTECTED] -Original Message- From: Ciliotta, Mario [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 9:55 AM To: CF-Talk Subject: Question for Java people on this list: Converting a CF app to JS P Hi, I was wondering if someone on this might have experience using the SWITCH statement in JSP. I am in the process of converting a CF app to JSP (Do not ask why -- company standards for the future) and in the CF page I make use of the CFSWITCH and I looked into JSP/Java and there is also a switch statement but I cannot get it to work correctly. Here is a CF example: cfswitch expression=#Trim(Department)# cfcase value=FAO cfset rate=.09 /cfcase cfcase value=CAO cfset rate=.19 /cfcase cfcase value=RES cfset rate=.39 /cfcase cfdefaultcase cfset rate=.09 /cfdefaultcase /cfswitch Does anyone know if this can be done with the SWITCh statement in JSP. Can switch be used on strings --- I have been told yes and no by different people but I cannot get past the problem. Thanks Mario ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188927 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Question for Java people on this list: Converting a CF app to JS P
Java doesn't allow you to use anything other than integer (or castable to integer) values for switch statements, so strings can't be sued. With a switch that small, I recommend a series of if statements String s=department.trim().toUpperCase(); if (s.equals(FAO)) rate=0.09; else if (s.equals(CAO)) rate=0.19; else if (s.equals(RES)) rate=0.39; else rate=0.09; This will do at most 3 string comparisons, which isn't all that bad. Assuming you are just mapping values to values, you might want to use a map/hashtable/properties object... Example: // scope this in the application scope java.util.Hashtable values=new java.util.Hashtable(); values.put(CAO,new Double(0.19)); values.put(RES,new Double(0.39)); values.put(DEFAULT,new Double(0.09)); Then you can do Double d=(Double) values.get(department.trim().toUpperCase()) to get the value. This is usually better for larger cases, where lots of if statements would take longer than a single hash lookup Then there's an alternative way to use switches if you have more code than just an assignment to make. First convert all your string values to integers via a map, and switch on the integers I would do this (so it's easy to read, like this) Static final int FAO=1, CAO=2, RES=3; Hashtable table=new Hashtable(); Table.put(FAO,new Integer(FAO)); Table.put(CAO,new Integer(CAO)); Table.put(RES,new Integer(RES)); int switchValue=-1; Integer d=(Integer ) table.get(department.trim().toUpperCase()) if (d!=null) swtichValue=d.intValue(); switch(switchValue){ case FAO: ... break; ... etc... } -Original Message- From: Ciliotta, Mario [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 9:55 AM To: CF-Talk Subject: Question for Java people on this list: Converting a CF app to JS P Hi, I was wondering if someone on this might have experience using the SWITCH statement in JSP. I am in the process of converting a CF app to JSP (Do not ask why -- company standards for the future) and in the CF page I make use of the CFSWITCH and I looked into JSP/Java and there is also a switch statement but I cannot get it to work correctly. Here is a CF example: cfswitch expression=#Trim(Department)# cfcase value=FAO cfset rate=.09 /cfcase cfcase value=CAO cfset rate=.19 /cfcase cfcase value=RES cfset rate=.39 /cfcase cfdefaultcase cfset rate=.09 /cfdefaultcase /cfswitch Does anyone know if this can be done with the SWITCh statement in JSP. Can switch be used on strings --- I have been told yes and no by different people but I cannot get past the problem. Thanks Mario ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188928 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Question for Java people on this list: Converting a CF app to JS P
It seems to be kind of poor not to be able to use switch on a string. If I use the dept number say (0305) instead of the name would this work or would Java freak on the 0 (zero). Our database treats these fields as varchar since the zero in front has meaning to the accounting people. Mario -Original Message- From: Nick de Voil [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 10:05 AM To: CF-Talk Subject: Re: Question for Java people on this list: Converting a CF app to JS P Mario Does anyone know if this can be done with the SWITCh statement in JSP. Can switch be used on strings --- I have been told yes and no by different people No, afaik the switch statement in Java needs a simple scalar type such as int or char. I suggest you use if...else if. Nick ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188929 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Question for Java people on this list: Converting a CF app to JS P
It seems to be kind of poor not to be able to use switch on a string. If I use the dept number say (0305) instead of the name would this work or would Java freak on the 0 (zero). Our database treats these fields as varchar since the zero in front has meaning to the accounting people. Yes, it's a pain. The department number would work except that you are right, Java would take the initial 0 to mean it's an octal number. Nick ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188930 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: My Init() in my CFC...am I on the right track?
-Original Message- From: Ben Rogers [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 10:04 AM To: CF-Talk Subject: RE: My Init() in my CFC...am I on the right track? I agree. I was only referring to setter methods (though I may not have been very clear about that). In the above example, you're using getters. A getter's purpose is to return something. Conseqently, the purpose of the line above seems very clear to me. This is in contrast to an example posted by Sean in another thread: person.setFirstName(Sean).setLastName(Corfield) I find it more difficult to read. I would be very surprised if it were any faster than two lines of code. So, I was wondering if there were any other benefits or tricks that I'm missing. No, I agree first! ;^) I've heard one argument with setters in that it might allow for more structured sets of complex data to be read more easily. For example if you have a form accepting first, middle and last names you could say: person.setFirstName(Sean).setMiddleName(Elizabeth).setLastName(Corfield ) (I am, however, guessing on the actual middle name in this case.) In this case I can see the argument that when you put on syntax blinders you see the name of the person as it should be seen. However I agree that the following seems much more readable: person.setFirstName(Sean) person.setMiddleName(Elizabeth) person.setLastName(Corfield) The other argument I've read is when you use a setter for an object, then immediately grab something from that object. Something like: profile.setPerson(Sean).getFirstName() I see this as a little more useful than the first argument (which to me is really simplistic and should be multiple lines). At the same time cases like this seem pretty rare to me. I've also heard (what I consider completely asinine) arguments that smaller code is better or runs faster or whatever. This of course is complete bullshit (it was bullshit even in the old CF days when the language was tokenized and is even moreso now in the compiled Java world). Still - returning this in a setter doesn't force you use this, it just provides the potential. Jim Davis ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188931 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: STICKY Application.datasource
Since the advent of CFMX 6.1, the Macromedia specs state (no time to find a URL, it's moving day 3) that shared-scope variables that will be set once and contain a static value (i.e. static data available to the entire app... like a DSN) do not need to be locked. Race conditions and deadlocks were eliminated, so the only reason to use a lock is to prevent data corruption... as long as your DSN isn't going to change there isn't a reason to lock it. At least according (I believe this is where it is) the LiveDoc for the cflock tag under 6.1. Also, even tho I'm sure this has already been stated, setting an application variable in a cfparam tag is a fine idea, but changing the default isn't going to change the value until you've deleted the original... because application variables are persistent, and because the cfparam tag doesn't fire to create the var unless it doesn't already exists, the only way to change the value is either to delete it... or, something I've done often is to put a cfif in application.cfm that looks for a URL variable to fire off some CFSETs: cfif isDefined(URL.reloadAppScope) cflock scope=application type=exclusive timeout=20 cfset application.appVar1 = 1 {more cfset tags to write your app vars} /cflock /cfif And that's my own two cents... Laterz, J -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com On Wed, 29 Dec 2004 09:50:30 -, Martin Parry [EMAIL PROTECTED] wrote: You can most certainly store the datasource in an application variable. Assuming you have a whole bunch of app vars that you will be using throughout your application. Andrew is correct in what he is saying about using request scope as you don't need to lock the application scope EVERY time you want to use it. Instead you can use something like:- cflock scope=APPLICATION type=READONLY timeout=10 throwontimeout=Yes cfset Request.Application = duplicate(Application) /cflock Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Andrew Grosset [mailto:[EMAIL PROTECTED] Sent: 29 December 2004 05:16 To: CF-Talk Subject: Re: STICKY Application.datasource Unless it's really necessary I would try not to set datasource as an application variable, either: cfset datasource=CODAGenomics or cfset request.datasource=CODAGenomics Andrew. ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188932 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: My Init() in my CFC...am I on the right track?
Jim Davis wrote: As for returning this from a setter... I never thought about it, but I might start (mine all return void now). I may personally never use it, but if it doesn't affect performance it leaves to possibility open for others that might want to. I return this from pretty much everything. I don't typically use it to chain methods because I find it harder to read, but if the next maintainer likes it the code is there for him to use :) One small additional benefit is where people new to the whole CFC thing use code like: cfset object = object.setVar(val) This actually works if you return this, even if it is not good practice. Jochem ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188933 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Question for Java people on this list: Converting a CF app to JS P
I am sure you could write your own taglib to help with this, here is a tutorial for you http://www.orionserver.com/tutorials/taglibs/4.html Regards Mark Drew On Wed, 29 Dec 2004 15:19:16 -, Nick de Voil [EMAIL PROTECTED] wrote: It seems to be kind of poor not to be able to use switch on a string. If I use the dept number say (0305) instead of the name would this work or would Java freak on the 0 (zero). Our database treats these fields as varchar since the zero in front has meaning to the accounting people. Yes, it's a pain. The department number would work except that you are right, Java would take the initial 0 to mean it's an octal number. Nick ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188934 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: My Init() in my CFC...am I on the right track?
Jim Davis wrote: As for returning this from a setter... I never thought about it, but I might start (mine all return void now). I may personally never use it, but if it doesn't affect performance it leaves to possibility open for others that might want to. I return this from pretty much everything. I don't typically use it to chain methods because I find it harder to read, but if the next maintainer likes it the code is there for him to use :) One small additional benefit is where people new to the whole CFC thing use code like: cfset object = object.setVar(val) This actually works if you return this, even if it is not good practice. So am I to understand correctly...that you can ONLY chain methods that return this? Or that if your init function returns an object then all methods can be chained? I'm reading all of this conversation as the former (the first one) meaning that if you WANT to be able to chain a method, that method needs to return this. ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188935 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: My Init() in my CFC...am I on the right track?
Don't break the chain of love. -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 11:40 AM To: CF-Talk Subject: Re: My Init() in my CFC...am I on the right track? Jim Davis wrote: As for returning this from a setter... I never thought about it, but I might start (mine all return void now). I may personally never use it, but if it doesn't affect performance it leaves to possibility open for others that might want to. I return this from pretty much everything. I don't typically use it to chain methods because I find it harder to read, but if the next maintainer likes it the code is there for him to use :) One small additional benefit is where people new to the whole CFC thing use code like: cfset object = object.setVar(val) This actually works if you return this, even if it is not good practice. So am I to understand correctly...that you can ONLY chain methods that return this? Or that if your init function returns an object then all methods can be chained? I'm reading all of this conversation as the former (the first one) meaning that if you WANT to be able to chain a method, that method needs to return this. ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188936 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: My Init() in my CFC...am I on the right track?
So am I to understand correctly...that you can ONLY chain methods that return this? Or that if your init function returns an object then all methods can be chained? I'm reading all of this conversation as the former (the first one) meaning that if you WANT to be able to chain a method, that method needs to return this. If you want to chain method calls on the same object, all of the methods in question must return this: person.setFirstName(Sean).setLastName(Corfield) In this example, you have a person component with methods setFirstName and setLastName. Each of those methods is returning this. The long way to accomplish the above is: person.setFirstName(Sean) person.setLastName(Corfield) In the other example posted, multiple CFCs are involved: Name = Session.SessionCFC.getUserCFC().getName() In this example, the getUserCFC() method belongs to the SessionCFC component. It is returning a UserCFC component, not this. The getName() method belongs to the UserCFC component, not the SessionCFC component. The longer way to accomplish the above would be: User = Session.SessionCFC.getUserCFC() Name = User.getName() Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188937 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: My Init() in my CFC...am I on the right track?
Jeff Small wrote: So am I to understand correctly...that you can ONLY chain methods that return this? Yes. I'm reading all of this conversation as the former (the first one) meaning that if you WANT to be able to chain a method, that method needs to return this. Correct. Jochem ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188938 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: STICKY Application.datasource
Assuming you have a whole bunch of app vars that you will be using throughout your application. Andrew is correct in what he is saying about using request scope as you don't need to lock the application scope EVERY time you want to use it. Instead you can use something like:- cflock scope=APPLICATION type=READONLY timeout=10 throwontimeout=Yes cfset Request.Application = duplicate(Application) /cflock While you can do this, in my experience this causes a terrible performance degradation in applications with moderate or heavy use. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188939 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: My Init() in my CFC...am I on the right track?
So am I to understand correctly...that you can ONLY chain methods that return this? Or that if your init function returns an object then all methods can be chained? I'm reading all of this conversation as the former (the first one) meaning that if you WANT to be able to chain a method, that method needs to return this. You can only chain two methods if the first method returns an object containing the second method. If you want to chain two methods that belong to a single object, the first method needs to return the object containing that method (this). If you want to chain a third method, the second method has to return an object containing the third method, and so on. So, for your purposes, all your methods need to return this if you want to chain them. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188940 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: shopping cart, session variables - best practices
Use a structure for storing the basket contents by all means, however instead of session.basketContents, convert the structure to a WDDX object and store it as client.basketContents - That way you're not using precious RAM but cheap disk space. Storing application- and user-specific data is what precious RAM is for! In an application environment with a single application server, you will typically achieve significantly higher performance under load by storing things in memory rather than fetching them from the database for each page request. You may need to provision your server's RAM adequately to ensure you have enough for the number of concurrent users you need to support, but RAM is comparatively cheap. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188941 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: large cf ecom sites?
Autobytel.com is pretty stinkin big. They're CF. -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 12:00 PM To: CF-Talk Subject: large cf ecom sites? I have a client that is starting to backpedal on wanting to use coldfusion for their ecommerce site. Some idiot in their marketing department is a fierce opponent of cf. Luckily he's not the deal breaker for cf but he does have some influence. Does anyone know of some other well known cf commerce sites such as potterybarn.com? Emmet ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188942 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: STICKY Application.datasource
Unless it's really necessary I would try not to set datasource as an application variable, either: cfset datasource=CODAGenomics or cfset request.datasource=CODAGenomics In general, I agree with this. If the value of a variable won't change during the operation of an application and the variable contains a simple value, there's little value in storing it persistently beyond a single page request, since there's very little cost involved in simply recreating it on every page request as needed. However, if you're using CFMX it really doesn't make any significant difference one way or the other, and even with previous versions it usually didn't as long as you were careful to create the variable once but never write to it again. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188943 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: shopping cart, session variables - best practices
Any reason you're not using an array of structs? It would be much cleaner to work with and much faster than using lists (which is going to have much more impact on your performance than storing data). While I agree with your suggestion to use arrays and structures rather than lists, I doubt it would have a fraction of the impact on performance that choices about storing data will have. You might save a few milliseconds per page by avoiding lists, but you will typically suffer a more severe performance penalty by making trips to the database instead of storing things in the Session scope in my experience. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188944 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Setting Default Printer
Does anyone know how to set a default printer from a list of prints shown in a webpage? im using the tag CFX_EnumPrinters to enumerate the printers, but im not sure how to allow the user to pick the default. Are you trying to set a default printer on the server or on the client? Presumably, your CFX custom tag lists printers on the server, not the client. You could run the VBScript code you posted from a command shell using CFEXECUTE, or adapt the code somewhat to make it available as a WSH COM object, although I've had limited success in using Windows Script from CFMX to control printers and would try to avoid doing that if I could. Instead, you could simply track the printer choice that the user made and force server print jobs to use that printer within your own code. Finally, keep in mind that the server will only be able to have one default printer, so if one user changes it to printer A and another changes it to printer B, someone's going to be disappointed. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188945 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Setting Default Printer
Im trying to do this on the client. I want to present them with a list of their printers and have them select which one they want as a default. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 1:21 PM To: CF-Talk Subject: RE: Setting Default Printer Does anyone know how to set a default printer from a list of prints shown in a webpage? im using the tag CFX_EnumPrinters to enumerate the printers, but im not sure how to allow the user to pick the default. Are you trying to set a default printer on the server or on the client? Presumably, your CFX custom tag lists printers on the server, not the client. You could run the VBScript code you posted from a command shell using CFEXECUTE, or adapt the code somewhat to make it available as a WSH COM object, although I've had limited success in using Windows Script from CFMX to control printers and would try to avoid doing that if I could. Instead, you could simply track the printer choice that the user made and force server print jobs to use that printer within your own code. Finally, keep in mind that the server will only be able to have one default printer, so if one user changes it to printer A and another changes it to printer B, someone's going to be disappointed. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188946 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: My Init() in my CFC...am I on the right track?
You can only chain two methods if the first method returns an object containing the second method. If you want to chain two methods that belong to a single object, the first method needs to return the object containing that method (this). If you want to chain a third method, the second method has to return an object containing the third method, and so on. So, for your purposes, all your methods need to return this if you want to chain them. ... Good lord this is a lot of...ahem...stuff to remember... Where's a good reference for ALL of this conceptual stuff? Not the syntax, or what you can and can't write...but general conceptual here's what you're trying to accomplish by using CFCs and here's why you want to do some of the things you want to do sort of document? I've seen ALL sorts of here's how to invoke a CFC and here's how to write your first CFC but nothing on, so you want to design a good, robust CFC?...what's a good reference that's syntax independent? ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188947 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: large cf ecom sites?
Recruitmax.com good example -Original Message- From: Bryan Love [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 12:55 PM To: CF-Talk Subject: RE: large cf ecom sites? Autobytel.com is pretty stinkin big. They're CF. -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 12:00 PM To: CF-Talk Subject: large cf ecom sites? I have a client that is starting to backpedal on wanting to use coldfusion for their ecommerce site. Some idiot in their marketing department is a fierce opponent of cf. Luckily he's not the deal breaker for cf but he does have some influence. Does anyone know of some other well known cf commerce sites such as potterybarn.com? Emmet ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188948 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: shopping cart, session variables - best practices
I think we should really find out the capabilities of Mayo's server/host before we can truly suggest one method over another. In high traffic eComm sites I have seen superb performance using the method described. If, however RAM is not a problem, he isn't experiencing high volumes and is not on another server with xxx websites who all make excessive use of session variables, then yes - maybe he should use session variables.. Mayo - please advise. Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: 29 December 2004 18:02 To: CF-Talk Subject: RE: shopping cart, session variables - best practices Use a structure for storing the basket contents by all means, however instead of session.basketContents, convert the structure to a WDDX object and store it as client.basketContents - That way you're not using precious RAM but cheap disk space. Storing application- and user-specific data is what precious RAM is for! In an application environment with a single application server, you will typically achieve significantly higher performance under load by storing things in memory rather than fetching them from the database for each page request. You may need to provision your server's RAM adequately to ensure you have enough for the number of concurrent users you need to support, but RAM is comparatively cheap. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188949 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: large cf ecom sites?
Half.com uses some CF and they're pretty big too... Tek-tips.com is entirely CF driven and has nearly a million members and probably 4 constantly active. The simplest way to say it to the client is that the security and stability of the application is as much about the programmer's skill as it is the language programmed in and that his marketing guy may have had bad experience with a cf application, but like any product, internet or physical, the craftsmanship is the key. An Emerson TV offers as much as a Sony sometimes, but Sony is higher quality and therefore lasts longer and is better but they are both built on the same technology. On Wed, 29 Dec 2004 09:55:14 -0800, Bryan Love [EMAIL PROTECTED] wrote: Autobytel.com is pretty stinkin big. They're CF. -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 12:00 PM To: CF-Talk Subject: large cf ecom sites? I have a client that is starting to backpedal on wanting to use coldfusion for their ecommerce site. Some idiot in their marketing department is a fierce opponent of cf. Luckily he's not the deal breaker for cf but he does have some influence. Does anyone know of some other well known cf commerce sites such as potterybarn.com? Emmet ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188950 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFMX ODBC problems..
Alexis, Did you ever get an answer to this problem? Also, do you have any experience with minisoft on 4.5 - or with troubleshooting minisoft drivers to CF Server? -Mark ([EMAIL PROTECTED]) ok here is my problem.. I had an application that worked perfectly on CF 5.0 using the Minisoft ODBC driver for Image/sql on an HP3000 with mpe/ix 6.0. When i moved that application over to the CFMX server and set up the ODBC socket dsn i get a weird error when trying to execute any simple query. I also found out that if i put a syntax error on the query the ODBC driver will let me know of the incorrect syntax... so the queries seem to be going through but when it gets back with the results the SequeLink JDBC Driver seems to hang. am i doing something wrong? or is the ODBC socket function on CFMX buggy? Bellow is the exact error i get.. Error Occurred While Processing Request ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188951 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: My Init() in my CFC...am I on the right track?
Good lord this is a lot of...ahem...stuff to remember... Fortunately, you don't really need to memorize it all as if it were a multiplication table. You just need to think about how objects, methods and properties work. For example, if you want to chain methods, you can see how things work within equivalent code that doesn't chain methods. Let's say you have an object foo with methods bar and baz. It doesn't matter what those methods do, just how you'd write the code to call them. cfset myfoo = CreateObject(component, foo) cfset myfoo.bar() cfset myfoo.baz() In the above code, we're creating an object instance called myfoo, then calling the bar and baz methods, each on a single line. On the second two lines, we're not doing anything to catch the returned value from each method call, so presumably it doesn't matter what values are returned by each method. On the other hand, let's say we want to be able to chain these methods together: cfset myfoo = CreateObject(component, foo).bar().baz() We already know that the CreateObject call returns an instance of foo, which contains a method bar so we can call that. To be able to call the baz method within the chain, we can see that bar needs to return the same object instance. Where's a good reference for ALL of this conceptual stuff? Not the syntax, or what you can and can't write...but general conceptual here's what you're trying to accomplish by using CFCs and here's why you want to do some of the things you want to do sort of document? I've seen ALL sorts of here's how to invoke a CFC and here's how to write your first CFC but nothing on, so you want to design a good, robust CFC?...what's a good reference that's syntax independent? Any primer on object-oriented programming, or any book introducing an object-oriented programming language such as Java, will do for this sort of thing. I don't know of anything that's CF-specific other than Hal Helms' book on components, which is a bit problematic in that it spends quite a bit of effort showing how to avoid problems that are specific to CFMX 6.0 if I recall correctly. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188952 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Setting Default Printer
Im trying to do this on the client. I want to present them with a list of their printers and have them select which one they want as a default. Well, to be perfectly honest, I think this is a bad thing to do from within a web page. The user's computer has perfectly good mechanisms to do this already. If you simply use JavaScript to open the standard printer dialog from within your application, the user will be able to print your web page just like she'd print from any other application. If you still wish to continue, you could presumably do what you want by placing that VBScript within your page to run on the client. You will not be able to do this purely with server-side code. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188953 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Setting Default Printer
Im trying to do this on the client. Oh, and I don't think you'll be able to do this in a cross-platform way. A Windows Script solution will only work for people using Windows and Internet Explorer. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188954 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: shopping cart, session variables - best practices
I think we should really find out the capabilities of Mayo's server/host before we can truly suggest one method over another. I wouldn't go so far as to say I was suggesting one mechanism over another. I merely pointed out that, in general, you improve the performance of web applications by storing data in application server memory instead of fetching it from the database for each page request. In high traffic eComm sites I have seen superb performance using the method described. There are plenty of reasons why you might choose Client variables or other database storage over Session variables. It is certainly possible to build applications that perform acceptably well using any of these approaches. My point was simply that storing data in memory will perform better than storing it in a database, all other things being equal. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188955 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: My Init() in my CFC...am I on the right track?
We already know that the CreateObject call returns an instance of foo, which contains a method bar so we can call that. To be able to call the baz method within the chain, we can see that bar needs to return the same object instance. I wish you could see me here at my desk with that little lightbulb going off over my head... ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188956 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
CFHTTP
I have this code using cfhttp below. When it does not connect I want it to display some text reading Connection lost. I have throwOnError set to yes. What do I have to add to the code below to get it to do this? Thanks. Robert O. HWW CFhttp method=get url=http://myurl/stats.cfm; resolveurl = 1 throwOnError = yes ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188957 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFHTTP
Maybe something like this: cftry CFhttp method=get url=http://myurl/stats.cfm; resolveurl = 1 throwOnError = yes cfcatch type=any Connection lost /cfcatch /cftry On Wed, 29 Dec 2004 15:16:32 -0500, Robert Orlini [EMAIL PROTECTED] wrote: I have this code using cfhttp below. When it does not connect I want it to display some text reading Connection lost. I have throwOnError set to yes. -- Ubqtous ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188958 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
FB4 prefuseaction postfuseaction hang server
I'm sure I'm missing something simple here, but I can't seem to figure it out although I have found a work around. I currently have one circuit named admin that I'm using. Below is the circuit.xml file: circuit access=public prefuseaction /prefuseaction fuseaction name=list do action=admin.header / include template=qry/qry_GetFileList / xfa name = deleteAction value = delete / xfa name = searchAction value = list / include template=dsp/dsp_fileList / do action=admin.footer / /fuseaction fuseaction name=delete do action=admin.header / include template=dsp/thisFar / do action=admin.footer / /fuseaction fuseaction name=header include template=dsp/dsp_pageHeader / /fuseaction fuseaction name=footer include template=dsp/dsp_pageFooter / /fuseaction postfuseaction /postfuseaction /circuit I can run this just fine in my application, no problems. Now if I take the do action=admin.footer / for example out of the fuseaction list and delete and put it under the postfuseaction and then view the list or delete fuseaction, my server hangs as it's eating up the CPU (goes on longer then 2 minutes before I restart the server). Bottom line is, do action works in individual fuseaction list or delete but not when it's in the prefuseaction or postfuseaction areas. Any help would be appreciated! -- Troy Murray ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188959 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: FB4 prefuseaction postfuseaction hang server
Are you sure you aren't creating an endless loop by running something in the prefuseaction that, when it runs, tries to run a prefuseaction again, and again, etc? Hope that helps. We use prefuseactions in many places so they do indeed work. On Wed, 29 Dec 2004 15:27:18 -0500, Troy Murray [EMAIL PROTECTED] wrote: I'm sure I'm missing something simple here, but I can't seem to figure it out although I have found a work around. I currently have one circuit named admin that I'm using. Below is the circuit.xml file: circuit access=public prefuseaction /prefuseaction fuseaction name=list do action=admin.header / include template=qry/qry_GetFileList / xfa name = deleteAction value = delete / xfa name = searchAction value = list / include template=dsp/dsp_fileList / do action=admin.footer / /fuseaction fuseaction name=delete do action=admin.header / include template=dsp/thisFar / do action=admin.footer / /fuseaction fuseaction name=header include template=dsp/dsp_pageHeader / /fuseaction fuseaction name=footer include template=dsp/dsp_pageFooter / /fuseaction postfuseaction /postfuseaction /circuit I can run this just fine in my application, no problems. Now if I take the do action=admin.footer / for example out of the fuseaction list and delete and put it under the postfuseaction and then view the list or delete fuseaction, my server hangs as it's eating up the CPU (goes on longer then 2 minutes before I restart the server). Bottom line is, do action works in individual fuseaction list or delete but not when it's in the prefuseaction or postfuseaction areas. Any help would be appreciated! -- Troy Murray ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188960 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
500 - Internal Server Error
Hi All, On my dev laptop lately I am getting 500 - Internal Server Error when ever I display a page with a ColdFusion error on it. I am running CFMX, WinXP Pro and the Dot Net framework. Any ideas why this might be happening and how to fix? Thanks, Duane ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188961 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: 500 - Internal Server Error
Duane, go to the CF Admin and turn of HTTP status codes, then you'll see the real error (instead of the generic 500). --- Ben -Original Message- From: Duane Boudreau [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 4:44 PM To: CF-Talk Subject: 500 - Internal Server Error Hi All, On my dev laptop lately I am getting 500 - Internal Server Error when ever I display a page with a ColdFusion error on it. I am running CFMX, WinXP Pro and the Dot Net framework. Any ideas why this might be happening and how to fix? Thanks, Duane ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188962 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: 500 - Internal Server Error
On my dev laptop lately I am getting 500 - Internal Server Error when ever I display a page with a ColdFusion error on it. I am running CFMX, WinXP Pro and the Dot Net framework. Any ideas why this might be happening and how to fix? I have no idea why it's happening, but you should see if you can get a more detailed error message than that. If you're using Internet Explorer, go into the settings and disable the Show friendly HTTP error messages option. You might also take a look at your CF error logs. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188963 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Possible contracting opportunity
I'm looking for someone in or near the Chicago area with experience in CF 4.x connecting to an HP e3000 using minisoft ODBC drivers. If anyone is out there like that contact me off-list. -Mark Mark A. Kruger, CFG, MSCE www.cfwebtools.com www.necfug.com http://blog.mxconsulting.com ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188964 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
splitchr is undefined
Hello all, I've been running into this js error recently. I noticed when this occurs is when I use cfform. Has anybody seen this error before? Thanks, Tim ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188965 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
cfapplication/clientvariable Error after Upgrade to MX 6.1
Hi all, I just upgraded to MX 6.1 and now I'm getting this error: The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values. The error occurred in C:\Websites\dave\scripts\Application.cfm: line 2 1 : !--- CFLOCATION URL=http://www.resumeblaster.com/welcomedown.html; --- 2 : cfapplication name=Cora applicationtimeout=#CreateTimeSpan( 0, 8, 0, 0 )# sessionmanagement=Yes clientmanagement=Yes clientstorage=sql_coldfusion 3 : cferror type=Request template=error.cfm mailto=[EMAIL PROTECTED] 4 : I'm using a datasource (sql_coldfusion) to store client variables. I have even deleted the tables out of the sql_coldfusion datasource and let the CF administrator recreate the tables in case MX wasn't compatible with tables created from 5.0. Any help on this? I can't seem to find any info on it on macromedia or google searches. Sincerely, Dave Phillips BizBreeze.com [EMAIL PROTECTED] 615-746-3851 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188966 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfapplication/clientvariable Error after Upgrade to MX 6.1
Long shots, but since the error is in your cfapplication tag I would go into the administrator and make sure both application and session variables are enabled (Server settings Memory Variables). If that doesn't work, you might also try clearing the cookies out of your web-browser. It's another long shot, but if you still have CFID/CFTOKEN pairs in there from CF5, it could mess you up, esp if you went from using UUID for cftoken to not, or vice versa. -Cameron On Wed, 29 Dec 2004 16:10:12 -0600, Dave Phillips [EMAIL PROTECTED] wrote: Hi all, I just upgraded to MX 6.1 and now I'm getting this error: The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values. The error occurred in C:\Websites\dave\scripts\Application.cfm: line 2 1 : !--- CFLOCATION URL=http://www.resumeblaster.com/welcomedown.html; --- 2 : cfapplication name=Cora applicationtimeout=#CreateTimeSpan( 0, 8, 0, 0 )# sessionmanagement=Yes clientmanagement=Yes clientstorage=sql_coldfusion 3 : cferror type=Request template=error.cfm mailto=[EMAIL PROTECTED] 4 : I'm using a datasource (sql_coldfusion) to store client variables. I have even deleted the tables out of the sql_coldfusion datasource and let the CF administrator recreate the tables in case MX wasn't compatible with tables created from 5.0. Any help on this? I can't seem to find any info on it on macromedia or google searches. Sincerely, Dave Phillips BizBreeze.com [EMAIL PROTECTED] 615-746-3851 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188967 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: shopping cart, session variables - best practices
In high traffic eComm sites I have seen superb performance using the method described. There are plenty of reasons why you might choose Client variables or other database storage over Session variables. To expand on Dave's statement the times you would want Client variables over memory (session) variables for storage is when the application needs to operate in a cluster of web servers. Sharing memory (session) variables then become impracticable. My point was simply that storing data in memory will perform better than storing it in a database, all other things being equal. Even though he actually did, it just goes without saying: memory is faster than I/O. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188968 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: shopping cart, session variables - best practices
On Wed, 29 Dec 2004 18:27:31 -0500, Dennis Powers [EMAIL PROTECTED] wrote: To expand on Dave's statement the times you would want Client variables over memory (session) variables for storage is when the application needs to operate in a cluster of web servers. Sharing memory (session) variables then become impracticable. Well, that depends. You can either use session replication or you can use sticky session - both allow session variables to be used effectively with clusters. macromeda.com is a cluster of several CFMX 6.1 instances, with hardware load balancing and lots of session data. We use sticky session in the load balancer. -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 6 invites to give away! If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188969 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: FB4 prefuseaction postfuseaction hang server
On Wed, 29 Dec 2004 15:27:18 -0500, Troy Murray [EMAIL PROTECTED] wrote: I currently have one circuit named admin that I'm using. Below is the circuit.xml file: ... I can run this just fine in my application, no problems. Now if I take the do action=admin.footer / for example out of the fuseaction list and delete and put it under the postfuseaction and then view the list or delete fuseaction, my server hangs as it's eating up the CPU (goes on longer then 2 minutes before I restart the server). You're creating an infinite loop. If your postfuseaction is admin.footer, that will go to circuit admin (this one) and run footer followed by postfuseaction... which will try to run admin.footer again. You'll need a separate circuit containing the header / footer stuff so that your admin circuit can do those actions. This is a good reason for following MVC-like principles of separating presentation from business logic and even separately the bulk of your presentation code from the layout level (in other words, splitting UI into presentation logic and presentation layout). -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 6 invites to give away! If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188970 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: shopping cart, session variables - best practices
To expand on Dave's statement the times you would want Client variables over memory (session) variables for storage is when the application needs to operate in a cluster of web servers. Sharing memory (session) variables then become impracticable. Session state stored in client variables also survive service and server restarts. Even though he actually did, it just goes without saying: memory is faster than I/O. Under a heavy load, this is no doubt true. However, I was recently surprised to find that under a small to moderate load, there may be no noticeable performance difference. I was recently tasked with upgrading a site from ColdFusion 5 to MX. I had used client variables when originally designing the site for various reasons. Mostly, I was trying to avoid locking issues and anticipating the need for clustering. Suffice it to say, we never had to cluster the site and locking for stability's sake is no longer necessary. So, when performing the upgrade, I decided to test the performance difference between using session variables and client variables. It took me a couple of hours to update the code base (20,000 lines of code). I was surprised to find that, under a minimal to moderate load, I could not measure the performance difference using the tools I had. Consequently, I decided not to make the switch (don't fix what ain't broke). That said, for new sites, I generally use the session scope because I can store complex objects such as CFCs in the session scope. Additionally, since the session scope is now thread safe, I don't have to worry about whether or not every developer is properly locking their code. Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188971 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: My Init() in my CFC...am I on the right track?
On Wed, 29 Dec 2004 13:18:43 -0500, Jeff Small [EMAIL PROTECTED] wrote: Good lord this is a lot of...ahem...stuff to remember... Yeah, that's why it takes most folks years to become 'fluent' in OO design... Where's a good reference for ALL of this conceptual stuff? Not the syntax, or what you can and can't write...but general conceptual here's what you're trying to accomplish by using CFCs and here's why you want to do some of the things you want to do sort of document? There's some OO basics in the first few sections of the Mach II Development Guide: http://livedocs.macromedia.com/wtg/public/machiidevguide/ (not all of the sections are Mach II specific!) And, as Dave Watts says, any primer on OO techniques (which are mostly for Java developers) should tell you most of this. There are currently no really good books on OO in CF... Hal's Discovering CFCs has some good background material but the book is out of date and the code examples show CFMX 6.0 stuff that is a long way from best practice on CFMX 6.1. -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 6 invites to give away! If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188972 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
OT: Tomcat/servlets issues with config (i believe)
I have dir structure: ROOT beer form.html WEB-INF web.xml classes com example web BeerSelect.class my web.xml file is as follows: servlet servlet-nameBeerTest/servlet-name servlet-classcom.example.web.BeerSelect/servlet-class /servlet servlet-mapping servlet-nameBeerTest/servlet-name url-pattern/sb.do/url-pattern servlet-mapping my form action of form.html is set to sb.do but when I submit my form.. I get: type Status report message /Beer/sb.do description The requested resource (/Beer/sb.do) is not available. Any ideas? suggestions? I need a fresh set of eyes.. I've been attempting to get this sorted for hours... -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Single Dads ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://single-dads.us ]-= ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188973 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Setting Default Printer
Jones, Becky wrote: Im trying to do this on the client. I want to present them with a list of their printers and have them select which one they want as a default. not with CFX_EnumPrinters you aren't, it's for server side. ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188974 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: FB4 on CFMX problem with set
It seems that the set was working fine, then at the end of the true I was doing relocate url=#myself#events.listamp;tk=#attributes.token# addtoken=yes type=client / and this seems to be wiping out any request variables. I replaced this with a do action=events.list / and the dump show request.usr_id is there and set. By using the relocate does FB wipe the request out and assume its a new one? Why would this be happening? ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188975 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Thread-safe CFCs
I think the mail you got saying your post was to long is just a warning, it still goes through. Is this right Mike? Ade -Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: 26 December 2004 03:55 To: CF-Talk Subject: Re: Thread-safe CFCs Because cf-talk doesn't allow long posts, I'm going to post this in two sections. Part I of II (or III). -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004 ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188976 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: FB4 on CFMX problem with set
On Thu, 30 Dec 2004 12:21:44 +1100, Duncan I Loxton [EMAIL PROTECTED] wrote: By using the relocate does FB wipe the request out and assume its a new one? Why would this be happening? relocate .. type=client/ stops execution of the current event and sends a redirect command back to the browser, which then initiates a new request. Like cflocation. -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 6 invites to give away! If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188977 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
cfmail and exchange server
The operations side of the house has recently built a windows 2000 server with exchange server 2000. Its an outsourced box at a server farm in Texas (good place for a farm). I've written a simple piece of code that creates a maillist with my email address 1,000 times. cfset maillist = cfoutput cfloop condition=counter lt 1000 cfif listlen(maillist) cfset maillist = maillist , [EMAIL PROTECTED] cfset counter = counter +1 cfelse cfset maillist = [EMAIL PROTECTED] cfset counter = counter +1 /cfif /cfloop /cfoutput I then use cfmail to loop over the list and send me 1,000 messages. cfoutput cfloop list=#maillist# index=i cfmail to=#i# from= [EMAIL PROTECTED] subject=#getMessages.Subject# type=html server=MyExchangeServer p#getMessages.Title#/p #getMessages.Content# /cfmail The CF page runs in about 13 seconds. It then takes the exchange server about 17 minutes to send off the 1,000 messages. That's only 3529 messages an hour. There is no way in hell a spam house can be profitable sending out 3500 messages and hour. I get offers to send out 1 million emails for $150.00 all the time. At 3,500 an hour that would take over 285 hours (nearly 12 days). Something has got to be wrong. Note: I am not bulding this to send out spam. We are trying to send out a newsletter type email to 25,000 opt in users. Anyone got any ideas? Being the CF runs in 13 seconds I doubt it is on the cf side. Anyone familar with Windows Exchange server? Ken Ketsdever Web Developer www.BloodSource.org http://www.bloodsource.org/ (916) 453-3718 Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188978 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Thread-safe CFCs
Yes.A long post will ALWAYS go through. The warning (which will be lengthened to 150 lines) is to remind people to trim their posts. In addition, the first post on a thread is always unlimited. I think the mail you got saying your post was to long is just a warning, it still goes through. Is this right Mike? Ade -Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: 26 December 2004 03:55 To: CF-Talk Subject: Re: Thread-safe CFCs Because cf-talk doesn't allow long posts, I'm going to post this in two sections. Part I of II (or III). -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188979 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54