Groups | Blog | Home
all groups > macromedia flash flash remoting > october 2003 >

macromedia flash flash remoting : DataGlue.bindFormatStrings doesn't work in 2004, Why?


Tom Muck
10/28/2003 9:09:19 AM

[quoted text, click to view]

DataGlue does not work with new components. MM did not make the components
backward compatible.


--
---------------------------------------------------------------
Tom Muck
author -- Flash Remoting: The Definitive Guide
http://www.flash-remoting.com/notablog

Team Macromedia Volunteer for Flash

Extending Knowledge, Daily
http://www.communityMX.com/


feiloiram
10/28/2003 10:29:59 AM
Hi,

following is done in Flash 2004 MX.

function ProvideBrandNames_Result (result) {
//trace(result.getLength());
//var titles = result.getColumnNames();
//trace(titles[0] + ", " + titles[1]);
//var record = result.getItemAt(0);
//trace(record.BrandName);
//combobox.addItem(record.BrandName, record.BrandNameID);
DataGlue.bindFormatStrings(combobox,result,"#BrandName#","#BrandNameID#");
}
#include "NetServices.as"
#include "NetDebug.as"
#include "DataGlue.as"
// open the gateway only once
if (isGatewayOpen == null) {
isGatewayOpen = true;
NetServices.setDefaultGatewayUrl( "http://noneofyourbusiness.com/flashservices/gateway");
gatewayConnnection = NetServices.createGatewayConnection();
BrandNameService = gatewayConnnection.getService("GFS.Components.GetBrandNames", this);
}
BrandNameService.ProvideBrandNames();

The trace-commands show that I connect to my Coldfusion Component and that the desired data is succefully retrieved.

When I would use addItem to add one record to the combobox then this works. (So I could build a small loop to enter the entire query)

But,
In flash MX I succefully used DataGlue.bindFormatStrings. So i want to use this also in Flash MX 2004.
Whats wrong with my coding. Or is this a bug?

Mario

OHSAH
10/31/2003 12:41:44 AM
No wonder I couldn't get it to work but anyway
I tried to update the combobox manually I mean looping
the result object (which is correct because I display all elements to the output window
with trace and all of them are being displaued correctly) and nothing happen.
The combobox doesn't get updated.
I have tried soo many things to make it work without success.

Any ideas?

Jason Huff
10/31/2003 5:56:17 AM
I am using remoting just fine!

Download the the remoting components for MX2004

Also another little tidbit,

[quoted text, click to view]

Take out the ending #! This cleared my issue right up. Isuppose you could
call it a bug with a workaround.

Jason Huff
huFFcodesign


[quoted text, click to view]

OHSAH
11/5/2003 10:40:34 PM
I tried removing the second # but still same problem.

I already re-install everything (Flash, Flash Remote Components and Flash Remoting)
and still same issue.

This is not a good start for someone that is starting to learn &=^(

Any other suggestions?

fragnrock
1/23/2004 10:58:41 AM
I have the same problem when I try to use a bindFormatStrings() with a combobox (FlashMX 2004). It doesn't crash, but my combobox isn't populated with my resultset.

To populate my combobox I loop over the resultset like that :

for(var i=0;i<result.length;i++){
mycombo.addItem(result.getItemAt(i).name, result.getItemAt(i).nameID);
}


But I did not understand why macromedia doesn't make anything to make the bindFormatStrings() method compatible with the new components.

mama
1/25/2004 11:49:22 AM
It's seems that there's a bug with Dataglue.bindFormatStrings with MX
2004 :(
But you can use Dataglue.bindFormatFunction that works fine and that
isn't difficult to use.

--
Mathieu
fragnrock
1/27/2004 8:43:32 AM
Can you give us an example of the Dataglue.bindFormatFunction() which works?

AddThis Social Bookmark Button