[flexcoders] Re: Flex 2, AMFPHP and charset

2007-03-27 Thread RadicalByte
--- In flexcoders@yahoogroups.com, Rafael Guédez [EMAIL PROTECTED] wrote:

 Hello,
 
 
 I really don't know what to do, I'm using in the gateway:
 
 
 $gateway-setCharsetHandler( none, ISO-8859-1, ISO-8859-1 );
 
 
 And running the application in the browser all the data look fine,  
 but in the database this really write weird characters for special  
 chars, and I need this data to see it in a normal flash web site.
 
 
 I don't know if this is a unsolved problem in this beta version. Any  
 idea?
 
 
 Flex 2, AMFPHP 1.9, MySQL 4.0.26 and PHP 5.0.4
 
 
 regards
 
 
 Rafael


Hi Rafael, 

What datatype are the fields in your DB?

How're you handling the characters in PHP (as it doesn't support unicode).

Cheers,
Ryan



[flexcoders] Dynamically sized array collection

2007-03-09 Thread RadicalByte
Hi All,

I'm hitting my head against a brick wall trying to work this out, but
to no avail.

I would like to have an ArrayCollection which contains a variable
number of ArrayCollections.

My code looks like..

[CODE]

var arrayCollection:ArrayCollection=new ArrayCollection();
var numberOfItems:int=10;

for(var x=1;xnumberOfItems;x++)
{
  arrayCollection.addItem(new ArrayCollection());
}

[/CODE]

arrayCollection[0] will contain an array of strings
arrayCollection[x] will contain an array of numbers

Structure wise it's like a spreadsheet, where the first column
contains a title and the other columns numbers.

This collection will be mapped to a DataGrid and an BarChart - with
the x-axis mapped to the array-of-strings and each series mapped to
the numbers (this'll be dynamic, too).

My aim with the collection is to use it to hold SUM values from a
tree-structured XML transmission.  The XML transmission has a fixed
debth but the number of properties may different.  In my example
below, I have Hours and Cost to SUM but in other XML transmissions
I'll have Hours, Cost, Profit, etc etc.

[XML]

Weeks
Week id=0 name=2007-01
Tarif Name=A Hours=100 Cost=50.00/
Tarif Name=B Hours=100 Cost=50.00/
Tarif Name=C Hours=100 Cost=50.00/
/Week
Week id=1 name=2007-02
Tarif Name=A Hours=100 Cost=50.00/
Tarif Name=C Hours=100 Cost=50.00/
/Week
/Weeks

[/XML]

So, can anyone explain to me what I'm doing wrong?

Cheers,
Ryan




[flexcoders] Sending form

2007-03-06 Thread RadicalByte
Hi All,

This is my first post to the group, and is probably a stupid question..

I'm building my first flex application.  It consists of the main
application area and several forms.

The main application area calls some web services via HTTPService and
stores the resulting data in ArrayCollections.

The froms are instantiated via Actionscript, and managed by the
PopupManager as they're popups.

Now for the questions:

1. How do I give the forms access to the application area's
ArrayCollections?  I'd ideally like to pass a reference in each form's
constructor.  If this is possible/easy then the next question isn't so
important [because I'll send my subform a reference to the variables
and it can work direct on them].

2. One of the forms is a data entry form.  It has an 'ok' button. 
OnClick of the OK button I need the form to send the values of its
member controls to the main application.  The main application then
uses these values.

3. Does anyone have any book recommendations?  I've nabbed O'Reilly's
ActionScript 3.0 Cookbook for answers to some questions, but I'd like
something that covers both Flex/ActionScript..

Thanks in advance :-)

Best regards,
Ryan