[flexcoders] Re: tilelist itemrender problem

2009-01-19 Thread johndoematrix
how do i create an Array Collection of Objects that have a label
property and an icon property. after reading something abt the
tilelist on bruce philips blog, someone had the same problem and was
asked to create an Array Collection of Objects that have a label
property and an icon property and use the icon property to load the
images.



[flexcoders] Re: tilelist itemrender problem

2009-01-18 Thread johndoematrix
when i do what you asked me to do by taking out the leading dots and
the forward slash, image icons appear but without loading the images.
could it be with the coldfusion query? coz it looks like its actually
trying to load the images but cant find them. am gonna revise my
coldfusion query bt if you dont mind you can also look at it see if am
doing something wrong.

cffunction name=load output=false access=remote returntype=query
cfargument name=ctry_id required=true type=numeric default=0
cfset var homes= 
cfset var result=   
cfquery name=homes datasource=realestate
select  id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, 
bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, image, lat, lng, description, tour

FROMhomes 
WHERE   ctryid_home = cfqueryparam 
value=#arguments.ctry_id#
cfsqltype=cf_sql_integer /   

/cfquery
cfquery dbtype=query name=results
select  id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, 
bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, 
'http://localhost:8500/IESTATE_V1/assets/homeprofile_pics/'
+ image AS profilePic,
lat, lng, description,
'http://localhost:8500/iestate/images/video/' + tour AS video
FROM homes  
/cfquery
cfreturn results
/cffunction



[flexcoders] Re: tilelist itemrender problem

2009-01-18 Thread Tracy Spratt
I'd suggest you just solve this systematically, instead of guessing.

Hard code a full url to a known image.  Verify it in a browser, and 
test it in the app.

Then make that url relative, test it.  If you can't find it, put the 
image in the same folder as the main app, test again with the full 
url in browser and app, then make the relative url (it should just be 
the file name alone).  Test in the app.

Move the image ONE folder toward where you want it. Adjust the 
relative url. Test.  Repeat, until the Image is where you want it and 
the app works.

Doing this will probably show you where your current logic is in 
error.

Having to do this once or twice was one of the reasons I mostly 
stopped using relative urls, and started passing the full qualified 
url to the root assets folder from the html wrapper via flashvars.  
That technique has other benefits as well.

Tracy

--- In flexcoders@yahoogroups.com, johndoematrix 
johndoemat...@... wrote:

 when i do what you asked me to do by taking out the leading dots and
 the forward slash, image icons appear but without loading the 
images.
 could it be with the coldfusion query? coz it looks like its 
actually
 trying to load the images but cant find them. am gonna revise my
 coldfusion query bt if you dont mind you can also look at it see if 
am
 doing something wrong.
 
 cffunction name=load output=false access=remote 
returntype=query
   cfargument name=ctry_id required=true type=numeric 
default=0
   cfset var homes= 
   cfset var result=   
   cfquery name=homes datasource=realestate
   select  id, ctryid_home, city, location, 
price, type, 
   square_feet, date_listed, 
bedrooms, bathrooms, status, 
   pool, backyard, closets, 
garage, sale, 
   rent, image, lat, lng, 
description, tour
   
   FROMhomes 
   WHERE   ctryid_home = cfqueryparam 
value=#arguments.ctry_id#
 cfsqltype=cf_sql_integer / 

   /cfquery
   cfquery dbtype=query name=results
   select  id, ctryid_home, city, location, 
price, type, 
   square_feet, date_listed, 
bedrooms, bathrooms, status, 
   pool, backyard, closets, 
garage, sale, 
   
rent, 'http://localhost:8500/IESTATE_V1/assets/homeprofile_pic
s/'
 + image AS profilePic,
   lat, lng, description,
 'http://localhost:8500/iestate/images/video/' + tour AS video
   FROM homes  
   /cfquery
   cfreturn results
   /cffunction





[flexcoders] Re: tilelist itemrender problem

