[flexcoders] Binding behaviour

2011-11-03 Thread geckko
Hi all,

I'm trying to duplicate one object but when i modify the "master" object
the child object is modified too. My code is something similar to this

private function cloneLeaf():CallMonitoringLeaf{
var obj:CallMonitoringLeaf = new CallMonitoringLeaf();
obj.optionCallMonitoring = optionCallMonitoring;
obj.nodesSelected = nodesSelected;
obj.dataCallMonitoring = dataCallMonitoring;
obj.nodeName = nodeName;
return obj;
}

But when i modify nodeName (for example) in the object that i use to
duplicate (master object), the child object modifies its name too. Is
there any way to avoid this behaviour?

Thanks in advance


[flexcoders] Creating an unconvential Air app like kuler

2011-11-03 Thread Nick Middleweek
Hi,

How does one create an Air app that has a non-rectangle window like Kuler?

And is it possible to create an Air app that has multi windows?


Thanks,
Nick


Re: [flexcoders] HTTPService post to return an image?

2011-11-03 Thread Rogerio Gonzalez
You can use base64 to encode your image on the server side, and then decode
in flex to display it.



Regards,

Rogério Gonzalez


On Tue, Nov 1, 2011 at 5:20 PM, claudiu ursica wrote:

> **
>
>
> HTTPService cannot handle binary data and images fall under this category.
> U have top go URLLoader.
>
> C
>
> --
> *From:* method_air 
> *To:* flexcoders@yahoogroups.com
> *Sent:* Tuesday, November 1, 2011 7:03 PM
> *Subject:* [flexcoders] HTTPService post to return an image?
>
>
> Is it possible to return an image object using HTTPService?
>
> The fault method executes when I attempt to do this:
>
> var http:HTTPService = new HTTPService();
> http.url = "myScript.ashx";
> http.method = "POST";
> http.resultFormat = "object";
>
> Should URLLoader be used instead?
>
> Cheers,
>
> Philip
>
>
>
>  
>


[flexcoders] Re: Binding behaviour

2011-11-03 Thread turbo_vb
If nodeName is a class, you'll need to create a clone method in that class as 
well, and do this:

obj.nodeName = nodeName.clone();

If it's just a string, you can try:

obj.nodeName = nodeName.toString();

-TH

--- In flexcoders@yahoogroups.com, geckko  wrote:
>
> Hi all,
> 
> I'm trying to duplicate one object but when i modify the "master" object
> the child object is modified too. My code is something similar to this
> 
> private function cloneLeaf():CallMonitoringLeaf{
> var obj:CallMonitoringLeaf = new CallMonitoringLeaf();
> obj.optionCallMonitoring = optionCallMonitoring;
> obj.nodesSelected = nodesSelected;
> obj.dataCallMonitoring = dataCallMonitoring;
> obj.nodeName = nodeName;
> return obj;
> }
> 
> But when i modify nodeName (for example) in the object that i use to
> duplicate (master object), the child object modifies its name too. Is
> there any way to avoid this behaviour?
> 
> Thanks in advance
>




[flexcoders] Re: HttpService error handling

2011-11-03 Thread valdhor
Have you tried using an AsyncToken?

--- In flexcoders@yahoogroups.com, "Sells, Fred"  wrote:
>
> I'm using Flex 4.1 with a django backend.  Django provides a really
> useful HTML error traceback when it fails.  Currently I then have to
> manually insert the offending url into the browser url to see the error
> details when debugging.  That's a pain.   I would like to subclass
> HttpService to provide a generic automatic solution, but I'm having
> trouble.
> 
>  
> 
> My typical pattern is
> 
> Var parms:Object = new Object()
> 
> Parms.a=3
> 
> Parms.b=4
> 
> MyHttpService.url = "http://yadda.yadda.yadda/root/function";
> 
> MyHttpService.send(parms)
> 
>  
> 
> When the faultHandler is called I would like to do something like this
> 
> navigateToURL( new URLRequest(
> Configure.getServer()+'getpdf?id='+parms.id+"&resid="+parms.resid ) ); 
> 
>  
> 
> but I cannot find a way to get the parms back from the HttpService in
> order to create the URLRequest string.  I've tried the
> MyHttpService.request object but that "appears" to be empty.  It won't
> expand in debugger view and a for loop does not iterate through it.
> 
>  
> 
> Can anyone offer a suggestion?
> 
>  
> 
> Thanks,
> 
> Fred.
>




