Re: CFParam vs. IsDefined

2010-09-04 Thread Scott Brady
rks in cfscript but not in cftags syntax. > > Regards, > Andrew Scott > http://www.andyscott.id.au/ > > > > -Original Message- > > From: Peter Boughton [mailto:bought...@gmail.com] > > Sent: Thursday, 2 September 2010 8:26 PM > > To: cf-talk &g

Re: CFParam vs. IsDefined

2010-09-04 Thread Scott Brady
On Wed, Sep 1, 2010 at 9:50 AM, Russ Michaels wrote: > > defo better to make sure they are defined. > Also using isDefined() is also bad as this search every single scope for > your variable and is thus quite slow and can potentially cause timeouts. > Much better to use StructKeyExists() and onl

Re: CFParam vs. IsDefined

2010-09-02 Thread Claude Schnéegans
>>Also using isDefined() is also bad as this search every single scope for your variable CFPARAM will also search for the variable exactly the same way in order to create it if it does not exist. What's the big differrence? >> and can potentially cause timeouts. Wow! Where do you hide your

Re: CFParam vs. IsDefined

2010-09-02 Thread Rick Root
On Thu, Sep 2, 2010 at 8:23 AM, Steve Lichtenberg wrote: > > Yes it does :-).  In .virc set up aliases for anuything you want.  use them > in update mode not insert mode. touche' ~| Order the Adobe Coldfusion Anthology now! ht

Re: CFParam vs. IsDefined

2010-09-02 Thread Steve Lichtenberg
Yes it does :-). In .virc set up aliases for anuything you want. use them in update mode not insert mode. --S ^ On Thu, Sep 2, 2010 at 8:16 AM, Rick Root wrote: > > On Thu, Sep 2, 2010 at 5:00 AM, Peter Boughton > wrote: > > > >> That coupled with StructKeyExists is a pain to type! > > >

Re: CFParam vs. IsDefined

2010-09-02 Thread Rick Root
On Thu, Sep 2, 2010 at 5:00 AM, Peter Boughton wrote: > >> That coupled with StructKeyExists is a pain to type! > > Why on earth would you *type* it!? "vi" doesn't do code completion? lol ~| Order the Adobe Coldfusion Antholog

RE: CFParam vs. IsDefined

2010-09-02 Thread Andrew Scott
Ok it works in cfscript but not in cftags syntax. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Peter Boughton [mailto:bought...@gmail.com] > Sent: Thursday, 2 September 2010 8:26 PM > To: cf-talk > Subject: Re: CFParam vs. IsDefined >

Re: CFParam vs. IsDefined

2010-09-02 Thread Peter Boughton
Hmmm, maybe they've changed the default. Goto Windows>Preferences and type "keys" in the filter box. That should bring the key binding panel, type "word" in that. Look for "Word Completion" option(s) and it'll list what the binding is. If it still doesn't work, check the "When" value - I've go

Re: CFParam vs. IsDefined

2010-09-02 Thread Michael Grant
I'm very interested. I just started using Aptana (coming from Homesite+) and I really really want to speed up my dev to where I was at with HS+. I'd love some more hotkey and snippet info. On Thu, Sep 2, 2010 at 5:00 AM, Peter Boughton wrote: > > > That coupled with StructKeyExists is a pain t

RE: CFParam vs. IsDefined

2010-09-02 Thread Andrew Scott
cf-talk > Subject: Re: CFParam vs. IsDefined > > > >This must be a CFEclipse thing as CFBuilder is CTRL-SPACE > > That's code completion. Word completion is faster (when you know what > you want). > > These are all Eclipse things (and will exist in any other IDE wort

Re: CFParam vs. IsDefined

2010-09-02 Thread Peter Boughton
>This must be a CFEclipse thing as CFBuilder is CTRL-SPACE That's code completion. Word completion is faster (when you know what you want). These are all Eclipse things (and will exist in any other IDE worth using), so available for both CFEclipse and CFBuilder. ~~

RE: CFParam vs. IsDefined

2010-09-02 Thread Andrew Scott
This must be a CFEclipse thing as CFBuilder is CTRL-SPACE Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Peter Boughton [mailto:bought...@gmail.com] > Sent: Thursday, 2 September 2010 7:01 PM > To: cf-talk > Subject: Re: CFPara

Re: CFParam vs. IsDefined

2010-09-02 Thread Peter Boughton
Oh, just to point out, ske and skel are custom ones I've created. They're not default commands. Shortcut keys may vary too. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-

Re: CFParam vs. IsDefined

2010-09-02 Thread Peter Boughton
> That coupled with StructKeyExists is a pain to type! Why on earth would you *type* it!? This is exactly why your IDE has Word Completion, Snippets and Templates! "Str" then completes word to StructKeyExists (press again to cycle through other commonly used words) "ske" then snippet for St

Re: CFParam vs. IsDefined

2010-09-01 Thread Tony Bentley
A classic issue yesterday related to isDefined(): This worked perfectly: //pass boolean to determine if the given field is null in the stored proc (1=submitted, 2=finalized) if(arguments.status eq 1){ submitted = false; finalized =

Re: CFParam vs. IsDefined

2010-09-01 Thread Casey Dougall
On Wed, Sep 1, 2010 at 5:56 PM, Rick Root wrote: > > Personally I like to things that I know are supposed to > exist, and I will go both ways on page variables that may or may not > exist. > > I prefer to param it and then test for a valid value than to test for > isDefined() > > Yup, and you

Re: CFParam vs. IsDefined

