[flexcoders] Re:createclassonthefly

2009-07-13 Thread Bagish K. Mishra
You can create a empty dynamic class and at run time you can add properties to 
it.For some glimpse for dynamic class and adding attribute at run time 
following 
link(http://flexxxed.wordpress.com/2009/05/15/adding-attribute-at-runtime-in-a-class/)


Bagish K Mishra

Re: [flexcoders] create class on the fly

2009-07-13 Thread Alan Shaw
There are a number of important techniques for manipulating classes (as detailed
in my post http://nodename.com/blog/2008/06/15/upon-reflection/ ), but
unfortunately
creating a class at runtime is not possible in AS3.

On Mon, Jul 13, 2009 at 8:23 PM, postwick wrote:
>
>
> I want to store descriptions of classes in an external file (such as XML) or
> database, and use them in my Flex application such that I can add, remove,
> or change the classes in the external file with recompling the Flex
> application.
>
> Is there any way to do this? In a nutshell, is there a way to create a class
> through an Actionscript function, with a for loop where the information that
> is looped over contains the definitions of the classes loaded from an
> external source?
>
> 


Re: [flexcoders] Re: Trying to change Flex 3 ToggleButtonBar dataprovider on user or admin log in

2009-07-13 Thread Yesaya handoyo
I got it by using components...Not by using server call..Yesterday
i've tried to set admin.visible=false and includeInLayout=false..It
doesn't work..I'' send you my project if it's alright with
you.Thanks..

On 7/14/09, valdhor  wrote:
> So, how do you get your storeCust arrayCollection?
>
> When this is populated from the server call, check to see if there is an
> admin item. If there is, set admin.visible = true and admin.includeinlayout
> = true.
>
>
> --- In flexcoders@yahoogroups.com, Yesaya handoyo  wrote:
>>
>> I put the code on pastebin,here are the link..
>> http://www.pastebin.org/1296
>> Anyway,do you mind to give me an example for returning different
>> data??Thanks a lot...
>>
>> On 7/13/09, valdhor  wrote:
>> > If I were to do this I would return different data depending on user or
>> > admin login. The dataprovider would remain the same - just the data
>> > would
>> > change.
>> >
>> >
>> > --- In flexcoders@yahoogroups.com, "yonghan79"  wrote:
>> >>
>> >> Hi all,i'm trying to change Flex 3 ToggleButtonBar dataprovider on user
>> >> or
>> >> admin log in..I'm trying to use 2 viewstack,one for user,one for admin
>> >> and
>> >> i got a component where the login form is in the component..What should
>> >> i
>> >> do to define the dataprovider on the mainbased on user log in??Thanks a
>> >> lot...
>> >>
>> >
>> >
>> >
>>
>
>
>


Re: [flexcoders] BrowserManager not working

2009-07-13 Thread edencane

Hi. 

trace(url1) outputs the server name and port eg. 'www.myserver.com:7070'

Alex: I am using http:// not file://

So the problem occurs when I use:
navigateToURL(u,"_self");
This loads the url, but whatever information is needed by BrowserManager to
extract the URL, is not included because when the page loads (this second
time), the BrowserManager object is null...

any clues anyone?

Thanks.

Kr.
Luke.

valdhor-3 wrote:
> 
> What does the trace(url1) output? Does it have a # in it somewhere? If so,
> the browser won't refresh as it is trying to move to an anchor.
> 
> 
> --- In flexcoders@yahoogroups.com, edencane  wrote:
>>
>> 
>> Hi. Thanks for your response.
>> After some more troubleshooting the problem is the following:
>> 
>> the URL is returned correctly by the following code:
>> 
>> import mx.managers.BrowserManager;
>> import mx.managers.IBrowserManager;
>> import mx.utils.URLUtil;
>> import mx.utils.ObjectUtil;
>> 
>> private var bman:IBrowserManager;
>> private var url1:String;
>> 
>> bman = BrowserManager.getInstance();
>> bman.init();
>> url1 = URLUtil.getServerNameWithPort(bman.url);
>> trace(url1);
>> 
>> but then I do this:
>> 
>> if (true) {
>> var u:URLRequest = new URLRequest(url1);
>> navigateToURL(u,"_self");
>> }
>> 
>> Basically I want to reload the original URL on certain conditions.
>> 
>> This time when the page loads the bman instance is null.
>> So the URLRequest object does not contain the information that
>> BrowserManager needs.
>> Would this be to do with the request headers...?
>> 
>> How can I solve this...?
>> 
>> Thanks 
>> 
>> Kr.
>> Luke Vanderfluit
>> Avid Flex Fan!
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Alex Harui wrote:
>> > 
>> > Compare with the examples.  You're not calling init() and you may need
>> to
>> > add an event listener as well.
>> > 
>> > Alex Harui
>> > Flex SDK Developer
>> > Adobe Systems Inc.
>> > Blog: http://blogs.adobe.com/aharui
>> > 
>> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
>> > Behalf Of edencane
>> > Sent: Thursday, July 09, 2009 1:30 AM
>> > To: flexcoders@yahoogroups.com
>> > Subject: [flexcoders] BrowserManager not working
>> > 
>> > 
>> > 
>> > 
>> > 
>> > Hi.
>> > 
>> > I want to get the information of the current URL
>> > 
>> > This is my code. It aint workin'. What 'm I doing wrong?
>> > 
>> > 
>> > http://www.adobe.com/2006/mxml";
>> > layout="absolute"
>> > creationComplete="init()">
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/BrowserManager-not-working-tp24406204p24406204.html
>> > Sent from the FlexCoders mailing list archive at Nabble.com.
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/BrowserManager-not-working-tp24406204p24454477.html
>> Sent from the FlexCoders mailing list archive at Nabble.com.
>>
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/BrowserManager-not-working-tp24406204p24471757.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] create class on the fly

2009-07-13 Thread postwick
I want to store descriptions of classes in an external file (such as XML) or 
database, and use them in my Flex application such that I can add, remove, or 
change the classes in the external file with recompling the Flex application.

Is there any way to do this?  In a nutshell, is there a way to create a class 
through an Actionscript function, with a for loop where the information that is 
looped over contains the definitions of the classes loaded from an external 
source?



RE: [flexcoders] Actionscript Number BUG?!!!

2009-07-13 Thread Gordon Smith
Because the Number type, which takes up 64 bits, can only store 15 or 16 
significant decimal digits. It doesn't do infinite precision arithmetic.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of _estatica_
Sent: Monday, July 13, 2009 1:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Actionscript Number BUG?!!!





Can anyone explain why this:

var test:Number=4984907906439604488;
trace(test);

Print out this:

4984907906439604000

Why am I losing precision?

Any hint is appreciated!



[flexcoders] Possible to create a chart with clustered & overlaid columns? (picture inside)

2009-07-13 Thread gmoniey22
I haven't been able to find an example of this, or any indication in the docs 
of how to do this, but I would imagine it is possible.

I want to chart some data that is hierarchical. Essentially each parent has a 
few children. I want the children to be clustered columns inside a big column 
which indicates the parent (which is the sum of all the children)

I found this example image which kinda shows what I am thinking of:
http://peltiertech.com/images/2009-02/MariBar_OverlapColumns.png

Thanks!



RE: [flexcoders] Re: Catching graphics update on UIComponent

2009-07-13 Thread Alex Harui
Does it appear correctly on screen but just not in the snapshot?  Maybe try 
using callLater to defer taking the snapshot

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of richmcgillicuddy
Sent: Monday, July 13, 2009 2:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Catching graphics update on UIComponent





Alex,

I tried this with Flex 2.01 and it did not work properly. Still the same 
number. The updated code looks like:

currentNum += thisAmount;

lblNumber.text = String(currentNum);
this.validateNow();

Still get a grid of the same initial value.

Rich

--- In flexcoders@yahoogroups.com, Alex 
Harui  wrote:
>
> Try calling validateNow() before taking the snapshot
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com] On 
> Behalf Of richmcgillicuddy
> Sent: Saturday, July 11, 2009 6:53 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Catching graphics update on UIComponent
>
>
>
>
>
> I have a UIComponent that is a component made up of a label and a background 
> image. I am running a loop to update the component, change the label and copy 
> the resulting bitmap to a standard image. My result is that I get the image 
> without any updates. The add function just pushes the counter of the label up 
> 1 and updates the .text field of the label. The code looks like...
>
> I know invalidatedisplaylist just adds a flag to a future update but how 
> should this be built.
>
> var curX :int = 10;
> var curY : int = 70;
> var anImage : Image;
> var imageBitmapData:BitmapData ;
>
> while (curY < this.height) {
> bbMain.add(1);
> if (curX < this.width) {
> curX += 60;
> } else {
> curY += 60;
> curX = 10;
> }
> this.invalidateDisplayList();
> // Copy into new image
> anImage = new Image();
> anImage.width = 54
> anImage.height = 54;
> anImage.x = curX;
> anImage.y = curY;
> this.addChild(anImage);
>
> imageBitmapData = ImageSnapshot.captureBitmapData(bbMain);
> anImage.source = new Bitmap(imageBitmapData);
> }
>