[flexcoders] ModuleLoader.child is null

2011-11-03 Thread method_air
Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
event listener:

this._moduleLoader = new ModuleLoader();
this._moduleLoader.url = "ImageComparisonModule.swf"; // 

this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);

private function onReady(e:ModuleEvent):void
{
 var test:ITest ITest(this._moduleLoader.child); // null
}

Module code:


http://ns.adobe.com/mxml/2009"; 
  xmlns:s="library://ns.adobe.com/flex/spark" 
  xmlns:mx="library://ns.adobe.com/flex/mx" 
 implements="com.storefront.interfaces.controller.ITest"
  >







Cheers,

Philip



RE: [flexcoders] ModuleLoader.child is null

2011-11-03 Thread Philip Smith

Can Flex modules be loaded into objects other than Application, eg sub view 
classes?

To: flexcoders@yahoogroups.com
From: loudj...@hotmail.com
Date: Thu, 3 Nov 2011 17:08:09 +
Subject: [flexcoders] ModuleLoader.child is null


















 



  



  
  
  Can anyone explain why ModuleLoader.child is null in the module event 
'ready' event listener:



this._moduleLoader = new ModuleLoader();

this._moduleLoader.url = "ImageComparisonModule.swf"; // 


this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);



private function onReady(e:ModuleEvent):void

{

 var test:ITest ITest(this._moduleLoader.child); // null

}



Module code:





http://ns.adobe.com/mxml/2009"; 

  xmlns:s="library://ns.adobe.com/flex/spark" 

  xmlns:mx="library://ns.adobe.com/flex/mx" 

 implements="com.storefront.interfaces.controller.ITest"

  >















Cheers,



Philip






 









  

[flexcoders] Module's creationComplete() called locally but not remotely

2011-11-03 Thread sdl1326
I have a module that is being loaded using the mxml ModuleLoader. When I
run the course locally on xampp, everything works, including the
Module's creationComplete function. However, upon loading it and testing
on a web server, creationComplete() never gets called. The module loads
correctly including all visual objects, however, the data isn't being
loaded which is handled in the creationComplete function. I have
confirmed this by placing both an Alert.show and Debug.log (Arthropod)
functions in the creationComplete and neither get called when running on
the remote server. Both get executed when testing locally.
Thanks for any and all replies.


[flexcoders] Re: ModuleLoader.child is null

2011-11-03 Thread turbo_vb
Perhaps you're getting an error on load; probably due to the path.  Try adding 
an event listener for ModuleEvent.ERROR.

Also, this line is missing an equal sign:

var test:ITest ITest(this._moduleLoader.child);

Should be:

var test:ITest = ITest(this._moduleLoader.child);

-TH

--- In flexcoders@yahoogroups.com, "method_air"  wrote:
>
> Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
> event listener:
> 
> this._moduleLoader = new ModuleLoader();
> this._moduleLoader.url = "ImageComparisonModule.swf"; // 
>   
> this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);
> 
> private function onReady(e:ModuleEvent):void
> {
>  var test:ITest ITest(this._moduleLoader.child); // null  
> }
> 
> Module code:
> 
> 
> http://ns.adobe.com/mxml/2009"; 
> xmlns:s="library://ns.adobe.com/flex/spark" 
> xmlns:mx="library://ns.adobe.com/flex/mx" 
>implements="com.storefront.interfaces.controller.ITest"
> >
>   
>   
>   
>   
>   
> 
> 
> Cheers,
> 
> Philip
>




RE: [flexcoders] Re: ModuleLoader.child is null

2011-11-03 Thread Philip Smith

>> Perhaps you're getting an error on load; probably due to the path.  Try 
>> adding an event listener for ModuleEvent.ERROR.

The ModuleEvent.READY listener is executing, the path is correct. 

>> var test:ITest ITest(this._moduleLoader.child);

This was a typo. this._moduleLoader.child is still null here though. I get the 
same problem using mx and spark ModuleLoader. So unless someone can spot the 
problem, I'm going to use SWFLoader...

