Adobe Dreamweaver Forums



Last 10 THreads :         Need assistance converting some AS2 code to AS3 (Last Post : NedWebs - Replies : 3 - Views : 4 )           »          pdf file stored as BLOB data type on Oracle (Last Post : BALAJI_JAY - Replies : 4 - Views : 8 )           »          Help with CFIMAGE (Last Post : VaQueenB - Replies : 0 - Views : 1 )           »          Display timer (Last Post : trycold - Replies : 0 - Views : 1 )           »          Publishing 16000 frames (Last Post : mgiff - Replies : 4 - Views : 5 )           »          Calling Query in Custom Tag (Last Post : -==cfSearching==- - Replies : 7 - Views : 8 )           »          moving files over to the right side (Last Post : eliot1785 - Replies : 0 - Views : 1 )           »          Purple border around my link!! (Last Post : Wodehouse - Replies : 1 - Views : 2 )           »          Changing platforms (Last Post : Janbod - Replies : 0 - Views : 1 )           »          Suddenly can't see files on remote server (Last Post : Alan - Replies : 8 - Views : 9 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: ,



Reply
  #1 (permalink)  
Old 07-09-2008, 02:34 PM
realtime158
 
Posts: n/a
Diggs:
Default what would this return

i created a function here is the code below. What i want it to return is the
results so i can bind it to any component like a combobox or a grid. I was
trying to return return phpService.xmlEncode; but no dice didn't work. any
ideas.

public function
phpResponse(pstMethod:String,srviceURL:String,usPr ox:Boolean,cursorStatus:Boolea
n):void
{
phpService.showBusyCursor = cursorStatus;
phpService.method = pstMethod;
phpService.url = srviceURL;
phpService.useProxy = usProx;
phpService.send;

}





Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-09-2008, 03:50 PM
SujitG
 
Posts: n/a
Diggs:
Default Re: what would this return

Hi,

I don't think this function will return anything. The function will just
return nothing and will finish executing once the send() call is made. The
send() call is asynchronous and will invoke the result handler once the
response is received from the server. You can try adding a result handler
(assuming this is a HTTPService) and then bind the data to the combo box in the
result handler.

Please visit the URL below for details on how to add a result handler.

http://livedocs.adobe.com/flex/3/htm..._2.html#193905

Hope this helps.

Reply With Quote
  #3 (permalink)  
Old 07-09-2008, 07:24 PM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: what would this return

Here is a simple yet complete example of an HTTPService with result handler:

----------- SimpleDGService1.xml ----------------
<?xml version="1.0" encoding="utf-8"?>
<data>
<item>
<food>butter</food>
<category>condiments</category>
<healthy>no</healthy>
</item>
<item>
<food>honeydew</food>
<category>fruit</category>
<healthy>yes</healthy>
</item>
<item>
<food>milk</food>
<category>dairy</category>
<healthy>yes</healthy>
</item>
<item>
<food>yogurt</food>
<category>dairy</category>
<healthy>yes</healthy>
</item>
<item>
<food>candy</food>
<category>snacks</category>
<healthy>no</healthy>
</item>
<item>
<food>beer</food>
<category>beverages</category>
<healthy>no</healthy>
</item>
</data>
------------ SimpleDGService1.mxml -----------------
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="dataRequest.send()">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;

[Bindable]
private var resultObj:Object = new Object();

private function resultHandler(event:ResultEvent):void{
resultObj = Object(event.result);
}
]]>
</mx:Script>
<mx:HTTPService id="dataRequest" url="SimpleDGService1.xml"
result="resultHandler(event)" resultFormat="e4x"/>
<mxataGrid dataProvider="{resultObj.item}">
<mx:columns>
<mxataGridColumn headerText="Food" dataField="food"/>
<mxataGridColumn headerText="Category" dataField="category"/>
<mxataGridColumn headerText="Healthy" dataField="healthy"/>
</mx:columns>
</mxataGrid>
</mx:Application>

Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:45 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk