Yeah thanks for the advice but I can't seem to get anything on that
code to work and to be honest I don't even begin to understand where
to begin on how to modify it to get it to work. Trying to get it to
work but I get a whole mess of errors


1046: Type was not found or was not a compile-time constant: AsyncToken.        
1046: Type was not found or was not a compile-time constant: AsyncToken.        
1046: Type was not found or was not a compile-time constant:
XMLListCollection.      
1120: Access of undefined property event.       
1120: Access of undefined property oRequest.    
1120: Access of undefined property service.     
1120: Access of undefined property token.       
1180: Call to a possibly undefined method doQuery2.     
1180: Call to a possibly undefined method XMLListCollection.

Thank you for your help Tracey



--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> labelField and labelFunction are properties of TileList.
> 
>  
> 
> You have several other issues.
> 
>  
> 
> I advise using my example code, including the trace statements.
> 
>  
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of markcavins
> Sent: Friday, January 11, 2008 2:35 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: XML List problems
> 
>  
> 
> OK so in the example that I have 
> 
> tempXML.lastResult.asset.fleet
> 
> tempXML is my source (the url)
> 
> asset is the parent attribute
> 
> and fleet is the actual name that I want to display 
> 
> I'm still unsure as to where I would use the labelFunction(asset).
> 
> Sorry I know this must be sounding Dugh to everyone and this is why I
> have never delved into Flex or Flash before because the language just
> confuses me to all heck. 
> 
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Tracy Spratt" <tspratt@> wrote:
> >
> > TileList is very similar to List and DataGrid. Each element (row,
> tile)
> > in the list gets a reference to the dataProvider item that is
> producing
> > it.
> > 
> > 
> > 
> > With all the lists, you have to tell the control which property in the
> > dataProvider item you want to display.
> > 
> > 
> > 
> > Specify labelField (dataField for DataGrid) for simple, top-level
> > properties of the item, like attributes, or first generation child
> nodes
> > in xml or properties in an object.
> > 
> > 
> > 
> > Specify labelFunction() to build complex labels from more than one
> > property, or to access values in nested nodes or properties./
> > 
> > 
> > 
> > Tracy
> > 
> > 
> > 
> > ________________________________
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of markcavins
> > Sent: Friday, January 11, 2008 1:43 PM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Re: XML List problems
> > 
> > 
> > 
> > I've tried this basic event handler with no success
> > 
> > Code:
> > 
> > <mx:HTTPService id="tempXML"
> >
> url="https://{customer.text}.mysite.net/interface.php?action=showopen&am
> >
> p;operation=showassets&amp;format=xml&amp;opstatus=crit&amp;username={us
> > ername.text}&amp;password={password.text}"
> > />
> > <mx:Script>
> > <![CDATA[
> > import mx.collections.*;
> > [Bindable]
> > public var TileList1dp:ArrayCollection;
> > 
> > private function initData():void {
> > TileList1dp = new ArrayCollection(tempXML.lastResult.asset.fleet);
> > }
> > ]]>
> > </mx:Script>
> > 
> > <mx:TileList dataProvider="{TileList1dp}"
> > width="344" backgroundColor="#000000" color="#ff0000" fontSize="27"
> > borderColor="#000000" columnWidth="300" rowHeight="50"
> > themeColor="#808080" fontWeight="bold" allowMultipleSelection="true"
> > id="TileList1" height="0" y="202" x="178"/>
> > 
> > I can look through fire bug and see that I am seeing the XML being
> > received but I am not seeing the data being displayed in the app.
> > 
> > I am trying to find an example of the result handler that will get the
> > data to the TileList.
> > 
> > I know that I am probably noobing this problem but I am still new and
> > unsure of how to receive. 
> > 
> > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > , "markcavins" <markcavins@> wrote:
> > >
> > > I am trying to find an example of the result handler that will get
> the
> > > data to the TileList. Tracy's example is great but I am having a
> hard
> > > time making this work with my app. 
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> , "markcavins" <markcavins@>
> > wrote:
> > > >
> > > > Thank you for this wonderful example and maybe I am just too much
> of
> > a
> > > > noob at this but wouldn't this example just put every thing in a
> > data
> > > > grid?
> > > > 
> > > > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> , "Tracy Spratt" <tspratt@>
> wrote:
> > > > >
> > > > > It is difficult to debug problems when you bind directly to
> > > > lastResult. Instead, use a result handler, in which you can
> inspect
> > > > yur data.
> > > > > Tracy
> > > > > 
> > > > > Sample code using HTTPService, e4x, handler function to populate
> a
> > > > list item. 
> > > > > Also shows usage of AsyncToken.
> > > > > 
> > > > > The DataGrid tag:
> > > > > <mx:DataGrid id="dg" dataProvider="{_xlcMyListData}" .../>
> > > > > 
> > > > > 
> > > > > The HTTPService tag:
> > > > > <mx:HTTPService id="service" resultFormat="e4x"
> > > > result="onResult(event)" fault="..../>
> > > > > 
> > > > > Script block declaration:
> > > > > import mx.rpc.Events.ResultEvent;
> > > > > [Bindable]private var _xlcMyListData:XMLListCollection;
> > > > > 
> > > > > Invoke send:
> > > > > var oRequest:Object = new Object();
> > > > > oRequest.Arg1 = "value1";
> > > > > var callToken:AsyncToken = service.send(oRequest);
> > > > > token.callId = "myQuery1";
> > > > > 
> > > > > Result Handler function:
> > > > > private function onResult(oEvent:ResultEvent):void {
> > > > > var xmlResult:XML = XML(event.result); //converts
> > > > result Object to XML. can also use "as" operator
> > > > > var xlMyListData:XMLList = xmlResult.myListData; //depends on
> > > > xml format, is row data
> > > > > _xlcMyListData = new XMLListCollection(xlMyListData); //wrap the
> > > > XMLList in a collection
> > > > > trace(_xlcMyListData.toXMLString()); //so you can
> > > > see exactly how to specify dataField or build labelFunction
> > > > > var callToken:AsyncToken = oEvent.token;
> > > > > var sCallId = callToken.callId; //"myQuery1"
> > > > > switch(sCallId) { //Process
> > > > the result conditionally
> > > > > case "myQuery1":
> > > > > doQuery2(); //do
> > > > whatever. this example calls another data service query
> > > > > break;
> > > > > ... 
> > > > > }
> > > > > }//onResult
> > > > > 
> > > > > ________________________________________
> > > > > From: flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > ]
> > > > On Behalf Of markcavins
> > > > > Sent: Thursday, January 10, 2008 7:21 PM
> > > > > To: flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> 
> > > > > Subject: [flexcoders] Re: XML List problems
> > > > > 
> > > > > another question would be if I need to add a result to the
> > HTTPService
> > > > > to get it to display and if so what would the result set need to
> > be?
> > > > > 
> > > > > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> , "markcavins" <markcavins@>
> > wrote:
> > > > > >
> > > > > > This is the XML output for each asset
> > > > > > 
> > > > > > <asset id="aa44">
> > > > > > <name>333CCC</name>
> > > > > > <tag>abc232</tag>
> > > > > > <vin>11111111</vin>
> > > > > > <fleet>0052</fleet>
> > > > > > <type id="0">Standard</type>
> > > > > > <subtype id="4">STANDARD</subtype>
> > > > > > <exsid/>
> > > > > > <mileage>1946</mileage>
> > > > > > <location>Home</location>
> > > > > > <mileoffset>0</mileoffset>
> > > > > > <radioaddress/>
> > > > > > <mfg>GMC</mfg>
> > > > > > <inservice></inservice>
> > > > > > <inspdate id="555" type="34343">12/10/2002</inspdate>
> > > > > > &#8722;
> > > > > > <yardstat>
> > > > > > <yard/>
> > > > > > <stat timestamp="0"></stat>
> > > > > > </yardstat>
> > > > > > <opstatus timestamp="1190311036">1325465465</opstatus>
> > > > > > <gps></gps>
> > > > > > <homeloi/>
> > > > > > </asset>
> > > > > > 
> > > > > > 
> > > > > > All I am looking for is just that asset name.
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> , Alger Werft <alger.werft@>
> > wrote:
> > > > > > >
> > > > > > > To clarify:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/http/mxml/HTTPServic
> <http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/http/mxml/HTTPServi
> c> 
> > e.html
> >
> <http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/http/mxml/HTTPServi
> <http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/http/mxml/HTTPServi
> > 
> > ce.html> 
> > > > > > > 
> > > > > > > There's a lastResult property but no result!
> > > > > > > 
> > > > > > > There's a result event which is fired when the HTTP response
> > is
> > > > > loaded.
> > > > > > > This event has a result property.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/events/ResultEvent.h
> <http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/events/ResultEvent.
> h> 
> > tml
> >
> <http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/events/ResultEvent.
> <http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/events/ResultEvent.
> > 
> > html> 
> > > > > > > 
> > > > > > > 
> > > > > > > What's the structure of your XML?
> > > > > > > 
> > > > > > > 
> > > > > > > markcavins schrieb:
> > > > > > > >
> > > > > > > > In that case I get the following error
> > > > > > > >
> > > > > > > > 1119: Access of possibly undefined property result through
> a
> > > > > reference
> > > > > > > > with static type mx.rpc.http.mxml:HTTPService.
> > > > > > > >
> > > > > > > > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> 
> > > > > > > > <mailto:flexcoders%40yahoogroups.com>, Sheriff
> <sherif626@>
> > > wrote:
> > > > > > > > >
> > > > > > > > > it shouldnt be tempXML.lastResult, instead
> tempXML.result
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ----- Original Message ----
> > > > > > > > > From: markcavins <markcavins@>
> > > > > > > > > To: flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> 
> > > > > <mailto:flexcoders%40yahoogroups.com>
> > > > > > > > > Sent: Thursday, January 10, 2008 3:40:58 PM
> > > > > > > > > Subject: [flexcoders] XML List problems
> > > > > > > > >
> > > > > > > > > I have had some help from some others on this issue but
> > the
> > > > battle
> > > > > > > > > continues and I am perplexed as to why this might be
> > > happening.
> > > > > > > > >
> > > > > > > > > I am grabbing a HTTPService from my site
> > > > > > > > >
> > > > > > > > > <mx:HTTPService id="tempXML"
> > > > > > > > > url="https://mysite. net/interface. php?action=
> showopen&
> > > > > > > > amp;operation= showassets& amp;format= xml&amp;opstatus
> > =crit"
> > > > > > > > > />
> > > > > > > > >
> > > > > > > > > and displaying it in a TileList
> > > > > > > > >
> > > > > > > > > <mx:TileList dataProvider= "{tempXML. lastResult.
> > > asset.fleet} "
> > > > > > > > > width="344" backgroundColor= "#000000" color="#ff0000"
> > > > > fontSize="27"
> > > > > > > > > borderColor= "#000000" columnWidth= "300" rowHeight="50"
> > > > > > > > > themeColor=" #808080" fontWeight=" bold"
> > allowMultipleSelect
> > > > > > ion="true"
> > > > > > > > > id="TileList1" height="0" y="202" x="178"/>
> > > > > > > > >
> > > > > > > > > and then refreshing the data every 5 minutes or when a
> > user
> > > > > pushes a
> > > > > > > > > button.
> > > > > > > > >
> > > > > > > > > before I was trying to call the data with a mx:XML and
> the
> > > > > data was
> > > > > > > > > displaying but the data would not refresh. Looking
> > through the
> > > > > > docs it
> > > > > > > > > seems that that is the expected response. changing to
> the
> > > > Service
> > > > > > > > > request I can look through firebug and see that the
> > request is
> > > > > being
> > > > > > > > > made and that the server is returning the proper xml but
> > > now the
> > > > > > > > > TileList is not displaying any information.
> > > > > > > > >
> > > > > > > > > I have tried to look through the docs to see what might
> > be the
> > > > > cause
> > > > > > > > > but not solution has presented itself.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > __________________________________________________________
> > > > > > > > > Looking for last minute shopping deals?
> > > > > > > > > Find them fast with Yahoo! Search.
> > > > > > > >
> > > > > >
> > > >
> > http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
> 
> >
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
> >
> > 
> > > > > > > >
> > > > > >
> > > >
> >
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
> 
> >
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
> >
> > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply via email to