To: flexcoders@yahoogroups.com
From: timh...@aol.com
Date: Thu, 3 Nov 2011 18:35:10 +
Subject: [flexcoders] Re: ModuleLoader.child is null


















 



  



  
  
  Perhaps you're getting an error on load; probably due to the path.  Try 
adding an event listener for ModuleEvent.ERROR.



Also, this line is missing an equal sign:



var test:ITest ITest(this._moduleLoader.child);



Should be:



var test:ITest = ITest(this._moduleLoader.child);



-TH



--- In flexcoders@yahoogroups.com, "method_air"  wrote:

>

> Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
> event listener:

> 

> this._moduleLoader = new ModuleLoader();

> this._moduleLoader.url = "ImageComparisonModule.swf"; // 

>   
> this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);

> 

> private function onReady(e:ModuleEvent):void

> {

>  var test:ITest ITest(this._moduleLoader.child); // null  

> }

> 

> Module code:

> 

> 

> http://ns.adobe.com/mxml/2009"; 

> xmlns:s="library://ns.adobe.com/flex/spark" 

> xmlns:mx="library://ns.adobe.com/flex/mx" 

>implements="com.storefront.interfaces.controller.ITest"

> >

>   

>   

>   

>   

>   

> 

> 

> Cheers,

> 

> Philip

>






 









  

RE: [flexcoders] Re: ModuleLoader.child is null

2011-11-03 Thread Philip Smith

The module loads fine in a simple testbed, but in this particular larger 
application context, fails (and it's time consuming/costly debugging, when by 
all extents and purposes, it should work). In the end, I can achieve a similar 
result with SWFLoader, and cast the result as an interface type...

To: flexcoders@yahoogroups.com
From: loudj...@hotmail.com
Date: Thu, 3 Nov 2011 19:36:57 +
Subject: RE: [flexcoders] Re: ModuleLoader.child is null


















 



  



  
  
  


>> Perhaps you're getting an error on load; probably due to the path.  Try 
>> adding an event listener for ModuleEvent.ERROR.

The ModuleEvent.READY listener is executing, the path is correct. 

>> var test:ITest ITest(this._moduleLoader.child);

This was a typo. this._moduleLoader.child is still null here though. I get the 
same problem using mx and spark ModuleLoader. So unless someone can spot the 
problem, I'm going to use SWFLoader...

To: flexcoders@yahoogroups.com
From: timh...@aol.com
Date: Thu, 3 Nov 2011 18:35:10 +
Subject: [flexcoders] Re: ModuleLoader.child is null


















 



  



  
  
  Perhaps you're getting an error on load; probably due to the path.  Try 
adding an event listener for ModuleEvent.ERROR.



Also, this line is missing an equal sign:



var test:ITest ITest(this._moduleLoader.child);



Should be:



var test:ITest = ITest(this._moduleLoader.child);



-TH



--- In flexcoders@yahoogroups.com, "method_air"  wrote:

>

> Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
> event listener:

> 

> this._moduleLoader = new ModuleLoader();

> this._moduleLoader.url = "ImageComparisonModule.swf"; // 

>   
> this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);

> 

> private function onReady(e:ModuleEvent):void

> {

>  var test:ITest ITest(this._moduleLoader.child); // null  

> }

> 

> Module code:

> 

> 

> http://ns.adobe.com/mxml/2009"; 

> xmlns:s="library://ns.adobe.com/flex/spark" 

> xmlns:mx="library://ns.adobe.com/flex/mx" 

>implements="com.storefront.interfaces.controller.ITest"

> >

>   

>   

>   

>   

>   

> 

> 

> Cheers,

> 

> Philip

>







 









  



 









  

RE: [flexcoders] Re: ModuleLoader.child is null

2011-11-03 Thread Merrill, Jason
>> In the end, I can achieve a similar result with SWFLoader, and cast the 
>> result as an interface type...

Same. I gave up on all the quirks and pains and limitations of Flex Modules and 
went with loading in separate .swfs calling them an interface.  Worked just as 
well, and I felt more "in control".

Jason Merrill
Instructional Technology Architect II
Bank of America  Global Learning





___

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Philip Smith
Sent: Thursday, November 03, 2011 3:53 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: ModuleLoader.child is null