[flexcoders] BarChart - CartesianDataCanvas lifecycle problem

2009-07-13 Thread EddieBerman
Due to a bug that causes chart item labels to not appear
(https://bugs.adobe.com/jira/browse/FLEXDMV-2158
  ), I'm having to
create my own chart item labels.  Though a simple approach is to add
labels to the itemRenderers, I can't use that method in this particular
instance.
Instead, I'm looking at using a CartesianDataCanvas annotationElement
that contains an array of labels.
Since the chart displays real-time data that updates every 5 seconds,
the thought was to use the chart's updateComplete event to first set the
label's text and then position each label using updateDataChild().
The problem is that this causes another update cycle of the chart
itself, which becomes an unending loop.
Is there a way to set the text and position of a label on the
CartesianDataCanvas as the absolute last step of the update process such
that it won't restart the updating process?

Thanks in advance.



[flexcoders] Re: Catching graphics update on UIComponent

2009-07-13 Thread richmcgillicuddy
Alex,


I tried this with Flex 2.01 and it did not work properly. Still the same 
number. The updated code looks like:

currentNum += thisAmount;

lblNumber.text = String(currentNum);
this.validateNow();

Still get a grid of the same initial value.

Rich


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Try calling validateNow() before taking the snapshot
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of richmcgillicuddy
> Sent: Saturday, July 11, 2009 6:53 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Catching graphics update on UIComponent
> 
> 
> 
> 
> 
> I have a UIComponent that is a component made up of a label and a background 
> image. I am running a loop to update the component, change the label and copy 
> the resulting bitmap to a standard image. My result is that I get the image 
> without any updates. The add function just pushes the counter of the label up 
> 1 and updates the .text field of the label. The code looks like...
> 
> I know invalidatedisplaylist just adds a flag to a future update but how 
> should this be built.
> 
> var curX :int = 10;
> var curY : int = 70;
> var anImage : Image;
> var imageBitmapData:BitmapData ;
> 
> while (curY < this.height) {
> bbMain.add(1);
> if (curX < this.width) {
> curX += 60;
> } else {
> curY += 60;
> curX = 10;
> }
> this.invalidateDisplayList();
> // Copy into new image
> anImage = new Image();
> anImage.width = 54
> anImage.height = 54;
> anImage.x = curX;
> anImage.y = curY;
> this.addChild(anImage);
> 
> imageBitmapData = ImageSnapshot.captureBitmapData(bbMain);
> anImage.source = new Bitmap(imageBitmapData);
> }
>




[flexcoders] Flex 4 - Backgrounds and Layout Awkwardness

2009-07-13 Thread Baz
In Flex 4 there is no longer such a thing as a 'background'. Instead, you
define a rectangle in a skin with the fill properties that you need. This is
great for many reasons, but it also causes some awkwardness with layouts. If
your skin needs to define a background but also other elements like images,
or vector graphics that need to be laid out horizontally, or vertically, or
tiled (using the new layout mechanisms) - you can't - because since the
background is just another first order element it will also adhere to the
layout you specify and no longer encompass the entire component and act like
a background.

Is there anyway to get around this? If not can I safely say that if you need
a background in a skin then you have no choice but to use basiclayout?

Thanks,
Baz


[flexcoders] Re: Custom DataGrid with Form for itemeditor (any examples)???

2009-07-13 Thread flexaustin
Any examples of the fake dataGrid?

TIA, J



