Interesting, I didn't think of transferring the resultSet to a new object.
Definitely a good technique.
I used some of Mike Chambers' example code, which specifies one specific
responder for functions within a service.
NetServices.("http://localhost:8500/flashservices/gateway");
var gw = NetServices.createGatewayConnection();
var server = gw.getService("com.macromedia.test.HelloWorld", new Result());
server.sayHello();
now when ever you call a server.myFunciton() or server.sayHello(); the
default responder is always the function "Result()", instead of
myFunction_result() or sayHello_result()
The reason I was trying to do this is...imagine the pubs db, books, user can
search by title, author, etc. But the result set always contains a common
set of fields, title, author, publisher, etc. So I didn't want to deal with
a multitude of myFunction_result() responders, just wanted one common one
for a service.
At any rate both are good techniques to know and I can actually use your
method. I was planning to create an array out of the result set returned in
its responder using a for loop, but "_root.myResultSet = new Object();" is
sure SIMPLER!!!!!!
Re too much data, point taken.
-steve
-----Original Message-----
From: Kevin Towes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 4:30 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFTALKTor] CFNorth
Hi Steve... thanks for the feedback...
A Default Responder is easy... it is simple a custom function that is named
the same as your service function..
FYI: Lets say you create a function in your CFC called "getData". The
Filename of your CFC is "myCFC.cfm"
you will call (invoke) the service function like this:
myCFC.getData();
your default responder will be called:
getData_result(result)
The following function will AUTOMATICALLY be called when the service
function is complete. Here is how you create it.
getData_result(result) {
myFirstColumData=result.items[1].myColumnName;
}
you could also transfer the data into an object that is accessible outside
the responder:
getData_result(result) {
_root.myResultSet = new Object();
_root.myResultSet=result.items[1].myColumnName;
_root.gotoAndPlay("anotherFrame");
}
Then you can access it anywhere....
reguarding a data limit... remember, with remoting, you don't need to bring
in all your data at once... it is best not to... just get what you need (DO
NOT DO A SELECT * and import the entire recordset) that will not be good
for the player... remember, the Flash Application relys on the client's
computer. its data handleing methods are much slower then CF... so try and
do as much pre-processing at the server. Call back to the server often.
(remeber,. each time you call back, the IIS logs are updated -- think about
it.... the more you call back the more you can track your flash
application's usage!)
kev.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: May 21, 2002 3:43 PM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] CFNorth
On a slightly different note...
I spent some time on the weekend making my first FlashMX/CFMX app. Kev your
code (downloaded from Macromedia) was very very useful. The only thing I
found missing was how to create my own default responder. Not difficult if
you have an example, but impossible without one.
Found an example at Macromedia though.
The other thing I noticed was my original query returned too much data and
remoting throws an error. Is the threshold known? I'm sure I could figure
it
out, but I'd rather not if I don't have to. The fix was to use
Flash.pagesize = 30 in the CF component.
-steve
-----Original Message-----
From: Kevin Towes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 3:20 PM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] RoadTrip to CFUN next Month
Importance: High
Hi Gang..
I am driving down to Rockville MD on June 14th for the CFUN conference
(Sat,
Jun 15-16). It is a similar conference as CFNorth (a little smaller,
though) But if you missed CFNorth a couple weeks ago, you should consider
going to this. The Price is $199US for the weekend, plus your Hotel...
There will be a number of speakers there that were not at CFNorth... I will
be speaking about Flash Remoting... and there will be a strong focus on
ColdFusion MX.
Let me know if anyone is interested in a roadTrip(); that weekend.
kev.
:::Kevin Towes BAA, CFCP, AAGG:::
[EMAIL PROTECTED]
www.PangaeaNewMedia.ca
+1 (416) 922.1600 x251
349 Carlaw Ave.,
Suite 2C, Toronto M4M2T1
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Kevin Towes" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: Steve Budan <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Kevin Towes" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: Steve Budan <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)