RE: CFC or UDF
> -Original Message- > From: David Brown [mailto:[EMAIL PROTECTED] > Sent: Monday, March 28, 2005 12:19 AM > To: CF-Talk > Subject: CFC or UDF > > I am new to both of these features, but I am getting the hang of them. My > question is: What is the difference between them? These are very big questions... here's a shot at it, but I think it will leave you wanting: A UDF is a function: it can be called (perhaps with defined input parameters) to do something. That's it: call it (maybe giving it something to work with) and get an answer (or some work done). Functions generally represent a task, a verb: Find(), Replace(), Delete(), etc - these are all functions. Functions tend to be generalized: I can call "Find()" all over the place, in all sorts of code and use it. The function doesn't maintain state, it's not persistent and it's not picky - it just works on what its given. A CFC is an object (OO people might slap me for saying this but it stands up well enough at a glance). Objects "know" things (data) and can "do" things (methods). CFC methods (those things that the CFC can do) are actually UDFs - so CFCs can also be seen as collections of variables and UDFs. However the UDFs in a CFC are usable only in relation to that CFC. So, in this way at least, CFCs and UDFs aren't in "competition". CFCs generally represent some thing. Some tangible (or virtual) noun. For example you might have a "Blog" CFC. This CFC might contain data (variables) containing the authoring information, system information, etc. It would also contain methods (UDFs) that helped you work with the blog. Things like "Add()", "Update()", "Delete()", "Display()", etc. > What are the pro's and cons to each? They are both very different things so it's not really a choice of using one or the other. However: On the plus side using CF Mappings CFCs (like Custom Tags) can be included in an application with no fuss and muss: once the mapping is made you access the CFC as if it were part of the language. CFCs also allow for more structured programming in CF (something often missing in CF applications). They don't really enforce better coding, but they can definitely lead to it. CFCs tend to be confusing to people that don't know OO (although they are the gentlest introduction to OO available). They are slightly more complex to plan for an write (since each CFC must be maintained in its own, separate file. UDFs are great for adding functionality to the language. CFML doesn't have a "CountMyToes()" function and you need it? No sweat: create a UDF. UDFs are also very fast in CFML. Since they are treated by CF as data (as are JavaScript functions) they can be copied, moved, sent, etc. Like CFCs UDFs can often lead to better code. For example you might have a complex calculation going on in an output loop. By moving that calc to a UDF you can greatly simplify the presentation code and separate the calc from your presentation. UDFs can also be a pain the butt as there is no server-level option for including them. You must, on the other hand, make sure to include them where you need them. Because of this UDF management can become a real chore. Unless some standards are put in place you'll find yourself getting those "cannot declare the same UDF twice" errors all over the place. > If I create a CFC with a several methods in it is that not the same thing > if > I have one template with the several functions on it? Is a CFC just a > collection of UDF's? In one sense: but it's much more than that. CFCs are very much like a CFM page in that they can have data (variables) and functions (methods defined as UDFs). However there are two key points: 1) CFCs can be created and run as a part of another page. As a contributor to the page. The CFC (unlike CFINCLUDE but like a custom tag) is a private memory area for things to happen it. 2) CFCs can be persistent. This is were the real power of use comes in. You can create a "Shopping Cart" CFC and store it in the session scope to be called on at any time. You can't do that with a UDF, Custom Tag or CFINCLUDE. Unlike a struct or array (which only "know" things) your shopping cart CFC can also DO things like "add()" or "calculateShipping()". > Does CFC use up more memory then UDF's? It depends on what they do and how they're used. There's no simple answer to this. Since UDFs cannot be persisted (saved in memory) then, in that sense at the very least, CFCs do take up more memory. In general since UDFs are generally used to do small, concise tasks they tend to be small and fast. CFCs tend to represent everything that some noun can be and do: they can get very complex and memory hungry. Going back to our examples you can create a "ShoppingCart" CFC that could have 20 methods (UDFs). But you'd be hard pressed to create a UDF that could do the same tasks as neatly. Lastly CFCs are often used a "function libraries". Some people find it easier to place a lot of re
RE: CFC or UDF
> What is the difference between them? A CFC is generally used to encapsulate portions of business logic into a reusable API that can be called by one or more applications in different ways. You can use a CFC to publish a web service that can be called from anywhere, or you can use it as a function library if you want to. A UDF would be used to define a method within a CFC, or it can be used to encapsulate reusable code in its own right. I have a UDF that validates e-mail addresses, for example. It gets included in a standard function library that most of my applications use, or it can be included in a CFC that might need that logic for some reason. There is a lot more than can be said on this topic, but that's what comes to mind here at a quarter to one in the morning. --- Justin D. Scott Vice President Sceiron Interactive, Inc. www.sceiron.com [EMAIL PROTECTED] 941.378.5341 - office 941.320.2402 - mobile 877.678.6011 - facsimile ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200190 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: Best practice question?
Oops, Apparently I didn't read the example given quite thoroughly enough... sorry for any confusion I may have contributed to. Just trying to spread the joy! (Or, welcome to my world!) ;) J On Mon, 28 Mar 2005 00:16:58 -0500, Jim Davis <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Johnny Le [mailto:[EMAIL PROTECTED] > > Sent: Sunday, March 27, 2005 10:43 PM > > To: CF-Talk > > Subject: Re: Best practice question? > > > > This sounds great, but isn't the args variable has its own scope too? It > > is variables scope, isn't it? Since it declares locally in the function, > > I am not sure if its scope is variables, but it has a scope of something. > > So if you have scope everything, you would have to do > > variables.args.MaxCount, right? > > No - in the case presented (since the "var" keyword was used) "args" is in > the "function local" (also called the unnamed scope). It is NOT in the > variables scope and can't be accessed using it. > > The function local scope is persistent only during the current iteration of > the function and is then gone. The variables scope is persistent to the > instantiated life of the CFC (which can be quite a long time if the CFC is > kept in a shared memory scope). -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200189 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: Best practice question?
Johnny, Technically, yeah, that's exactly right. If you want to see all your scopes and all their contents, try this: That will dump every built-in scope, or those available to any page, special tag scopes notwithstanding, including: cffile cgi variables session application server form url client The other scopes, primarily, are (be kind, workin on the fly from memory here!): cfhttp cferror/error (similar but different, depending on cferror tag settings, see docs) query (addressed by queryName) cfcatch arguments parameters super thistag caller The first list are *always* available to any page, CFC, or construct of any type. The "variables" scope is the default container for any variables declared without being explicitly scoped in your code. So you're correct... args is actually variables.args. There are reasons to collect your form and URL vars into variables.args, though... it's a lot more convenient and allows you to build to an interface (i.e. args.action can be URL OR form, not restricted to either, doesn't matter which) rather than building to an implementation (MUST use URL or FORM, dependent on one or the other). You can use structAppend(args,url) and structAppend(args,form) to accomplish this, and the order in which you do this or whether or not you use the overwrite flag for structAppend is determined (in FB and MachII, and by developer choice in ad-hoc) by a variablePrecedence flag of form or url, determining which you know you can depend on to be in the args struct if there's a name conflict. All pages and CFCs have a variables scope and access as mentioned previously. However the other scopes, in the second list, are only available to code executing within the same context as the tags that create them (i.e. cferror is only available on an error page). So, if they occur within a function, they're available to the CFC. If they occur in a page, they're available to the page. If they occur in an include, they're available to the page after the include but not before. If you need to make the contents of a query scope that is created inside a CFC available to a page, you're going to have to use CFRETURN or cfset to a session, application, or some other mechanism to pass the query scope to the calling page. The other scope is the local scope, or the var scope, or function-local, that being a variable that dies as soon as the function in which it was declared, finishes executing... And, by "context" I basically refer to the owner of the current variables scope. Calling #args.maxCount# from within a container (like a page or a CFC) will, by default, refer to variables.args.maxCount. That's sort of what this thread is all about... is it acceptable to rely on the default scope for calling variables. Anyway, I hope that helps... J On Sun, 27 Mar 2005 23:43:05 -0400, Johnny Le <[EMAIL PROTECTED]> wrote: > This sounds great, but isn't the args variable has its own scope too? It is > variables scope, isn't it? Since it declares locally in the function, I am > not sure if its scope is variables, but it has a scope of something. So if > you have scope everything, you would have to do variables.args.MaxCount, > right? > > Johnny -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200188 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
CFC or UDF
I am new to both of these features, but I am getting the hang of them. My question is: What is the difference between them? What are the pro's and cons to each? If I create a CFC with a several methods in it is that not the same thing if I have one template with the several functions on it? Is a CFC just a collection of UDF's? Does CFC use up more memory then UDF's? I am looking for best practice I guess. Sorry for the steam of thought email. David ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200187 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: Best practice question?
> -Original Message- > From: Johnny Le [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 27, 2005 10:43 PM > To: CF-Talk > Subject: Re: Best practice question? > > This sounds great, but isn't the args variable has its own scope too? It > is variables scope, isn't it? Since it declares locally in the function, > I am not sure if its scope is variables, but it has a scope of something. > So if you have scope everything, you would have to do > variables.args.MaxCount, right? No - in the case presented (since the "var" keyword was used) "args" is in the "function local" (also called the unnamed scope). It is NOT in the variables scope and can't be accessed using it. The function local scope is persistent only during the current iteration of the function and is then gone. The variables scope is persistent to the instantiated life of the CFC (which can be quite a long time if the CFC is kept in a shared memory scope). The function local scope is the odd-man-out as to scopes: it's the only CF scope that's not named and not accessible as a struct. This is why I use . By creating this "pseudo-scope" and putting all of my function local vars into it I gain pretty much all of the benefits of other CF Scopes. But understanding the differences between the function local and variables scopes in CFC is tremendously important for building thread-safe applications. Knowing this stuff will save you tremendous heartache later - the bugs that come from this are nasty to track down and only appear under pressure. Jim Davis ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200186 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: Best practice question?
This sounds great, but isn't the args variable has its own scope too? It is variables scope, isn't it? Since it declares locally in the function, I am not sure if its scope is variables, but it has a scope of something. So if you have scope everything, you would have to do variables.args.MaxCount, right? Johnny > > > > > > > #local.Cnt# > > > > > >It's a simple example but it's very clear where all the values came from and >how each should be used. > >Jim Davis ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200185 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: Best practice question?
> Right, however, in some circumstances, ambiguity > may be a useful feature. For instance, not > specifying the form or url scope for a variable > can make a template work both as a form action or > as an href called template with parameters passed > in the url. That's why I like the way FuseBox handles input. So much so that I use it even outside my FuseBox apps. It takes all of the FORM and URL variables and moves them to the ATTRIBUTES scope if it doesn't already exist. That way you can CFPARAM all your input variables to that scope and use them wherever. You no longer have to worry about where they came from, AND you can continue to scope properly. Very nice, IMHO. --- Justin D. Scott Vice President Sceiron Interactive, Inc. www.sceiron.com [EMAIL PROTECTED] 941.378.5341 - office 941.320.2402 - mobile 877.678.6011 - facsimile ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200184 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: help-a-noob: Null Pointers
>> No, probably not to a noticeable degree. > I imagine it's probably none at all - probably winds up > with same > bytecode in the end? Yes although at some point that # symbol does have to be removed during the process of converting CFML to java bytecode. Though it generally only happens once after writing and then executing the template. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200183 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: help-a-noob: Null Pointers
> most importantly, you will impress your peers with your > superb knowledge in 'The Use of Pound Signs' ;) I'm always very impressed by this knowledge. :) s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200182 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: help-a-noob: Null Pointers
> I'm guessing that unless you've got 20 million of them in > a page, > they're blitzed after the first run... so they're only > going to slow > things down in a development environment or for very > dynamic pages > that can't be cached in some way. Well it would have to be a page for which the Java classes created by CF for each CF template can't be reused... the only way I know to do that is to use or the like to write the template repeatedly and include it. So it's have to be like > No matter how you slice it though, the characters have to > be analyzed, > removed, etc., and that's going to translate into some > sort of > operation at some point. It ain't going to cost much > unless it happens > often or your page is buried in them, but it's going to > have to cost > something at some point. Yes but generally only on the first run. Iirc you can disable caching of the java classes in CF7 -- I don't remember off the top of my head if that's available in 6.1 ... though you're not generally going to do that in production either... so yes, there is a cost, but you pay it once and even then it's minimal at best. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200181 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: help-a-noob: Null Pointers
most importantly, you will impress your peers with your superb knowledge in 'The Use of Pound Signs' ;) D On Sun, 27 Mar 2005 21:29:23 -0600, Jared Rypka-Hauer - CMG, LLC <[EMAIL PROTECTED]> wrote: > I'm guessing that unless you've got 20 million of them in a page, > they're blitzed after the first run... so they're only going to slow > things down in a development environment or for very dynamic pages > that can't be cached in some way. > > No matter how you slice it though, the characters have to be analyzed, > removed, etc., and that's going to translate into some sort of > operation at some point. It ain't going to cost much unless it happens > often or your page is buried in them, but it's going to have to cost > something at some point. > > Laterz! > > J > > > On Sun, 27 Mar 2005 21:59:45 -0500, Joe Rinehart <[EMAIL PROTECTED]> wrote: > > > No, probably not to a noticeable degree. > > > > I imagine it's probably none at all - probably winds up with same > > bytecode in the end? > > > > -Joe > > > > -- > > For Tabs, Trees, and more, use the jComponents: > > http://clearsoftware.net/client/jComponents.cfm > > > > > > ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200180 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: help-a-noob: Null Pointers
I'm guessing that unless you've got 20 million of them in a page, they're blitzed after the first run... so they're only going to slow things down in a development environment or for very dynamic pages that can't be cached in some way. No matter how you slice it though, the characters have to be analyzed, removed, etc., and that's going to translate into some sort of operation at some point. It ain't going to cost much unless it happens often or your page is buried in them, but it's going to have to cost something at some point. Laterz! J On Sun, 27 Mar 2005 21:59:45 -0500, Joe Rinehart <[EMAIL PROTECTED]> wrote: > > No, probably not to a noticeable degree. > > I imagine it's probably none at all - probably winds up with same > bytecode in the end? > > -Joe > > -- > For Tabs, Trees, and more, use the jComponents: > http://clearsoftware.net/client/jComponents.cfm > > ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200179 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: Best practice question?
> I thought that query result variables do not require prefix > if in a loop, and query result variable is > actually the first scope in the order of evaluation that > coldfusion would look for. I guess > alone is not a loop. I guess you need the query attribute to > make it a loop. That's correct. CFOUTPUT only loops over a query when you specify the QUERY attribute. Once you add the QUERY attribute, CFOUTPUT will not only loop over that query but will also look within the query to resolve unscoped variables, although you should scope them anyway for clarity. 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! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200178 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: Best practice question?
What surprise me is that this would not work at all, not even the value of the first row. It actually throws an error: #colName# I thought that query result variables do not require prefix if in a loop, and query result variable is actually the first scope in the order of evaluation that coldfusion would look for. I guess alone is not a loop. I guess you need the query attribute to make it a loop. Johnny >You had to use the query name in cfloop but not in cfoutput. > >That's the only rule there was... at least that I recall... > >so this worked: > >#colName# > >And this worked: >#qryName.colName# > >But this would only output the first row for every iteration: > >#colName# > >Laterz, >J > > >On Sun, 27 Mar 2005 15:06:43 -0500, Andrew Tyrone <[EMAIL PROTECTED]> wrote: > > > >-- >Continuum Media Group LLC >Burnsville, MN 55337 >http://www.web-relevant.com >http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200177 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: help-a-noob: Null Pointers
> No, probably not to a noticeable degree. I imagine it's probably none at all - probably winds up with same bytecode in the end? -Joe -- For Tabs, Trees, and more, use the jComponents: http://clearsoftware.net/client/jComponents.cfm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200176 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: HTML Editor
yeah, version 1 had a hook to use iSpell which is great for individuals, but the license required a purchase for use enterprise wide and iSpell required a client side install, something of a real PITA to get approved for an intranet of 20,000 employees. Activedit was therefore a cheaper route in the end. Now, I see FCKEditor now has spell checking in the latest release. http://www.fckeditor.net/whatsnew/default.html but the approach is the same. suppose we could work on getting spellerpages to work, but hey, we already own Activedit licenses. ;) Doug On Sun, 27 Mar 2005 16:13:51 -0800, Matt Robertson <[EMAIL PROTECTED]> wrote: > I'm not referring to the 'betas' of FCKEditor (the author means well > but seems to have reinvented development cycle terminology). I'm > staying away from it until its final. I'm referencing v1.6. I > replaced ActivEdit with FCKEditor 1.6 some time ago. The file upload > capability was super-important, but translateability was a killer > problem I had to have solved as well. > > -- > --mattRobertson-- > Janitor, MSB Web Systems > mysecretbase.com > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200175 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: CFMX7 Install Error (JNDI Port 2920?)
if i have to install again, and run into it, i guess ill try that stuff... but for now, i just wasted 5 hours of dev. time effing with this crap :( i need to get some work done before i get ready for this week! :) cheers! tw On Sun, 27 Mar 2005 18:45:08 -0500, Dave Watts <[EMAIL PROTECTED]> wrote: > > i did the default install directories, and it worked perfectly? > > > > must be something with the dev. edition install and the > > inability to use dir's other than the defaults? > > No, those things shouldn't make any difference. See if this helps: > > http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=3&th > readid=777829 > http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=2&th > readid=667625 > > 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! > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200174 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: HTML Editor
yeah, version 1 had a hook to use iSpell which is great for individuals, but the license required a purchase for use enterprise wide and iSpell required a client side install, something of a real PITA to get approved for an intranet of 20,000 employees. Activedit was therefore a cheaper route in the end. Now, I see FCKEditor now has spell checking in the latest release. http://www.fckeditor.net/whatsnew/default.html but the approach is the same. suppose we could work on getting spellerpages to work, but hey, we already own Activedit licenses. ;) Doug On Sun, 27 Mar 2005 16:13:51 -0800, Matt Robertson <[EMAIL PROTECTED]> wrote: > I'm not referring to the 'betas' of FCKEditor (the author means well > but seems to have reinvented development cycle terminology). I'm > staying away from it until its final. I'm referencing v1.6. I > replaced ActivEdit with FCKEditor 1.6 some time ago. The file upload > capability was super-important, but translateability was a killer > problem I had to have solved as well. > > -- > --mattRobertson-- > Janitor, MSB Web Systems > mysecretbase.com > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200173 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: Best practice question?
>>isnt it just better to use and only output when you need to output? Then you loose the GROUP facility in the CFOUTPUT tag. If I remember well, the CFLOOP tag was introduced in version 3 or so to add facilities than the CFOUTPUT tag had not. But it can't replace it completely. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200172 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: Best practice question?
Thanks for the clarification, Jim... I think your point came across more clearly the second time thru. I've never tried the query.column[1] method... I honestly didn't think it would work. Ya learn something new every day, eh? And you're absolutely right, we can do things with our variables that make other environments seem silly and small! Laterz, J On Sun, 27 Mar 2005 19:00:17 -0500, Jim Davis <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] > > Sent: Sunday, March 27, 2005 6:09 PM > > To: CF-Talk > > Subject: Re: Best practice question? > > > > > The odd thing is with queries should you use indexed notation you get a > > > different value. While the value of "queryname.fieldname" is the value > > of > > > the first row the value of "queryname["fieldname"]" is actually a > > reference > > > the column - essentially a one dimensional array containing all of the > > rows > > > values. > > > > Well, yeah, it's true... but it's actually a 2-dimensional array, > > because your column name is the first dimension. I may be being unduly > > picky, but these are issues where "getting it right" is the same as > > "getting it to work." > > I think we're saying the same thing - the QUERY is a two dimensional array, > but the column is a one-dimensional array. > > The result from queryname["fieldname"] is a one-dimensional array, not two. > > > When using query["column"][rowNumber], you're effectively treating > > your entire query as a 2-dimensional array, whereas you're asserting > > that it treats the individual column as a one-dimensional array. It's > > a critical distinction, because query.column[1] should work as you've > > explained it, but it won't. > > It does actually work just as I described (give it a try: query.column[1] > will give you the value from that column for the first row of the query). > > Queryname["fieldname"][index] gives the exact same results as > queryname.fieldname[index]. In this case (accessing a single cell) indexed > and dot notation are equivalent and return the same values. > > However queryname.fieldname returns the value of the first row of that > column while queryname["fieldname"] does not - it returns a one-dimensional > array of all the values in the column. So in this case (accessing a column) > indexed and dot notations result in different values. > > I'm sorry if I said something incorrectly - but the above is definitely what > I meant. > -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200171 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: HTML Editor
I'm not referring to the 'betas' of FCKEditor (the author means well but seems to have reinvented development cycle terminology). I'm staying away from it until its final. I'm referencing v1.6. I replaced ActivEdit with FCKEditor 1.6 some time ago. The file upload capability was super-important, but translateability was a killer problem I had to have solved as well. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200171 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: Best practice question?
>>Explicit scoping _IS_always_ the best idea, unless you have a >>compelling rationale to break with the best practice. and vice versa ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200169 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: client variable: simple or complex?
> -Original Message- > From: Will Tomlinson [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 27, 2005 5:53 PM > To: CF-Talk > Subject: Re: client variable: simple or complex? > > >> In Ben Forta's study guide, on page 100, he says "CLIENT > >> variables can store only simple data (like numbers and > >> strings), not complex data (like arrays, structures, and queries). > > > >This is correct. Client variables are stored in places that can only > accept > >character data > > BUT there's a way around this limitation. Jeff Peters' book; Lists Arrays > and Structures, pages 137-142 > > You convert structures to strings (xml data set) by serializing them using > CFWDDX. Good example is a shopping cart. > > > > Then deserialize it with action="WDDX2CFML". > > Cool for saving complex data in Client scope. Just to caveat your caveat one thing to be aware of with this is that the client-storage mechanism is set at the server-side, not programmatically. Unfortunately this means that depending the server configuration you may have size limits as well. For example even small data structures can make big WDDX packets: most of which are too big for cookies and some of which are too big the registry. Of course cookies and the registry are both the red-headed step children of client storage, but some people still use them. ;^) If you store your client information in a DB then the WDDX method works a treat (but you should still plan for performance testing as the conversion can be expensive if done too often). Jim Davis ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200168 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: Best practice question?
> -Original Message- > From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 27, 2005 6:09 PM > To: CF-Talk > Subject: Re: Best practice question? > > > The odd thing is with queries should you use indexed notation you get a > > different value. While the value of "queryname.fieldname" is the value > of > > the first row the value of "queryname["fieldname"]" is actually a > reference > > the column - essentially a one dimensional array containing all of the > rows > > values. > > Well, yeah, it's true... but it's actually a 2-dimensional array, > because your column name is the first dimension. I may be being unduly > picky, but these are issues where "getting it right" is the same as > "getting it to work." I think we're saying the same thing - the QUERY is a two dimensional array, but the column is a one-dimensional array. The result from queryname["fieldname"] is a one-dimensional array, not two. > When using query["column"][rowNumber], you're effectively treating > your entire query as a 2-dimensional array, whereas you're asserting > that it treats the individual column as a one-dimensional array. It's > a critical distinction, because query.column[1] should work as you've > explained it, but it won't. It does actually work just as I described (give it a try: query.column[1] will give you the value from that column for the first row of the query). Queryname["fieldname"][index] gives the exact same results as queryname.fieldname[index]. In this case (accessing a single cell) indexed and dot notation are equivalent and return the same values. However queryname.fieldname returns the value of the first row of that column while queryname["fieldname"] does not - it returns a one-dimensional array of all the values in the column. So in this case (accessing a column) indexed and dot notations result in different values. I'm sorry if I said something incorrectly - but the above is definitely what I meant. > > For most everything you can use this as an array. To get the sum of a > query > > column, for example, you can do ArraySum(queryname["fieldname"]). > > > > This is a very powerful feature - but test it first. CFMX had some > minor > > bugs with this related to the fact that in some cases it counted the > array > > from zero (as Java) and not from one (as CF). > > And... something you don't see mentioned very often... this worked as > far back as CF 4.x, it's not specifically a Java-derived feature, and To take it further it actually worked BETTER in CF 4.5/5 since once CF went to Java we began to see bugs in stuff like this since Java arrays are counted from 0 natively. It's still useful post-mx but just check out first. There were a lot of little annoying bugs in features like this due to that... which reminds me that I've got to test CF 7 and see if they're still there. ;^) > I've used it on SQL Server datasets that had spaces in the column > names because this treats the first dimension of the array - the > column name - as a string, which, being wrapped in quotes, resolves > just fine where #spaces in this name# won't work no matter how you try > to resolve it. Exactly - this also applies to structs as well (naturally since internally a query is a struct of arrays - the column name is the struct key). You can use indexed notation to use key or column labels that are not legal CF variables names (contain spaces as you mention but also begin with numbers, use odd punctuation characters or other odd things). All told the breadth and ability of CF variables and data structures far out-shadows any other language I've seen - but most people barely scratch the surface. Jim Davis ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200167 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: HTML Editor
Matt Robertson wrote: > Huh? FCKEditor has a spell checker, and has had it for some time. > Its listed right on the feature set on the front page. Its a > 3rd-party plugin, but it works quite well. Well, it wasn't in the 2.0 beta releases, RC1, or RC2... they didn't add it back in until RC3. Personally, the developer is a little confused about the meaning of the term "Release Candidate" but hey.. =) - Rick ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200166 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: client variable: simple or complex?
I wrote this a long time ago as a proof-of-concept when I was trying to figure out how to store arrays in client vars. Substitute my query for yours. Something simple with a field or two. Clearly if you need to store a structure in a persistent scope there are better ways to do it, but this shows how its done if you *must* do it in cvars. SELECT groups.ID, groups.GroupName FROM groups WHERE 0=0 #client.MyArray# #variables.MyArray[ArrayRows][ArrayCols]# #variables.MyArray[ArrayRows][ArrayCols]# -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200165 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: client variable: simple or complex?
>> In Ben Forta's study guide, on page 100, he says "CLIENT >> variables can store only simple data (like numbers and >> strings), not complex data (like arrays, structures, and queries). > >This is correct. Client variables are stored in places that can only accept >character data BUT there's a way around this limitation. Jeff Peters' book; Lists Arrays and Structures, pages 137-142 You convert structures to strings (xml data set) by serializing them using CFWDDX. Good example is a shopping cart. Then deserialize it with action="WDDX2CFML". Cool for saving complex data in Client scope. Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200164 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
Seeking algorithm to calculate parallel processing cost
I am looking for a method to calculate the cost of running multiple, simultaneous processing jobs on a computer cluster. For example, I am renting cluster time at $XX/hour. I can run multiple jobs, but the cost is always $XX/hour regardless of the number of parallel, simultaneous jobs running. If one job is running I still get charged $XX/hour, or if 10 jobs are running during the same period, I still get charged $XX/hour. I have the start time/date and end time/date of each job. Anyone have any idea how to code this kind of calculation? TNX if you can provide some clues. Richard Colman Institute for Genomics and Bioinformatics 949-824-1816, 701-5330 [EMAIL PROTECTED] ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200163 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: CFMX7 Install Error (JNDI Port 2920?)
> i did the default install directories, and it worked perfectly? > > must be something with the dev. edition install and the > inability to use dir's other than the defaults? No, those things shouldn't make any difference. See if this helps: http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=3&th readid=777829 http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=2&th readid=667625 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! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200162 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: CFMX7 Install Error (JNDI Port 2920?)
well... i did the default install directories, and it worked perfectly? must be something with the dev. edition install and the inability to use dir's other than the defaults? tony On Sun, 27 Mar 2005 17:58:15 -0500, Dave Watts <[EMAIL PROTECTED]> wrote: > > so there should be something on that port? > > Yes, the JRun server should be listening on that port if the web server > configuration utility plans to connect to it. > > 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! > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200161 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: HTML Editor
Huh? FCKEditor has a spell checker, and has had it for some time. Its listed right on the feature set on the front page. Its a 3rd-party plugin, but it works quite well. On Sat, 26 Mar 2005 12:47:02 -0500, Douglas Knudsen <[EMAIL PROTECTED]> wrote: > what was your answer to 'I can not spell woth [EMAIL PROTECTED], where is tha > spiel > cheeker'? That's the one thing lacking in fckeditor. We are using > activedit as it comes with a spell checker off the shelf. > > D > > On Sat, 26 Mar 2005 09:27:45 -0800, Matt Robertson > <[EMAIL PROTECTED]> wrote: > > Will wrote: > > > Ya know...the more I think about it, the LESS I want my client handling > > > images... > > > They have enough trouble with simple text formatting! Anyone with me > > > here?? > > > > > > > Oh HELL no! :D > > > > I have clients who got down on their knees and thanked me whenI > > replaced the commercial editor I was using with FCKEditor. There were > > two reasons: The text/paste or from-Word/paste(where it strips all > > html or Word crap out of a paste and puts it in plain) and the file > > uploader, so they could finally put up their excel spreadsheets, Word > > docs and pdf's inside the page rather than use the external thing I > > had to build for them since the editor wouldn't support it. > > > > I just did a training session yesterday with a client I'm upgrading > > from an old system and she was practically delirious when I showed her > > the procedure. Its the sort of thing that I've seen make a sale with > > a new client, more than once. > > > > -- > > --mattRobertson-- > > Janitor, MSB Web Systems > > mysecretbase.com > > > > > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200160 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: Best practice question?
On Sun, 27 Mar 2005 17:39:35 -0500, Jim Davis <[EMAIL PROTECTED]> wrote: > > On Sun, 27 Mar 2005 15:06:43 -0500, Andrew Tyrone <[EMAIL PROTECTED]> > > wrote: > > > I might be crazy, but I seem to remember, at least in CF 4.x versions, > > that > > > if you scoped a query column within a cfoutput, it would only output the > > > data in the first row of the query, not the current row, no matter where > > you > > > were in the loop. > > Matt's right here, the basic rule doesn't change depending on scope, it > changes on situation. > > If your looping over the query (with a cfoutput or cfloop using the query > attribute) then doing "queryname.fieldname" will always output the current > row's value. Right, query.column will get you the value, whether you're using cfquery or cfloop. Without a loop, you'll get the values from the first row of the query, which is a handy shortcut if you've got a one-row query. But, with cfoutput you DO NOT need to prefix the column, whereas with cfloop you do... perhaps not now, but in previous versions of CF you did. That's what Matt was referring to. > If you're not looping over a query then "queryname.fieldname" will always > return the value of the first row as if you said "queryname.fieldname[1]". > > The odd thing is with queries should you use indexed notation you get a > different value. While the value of "queryname.fieldname" is the value of > the first row the value of "queryname["fieldname"]" is actually a reference > the column - essentially a one dimensional array containing all of the rows > values. Well, yeah, it's true... but it's actually a 2-dimensional array, because your column name is the first dimension. I may be being unduly picky, but these are issues where "getting it right" is the same as "getting it to work." When using query["column"][rowNumber], you're effectively treating your entire query as a 2-dimensional array, whereas you're asserting that it treats the individual column as a one-dimensional array. It's a critical distinction, because query.column[1] should work as you've explained it, but it won't. > For most everything you can use this as an array. To get the sum of a query > column, for example, you can do ArraySum(queryname["fieldname"]). > > This is a very powerful feature - but test it first. CFMX had some minor > bugs with this related to the fact that in some cases it counted the array > from zero (as Java) and not from one (as CF). And... something you don't see mentioned very often... this worked as far back as CF 4.x, it's not specifically a Java-derived feature, and I've used it on SQL Server datasets that had spaces in the column names because this treats the first dimension of the array - the column name - as a string, which, being wrapped in quotes, resolves just fine where #spaces in this name# won't work no matter how you try to resolve it. Just another tool in thye boxe... Laterz! J -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200159 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: CFMX7 Install Error (JNDI Port 2920?)
> so there should be something on that port? Yes, the JRun server should be listening on that port if the web server configuration utility plans to connect to it. 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! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200158 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: CFMX7 Install Error (JNDI Port 2920?)
> You might try running netstat from a command prompt to see if anything's > listening on that port. That said, I've occasionally been stymied running > into this problem with previous versions of CFMX - nothing appeared to be > using the port, yet the web server connector couldn't connect to it. so there should be something on that port? > > > and this one too? > > > > - > > ANT Script Error: > > Status: ERROR > > Additional Notes: ERROR - > > windows_basic_commands.xmlgetFile(globalinstall.properties): > > couldn't create temp dir C:\Documents and Settings\Tony > > Weeg\Local Settings\Temp\2582.tmp > > - > > Out of disk space? Running with insufficient privileges? not a chance, i have gigs of gigs :) ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200157 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: Best practice question?
> On Sun, 27 Mar 2005 15:06:43 -0500, Andrew Tyrone <[EMAIL PROTECTED]> > wrote: > > I might be crazy, but I seem to remember, at least in CF 4.x versions, > that > > if you scoped a query column within a cfoutput, it would only output the > > data in the first row of the query, not the current row, no matter where > you > > were in the loop. Matt's right here, the basic rule doesn't change depending on scope, it changes on situation. If your looping over the query (with a cfoutput or cfloop using the query attribute) then doing "queryname.fieldname" will always output the current row's value. If you're not looping over a query then "queryname.fieldname" will always return the value of the first row as if you said "queryname.fieldname[1]". The odd thing is with queries should you use indexed notation you get a different value. While the value of "queryname.fieldname" is the value of the first row the value of "queryname["fieldname"]" is actually a reference the column - essentially a one dimensional array containing all of the rows values. For most everything you can use this as an array. To get the sum of a query column, for example, you can do ArraySum(queryname["fieldname"]). This is a very powerful feature - but test it first. CFMX had some minor bugs with this related to the fact that in some cases it counted the array from zero (as Java) and not from one (as CF). Just to plug much of this information comes from my guide to CFML variables. It's actually long overdue for a clean up (many of the links inside it are dead and some information has changed since CF 6.0) but it's still rather good if I do say so myself: http://www.depressedpress.com/DepressedPress/Content/Development/ColdFusion/ Guides/Variables/Index.cfm Jim Davis ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200156 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: Best practice question?
isnt it just better to use and only output when you need to output? or wrap the cfoutput around the whole thing? just wondering... im a big fan of and then make myself access everything with #myQuery.myColumn[i]# i guess i just feel like i have more control over things like that :) -- tony Tony Weeg macromedia certified coldfusion mx developer email: tonyweeg [at] gmail [dot] com blog: http://www.revolutionwebdesign.com/blog/ cool tool: http://www.antiwrap.com "...straight cash homey" - randy moss, now a raider ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200155 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: Best practice question?
You had to use the query name in cfloop but not in cfoutput. That's the only rule there was... at least that I recall... so this worked: #colName# And this worked: #qryName.colName# But this would only output the first row for every iteration: #colName# Laterz, J On Sun, 27 Mar 2005 15:06:43 -0500, Andrew Tyrone <[EMAIL PROTECTED]> wrote: > I might be crazy, but I seem to remember, at least in CF 4.x versions, that > if you scoped a query column within a cfoutput, it would only output the > data in the first row of the query, not the current row, no matter where you > were in the loop. That might also have been the case when outputting query > data with cfloop, and I might have these totally reversed as far as which > exhibited the aforementioned behavior. Either way, I never scoped query > columns when looping over a query for this reason. I don't remember with > which version of CF this changed. Like I said, I might be crazy and this > never was the case, but something tells me it was. > > Andy > -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200154 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: CFMX7 Install Error (JNDI Port 2920?)
> any ideas... > > a-googling i went... and a-googling was not finding anything! > > - > Web Server Connector Configuration Error > Status: ERROR > Additional Notes: ERROR - JNDI port 2920 for server > coldfusion is not active > - You might try running netstat from a command prompt to see if anything's listening on that port. That said, I've occasionally been stymied running into this problem with previous versions of CFMX - nothing appeared to be using the port, yet the web server connector couldn't connect to it. > and this one too? > > - > ANT Script Error: > Status: ERROR > Additional Notes: ERROR - > windows_basic_commands.xmlgetFile(globalinstall.properties): > couldn't create temp dir C:\Documents and Settings\Tony > Weeg\Local Settings\Temp\2582.tmp > - Out of disk space? Running with insufficient privileges? 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! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200153 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: just noticed this when validating email
> But there *must* be quite a few of us that don't like JS, > don't take the time to write it ourselves because it takes > much longer than writing: > > message="Please enter a search term"> > > I use that one all the time. lol In exchange for having CF write JavaScript for you, you have to cede control over exactly how that JavaScript will act. How about if you want to show a hidden div instead of an alert box? How about if you want to set focus back on the form field with the bad data, when the user tabs out of the field? If you want to be able to make it do exactly what you want it to do, you have to be able to write the code yourself. 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! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200152 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: CFMX7 Install Error (JNDI Port 2920?)
1. i have no firewall or firewall software running on this box. 2. my install was server configuration (iis) thanks. tw On Sun, 27 Mar 2005 17:22:03 -0500, Tony Weeg <[EMAIL PROTECTED]> wrote: > any ideas... > > a-googling i went... and a-googling was not finding anything! > > - > Web Server Connector Configuration Error > Status: ERROR > Additional Notes: ERROR - JNDI port 2920 for server coldfusion is not active > - > > and this one too? > > - > ANT Script Error: > Status: ERROR > Additional Notes: ERROR - > windows_basic_commands.xmlgetFile(globalinstall.properties): couldn't > create temp dir C:\Documents and Settings\Tony Weeg\Local > Settings\Temp\2582.tmp > - > > -- > tony > > Tony Weeg > > macromedia certified coldfusion mx developer > email: tonyweeg [at] gmail [dot] com > blog: http://www.revolutionwebdesign.com/blog/ > cool tool: http://www.antiwrap.com > > "...straight cash homey" > - randy moss, now a raider > -- tony Tony Weeg macromedia certified coldfusion mx developer email: tonyweeg [at] gmail [dot] com blog: http://www.revolutionwebdesign.com/blog/ cool tool: http://www.antiwrap.com "...straight cash homey" - randy moss, now a raider ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200151 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: just noticed this when validating email
Learnin alot here from you guys. But there *must* be quite a few of us that don't like JS, don't take the time to write it ourselves because it takes much longer than writing: I use that one all the time. lol Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200150 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: Best practice question?
On Sun, 27 Mar 2005 15:06:43 -0500, Andrew Tyrone <[EMAIL PROTECTED]> wrote: > I might be crazy, but I seem to remember, at least in CF 4.x versions, that > if you scoped a query column within a cfoutput, it would only output the > data in the first row of the query, not the current row, no matter where you > were in the loop. I think that should still be true for [cfquery myname goes here] [cfoutput] #myquery.myfield# [/cfoutput] Not something you would use very often. I'm pretty sure the following was not true in CF 4.5, which I quit using maybe 2 yrs ago. [cfoutput query="myquery"] #myquery.myfield# [/cfoutput] No clue about 4.0 or 3.x. WAY too many dead brain cells between then and now :-) -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200149 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
CFMX7 Install Error (JNDI Port 2920?)
any ideas... a-googling i went... and a-googling was not finding anything! - Web Server Connector Configuration Error Status: ERROR Additional Notes: ERROR - JNDI port 2920 for server coldfusion is not active - and this one too? - ANT Script Error: Status: ERROR Additional Notes: ERROR - windows_basic_commands.xmlgetFile(globalinstall.properties): couldn't create temp dir C:\Documents and Settings\Tony Weeg\Local Settings\Temp\2582.tmp - -- tony Tony Weeg macromedia certified coldfusion mx developer email: tonyweeg [at] gmail [dot] com blog: http://www.revolutionwebdesign.com/blog/ cool tool: http://www.antiwrap.com "...straight cash homey" - randy moss, now a raider ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200148 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: just noticed this when validating email
On Sun, 27 Mar 2005 05:46:26 -0400, Will Tomlinson <[EMAIL PROTECTED]> wrote: > Ok, so I exaggerated, but who's the numb skull that came up with ++ and &&?? > And ==? Kernighan and Ritchie, when they invented C I think. But there are far worse syntactic monstrosities out there. C++ has a delightful pointer to (class) member syntax that involves ::* and other such strangeness - check out pages like these: http://corfield.org/index.cfm?event=cplusplus.section§ion=ptdis http://corfield.org/index.cfm?event=cplusplus.section§ion=ptspc > My point is it'd just make life easier if the same creative minds that > engineered CF to be written much like english also engineered the others. You could always try COBOL :) -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200147 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: help-a-noob: Null Pointers
> I know it's not a biggie, but that means the #'s actually > would slow it down a little? No, probably not to a noticeable degree. However, you would then be using pound signs unnecessarily, which indicates that you may be unsure when you need to use them and when you don't. An easy-to-remember rule for using pound signs in CF is that you only need to use them when you are getting the value of a variable and placing it into a literal string. 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! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200146 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: Best practice question?
> In CFC, I always do this: > > > > > > If we should always scope our variables. Should I do this? > > variables.few = 10/> I'm not sure what the point of this example is, anyway. Why would you require an argument, then immediately overwrite it? > The reason I re-set arguments.some to few is because I want > to type 3 letters instead of 14, but if I should always scope > my variables, then there is no point of resetting it. Yes, there's no point in storing one variable's value within another solely to avoid typing a scope identifier. 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! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200145 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: just noticed this when validating email
> With all due respect you missed my point. Or maybe I didn't > make it clear. It wasnt to get rid of JS, but rather for it > to written as easily as CF. CF makes sense. > > > do this > > > The same thing in JS goes somethin like this. > > for (i=0;i total+=parseInt(g[i][1]) > > output='' > for (i=0;i calpercentage=Math.round(g[i][1]*100/total) > calwidth=Math.round(gwidth*(calpercentage/100)) > output+=''+g[i][0]+' src="'+graphimage+'" width="'+calwidth+'" height="10"> > '+calpercentage+'%' > } > output+='' > document.write(output+'Total participants: '+total+'') Well, actually, the same thing in JS would be something like this: if (getquery.theID == 'blahblah') { do this; } > Ok, so I exaggerated, but who's the numb skull that came up > with ++ and &&?? And ==? Those operators predate the existence of CF, actually. > My point is it'd just make life easier if the same creative > minds that engineered CF to be written much like english also > engineered the others. CFML isn't written especially like English, it's written like HTML. CFML is designed to do one thing, and that's generate HTML. So, the creative minds that came up with CFML explicitly modeled it after HTML. Many programming languages, such as JavaScript, are not designed to do just one thing, and programs written in these languages might be able to run in many different environments. For example, JavaScript programs can run in an HTML page within a browser, or as Windows Script Host files from a Windows command line, or within a classic ASP page to generate HTML. So, the creative minds that came up with JavaScript weren't so concerned with fitting it within one niche. I suspect that most programmers would rather shoot themselves than use a tag-based language for things outside the niche of generating tag-based markup like HTML, XML and so on. Most programmers learn programming with languages that are more similar to JavaScript than CFML, too, and in many respects those languages often give the programmer much more control over how the program can work. 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! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200144 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: Best practice question?
> -Original Message- > From: Johnny Le [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 27, 2005 3:41 PM > To: CF-Talk > Subject: Re: Best practice question? > > In CFC, I always do this: > > > > > > In my opinion: One of the main reasons to scope is to be able to easily track the source of a variable. Setting your arguments to function local like this eliminates that - you don't know what the source of the variable is. > If we should always scope our variables. Should I do this? > > > Well - no, that won't work really. "Variables" is the scope name for the private CFC scope. It might technically work the way you have it but at best you'd be creating a function local "variables" container that would be completely different from the actual CFC variables container. > The reason I re-set arguments.some to few is because I want to type 3 > letters instead of 14, but if I should always scope my variables, then > there is no point of resetting it. In general I would recommend just using the arguments prefix - as a CFC you should get used to verbosity (and clarity). ;^) But if you really wanted to do this you might consider something like this: You should now have a function local reference to the arguments scope in the args container. You can now use "args" in every way that you'd use "arguments". Easy peasy. Another trick I like is to do this: You can then easily set function local variables anyplace in the function (or at the top) by adding them to the "local" struct which becomes, essentially, a pseudo-scope. Putting all that together might look like this: #local.Cnt# It's a simple example but it's very clear where all the values came from and how each should be used. Jim Davis ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200143 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: client variable: simple or complex?
> In Ben Forta's study guide, on page 100, he says "CLIENT > variables can store only simple data (like numbers and > strings), not complex data (like arrays, structures, and queries). This is correct. Client variables are stored in places that can only accept character data. 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! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200142 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: Best practice question?
In CFC, I always do this: If we should always scope our variables. Should I do this? The reason I re-set arguments.some to few is because I want to type 3 letters instead of 14, but if I should always scope my variables, then there is no point of resetting it. Johnny >I believe that scoping is important and removed ambiguity, especially for >developers (including yourself) who may latter have to work on that page. > >I would opine that scoping is a best practice. > >- Calvin > >-Original Message- >From: Jim Davis [mailto:[EMAIL PROTECTED] >Sent: Saturday, March 26, 2005 5:34 PM >To: CF-Talk >Subject: RE: Best practice question? > > >When the examples are this simple it doesn't really show why you would do >the latter - but in many cases the code between a CFOUTPUT can be very long >and complex. > >It's almost always better to know where a variable came from. > >As for performance scoping a variable is almost always more performant - >without the scope identifier CF has to do a scope chain lookup to determine >where the variable is. > >Inside a CF output that scope chain look up begins with the query so it's >still fast, but scoping is definitely not slower. > >Jim Davis ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200141 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: race condition here?
yep, you got it. On Sun, 27 Mar 2005 13:13:34 -0500, Tony Weeg <[EMAIL PROTECTED]> wrote: > and while im here, is it safe for me to assume that application.cfc > is set off just like application.cfm (for each and every page request) > and that the methods inside application.cfc are sparked when its their > turn... > > "onApplicationStart" = only happens when the application first starts (so > other > than the first time, its basically ignored?) > > etc etc etc > > tw > > On Sat, 26 Mar 2005 10:22:57 +0700, Paul Hastings > <[EMAIL PROTECTED]> wrote: > > Barney Boisvert wrote: > > > happens twice. Not that I wouldn't lock it, but it's not critical that > > > you do, because the race condition has no adverse consequences. > > > > except for the time between the rb structure init & other threads > > checking for the init flag when the app's rb would be empty (single-user > > admin apps excepted). > > > > > > ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200140 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: Best practice question?
> -Original Message- > From: Johnny Le [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 26, 2005 12:33 AM > To: CF-Talk > Subject: Best practice question? > > Is it better to do this: > > >#Dept_ID# #CorName# #CorLevel# > > > or this: > >#GetCourses.Dept_ID# #GetCourses.CorName# > #GetCourses.CorLevel# > > > I know that you should prefix your variables, but this seems > to be unnecessary. I think I read somewhere that it actually > performs better without the prefix in this case. I always > use the first one and for some reasons I kept thinking > "beginners" when I see the second one. Am I wrong? I might be crazy, but I seem to remember, at least in CF 4.x versions, that if you scoped a query column within a cfoutput, it would only output the data in the first row of the query, not the current row, no matter where you were in the loop. That might also have been the case when outputting query data with cfloop, and I might have these totally reversed as far as which exhibited the aforementioned behavior. Either way, I never scoped query columns when looping over a query for this reason. I don't remember with which version of CF this changed. Like I said, I might be crazy and this never was the case, but something tells me it was. Andy ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200139 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: just noticed this when validating email
"Anyway, I find other programming languages as fascinating as I do other human languages, and think the landscape would be barren and ugly without them." Smalltalk, lacking in constructs but beautiful none-the-less :O) Ade -Original Message- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: 27 March 2005 19:14 To: CF-Talk Subject: Re: just noticed this when validating email I do see your point... and further, I still disagree... With all due respect, && is the AND comparison operator. And == is the IS comparison operator. My point was that JS isn't all that hard to read and write once you learn it. My new point is that if all languages were as easy to write as CF, the world would be a very boring place. It's kind of like asserting that the world would be a better place if everyone spoke English, and nothing but English. Sounds kinda blah. Especially since other languages contain idiomatic expressions that convey a nuance that's impossible to convey in English, as English does with some things that other languages don't. += would be a nice operator to have in CF... and yet it must be said with i=1+1... hence some things are easier to write in JS than in CF. And for me, often, I'd *rather* use JS-style syntax in CFSCRIPT. Why? Because the JS syntax is more concise, and in general faster (though CFSCRIPT no longer provides better performance per se, the concise code it can produce reduces the code written under some circumstances). Also, your example isn't entirely fair, because you left out the whole example in CF and wrote the whole example in JS: #round(g[i][0])##calpercentage#% And, if someone wanted to use cfscript for this task, it could be done exactly as JS does it with very minimal alterations: output = ""; while (i lte arrayLen(g)) { calpercentage = round(g[i][1]*100/total); calwidth = round(gwidth*(calpercentage*100)); output = output & "" & round(g[i][0]) & "" & calpercentage & "%"; } output = output & ""; writeOutput(output); So, it's not so simple as CF is a more natural language... were it not for Java, which looks almost exactly like JS, there WOULD BE no CF. And had it not been for C++, which was the original language that CF was written in, it would never have gotten started at all. CF is a high-level productivity-layer language that works well for its appointed tasks, and yeah, it might be great if everything worked that way... but I doubt it. Since, if nothing else, there's a certain amount of overhead that goes with turning human-readable code into machine-executable code, there would probably be a huge cost involved at runtime... whereas since CF is built in layers, the underlying layers are very close to the surface and provide that conversion quite quickly AND only once, in general, because it's only recompliled when changes are made (generally speaking). Anyway, I find other programming languages as fascinating as I do other human languages, and think the landscape would be barren and ugly without them. Laterz, J -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200138 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: Best practice question?
But it IS a broad application-development question! You can't decide *not* to scope a variable until you know *why* you would scope one to begin with. You can't decide to rely on CF's default scoping capabilities successfully until you know all the implications of them. It is a broad app-dev question because the decision to use a particular technique must be founded in good app-dev skills. There's no getting around that. Explicit scoping _IS_always_ the best idea, unless you have a compelling rationale to break with the best practice. Laterz, J On Sun, 27 Mar 2005 11:48:42 -0500, Claude Schneegans <[EMAIL PROTECTED]> wrote: > >>looks like scoping AND no scoping are desirable depending on the > application. > > Exact, that's one of the advantages of using a weakly or dynimically > typed language. > Since both scoping and no scoping (or default scoping) are features of > CF, rules like "never do" or "always do" > can only make the programmer loose one of the features. -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200137 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: help-a-noob: Null Pointers
Shouldn't, but it's harder to read w/ #'s. On Sun, 27 Mar 2005 11:32:19 -0400, Will Tomlinson <[EMAIL PROTECTED]> wrote: > >They're equivalent, but you don't need any #'s at all: > > > > > > > > Joe, > > I know it's not a biggie, but that means the #'s actually would slow it down > a little? > > Thanks, > Will > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200136 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: just noticed this when validating email
Typos, typos... i=i+1, for one... not i=1+1. And as far as preferring the JS-style syntax in cfscript, it's a style thing. It looks better and is less cluttered... I definitely use more tag-style code than cfscript, but I also use cfscript wherever I can simply to produce cleaner, more readable code. On Sun, 27 Mar 2005 12:14:18 -0600, Jared Rypka-Hauer - CMG, LLC <[EMAIL PROTECTED]> wrote: > I do see your point... and further, I still disagree... > > With all due respect, && is the AND comparison operator. > > And == is the IS comparison operator. > > My point was that JS isn't all that hard to read and write once you learn it. > > += would be a nice operator to have in CF... and yet it must be said > with i=1+1... hence some things are easier to write in JS than in CF. > And for me, often, I'd *rather* use JS-style syntax in CFSCRIPT. Why? > Because the JS syntax is more concise, and in general faster (though > CFSCRIPT no longer provides better performance per se, the concise > code it can produce reduces the code written under some > circumstances). > -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200135 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: just noticed this when validating email
I do see your point... and further, I still disagree... With all due respect, && is the AND comparison operator. And == is the IS comparison operator. My point was that JS isn't all that hard to read and write once you learn it. My new point is that if all languages were as easy to write as CF, the world would be a very boring place. It's kind of like asserting that the world would be a better place if everyone spoke English, and nothing but English. Sounds kinda blah. Especially since other languages contain idiomatic expressions that convey a nuance that's impossible to convey in English, as English does with some things that other languages don't. += would be a nice operator to have in CF... and yet it must be said with i=1+1... hence some things are easier to write in JS than in CF. And for me, often, I'd *rather* use JS-style syntax in CFSCRIPT. Why? Because the JS syntax is more concise, and in general faster (though CFSCRIPT no longer provides better performance per se, the concise code it can produce reduces the code written under some circumstances). Also, your example isn't entirely fair, because you left out the whole example in CF and wrote the whole example in JS: #round(g[i][0])##calpercentage#% And, if someone wanted to use cfscript for this task, it could be done exactly as JS does it with very minimal alterations: output = ""; while (i lte arrayLen(g)) { calpercentage = round(g[i][1]*100/total); calwidth = round(gwidth*(calpercentage*100)); output = output & "" & round(g[i][0]) & "" & calpercentage & "%"; } output = output & ""; writeOutput(output); So, it's not so simple as CF is a more natural language... were it not for Java, which looks almost exactly like JS, there WOULD BE no CF. And had it not been for C++, which was the original language that CF was written in, it would never have gotten started at all. CF is a high-level productivity-layer language that works well for its appointed tasks, and yeah, it might be great if everything worked that way... but I doubt it. Since, if nothing else, there's a certain amount of overhead that goes with turning human-readable code into machine-executable code, there would probably be a huge cost involved at runtime... whereas since CF is built in layers, the underlying layers are very close to the surface and provide that conversion quite quickly AND only once, in general, because it's only recompliled when changes are made (generally speaking). Anyway, I find other programming languages as fascinating as I do other human languages, and think the landscape would be barren and ugly without them. Laterz, J On Sun, 27 Mar 2005 05:46:26 -0400, Will Tomlinson <[EMAIL PROTECTED]> wrote: > >But Will... > > > >JS is client-side, and CF is server-side... > > > >The whole universe could convert to CF (and I'd probably be out of a > >job!) and we'd still need JS or something like it (unless, with the > >mass conversion, MM created a CF-based browser that could use CF > > With all due respect you missed my point. Or maybe I didn't make it clear. It > wasnt to get rid of JS, but rather for it to written as easily as CF. CF > makes sense. > > > do this > > > The same thing in JS goes somethin like this. > > for (i=0;i total+=parseInt(g[i][1]) > > output='' > for (i=0;i calpercentage=Math.round(g[i][1]*100/total) > calwidth=Math.round(gwidth*(calpercentage/100)) > output+=''+g[i][0]+' width="'+calwidth+'" height="10"> '+calpercentage+'%' > } > output+='' > document.write(output+'Total participants: '+total+'') > > Ok, so I exaggerated, but who's the numb skull that came up with ++ and &&?? > And ==? > > My point is it'd just make life easier if the same creative minds that > engineered CF to be written much like english also engineered the others. > > :) > > Will -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200134 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: race condition here?
and while im here, is it safe for me to assume that application.cfc is set off just like application.cfm (for each and every page request) and that the methods inside application.cfc are sparked when its their turn... "onApplicationStart" = only happens when the application first starts (so other than the first time, its basically ignored?) etc etc etc tw On Sat, 26 Mar 2005 10:22:57 +0700, Paul Hastings <[EMAIL PROTECTED]> wrote: > Barney Boisvert wrote: > > happens twice. Not that I wouldn't lock it, but it's not critical that > > you do, because the race condition has no adverse consequences. > > except for the time between the rb structure init & other threads > checking for the init flag when the app's rb would be empty (single-user > admin apps excepted). > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200133 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: Best practice question?
>>looks like scoping AND no scoping are desirable depending on the application. Exact, that's one of the advantages of using a weakly or dynimically typed language. Since both scoping and no scoping (or default scoping) are features of CF, rules like "never do" or "always do" can only make the programmer loose one of the features. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200132 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: Best practice question?
>>one may note that this is copied from >>fusebox's functionality Yes, but this is one of the things I hate the most in FB: using the attributes structure, so that one never knows if a template is used as a custom tag or not. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200131 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: Best practice question?
looks like scoping AND no scoping are desirable depending on the application. Kinda goes back to my "registering to purchase a product question". It's an application-specific question, not a broad application development question. Will ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200130 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: help-a-noob: Null Pointers
>They're equivalent, but you don't need any #'s at all: > > > Joe, I know it's not a biggie, but that means the #'s actually would slow it down a little? Thanks, Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200129 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: Best practice question?
That is definitely true, however, it can also be undesirable, for example a developer might want form submissions to only arrive via post and not get. I prefer to try to code using scopes and typically use something similar to this in the case you mentioned (one may note that this is copied from fusebox's functionality): Function setAttributes() { attributes = StructNew(); StructAppend(attributes,'form',true); StructAppend(attributes,'url',true); } By explicitly declaring I'm choosing to use have both scopes together, I can remove that ambiguity, and explicitly declare which scope I want to have precedence while I'm at it. - Calvin -Original Message- From: Claude Schneegans [mailto:[EMAIL PROTECTED] Sent: Sunday, March 27, 2005 9:23 AM To: CF-Talk Subject: Re: Best practice question? >>I believe that scoping is important and removed ambiguity Right, however, in some circumstances, ambiguity may be a useful feature. For instance, not specifying the form or url scope for a variable can make a template work both as a form action or as an href called template with parameters passed in the url. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200128 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: help-a-noob: Null Pointers
They're equivalent, but you don't need any #'s at all: -Joe On Sun, 27 Mar 2005 08:26:27 -0400, Will Tomlinson <[EMAIL PROTECTED]> wrote: > Shouldnt line 149 read: > > > > Originally your pounds are on the inside of the datefunction. > > > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200127 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: Best practice question?
>>I believe that scoping is important and removed ambiguity Right, however, in some circumstances, ambiguity may be a useful feature. For instance, not specifying the form or url scope for a variable can make a template work both as a form action or as an href called template with parameters passed in the url. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200126 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: help-a-noob: Null Pointers
Shouldnt line 149 read: Originally your pounds are on the inside of the datefunction. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200125 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: Evaluate and isdefined
Blatant self plug... I put together a brief blog entry that provides quick coverage of how to avoid using evaluate(). http://steve.coldfusionjournal.com/read/1135458.htm Steve Bryant Bryant Web Consulting LLC http://www.BryantWebConsulting.com/ http://steve.coldfusionjournal.com/ >Hi, I try to see if a variable is defined but I don't know the name of the >variable.. > >Any help? > > > > >asdasd > > >Thanks > >Pat ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200124 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: Ordering WACK from Amazon
Having said all that, what's with the Amazon ship date? I ordered two copies of the first one! - Calvin -Original Message- From: Ben Forta [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 3:07 PM To: CF-Talk Subject: RE: Ordering WACK from Amazon Very good point. And that is the primary reason for me to write the CF books specifically. They give me the credibility to do what I do, personally as well as for Macromedia. --- Ben -Original Message- From: Ray Champagne [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 10:23 AM To: CF-Talk Subject: RE: Ordering WACK from Amazon I dunno, I am not 100% on board on that e-book/pdf thing. Personally, I like having Ben's lineup of books all bound up nicely sitting right here on my shelf. The convenience is worth it, IMO. I would think that print would make Ben's exposure much more worth the effort in the CF community. Ray At 10:20 AM 3/25/2005, you wrote: >Given the technological tools such as e-books, pdf, and even posting >books/chapters/examples online in a subscription service, I still don't >understand why you don't by-pass the traditional publishing process and >publish online. > >You can publish a chapter at a time as it's completed, let readers >print it if they want to, make it searchable, include downloadable code >examples to implement and study, etc, etc, etc... > >You control the *entire* process, make *all* the money, and get work >out to the public *immediately* upon creation > >Ben, for the sake of understanding...why wouldn't you want to >self-publish?!?! >What am I missing? > >Rick > > >-Original Message- >From: Ben Forta [mailto:[EMAIL PROTECTED] >Sent: Friday, March 25, 2005 10:09 AM >To: CF-Talk >Subject: RE: Ordering WACK from Amazon > > > >> I would love to know how much Ben makes on a per book sold basis. > >Far less than you might think. Considering the time involved, the years >of "support" in the forms of questions from readers, and so on ... I'd >make much more per hour flipping burgers. > >Believe me, no one writes tech books for the money. > >--- Ben > > > >-Original Message- >From: Claremont, Timothy [mailto:[EMAIL PROTECTED] >Sent: Friday, March 25, 2005 8:38 AM >To: CF-Talk >Subject: Ordering WACK from Amazon > >I ordered my WACK yesterday and Amazon still showed a ship date of late May. >Hopefully this will not be the real case. 7.1 should be out by then... > >I would love to know how much Ben makes on a per book sold basis. >** >This email and any files transmitted with it are confidential and >intended solely for the use of the individual or entity to whom they are addressed. >If you have received this email in error please delete it from your system. > >This footnote also confirms that this email message has been swept for >the presence of computer viruses. > >Thank You, >Viahealth >** > > > > > > > ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200123 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: Best practice question?
I believe that scoping is important and removed ambiguity, especially for developers (including yourself) who may latter have to work on that page. I would opine that scoping is a best practice. - Calvin -Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: Saturday, March 26, 2005 5:34 PM To: CF-Talk Subject: RE: Best practice question? > -Original Message- > From: Johnny Le [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 26, 2005 12:33 AM > To: CF-Talk > Subject: Best practice question? > > Is it better to do this: > > >#Dept_ID# #CorName# #CorLevel# > > > or this: > >#GetCourses.Dept_ID# #GetCourses.CorName# #GetCourses.CorLevel# > When the examples are this simple it doesn't really show why you would do the latter - but in many cases the code between a CFOUTPUT can be very long and complex. It's almost always better to know where a variable came from. As for performance scoping a variable is almost always more performant - without the scope identifier CF has to do a scope chain lookup to determine where the variable is. Inside a CF output that scope chain look up begins with the query so it's still fast, but scoping is definitely not slower. Jim Davis ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200122 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
[SOLVED] Re: help-a-noob: Null Pointers
And seconds after crying for help, I realised what it was: a null field in my backend database that can't be null. I know, I know. I'm very tired, okay? Sorry to waste everybody's bandwidth. Best regards, CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200121 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
help-a-noob: Null Pointers
Hello list! It's 12.47pm and I didn't go to sleep last night. Thank the goddess for illegal stimulants. So I'm bashing my exhausted head on the desk with this error message: -- 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 /Applications/JRun4/servers/cfmx/cfusion-ear/cfusion-war/CFIDE/ taskomatic/viewtasks.cfm: line 149 147 : 148 : 149 : 150 : 151 : -- I think this is the problem code: -- #taskname# #projectname# bgcolor=##CBFDD4 bgcolor=##99 bgcolor=##E5BF8C >#dateformat(deadline)# #importancename# #ownername# -- But maybe I'm wrong, here is the whole page: _ http://www.w3.org/TR/html4/loose.dtd";> Taskomatic DELETE FROM tasks WHERE task_id='#task_id#' UPDATE tasks SET status_id = #status_id# WHERE task_id = #task_id# SELECT tasks.task_id, tasks.name AS taskname, tasks.deadline, tasks.project_id, tasks.importance_id, tasks.owner_id, tasks.lead_time, tasks.status_id, projects.project_id, projects.name AS projectname, projects.colour, people.person_id, people.name AS ownername, importance.importance_id, importance.importance AS importancename FROM tasks JOIN projects ON tasks.project_id = projects.project_id JOIN people ON tasks.owner_id = people.person_id JOIN importance ON tasks.importance_id = importance.importance_id WHERE tasks.status_id=1 ORDER BY #order# SELECT tasks.task_id, tasks.name AS taskname, tasks.deadline, tasks.project_id, tasks.importance_id, tasks.owner_id, tasks.lead_time, tasks.status_id, projects.project_id, projects.name AS projectname, projects.colour, people.person_id, people.name AS ownername, importance.importance_id, importance.importance AS importancename FROM tasks JOIN projects ON tasks.project_id = projects.project_id JOIN people ON tasks.owner_id = people.person_id JOIN importance ON tasks.importance_id = importance.importance_id WHERE tasks.status_id=2 ORDER BY #order# Task Project Deadline Importance Owner #taskname# #projectname# bgcolor=##CBFDD4 bgcolor=##99 bgcolor=##E5BF8C >#dateformat(deadline)# #importancename# #ownername# Completed tasks. Click here to permanently delete them. #taskname# #projectname# bgcolor=##CBFDD4 bgcolor=##99 bgcolor=##E5BF8C > #dateformat(deadline)# #importancename# #ownername# -- Guys, this is killin
Re: just noticed this when validating email
>But Will... > >JS is client-side, and CF is server-side... > >The whole universe could convert to CF (and I'd probably be out of a >job!) and we'd still need JS or something like it (unless, with the >mass conversion, MM created a CF-based browser that could use CF With all due respect you missed my point. Or maybe I didn't make it clear. It wasnt to get rid of JS, but rather for it to written as easily as CF. CF makes sense. do this The same thing in JS goes somethin like this. for (i=0;i '+calpercentage+'%' } output+='' document.write(output+'Total participants: '+total+'') Ok, so I exaggerated, but who's the numb skull that came up with ++ and &&?? And ==? My point is it'd just make life easier if the same creative minds that engineered CF to be written much like english also engineered the others. :) Will ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200119 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