--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Peter Ent did a renderer for list that does something similar:
> 
> http://weblogs.macromedia.com/pent/archives/flex_2/index.html
> 
>  
> 
> But making such a thing for a dataGrid will be harder.  Do you actually need
> the DataGrid(column resize, move, column sort, etc).  If not, you can fake a
> dataGrid using an item renderer in a list.
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of flexaustin
> Sent: Friday, July 10, 2009 9:49 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Custom DataGrid with Form for itemeditor (any
> examples)???
> 
>  
> 
> 
> 
> 
> 
> 
> I would prefer not to use a popup, but rather an inline form in the actual
> datagrid row. Just not sure how I would get the inline form to expand across
> all the columns.
> 
> --- In flexcod...@yahoogro  ups.com,
> niamath basha  wrote:
> >
> > you mean
> > when we click on datagrid row display a popup with a form containing
> details
> > of the selected row
> > and then you can edit, delete the details.
> > 
> > With Regards,
> > Niamath Basha
> > www.niamathbasha.wordpress.com
> > 
> > 
> > 
> > On Thu, Jul 9, 2009 at 10:08 PM, flexaustin  wrote:
> > 
> > >
> > >
> > > Wondering if anyone has ever seen and example of a custom DataGrid
> > > component where you click a row in the DataGrid to edit it and instead
> of
> > > showing a combobox or textfield as an itemeditor you replace the entire
> row
> > > with a form.
> > >
> > > So any row or columns lines would be removed or the form would be
> > > positioned overtop of the row.
> > >
> > > TIA
> > >
> > > 
> > >
> >
>




RE: [flexcoders] Issue adding an Image component to a custom component

2009-07-13 Thread Alex Harui
Maybe IDSWeather::init() is being called before IDSWeather has been added as a 
child to a container.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of gordofeatherfoot
Sent: Monday, July 13, 2009 8:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Issue adding an Image component to a custom component





Hello,

I have a problem that is not so easy to expose so please bare with me.

I have a Component class written is AS3 which extends the Canvas Class. I then 
have a weather component written in mxml that uses as a base the the Component 
class. ie my weather component.mxml looks something like this:

http://www.adobe.com/2006/mxml";
verticalScrollPolicy="off" horizontalScrollPolicy="off"
preinitialize="onPreInitialize()">
...
...

RE: [flexcoders] Re: BrowserManager not working

2009-07-13 Thread Alex Harui
Also, some BrowserManager features don't work well from file://.  You have to 
run the app from http://

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of valdhor
Sent: Monday, July 13, 2009 9:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BrowserManager not working





What does the trace(url1) output? Does it have a # in it somewhere? If so, the 
browser won't refresh as it is trying to move to an anchor.

--- In flexcoders@yahoogroups.com, 
edencane  wrote:
>
>
> Hi. Thanks for your response.
> After some more troubleshooting the problem is the following:
>
> the URL is returned correctly by the following code:
>
> import mx.managers.BrowserManager;
> import mx.managers.IBrowserManager;
> import mx.utils.URLUtil;
> import mx.utils.ObjectUtil;
>
> private var bman:IBrowserManager;
> private var url1:String;
>
> bman = BrowserManager.getInstance();
> bman.init();
> url1 = URLUtil.getServerNameWithPort(bman.url);
> trace(url1);
>
> but then I do this:
>
> if (true) {
> var u:URLRequest = new URLRequest(url1);
> navigateToURL(u,"_self");
> }
>
> Basically I want to reload the original URL on certain conditions.
>
> This time when the page loads the bman instance is null.
> So the URLRequest object does not contain the information that
> BrowserManager needs.
> Would this be to do with the request headers...?
>
> How can I solve this...?
>
> Thanks
>
> Kr.
> Luke Vanderfluit
> Avid Flex Fan!
>
>
>
>
>
>
>
>
>
>
>
>
>
> Alex Harui wrote:
> >
> > Compare with the examples. You're not calling init() and you may need to
> > add an event listener as well.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@yahoogroups.com 
> > [mailto:flexcoders@yahoogroups.com] On
> > Behalf Of edencane
> > Sent: Thursday, July 09, 2009 1:30 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] BrowserManager not working
> >
> >
> >
> >
> >
> > Hi.
> >
> > I want to get the information of the current URL
> >
> > This is my code. It aint workin'. What 'm I doing wrong?
> >
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute"
> > creationComplete="init()">
> >
> > 
> > 
> > 
> > 
> >
> >
> > 
> > --
> > View this message in context:
> > http://www.nabble.com/BrowserManager-not-working-tp24406204p24406204.html
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/BrowserManager-not-working-tp24406204p24454477.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>



[flexcoders] Actionscript Number BUG?!!!

2009-07-13 Thread _estatica_
Can anyone explain why this:

var test:Number=4984907906439604488;
trace(test);

Print out this:

4984907906439604000

Why am I losing precision?

Any hint is appreciated!



[flexcoders] Does annual maintenance include upgrade to Flex Builder 4/Gumbo?

2009-07-13 Thread gmbroth
Hi,

If I renew my annual maintenance contract for FB 3, will it cover
an upgrade to FB 4 when it becomes available later this year? If 
not, what's the procedure for getting FB 4? 

Thanks, Garry



RE: [flexcoders] Calling List.change (or equivalent) from within a custom itemRenderer?

2009-07-13 Thread Battershall, Jeff
>From within your custom item renderer, you can execute this code:

owner.dispatchEvent(new Event("change"));

The TileList will broadcast this event to any listeners.  If you need to pass 
data elements you may have to create a custom event that contains the elements 
you need.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of sixtypercentliquid
Sent: Monday, July 13, 2009 12:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Calling List.change (or equivalent) from within a custom 
itemRenderer?

I have a TileList, i have been using the change method to call a function and 
passing the ListEvent.

I have added a custom itemRenderer and hooked (i believe) everything up. Now i 
need to essentially call the TileList.change event from part of the UI within 
the custom renderer.

Having a hard time figuring this out, tried searching for a while.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links





[flexcoders] Re: PHP $_POST Array with HTTPService

2009-07-13 Thread valdhor
I probably should have read through the entire message.

I don't believe you can do what you want (ie. encapsulating one object inside 
another) with HTTPService. You would need to use Remote Objects instead.


