Add one more to your list of three. (sorta)

Don't forget the local scope. Many times I have saved my butt and sped up my
coding by attributes scoping "practically all" my variables, including
variables that would otherwise be happy to live in the local, unscoped
scope. You never know when you just might want to call that individual file
with cfmodule and you'll be happy that it has many variables attribute
scoped. This allows for more impromptu reuse of code. Also, you can
*directly* change how the page processes on the fly, for purposes of
debugging, by adding a url varibale, which will be converted to attributes.

I hope other people out there do the same.

NAT

-----Original Message-----
From: Steve Nelson [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 17, 2000 8:55 AM
To: [EMAIL PROTECTED]
Subject: Re: Need to toggle URL and FORM vars


it's simple.

by using attributes it allows you to do 3 things.

1) pass variables in from a FORM
2) pass variables in from a URL
3) pass variables in from a CFMODULE

The attributes scope allows for a single scoping instead of having to
constantly switch back and forth when you want this functionality.

The CFMODULE technique is only rarely used, but it's powerful as all
hell when you do use it.  Basically it allows you to create a CF tag
made up of multiple files.  The beautiful thing is that it works
identically to the way you create your normal application.

Does that make sense?

Steve



"McCollough, Alan" wrote:
> 
> OK, I'm now going to ask a question that is so shocking, so inane, that
I've
> gotta gotta ask it.
> 
> I have never understood fully the benefits of using attributes. scoped
> variables instead of form. or url. scoped variables. Could somebody please
> enlighten me? I'm sure I got beat up on the CF Developer's test on those
> questions...
> 
> Alan McCollough
> Web Programmer
> Alaska Native Medical Center
> 
> > -----Original Message-----
> > From: Fred T. Sanders [SMTP:[EMAIL PROTECTED]]
> > Sent: Saturday, July 15, 2000 7:54 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Need to toggle URL and FORM vars
> >
> > well if your using formurl2attributes, then you can code them as
> > attributes.
> > scoped variables and it won't matter how your getting them.
> >
> > Fred
> >
> > ----- Original Message -----
> > From: "CM Randall" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, July 15, 2000 11:22 AM
> > Subject: Need to toggle URL and FORM vars
> >
> >
> > > I'm working with a site that is going to send me vars using either URL
> > or
> > > FORM variables.  I have the code done for accepting URL variables and
I
> > want
> > > to find an easy way to dynamically convert all my URL.vars to be
> > FORM.vars
> > > in my code.  I can setup a CFIF statement to check and then send the
> > script
> > > to the correct code (either URL or FORM) but then I would have two
code
> > sets
> > > to manage.
> > >
> > > Is there a way to modify my current code to accept the other servers
> > > variables no matter if they are sending URL or FORM vars?  The code
for
> > both
> > > is 100% identical.
> > >
> > > Thanks,
> > > --RC
> > >
> > >
________________________________________________________________________
> > > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com
> > >
> > >
> >
--------------------------------------------------------------------------
> > ----
> > > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox
or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
> > the body.
> > >
> >
> >
--------------------------------------------------------------------------
> > ----
> > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox
or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
> > the body.
>
----------------------------------------------------------------------------
--
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to