2009-01-17 Thread Amy
--- In flexcoders@yahoogroups.com, johndoematrix 
johndoemat...@... wrote:

 my project is arranged in the following way. the project folder is
 IESTATE_V1 and the project is named Portal_V1. inside the IESTATE_V1
 is the main application named portal_V1.mxml, the assets folder 
which
 has the homeprofile_ pics folder where the images are stored, the
 components folder which has my tilelist and tilelist itemrenderer.
 hope thats clear. so after knowing how things are arranged do you
 still think {'../assets/ homeprofile_ pics/' + data.profilePic}  
is
 the problem?


Try taking off the leading dots and forward slash.  The path should 
be relative to your main mxml file, not relative to the component.



HTH;

Amy



[flexcoders] Re: tilelist itemrender problem

2009-01-16 Thread johndoematrix
hi i have tried to debug the application but failed to find what the
problem is the other data is pulled from the database well but the
images are not. in all honesty i have tried over and over again bt
failed please help me. once again i will post my cfc.

cfc

!--- Get Homes ---
cffunction name=load output=false access=remote
returntype=query
cfargument name=ctry_id required=true type=numeric default=0
cfset var homes= 
cfset var result=   
cfquery name=homes datasource=realestate
select  id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, 
bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, image, lat, lng, description, tour

FROMhomes 
WHERE   ctryid_home = cfqueryparam 
value=#arguments.ctry_id#
cfsqltype=cf_sql_integer /   

/cfquery
cfquery dbtype=query name=results
select  id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, 
bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, 
'http://localhost:8500/IESTATE_V1/assets/homeprofile_pics/'
+ image AS profilePic,
lat, lng, description,
'http://localhost:8500/iestate/images/video/' + tour AS video
FROM homes  
/cfquery
cfreturn results
/cffunction

item renderer

?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns:reflection=as_logic.*
mx:CurrencyFormatter id=cf/

mx:Image source={'../assets/homeprofile_pics/' + data.profilePic}/
mx:VBox
mx:Label text={data.type} fontWeight=bold/
mx:Label text={cf.format(data.price)}/
/mx:VBox  
/mx:HBox

by the way i use the same arraycollection for the tilelist and
datagrid and all data is pulled out except the images. here is my
arraycollection

dataAr

[Bindable]
   private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{
//var dataAry:Array = event.result as Array ;
//dataAr = new ArrayCollection( (dataAry as 
ArrayCollection).source);
dataAr = new ArrayCollection( (event.result as
ArrayCollection).source);
}



RE: [flexcoders] Re: tilelist itemrender problem

2009-01-16 Thread Tracy Spratt
Hard code a full url as a test.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of johndoematrix
Sent: Friday, January 16, 2009 3:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: tilelist itemrender problem

 

hi i have tried to debug the application but failed to find what the
problem is the other data is pulled from the database well but the
images are not. in all honesty i have tried over and over again bt
failed please help me. once again i will post my cfc.

cfc

!--- Get Homes ---
cffunction name=load output=false access=remote
returntype=query
cfargument name=ctry_id required=true type=numeric default=0
cfset var homes= 
cfset var result=  
cfquery name=homes datasource=realestate
select id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, image, lat, lng, description, tour

FROM homes 
WHERE ctryid_home = cfqueryparam value=#arguments.ctry_id#
cfsqltype=cf_sql_integer / 
/cfquery
cfquery dbtype=query name=results
select id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, 'http://localhost:8500/IESTATE_V1/assets/homeprofile_pics/
http://localhost:8500/IESTATE_V1/assets/homeprofile_pics/ '
+ image AS profilePic,
lat, lng, description,
'http://localhost:8500/iestate/images/video/
http://localhost:8500/iestate/images/video/ ' + tour AS video
FROM homes 
/cfquery
cfreturn results
/cffunction

item renderer

?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
xmlns:reflection=as_logic.*
mx:CurrencyFormatter id=cf/