> --- In flexcoders@yahoogroups.com, "kenny14390"  wrote:
> >
> > Hi,
> >
> > We all know about PHP's ability to send an array through the $_POST
> > variable, in a form for example:
> >
> > [form method="POST" action=""]
> > [text type="input" name="data[name]"/]
> > ...
> > [/form]
> >
> > But how can I achieve that through Flex's HTTPService?
> >
> > If I were to print_r($_POST) in the PHP page, this is would I would
> like
> > to see:
> >
> >
> > Array
> > (
> >  [data] => Array
> >  (
> >  [-1] => A
> >  [0] => B
> >  [1] => C
> >  )
> >
> > )
> >
> > I have tried this programmatically while calling the
> send(params:Object)
> > method of the HTTPService, with the Object containing {data:
> > {'-1':'A','0':'B','1':'C'}} but the result is more like [data] =>
> > [object Object]
> >
> >
> > Any ideas how to mimic PHP's ability to POST an array?
> >
> >
> > Note: I can achieve this easily with GET, by appending
> > "data[-1]=A&data[0]=B&data[1]=C" to the URL, but my problem requires
> > POST.
> >
> >
> >
> > Thanks.
> >
>




[flexcoders] Re: PHP $_POST Array with HTTPService

2009-07-13 Thread valdhor
Flex:

http://www.adobe.com/2006/mxml";
layout="absolute"
 creationComplete="onCreationComplete()">
 
 
 
 http://action.gcsc.att.com/v2dev/test2.php";
 useProxy="false" method="POST"/>


PHP:


Check the debug.txt file. It should look like:
Array
(
 [-1] => A
 [0] => B
 [1] => C
)

Note: This is also shown in Charles (http://www.charlesproxy.com)



HTH




Steve


--- In flexcoders@yahoogroups.com, "kenny14390"  wrote:
>
> Hi,
>
> We all know about PHP's ability to send an array through the $_POST
> variable, in a form for example:
>
> [form method="POST" action=""]
> [text type="input" name="data[name]"/]
> ...
> [/form]
>
> But how can I achieve that through Flex's HTTPService?
>
> If I were to print_r($_POST) in the PHP page, this is would I would
like
> to see:
>
>
> Array
> (
>  [data] => Array
>  (
>  [-1] => A
>  [0] => B
>  [1] => C
>  )
>
> )
>
> I have tried this programmatically while calling the
send(params:Object)
> method of the HTTPService, with the Object containing {data:
> {'-1':'A','0':'B','1':'C'}} but the result is more like [data] =>
> [object Object]
>
>
> Any ideas how to mimic PHP's ability to POST an array?
>
>
> Note: I can achieve this easily with GET, by appending
> "data[-1]=A&data[0]=B&data[1]=C" to the URL, but my problem requires
> POST.
>
>
>
> Thanks.
>



[flexcoders] PHP $_POST Array with HTTPService

2009-07-13 Thread kenny14390
Hi,

We all know about PHP's ability to send an array through the $_POST
variable, in a form for example:

[form method="POST" action=""]
[text type="input" name="data[name]"/]
...
[/form]

But how can I achieve that through Flex's HTTPService?

If I were to print_r($_POST) in the PHP page, this is would I would like
to see:


Array
(
 [data] => Array
 (
 [-1] => A
 [0] => B
 [1] => C
 )

)

I have tried this programmatically while calling the send(params:Object)
method of the HTTPService, with the Object containing {data:
{'-1':'A','0':'B','1':'C'}} but the result is more like [data] =>
[object Object]


Any ideas how to mimic PHP's ability to POST an array?


Note: I can achieve this easily with GET, by appending
"data[-1]=A&data[0]=B&data[1]=C" to the URL, but my problem requires
POST.



Thanks.



Re: [flexcoders] Gumbo Graphs

2009-07-13 Thread Peter Cowling
Hi Tom,

I have not used fx:Application before; is it not s:Application?

I am not so sure that it is bugs in Flex 4 that are causing the problem, 
because: 
 
1. I can compile in Flash Builder 4, using the old (2006) mxml namespace (at 
the application level); switch that out and try to use the new namespace - or a 
combination of the two, and no dice.  
2. A bit of scouting pinpoints the issue as being where degrafa has things like 
Rectangles and Matrix3D, which have equivalents in Flex 4, but are different - 
in terms of their property names, and sometimes operations.
3. Degrafa do not claim to support Flex 4 - only 3 (and perhaps 2, I cannot 
remember).

Hence my casting around to try and get a better feel for the situation...

Thanks for your thoughts so far, and

Regards

Peter Cowling





From: Tom Chiverton 
To: flexcoders@yahoogroups.com
Sent: Monday, 13 July, 2009 16:24:35
Subject: Re: [flexcoders] Gumbo Graphs





On Monday 13 Jul 2009, pedrocpedroc wrote:
> like Birdeye, and more recently Axiis.  Cool, but none of them work in Flex
> 4/Gumbo - because the current version of Degrafa is not meant to be used
> with Gumbo.

You should be able to load Flex 3 source into a Flex 4 fx:Application fine. If 
it's not working, that's a bug in Flex 4, at a guess.

> Use the native Flex 4 data visulization suite.  I have a Flex Builder 3

I don't know of any plans to port the Adobe data visualisation parts from Flex 
3 to 4, see my first point.

-- 
Helping to authoritatively leverage error-free bandwidth as part of the IT 
team of the year, '09 and '08

 * * * * 

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners. We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged. If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents. If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.Halliwells. com.  
   


  

[flexcoders] Calling List.change (or equivalent) from within a custom itemRenderer?

2009-07-13 Thread sixtypercentliquid
I have a TileList, i have been using the change method to call a function and 
passing the ListEvent.

I have added a custom itemRenderer and hooked (i believe) everything up. Now i 
need to essentially call the TileList.change event from part of the UI within 
the custom renderer.

Having a hard time figuring this out, tried searching for a while.



[flexcoders] Re: Trying to change Flex 3 ToggleButtonBar dataprovider on user or admin log in

2009-07-13 Thread valdhor
So, how do you get your storeCust arrayCollection?

When this is populated from the server call, check to see if there is an admin 
item. If there is, set admin.visible = true and admin.includeinlayout = true.


--- In flexcoders@yahoogroups.com, Yesaya handoyo  wrote:
>
> I put the code on pastebin,here are the link.. http://www.pastebin.org/1296
> Anyway,do you mind to give me an example for returning different
> data??Thanks a lot...
> 
> On 7/13/09, valdhor  wrote:
> > If I were to do this I would return different data depending on user or
> > admin login. The dataprovider would remain the same - just the data would
> > change.
> >
> >
> > --- In flexcoders@yahoogroups.com, "yonghan79"  wrote:
> >>
> >> Hi all,i'm trying to change Flex 3 ToggleButtonBar dataprovider on user or
> >> admin log in..I'm trying to use 2 viewstack,one for user,one for admin and
> >> i got a component where the login form is in the component..What should i
> >> do to define the dataprovider on the mainbased on user log in??Thanks a
> >> lot...
> >>
> >
> >
> >
>




Re: [flexcoders] Re: Trying to change Flex 3 ToggleButtonBar dataprovider on user or admin log in

2009-07-13 Thread Yesaya handoyo
I put the code on pastebin,here are the link.. http://www.pastebin.org/1296
Anyway,do you mind to give me an example for returning different
data??Thanks a lot...

On 7/13/09, valdhor  wrote:
> If I were to do this I would return different data depending on user or
> admin login. The dataprovider would remain the same - just the data would
> change.
>
>
> --- In flexcoders@yahoogroups.com, "yonghan79"  wrote:
>>
>> Hi all,i'm trying to change Flex 3 ToggleButtonBar dataprovider on user or
>> admin log in..I'm trying to use 2 viewstack,one for user,one for admin and
>> i got a component where the login form is in the component..What should i
>> do to define the dataprovider on the mainbased on user log in??Thanks a
>> lot...
>>
>
>
>


[flexcoders] Re: BrowserManager not working

2009-07-13 Thread valdhor
What does the trace(url1) output? Does it have a # in it somewhere? If so, the 
browser won't refresh as it is trying to move to an anchor.


--- In flexcoders@yahoogroups.com, edencane  wrote:
>
> 
> Hi. Thanks for your response.
> After some more troubleshooting the problem is the following:
> 
> the URL is returned correctly by the following code:
> 
> import mx.managers.BrowserManager;
> import mx.managers.IBrowserManager;
> import mx.utils.URLUtil;
> import mx.utils.ObjectUtil;
> 
> private var bman:IBrowserManager;
> private var url1:String;
> 
> bman = BrowserManager.getInstance();
> bman.init();
> url1 = URLUtil.getServerNameWithPort(bman.url);
> trace(url1);
> 
> but then I do this:
> 
> if (true) {
> var u:URLRequest = new URLRequest(url1);
> navigateToURL(u,"_self");
> }
> 
> Basically I want to reload the original URL on certain conditions.
> 
> This time when the page loads the bman instance is null.
> So the URLRequest object does not contain the information that
> BrowserManager needs.
> Would this be to do with the request headers...?
> 
> How can I solve this...?
> 
> Thanks 
> 
> Kr.
> Luke Vanderfluit
> Avid Flex Fan!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Alex Harui wrote:
> > 
> > Compare with the examples.  You're not calling init() and you may need to
> > add an event listener as well.
> > 
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> > Behalf Of edencane
> > Sent: Thursday, July 09, 2009 1:30 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] BrowserManager not working
> > 
> > 
> > 
> > 
> > 
> > Hi.
> > 
> > I want to get the information of the current URL
> > 
> > This is my code. It aint workin'. What 'm I doing wrong?
> > 
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute"
> > creationComplete="init()">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > View this message in context:
> > http://www.nabble.com/BrowserManager-not-working-tp24406204p24406204.html
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/BrowserManager-not-working-tp24406204p24454477.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>




