On Wed, Sep 1, 2010 at 9:50 AM, Russ Michaels r...@michaels.me.uk 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
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
Hmmm, maybe they've changed
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 Alt-/ completes word to StructKeyExists
(press Alt-/ again to cycle through other commonly used words)
ske then Ctrl-J
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!
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: 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 worth using), so
available for both CFEclipse and CFBuilder.
: 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 worth
using), so
available for both CFEclipse and CFBuilder
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 bought...@gmail.com wrote:
That coupled with
Hmmm, maybe they've changed the default.
Goto WindowsPreferences 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 got one
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
Hmmm, maybe they've
On Thu, Sep 2, 2010 at 5:00 AM, Peter Boughton bought...@gmail.com 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
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 rick.r...@gmail.com wrote:
On Thu, Sep 2, 2010 at 5:00 AM, Peter Boughton bought...@gmail.com
wrote:
That coupled with
On Thu, Sep 2, 2010 at 8:23 AM, Steve Lichtenberg
steve.lichtenb...@gmail.com 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
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
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.
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 to doing it my way vs
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 ?
No,
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. IsDefined
I prefer to CFParam my vars with a default value of a zero len string or
a 0
. If it isn't there then 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. IsDefined
-
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 thus quite slow
-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 thus quite slow and can potentially cause timeouts.
Much better to use StructKeyExists() and only test the scope
.
Admittedly we could probably do this more efficiently by having all perms as
keys inside a perms struct, but cest la vie.
andy
-Original 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
: 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 thus quite slow and can potentially cause timeouts.
Much better to use StructKeyExists() and only test the scope your
variable
On Wed, Sep 1, 2010 at 8:54 AM, John M Bliss bliss.j...@gmail.com wrote:
cfloop index=i from=1 to=1
cfif not IsDefined(variables.anothervar i)
cfset SetVariable(variables.anothervar i, i)
/cfif
/cfloop
Try that with cfset variables[anothervar i] = i / - I suspect
setVariable() is
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 thus quite slow
Michael Grant mgr...@modus.bz 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
Skype: markakruger
www.cfwebtools.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: CFParam vs. IsDefined
defo better
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 ?
There
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.
Personally I like to cfparam 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...
cfparam name=someid default=
cfif someid eq (or cfif len(someid)
On Wed, Sep 1, 2010 at 5:56 PM, Rick Root rick.r...@gmail.com wrote:
Personally I like to cfparam 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
A classic issue yesterday related to isDefined():
This worked perfectly:
cfscript
//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;
32 matches
Mail list logo