Re: [flexcoders] Eeeeek! Development grinds to a halt due to stupid syntax problem

2007-09-22 Thread Paul Andrews
Why do you have to use the database field names inside the flex application?

- Original Message - 
From: candysmate [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Saturday, September 22, 2007 3:58 PM
Subject: [flexcoders] Ek! Development grinds to a halt due to stupid 
syntax problem


 My client's database contains hash symbols as part of the field name(s).
 So a line like:


 var selectedGrowerAddress2:String =
 StringUtil.trim(String(event.currentTarget.growerSearchGrid.selectedItem.ADDRESS_LINE#2));

 throws a compiler syntax error: expecting a semicolon before the 2.

 How can I get around this please?

 No, renaming the client's daatabase fields is NOT an option. Their
 main app uses this. My bespoke Flex app runs parallel to it.



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links



 



Re: [flexcoders] Eeeeek! Development grinds to a halt due to stupid syntax problem

2007-09-22 Thread Stephen Allison
Are you able to use the square brackets syntax for accessing  
properties ?
This should work if your data objects are type object or are dynamic (?)

var selectedGrowerAddress2:String =
StringUtil.trim(String 
(event.currentTarget.growerSearchGrid.selectedItem[ADDRESS_LINE#2]));


 My client's database contains hash symbols as part of the field name 
 (s).
 So a line like:

 var selectedGrowerAddress2:String =
 StringUtil.trim(String 
 (event.currentTarget.growerSearchGrid.selectedItem.ADDRESS_LINE#2));

 throws a compiler syntax error: expecting a semicolon before the 2.

 How can I get around this please?

 No, renaming the client's daatabase fields is NOT an option. Their
 main app uses this. My bespoke Flex app runs parallel to it.