Charlie.
I must say that Web Assist has awesome support (you have to pay for it
though, but I got five free incidents when I purchased the product). A
tech called me just know, sent me to a website where I could login to
Breeze and share my screen. He then took over the page in Dreamweaver
and showed me how to do what I was trying to do, explaining
everything.
Unless Dreamweaver supports using createObject and cfinvoke I am not
going to bother with cfinvoke. I will just keep using cfset and
createObject() to instantiate my object and cfset to invoke each
method.
Thanks,
Aaron
On 10/26/06, Charlie Griefer <[EMAIL PROTECTED]> wrote:
> Aaron:
>
> I don't use DW and I'm not familiar with Web Assist's eCart... so I'm
> afraid I can't really be of help there.
>
> What I can tell you is yes, you can instantiate a CFC using
> createObject(), and invoke methods via the <cfinvoke> tag afterwards.
>
> On 10/26/06, Aaron Roberson <[EMAIL PROTECTED]> wrote:
> > Charlie,
> >
> > My reason for opting for cfobject is a bit unique. I am working with
> > tech support at Web Assist for their eCart product. Currently, it does
> > recognize CFC Queries as recordsets. I have noticed that Dreamweaver
> > does recognize CFC Queries when using placing <!--- CFC Query ---> as
> > a comment between <cfinvoke></cfinvoke> tags.
> >
> > This made me think that WA eCart could recognize CFC Queries in the
> > same way. However, I don't want to invoke my component each time I
> > invoke one of its methods. Therefore, I was thinking of using cfobject
> > to instantiate the component and cfinvoke to call the method and place
> > the DW specific comment between the tags.
> >
> > I'm not even sure if Web Assist will implement such a compatability
> > feature, but that is what I suggested to them.
> >
> > Is it possible to use createobject instead of cfobject and then use
> > the variable name for the object as the component name in cfinvoke?
> > Here is an example of what I am asking:
> >
> > <cfset gateway = createObject("component", "myCFC").init(application.dsn) />
> > <cfinvoke component="gateway" method="getRecordset"
> > returnvariable="qRecordset"><!--- CFC Query ---></cfinvoke>
> >
> > Unfortunately, Dreamweaver doesn't even support using createObject or
> > <cfobject>. When I place the DW comments between the <cfinvoke /> tags
> > when specifying the component name as the cfobject name or
> > createObject variable name Dreamweaver says that the component could
> > not be found it and does not display the recordset in the Bindings tab
> > of the Application panel. I submitted a feature request to Adobe, but
> > who knows when they will even look at it and how much longer still
> > until they do something about it (not a slant on Adobe's team, just a
> > reality when dealing with a corporation that size). I'm wondering what
> > CFEclipses support of these things is like?
> >
> > -Aaron
> >
> > On 10/26/06, Charlie Griefer <[EMAIL PROTECTED]> wrote:
> > > i believe you'd need a <cfinvoke> for your init() method.
> > >
> > > so you need to insert <cfinvoke> before the one you have listed.
> > > <cfinvoke component="gateway" method="init" dsn="#application.dsn#" />
> > >
> > > just out of curiousity...any reason you want <cfobject> over the
> > > createObject() way? I'm sure when it all boils down you'll have 6 of
> > > 1, half-dozen of the other...but at the very least, the createObject()
> > > allows the method chaining so it's easier to invoke the init() when
> > > you first instantiate your CFC.
> > >
> > > I've also read (I think Sean C. said it) that the method chaining
> > > syntax is a little "tighter" as it prevents any race condition issues
> > > that may arise (especially if you're creating your CFC into the
> > > application scope).
> > >
> > > On 10/26/06, Aaron Roberson <[EMAIL PROTECTED]> wrote:
> > > > I have been creating and invoking my CFCs like such:
> > > >
> > > > <cfset gateway = createObject("component",
> > > > "appName.path.cfc").init(application.dsn) />
> > > > <cfset qRecordset = gateway.getRecords() />
> > > >
> > > > But I am considering using <cfobject> instead. Here is a comparison:
> > > >
> > > > <cfobject name="gateway" component="appName.path.cfc">
> > > > <cfinvoke component="gateway" method="getRecords"
> > > > returnvariable="qRecordset">
> > > >
> > > > The only problem is that I don't know how to pass the datasource name
> > > > to the init function upon creating the object using <cfobject>.
> > > >
> > > > What am I missing? Any help would be appreciated.
> > > >
> > > > Thanks,
> > > > Aaron
> > > >
> > > >
> > >
> > >
> >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258152
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4