[flexcoders] Re: Trying to change Flex 3 ToggleButtonBar dataprovider on user or admin log in

2009-07-13 Thread valdhor
If I were to do this I would return different data depending on user or admin 
login. The dataprovider would remain the same - just the data would change.


--- In flexcoders@yahoogroups.com, "yonghan79"  wrote:
>
> Hi all,i'm trying to change Flex 3 ToggleButtonBar dataprovider on user or 
> admin log in..I'm trying to use 2 viewstack,one for user,one for admin and i 
> got a component where the login form is in the component..What should i do to 
> define the dataprovider on the mainbased on user log in??Thanks a lot...
>




[flexcoders] Re: Error: Unknown Property: 'constructor'. when using LCDS

2009-07-13 Thread valdhor
Is this a problem only when using LCDS?

Is this a Flex error or a coldfusion error?

If it is a Flex error it has got to be with the Datagrid control.

If it is a Coldfusion error, then, sorry, I can't help you but there should be 
others around who can.



--- In flexcoders@yahoogroups.com, "postwick"  wrote:
>
> I realize this is an old thread I'm digging up, but I am running into the 
> same problem.  I did the artists example from :
> 
> http://www.adobe.com/devnet/coldfusion/articles/data_app.html
> 
> The grid fills just fine but when I try to edit a cell I get:
> 
> Error: Unknown Property: 'constructor'
> 
> I looked around online and found others getting this error but no solutions.
> 
> Thanks,
> Paul
> 
> --- In flexcoders@yahoogroups.com, "Jeff Vroom"  wrote:
> >
> > Do you know ActionScript your objects from CF land are getting converted
> > to?Typically they come across as Objects unless you are mapping a
> > strong type in which case you need to mark those classes with [Managed].
> > This appears to be something which does not extend Object - like maybe
> > XML?   
> > 
> >  
> > 
> > If you can't tell, adding  in MXML and using the debug
> > player you can get a flashlog.txt which should have that information
> > (feel free to send that to me directly offlist).   
> > 
> >  
> > 
> > We use the constructor property in some cases to determine which class
> > we are dealing with but there are other ways we could do that.  
> > 
> >  
> > 
> > Jeff
> > 
> >  
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> > Behalf Of Alexander Tsoukias
> > Sent: Saturday, March 29, 2008 9:53 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Error: Unknown Property: 'constructor'. when using
> > LCDS
> > 
> >  
> > 
> > The fill method works great using RTMP and it fills a datagrid.
> > 
> > When i make the datagrid editable and change a value, It returns this
> > error: Error: Unknown Property: 'constructor'.
> > 
> > The backend is connected with coldfusion CFCs. Again the fill method
> > works great.
> > 
> > Thanks,
> > Alexander
> >
>




[flexcoders] Issue adding an Image component to a custom component

2009-07-13 Thread gordofeatherfoot
Hello,

I have a problem that is not so easy to expose so please bare with me.