The module loads fine in a simple testbed, but in this particular larger 
application context, fails (and it's time consuming/costly debugging, when by 
all extents and purposes, it should work). In the end, I can achieve a similar 
result with SWFLoader, and cast the result as an interface type...

To: flexcoders@yahoogroups.com
From: loudj...@hotmail.com
Date: Thu, 3 Nov 2011 19:36:57 +
Subject: RE: [flexcoders] Re: ModuleLoader.child is null



>> Perhaps you're getting an error on load; probably due to the path. Try 
>> adding an event listener for ModuleEvent.ERROR.

The ModuleEvent.READY listener is executing, the path is correct.

>> var test:ITest ITest(this._moduleLoader.child);

This was a typo. this._moduleLoader.child is still null here though. I get the 
same problem using mx and spark ModuleLoader. So unless someone can spot the 
problem, I'm going to use SWFLoader...

To: flexcoders@yahoogroups.com
From: timh...@aol.com
Date: Thu, 3 Nov 2011 18:35:10 +
Subject: [flexcoders] Re: ModuleLoader.child is null


Perhaps you're getting an error on load; probably due to the path. Try adding 
an event listener for ModuleEvent.ERROR.

Also, this line is missing an equal sign:

var test:ITest ITest(this._moduleLoader.child);

Should be:

var test:ITest = ITest(this._moduleLoader.child);

-TH

--- In flexcoders@yahoogroups.com, 
"method_air"  wrote:
>
> Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
> event listener:
>
> this._moduleLoader = new ModuleLoader();
> this._moduleLoader.url = "ImageComparisonModule.swf"; //
> this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);
>
> private function onReady(e:ModuleEvent):void
> {
> var test:ITest ITest(this._moduleLoader.child); // null
> }
>
> Module code:
>
> 
> http://ns.adobe.com/mxml/2009";
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx"
> implements="com.storefront.interfaces.controller.ITest"
> >
> 
> 
> 
>
> 
> 
>
> Cheers,
>
> Philip
>




--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited. 
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law. 
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses. 

References to "Sender" are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are 
Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a 
Condition to Any Banking Service or Activity * Are Not Insured by Any Federal 
Government Agency. Attachments that are part of this EC may have additional 
important disclosures and disclaimers, which you should read. This message is 
subject to terms available at the following link: 
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.


Re: [flexcoders] Re: ModuleLoader.child is null

2011-11-03 Thread Alex Harui
Can you post link-reports for the main app and the module?  The implication is 
that the factory.create() didn’t work because the module’s class definition is 
not in the module swf.


On 11/3/11 12:52 PM, "Philip Smith"  wrote:






The module loads fine in a simple testbed, but in this particular larger 
application context, fails (and it's time consuming/costly debugging, when by 
all extents and purposes, it should work). In the end, I can achieve a similar 
result with SWFLoader, and cast the result as an interface type...


To: flexcoders@yahoogroups.com
From: loudj...@hotmail.com
Date: Thu, 3 Nov 2011 19:36:57 +
Subject: RE: [flexcoders] Re: ModuleLoader.child is null





>> Perhaps you're getting an error on load; probably due to the path.  Try 
>> adding an event listener for ModuleEvent.ERROR.

The ModuleEvent.READY listener is executing, the path is correct.

>> var test:ITest ITest(this._moduleLoader.child);

This was a typo. this._moduleLoader.child is still null here though. I get the 
same problem using mx and spark ModuleLoader. So unless someone can spot the 
problem, I'm going to use SWFLoader...


To: flexcoders@yahoogroups.com
From: timh...@aol.com
Date: Thu, 3 Nov 2011 18:35:10 +
Subject: [flexcoders] Re: ModuleLoader.child is null




   Perhaps you're getting an error on load; probably due to the path.  Try 
adding an event listener for ModuleEvent.ERROR.

Also, this line is missing an equal sign:

var test:ITest ITest(this._moduleLoader.child);

Should be:

var test:ITest = ITest(this._moduleLoader.child);

-TH