mx:Image source={'../assets/homeprofile_pics/' + data.profilePic}/
mx:VBox
mx:Label text={data.type} fontWeight=bold/
mx:Label text={cf.format(data.price)}/
/mx:VBox 
/mx:HBox

by the way i use the same arraycollection for the tilelist and
datagrid and all data is pulled out except the images. here is my
arraycollection

dataAr

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{
//var dataAry:Array = event.result as Array ;
//dataAr = new ArrayCollection( (dataAry as ArrayCollection).source);
dataAr = new ArrayCollection( (event.result as
ArrayCollection).source);
}

 



[flexcoders] Re: tilelist itemrender problem

2009-01-16 Thread johndoematrix
i have tried that and the image shows. but when i try loading them
dynamically from db nothing shows up. thats where am stuck. all am
asking is to be pointed into the right direction, maybe there could be
something in my code thats missing or that needs to be removed. thanks



[flexcoders] Re: tilelist itemrender problem

2009-01-16 Thread Amy
--- In flexcoders@yahoogroups.com, johndoematrix johndoemat...@... 
wrote:

 i have tried that and the image shows. but when i try loading them
 dynamically from db nothing shows up. thats where am stuck. all am
 asking is to be pointed into the right direction, maybe there could be
 something in my code thats missing or that needs to be removed. thanks


I think the problem is this:

{'../assets/homeprofile_pics/' + data.profilePic}

This is sayint to look for the assets folder _outside_ of the src 
directory, in the main project folder.  Is that where you've placed 
them?

-Amy



[flexcoders] Re: tilelist itemrender problem

2009-01-16 Thread johndoematrix
my project is arranged in the following way. the project folder is
IESTATE_V1 and the project is named Portal_V1. inside the IESTATE_V1
is the main application named portal_V1.mxml, the assets folder which
has the homeprofile_ pics folder where the images are stored, the
components folder which has my tilelist and tilelist itemrenderer.
hope thats clear. so after knowing how things are arranged do you
still think {'../assets/ homeprofile_ pics/' + data.profilePic}  is
the problem?



[flexcoders] Re: tilelist itemrender problem

2009-01-09 Thread johndoematrix
when i use the hardcode relative link it works, so i guess the data
return from the cfc is wrong. bt thats odd the query seems to be
correct. may be its something to do with my arraycollection. please
take a look at the array collection and see if there's something wrong.

dataAr

[Bindable]
   private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{
//var dataAry:Array = event.result as Array ;
//dataAr = new ArrayCollection( (dataAry as 
ArrayCollection).source);
dataAr = new ArrayCollection( (event.result as
ArrayCollection).source);   
}

remoteobj call

mx:RemoteObject id=homeSvc destination=ColdFusion
source=test.cfcs.homes1 showBusyCursor=true
fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)
mx:method name=load result=displayResult(event) / 

/mx:RemoteObject



RE: [flexcoders] Re: tilelist itemrender problem

2009-01-09 Thread Kenneth Sutherland
What is the event.result? you need to stick a breakpoint when your
displayResult function is called and see what is being returned and
change that into an arraycollection.  You're line of code is effectively
saying that event.result is an arraycollection which I doubt (but I do
not know what CF can do).

 

Debug it and that will show you the answer, you need to see what's come
back. 

 

Kenneth.

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of johndoematrix
Sent: 09 January 2009 10:08
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: tilelist itemrender problem

 

when i use the hardcode relative link it works, so i guess the data
return from the cfc is wrong. bt thats odd the query seems to be
correct. may be its something to do with my arraycollection. please
take a look at the array collection and see if there's something wrong.

dataAr

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{
//var dataAry:Array = event.result as Array ;
//dataAr = new ArrayCollection( (dataAry as ArrayCollection).source);
dataAr = new ArrayCollection( (event.result as
ArrayCollection).source); 
}

remoteobj call

mx:RemoteObject id=homeSvc destination=ColdFusion
source=test.cfcs.homes1 showBusyCursor=true
fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=load result=displayResult(event) / 

/mx:RemoteObject

 

Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---