2010-09-01 Thread Rick Root
Personally I like to things that I know are supposed to exist, and I will go both ways on page variables that may or may not exist. I prefer to param it and then test for a valid value than to test for isDefined() Ie... (or ) Holy Crap! Rick ~

Re: CFParam vs. IsDefined

2010-09-01 Thread David McGraw
The only general advantage I see is that you are reserving memory no matter what, even though it's not much, where as with the isDefined, your just checking, rather than reserving that memory. >I prefer to CFParam my vars with a default value of a zero len string or a 0 >for numeric values. Th

Re: CFParam vs. IsDefined

2010-09-01 Thread Peter Boughton
>I prefer to CFParam my vars with a default value of a zero len string or a 0 >for numeric values. Then I skip the isdefined and just test against the >value. Well recently someone I know said that it's better to test if it's >defined. Is there a pro or con to doing it my way vs. IsDefined ? Ther

Re: CFParam vs. IsDefined

2010-09-01 Thread Russ Michaels
gt; -Mark > > > > > > Mark A. Kruger, MCSE, CFG > > > (402) 408-3733 ext 105 > > > Skype: markakruger > > > www.cfwebtools.com > > > www.coldfusionmuse.com > > > www.necfug.com > > > > > > > > > > > >

Re: CFParam vs. IsDefined

2010-09-01 Thread Roger Austin
Michael Grant wrote: > > I prefer to CFParam my vars with a default value of a zero len string or a 0 > for numeric values. Then I skip the isdefined and just test against the > value. Well recently someone I know said that it's better to test if it's > defined. Is there a pro or con to do

Re: CFParam vs. IsDefined

2010-09-01 Thread John M Bliss
ct about that - but it's not typically a performance >> problem >> > in >> > my view. More of a "buggy/security" type problem :) >> > >> > -Mark >> > >> > Mark A. Kruger, MCSE, CFG >> > (402) 408-3733 ext 105 >> > Skype: markakr

Re: CFParam vs. IsDefined

2010-09-01 Thread Sean Corfield
On Wed, Sep 1, 2010 at 8:54 AM, John M Bliss wrote: > > > > > Try that with - I suspect setVariable() is slowing that down. > #Evaluate(getTickCount() - starttick)# You don't need evaluate() here BTW. In general, micro-benchmarks like this aren't really useful. For example, you're gener

Re: CFParam vs. IsDefined

2010-09-01 Thread John M Bliss
fwebtools.com > > www.coldfusionmuse.com > > www.necfug.com > > > > > > > > -Original Message- > > From: Russ Michaels [mailto:r...@michaels.me.uk] > > Sent: Wednesday, September 01, 2010 10:51 AM > > To: cf-talk > > Subject: Re: CFP

RE: CFParam vs. IsDefined

2010-09-01 Thread Andy Matthews
one perm in this set SESSION.p.nav.SOMEPERMISSION From: Michael Grant [mailto:mgr...@modus.bz] > Sent: Wednesday, September 01, 2010 11:36 AM > To: cf-talk > Subject: CFParam vs. IsDefined > > > I prefer to CFParam my vars with a default value of a zero len string > or a 0 for

Re: CFParam vs. IsDefined

2010-09-01 Thread Russ Michaels
Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Wednesday, September 01, 2010 10:51 AM > To: cf-talk > Subject: Re: CFParam vs. IsDefined > > > defo better to make sure they are defined. > Also using isDefined() is also bad as this search every single scope for > your varia

RE: CFParam vs. IsDefined

2010-09-01 Thread Mark A. Kruger
riginal Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Wednesday, September 01, 2010 10:51 AM To: cf-talk Subject: Re: CFParam vs. IsDefined defo better to make sure they are defined. Also using isDefined() is also bad as this search every single scope for your variable and is

Re: CFParam vs. IsDefined

2010-09-01 Thread John M Bliss
; > > > -Original Message- > > From: Michael Grant [mailto:mgr...@modus.bz] > > Sent: Wednesday, September 01, 2010 11:36 AM > > To: cf-talk > > Subject: CFParam vs. IsDefined > > > > > > I prefer to CFParam my vars with a default value of a z

Re: CFParam vs. IsDefined

2010-09-01 Thread Russ Michaels
something went wrong. And > if you didn't define it and it is there you should be ignoring it. > > Steve > > -Original Message- > From: Michael Grant [mailto:mgr...@modus.bz] > Sent: Wednesday, September 01, 2010 11:36 AM > To: cf-talk > Subject: CFParam vs. I

Re: CFParam vs. IsDefined

2010-09-01 Thread Dave Watts
> I prefer to CFParam my vars with a default value of a zero len string or a 0 > for numeric values. Then I skip the isdefined and just test against the > value. Well recently someone I know said that it's better to test if it's > defined. Is there a pro or con to doing it my way vs. IsDefined ?

RE: CFParam vs. IsDefined

2010-09-01 Thread DURETTE, STEVEN J (ATTASIAIT)
t: CFParam vs. IsDefined I prefer to CFParam my vars with a default value of a zero len string or a 0 for numeric values. Then I skip the isdefined and just test against the value. Well recently someone I know said that it's better to test if it's defined. Is there a pro or con t

CFParam vs. IsDefined

2010-09-01 Thread Michael Grant
I prefer to CFParam my vars with a default value of a zero len string or a 0 for numeric values. Then I skip the isdefined and just test against the value. Well recently someone I know said that it's better to test if it's defined. Is there a pro or con to doing it my way vs. IsDefined ? Thanks.