I have a Component class written is AS3 which extends the Canvas Class. I then 
have a weather component written in mxml that uses as a base the the Component 
class. ie my weather component.mxml looks something like this:

http://www.adobe.com/2006/mxml";
verticalScrollPolicy="off" horizontalScrollPolicy="off"
preinitialize="onPreInitialize()">
...
   ...
   

[flexcoders] Issue adding an Image component to a custom component

2009-07-13 Thread gordofeatherfoot
Hello,

I have a problem that is not so easy to expose so please bare with me.

I have a Component class written is AS3 which extends the Canvas Class. I then 
have a weather component written in mxml that uses as a base the the Component 
class. ie my weather component.mxml looks something like this:

http://www.adobe.com/2006/mxml";
verticalScrollPolicy="off" horizontalScrollPolicy="off"
preinitialize="onPreInitialize()">
...
   ...
   

Re: [flexcoders] Gumbo Graphs

2009-07-13 Thread Tom Chiverton
On Monday 13 Jul 2009, pedrocpedroc wrote:
> like Birdeye, and more recently Axiis.  Cool, but none of them work in Flex
> 4/Gumbo - because the current version of Degrafa is not meant to be used
> with Gumbo.

You should be able to load Flex 3 source into a Flex 4 fx:Application fine. If 
it's not working, that's a bug in Flex 4, at a guess.

> Use the native Flex 4 data visulization suite.  I have a Flex Builder 3

I don't know of any plans to port the Adobe data visualisation parts from Flex 
3 to 4, see my first point.

-- 
Helping to authoritatively leverage error-free bandwidth as part of the IT 
team of the year, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

Re: [flexcoders] Re: Set up zendamf with flexbuilder

2009-07-13 Thread Yesaya handoyo
Thanks @valdhor ,i got it working allright.. :d