--- In flexcoders@yahoogroups.com  , 
"method_air"  wrote:
>
> Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
> event listener:
>
> this._moduleLoader = new ModuleLoader();
> this._moduleLoader.url = "ImageComparisonModule.swf"; //
> this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);
>
> private function onReady(e:ModuleEvent):void
> {
>  var test:ITest ITest(this._moduleLoader.child); // null
> }
>
> Module code:
>
> 
> http://ns.adobe.com/mxml/2009";
>   xmlns:s="library://ns.adobe.com/flex/spark"
>   xmlns:mx="library://ns.adobe.com/flex/mx"
>  implements="com.storefront.interfaces.controller.ITest"
>   >
> 
> 
> 
>
> 
> 
>
> Cheers,
>
> Philip
>
















--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] ALEX HAURI please help

2011-11-03 Thread deepa_pathuri
i want to implement undo and redo operations.
i am dragging image from one container to other and i want to facilitate a undo 
and redo for it.
can some body please tell me how to acheive it?



[flexcoders] code out of sync with flash builder

2011-11-03 Thread Wouter Schreuders
Hi All

I'm continually running into this problem. When I debug my code flash
builder intermittently show's me the previous build. It's super frustrating
because you make a complex logic change to your code and then it doesn't
work and you never know if it's that the code is wrong or flash builder
just screwed up and is showing you the previous version.

Anyone else run into this and know of some concrete steps I can take to
prevent it from happening? A friend of mine runs FDT and says he's also
encountered it so I'm guessing it's an eclipse problem.

Any help would be appreciated

thanks

Wouter


Re: [flexcoders] HTTPService post to return an image?

2011-11-03 Thread Tunde Majolagbe

Hello 

You cant send raw binaries via a http api 
two things i suggest you may do

1) convert your binary data  to hexadecimal (hex) Xters at the server site  and 
send it across the web as hex data then reconvert your  hex data to binaries on 
the browser.

2) Save the image on a path on the server, obtain the url to the path of the 
image
    return the url with httpservice (as a string offcourse) and set as 
imagepath to your image control.  


All the best !



Warm RegardsTunde Majolagbe+2348028320370, 018782170. *Exchange a Dollar, we 
still have ONE each, exchange an idea, we have TWO each.*Calm Down!!!  It’s 
just a mirage, like other worries it will soon fade away.   

--- On Tue, 1/11/11, method_air  wrote:

From: method_air 
Subject: [flexcoders] HTTPService post to return an image?
To: flexcoders@yahoogroups.com
Date: Tuesday, 1 November, 2011, 19:03
















 



  



  
  
  Is it possible to return an image object using HTTPService?



The fault method executes when I attempt to do this:



var http:HTTPService = new HTTPService();

http.url = "myScript.ashx";

http.method = "POST";

http.resultFormat = "object";



Should URLLoader be used instead?



Cheers,



Philip






 









  










Re: [flexcoders] Binding behaviour

2011-11-03 Thread The Real Napster
Use this.

import mx.utils.ObjectUtil;

ObjectUtil.copy(myObj);
ObjectUtil.copy(arrColl) as ArrayCollection;


On Tue, Oct 18, 2011 at 1:53 PM, geckko  wrote:

> **
>
>
> Hi all,
>
> I'm trying to duplicate one object but when i modify the "master" object
> the child object is modified too. My code is something similar to this
>
> private function cloneLeaf():CallMonitoringLeaf{
> var obj:CallMonitoringLeaf = new CallMonitoringLeaf();
> obj.optionCallMonitoring = optionCallMonitoring;
> obj.nodesSelected = nodesSelected;
> obj.dataCallMonitoring = dataCallMonitoring;
> obj.nodeName = nodeName;
> return obj;
> }
>
> But when i modify nodeName (for example) in the object that i use to
> duplicate (master object), the child object modifies its name too. Is there
> any way to avoid this behaviour?
>
> Thanks in advance
>  
>


[flexcoders] (s:List useVirtualLayout==true) + (HorizontalLayout==false) problem

2011-11-03 Thread naztafarian
Hi guys.

I have a Spark List that has useVirtualLayout set to true with a 
HorizontalLayout with variableColumnWidth set to false. (all itemRenderers 
inside have the same width)

The problem is, when I change the width of the custom itemRenderer and/or its 
contents, the itemRenderers don't update their x position on the List layout - 
they retain their old one from their original width.

As a result, I get the items overlapping if I make the itemRenderer wider or 
spaced too far apart if I make them thinner.

Is there a way to tell the list/HorizontalLayout to update the positions of its 
child elements manually?

Regards,

-Naz