On 7/13/09, valdhor  wrote:
> handoyo
>
> I went to the site you specified and downloaded the files. This is what
> I did to get things working...
>
> - Created a directory on my server at the same level as the "Zend"
> directory named "FlexZend". This is not required but I did not want to
> clutter my server. I then copied the two files named "zend_gateway.php"
> and "test_class.php" into the "FlexZend" directory.
>
> - Modified the "zend_gateway.php" so the include path knows where the
> Zend directory is. On my server this is:
>
>  $path = '/var/www/flex';
>  set_include_path(get_include_path() . PATH_SEPARATOR . $path);
>
>  You may not need to do this if you have set the include path in your
> php.ini file to include the "Zend" directory.
>
> - Imported the phpintegration zip file into Flex.
>
> - Opened the services-config.xml file and modified the endpoint uri to
> point to the "zend_gateway.php" file I copied earlier
> (http://www.myserver.com/flex/FlexZend/zend_gateway.php)
>
> - Opened phpintegration.mxml and clicked the debug button. Once the app
> started, I put my name in the box and clicked the button. Unfortunately,
> this gave me a security sandbox error "Error: [strict] Ignoring policy
> file at http://www.myserver.com/crossdomain.xml due to incorrect syntax.
> See http://www.adobe.com/go/strict_policy_files to fix this problem.".
> After reading the file and fixing my crossdomain.xml file, I restarted
> the app, Typed in my name and clicked the button. An Alert box popped up
> with "Hello Steve! This is php saying hello!", which is what I expected.
>
> So, the tutorial is fine. Perhaps you haven't set up your server
> correctly. Try downloading the latest version of Zend Framework (Note
> that there is a patched version at the moment specifically for users of
> Zend_AMF) and using the framework documentation to set it up. Perhaps
> you did not set the include path to include the Zend directory in your
> php.ini file.
>
>
> HTH
>
>
>
> Steve
>
> --- In flexcoders@yahoogroups.com, Yesaya handoyo  wrote:
>>
>> I'm following the
>>
> http://www.thetechlabs.com/tutorials/flex/integrate-flex-builder-30-php-\
> easly-with-the-fresh-zendamf/
>>
>> Thanks
>> handoyo
>>
>> On 7/11/09, R. S. Patil kpr.rspa...@... wrote:
>> > Yes I second it. Corlon's all AMF tutorials are working perfectly.
>> > I agree there are some hitches even if you follow character by
> character.
>> > Some googling and minor changes are essential to make them work
>> > on one's computer depending on how it's configured But those are
>> > great resource to start with and my experience is those give you a
>> > very good start. I am also beginner in flex and PHP and I found
>> > those to be most useful in development of our pilot project
>> > with Flex->AMFPHP/ZendAMF->ADOdb->firebird.
>> > The project is almost in finishing stage within 20 to 30 days.
>> > We are using Birt->PHP for reporting and Flex->PHP for UI and
>> > data collection.
>> >
>> > Thanks and best regards.
>> >
>> > Raja.
>> >
>> > Which tutorial did you follow? I tried the one at
>> >> http://corlan.org/2008/11/13/flex-and-php-remoting-with-zend-amf/
> and it
>> >> worked for me.
>> >>
>> >>
>> >>
>> >
>>
>
>


[flexcoders] Re: f_in_box memory issues

2009-07-13 Thread ag_rcuren
Here is a very simple test I just ran

Using this application:


http://www.adobe.com/2006/mxml"; layout="absolute">



Built in release mode running in f_in_box's sample app FullVersionTest.exe I 
see VM (Virtual Memory) usage of 74,250 K vs just running in Flash player 10 
stand alone where I see VM usage of 12,500 K. I am running Win XP Pro using 
task manager to see VM usage.

Has anyone else had this issue with VM using f_in_box.

--- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
>
> I was messing around and opened several instances of my application 
> simultaniously and received a warning that my I was out of virtual memory. So 
> I starting looking at task manager and saw that my page file usage was around 
> 8 gig! After seeing this I jumped over to process view and saw that my app 
> was using quite a bit of virtual memory. This lead me to test the flex app 
> straight in the Flash player and then in the f_in_box test application 
> because I wanted to ensure that it was not our other code. Running Flash 
> player next to f_in_box I noticed via task manager that the f_in_box process 
> was using a large amount of virtual memory.
> 
> Again this is virtual memory (page file) usage. Inside of task manager you 
> can select more information to be shown, one of which is virtual memory. The 
> non virtual memory usage that it shows for the application is about what we 
> expect.
> 
> I have no idea what would cause f_in_box to be using so much of the page file.
> 
> --- In flexcoders@yahoogroups.com, Steve Mathews  wrote:
> >
> > What methods are you using to determine the memory usage? We use f_in_box
> > and I don't think we have seen that kind of discrepancy before.
> > 
> > On Fri, Jul 10, 2009 at 11:57 AM, ag_rcuren wrote:
> > 
> > > I am currently using f_in_box for a project I am working on. I was doing
> > > some profiling and noticed that when using f_in_box virtual memory usage 
> > > is
> > > super high. When running our app stand alone in the flash player we are
> > > seeing virtual memory usage of around 20 megs vs. running in f_in_box it 
> > > is
> > > around 120 megs. This is over 5 times worse. I was hoping some one might
> > > have some insight or may have worked with f_in_box before and dealt with
> > > this issue.
> > >
> > >
> > >
> > > 
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Alternative FAQ location:
> > > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> > > Search Archives:
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> > > Links
> > >
> > >
> > >
> > >
> >
>




[flexcoders] Can you use BlazeDS receiving SOAP WS can be turned into typed objects?

2009-07-13 Thread app.developer
Can you use BlazeDS receiving SOAP WS can be turned into typed objects?  Has 
this been done been done before?

P



[flexcoders] Re: Set up zendamf with flexbuilder

2009-07-13 Thread valdhor
handoyo

I went to the site you specified and downloaded the files. This is what
I did to get things working...

- Created a directory on my server at the same level as the "Zend"
directory named "FlexZend". This is not required but I did not want to
clutter my server. I then copied the two files named "zend_gateway.php"
and "test_class.php" into the "FlexZend" directory.

- Modified the "zend_gateway.php" so the include path knows where the
Zend directory is. On my server this is:

 $path = '/var/www/flex';
 set_include_path(get_include_path() . PATH_SEPARATOR . $path);

 You may not need to do this if you have set the include path in your
php.ini file to include the "Zend" directory.

- Imported the phpintegration zip file into Flex.

- Opened the services-config.xml file and modified the endpoint uri to
point to the "zend_gateway.php" file I copied earlier
(http://www.myserver.com/flex/FlexZend/zend_gateway.php)

- Opened phpintegration.mxml and clicked the debug button. Once the app
started, I put my name in the box and clicked the button. Unfortunately,
this gave me a security sandbox error "Error: [strict] Ignoring policy
file at http://www.myserver.com/crossdomain.xml due to incorrect syntax.
See http://www.adobe.com/go/strict_policy_files to fix this problem.".
After reading the file and fixing my crossdomain.xml file, I restarted
the app, Typed in my name and clicked the button. An Alert box popped up
with "Hello Steve! This is php saying hello!", which is what I expected.

So, the tutorial is fine. Perhaps you haven't set up your server
correctly. Try downloading the latest version of Zend Framework (Note
that there is a patched version at the moment specifically for users of
Zend_AMF) and using the framework documentation to set it up. Perhaps
you did not set the include path to include the Zend directory in your
php.ini file.


HTH



Steve

--- In flexcoders@yahoogroups.com, Yesaya handoyo  wrote:
>
> I'm following the
>
http://www.thetechlabs.com/tutorials/flex/integrate-flex-builder-30-php-\
easly-with-the-fresh-zendamf/
>
> Thanks
> handoyo
>
> On 7/11/09, R. S. Patil kpr.rspa...@... wrote:
> > Yes I second it. Corlon's all AMF tutorials are working perfectly.
> > I agree there are some hitches even if you follow character by
character.
> > Some googling and minor changes are essential to make them work
> > on one's computer depending on how it's configured But those are
> > great resource to start with and my experience is those give you a
> > very good start. I am also beginner in flex and PHP and I found
> > those to be most useful in development of our pilot project
> > with Flex->AMFPHP/ZendAMF->ADOdb->firebird.
> > The project is almost in finishing stage within 20 to 30 days.
> > We are using Birt->PHP for reporting and Flex->PHP for UI and
> > data collection.
> >
> > Thanks and best regards.
> >
> > Raja.
> >
> > Which tutorial did you follow? I tried the one at
> >> http://corlan.org/2008/11/13/flex-and-php-remoting-with-zend-amf/
and it
> >> worked for me.
> >>
> >>
> >>
> >
>



[flexcoders] Gumbo Graphs

2009-07-13 Thread pedrocpedroc
Hi,

I have been using data visulization tools based on Degrafa - my own, things 
like Birdeye, and more recently Axiis.  Cool, but none of them work in Flex 
4/Gumbo - because the current version of Degrafa is not meant to be used with 
Gumbo.

So, I am trying work which of the following options to pursue:

Swap out the Degrafa part for a self-built FXG graph engine - which will take a 
fair amount of time. 

Wait for a Gumbo updated version of Degrafa - anyone know if it is being 
updated for Gumbo?

Take a look at any open source data visualization efforts targetting a Gumbo 
release - again, anyone know if there are any?

Use the native Flex 4 data visulization suite.  I have a Flex Builder 3 
Professional license, but have not yet used it to get the Flash Builder 4 
extension; is it the case that this will remove the 'trial' notice or will that 
only be the case once Flash builder 4 is out of Beta?

Thanks in advance for any answers. 



RE: [flexcoders] Re: This is not as easy as it seems ... apparently...

2009-07-13 Thread Tracy Spratt
First, to make it completely clear, when working with the data, you must
always use the underlying dataProvider and item and never the DataGrid or
cell itself.  This is because itemRenderers are recycled.  You can never do
any row level work in a renderer in creationComplete for the same reason,
but must override the set data() function.  Google this.

 

Also, if I am understanding correctly, there are two other ways to do this.

 

You mentioned labelFunction.  That is one way. A label function has access
to the entire row item, and can use the values of any property/cell for the
display logic.

 

You could also create a value object with a calculated property.

 

Note that if you update the dataProvider programmatically, you should use
the dataProvider collection API in order to ensure the correct events are
dispatched to update the UI.  You can call itemUpdated() if you assign the
value of an item.property directly.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Craig
Sent: Sunday, July 12, 2009 11:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: This is not as easy as it seems ... apparently...

 






--- In flexcod...@yahoogro  ups.com,
"postwick"  wrote:

thank you, sir... I appreciate your help, I shall do as you say !!

Craig

>
> That'll update the value of the cell. 
> 
> You can't do what you're trying to do. You can't have a column with a
different dataField per row. The dataField for the column is the same for
every row.
> 
> Is this data coming from a database, through a view? You really should do
this there. You can set up a view column with an if/then that returns the
column's value you want.
> 
> --- In flexcod...@yahoogro  ups.com,
"Craig"  wrote:
> >
> > now we're getting somewhere! but will this update the value of the col2
or the value of col2 DataField?
> > 
> > I am trying to change the value of col2 DataField to "Profit" not the
value of col2 itself.
> > 
> > Can I use:
> > 
> > dgOrdExt.getChildAt(i)["Profit"].dataField = "Profit"
> > 
> > CS
> > 
> > 
> > 
> > 
> > --- In flexcod...@yahoogro 
ups.com, "postwick"  wrote:
> > >
> > > You can't use selectedItem because there is no selectedItem. You
haven't clicked a row. Try looping through the grid.
> > > 
> > > In the end, I really don't understand why you don't do this in the
dataCollection, or even in the source data.
> > > 
> > > for (var i:Number = 0; i < mygrid.numChildren; i++) {
> > > if (mygrid.getChildAt(i)["Kind"] == "LONG") {
> > > mygrid.getChildAt(i)["Profit"] = "Profit";
> > > }
> > > else { mygrid.getChildAt(i)["Profit"] = "ShProfit"; }
> > > 
> > > --- In flexcod...@yahoogro 
ups.com, "Craig"  wrote:
> > > >
> > > > Ok... In the parent component to the datagrid I used an initialize
event:
> > > > 
> > > > public function initDg():void {
> > > > 
> > > >
if(dgOrdExt.selectedItem["Kind"]=="LONG")dgOrdExt.Profit.dataField="Profit";
> > > >
if(dgOrdExt.selectedItem["Kind"]=="SHORT")dgOrdExt.Profit.dataField="ShProfi
t";
> > > > 
> > > > }
> > > > 
> > > > it does not work. but if I replace the code with
dgOrdExt.dataField="Profit"; which just sets the dataField without
referencing the other column the code is all working... 
> > > > 
> > > > I also tried creationcomplete event and that did not work either.
> > > > 
> > > > 
> > > > 
> > > > --- In flexcod...@yahoogro 
ups.com, "Craig"  wrote:
> > > > >
> > > > > cause I was doing it within the custom component (column) itself
for the datagrid, which can not hold an Id value, I can put it in the parent
component however i'll give that a whack.
> > > > > 
> > > > > 
> > > > > --- In flexcod...@yahoogro 
ups.com, "postwick"  wrote:
> > > > > >
> > > > > > Not sure why you have all the Application.application stuff on
there. Just reference the datagrid by it's id.
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > mygrid.selectedItem["columname"] = "some value"
> > > > > > 
> > > > > > --- In flexcod...@yahoogro 
ups.com, "Craig"  wrote:
> > > > > > >
> > > > > > > From within the custom component DataGrid Column I tried this
code as you suggested at the initialize event but it errors:
> > > > > > > 
> > > > > > >
if(Application.application.CnvPos.dgOrdExt.selectedItem["Kind"]=="LONG")
Profit.dataField="Profit";
> > > > > > > 
> > > > > > > 
> > > > > > > I don't think the selecteditem field is the answer.
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > --- In flexcod...@yahoogro
 ups.com, "Craig"  wrote:
> > > > > > > >
> > > > > > > > yes the datagrid is bound to an array collection.
> > > > > > > > I don't want to select

[flexcoders] FXComps Money 2.0.0 is released

2009-07-13 Thread lacito.domingo
FXComps Money library (version: 2.0.0) is released (BSD license).

http://www.fxcomps.com/money.html 

FXComps Money library is developed for calculating with
arbitrary-precision signed decimal numbers and money.

This version includes bug fixes, new classes (SimpleDecimal,
PrimitiveDecimal) and unit tests.

Regards,
Laszlo Sas


RE: [flexcoders] Setting Tree.selectedItem

2009-07-13 Thread Tracy Spratt
Please do not “hijack” threads.  If your post is not directly related to a
current thread, start a new subject.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Terry Human
Sent: Saturday, July 11, 2009 2:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Setting Tree.selectedItem

 






Hello, 

I'm trying to do an application where the user can select images and put in
on a panel (similar the example Diagrammer in the tour of Flex). 

Could you send me some example?

 

Thanks

 

  _  

De: Tracy Spratt 
Para: flexcoders@yahoogroups.com
Enviado: sábado, 11 de julio, 2009 17:26:10
Asunto: RE: [flexcoders] Setting Tree.selectedItem

I have a couple examples on www.cflex.net  . Search
for “expand tree”.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On
Behalf Of bhaq1972
Sent: Friday, July 10, 2009 8:21 AM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Setting Tree.selectedItem

 





I'm trying to set the selectedItem for the given example. But I'm having all
sorts of problems. 

The tree's dataprovider is XML. I'm only interested in selecting the child
nodes (@label == "Receipt").. ..that means I have to expand the menu as
well.

Can someone give me some ideas?

Code ->
http://www.adobe. com/2006/ mxml
 ">






















 





RE: [flexcoders] Setting Tree.selectedItem

2009-07-13 Thread Tracy Spratt
Please do not “hijack” threads.  If your post is not directly related to a
current thread, start a new subject.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Terry Human
Sent: Saturday, July 11, 2009 2:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Setting Tree.selectedItem

 






Hello, 

I'm trying to do an application where the user can select images and put in
on a panel (similar the example Diagrammer in the tour of Flex). 

Could you send me some example?

 

Thanks

 

  _  

De: Tracy Spratt 
Para: flexcoders@yahoogroups.com
Enviado: sábado, 11 de julio, 2009 17:26:10
Asunto: RE: [flexcoders] Setting Tree.selectedItem

I have a couple examples on www.cflex.net  . Search
for “expand tree”.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On
Behalf Of bhaq1972
Sent: Friday, July 10, 2009 8:21 AM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Setting Tree.selectedItem

 





I'm trying to set the selectedItem for the given example. But I'm having all
sorts of problems. 

The tree's dataprovider is XML. I'm only interested in selecting the child
nodes (@label == "Receipt").. ..that means I have to expand the menu as
well.

Can someone give me some ideas?

Code ->
http://www.adobe. com/2006/ mxml
 ">