Re: [flexcoders] AS3 to .NET 3.5 WCF Service

2010-05-13 Thread Peeyush Tuli
Use SOAP? googling can give you a lot of sample code.

Peeyush Tuli
Adobe Certified Expert
http://www.metadesignsolutions.com

On Fri, May 14, 2010 at 12:41 AM, inteliarchs  wrote:

>
>
> Hello,
>
> Thank you for your response. Has anyone ventured down the path of writing a
> AS3 to WCF Service without using FluorineFx or WebORB? I have a project
> requirement not to use these tools (yikes) :)
>
> Please provide me with an example if you have done this so I can hit the
> ground running.
>
> Peace,
> Inteliarchs
>
>  
>


[flexcoders] Re: Deleting row datagrid | Itemrenderer shows incorrect data

2010-05-13 Thread turbo_vb
Your CheckBox itemRenderer is getting recycled after the delete.  Use a
custom itemRenderer for the CheckBox.
http://blogs.adobe.com/aharui/item_renderers/

-TH
--- In flexcoders@yahoogroups.com, "ilikeflex"  wrote:
>
> Hi
>
> I want to remove the row of datagrid. In one of the columns i have
checkbox as item renderer.I select checkbox and i delete the row.But the
challenge, i am facing is that when i remove the row from datagrid, the
next row's checkbox becomes selected which i do not want. How can i
avoid this?? Please see the test case below.
>
> Any pointers are highly appreciated.
>
> Thanks
> ilikeflex
>
> I have a sample test case
> 
> http://www.adobe.com/2006/mxml";>
>  
>   
>  
>dataProvider="{xc}">
>   
>   dataField="item">
> 
>  
>   
>  
> 
>
>
> 
>  
>  click="outerDocument.deleteItem(event)"/>
>  
> 
>
>   
>  
> 
>



Re: [flexcoders] Application requiring streaming data

2010-05-13 Thread Evan Klein
You are looking for messaging services. Messaging services come out of the
box with BlazeDS and Livecycle Data services.

Both products have a Java API for creating the producer components to push
messages down to clients.

Livecycle , however is about $40K / CPU and has advanced functionality such
as RMTP channels, guaranteed message delivery, throttling, etc.

Give this an example a try
http://learn.adobe.com/wiki/display/Flex/Creating+a+BlazeDS+messaging+application+in+Flex+Builder

On Thu, May 13, 2010 at 1:10 PM, sasuke  wrote:

>
>
>
> Hi all,
>
> I'm currently working on an use case/application which is something along
> the following lines:
> When the user successfully logs in the application, he would be shown a
> graph/some statistical data. This data would be real time in the sense that
> it would be updated with a granularity of around 100ms at the server which
> needs to be pushed ASAP to the client.
>
> Now, using services like WebServices, HttpService etc. would be a
> performance killer in my case given the time/resources taken during
> connection creation/tear down. Using long lived connections for HTTP might
> end up failing if the proxy server decides to "cache" the response till the
> stream is closed. Also, given that HTTP is a request oriented protocol, the
> client would have to "beg" for changes before the server sends them to the
> client.
>
> So my question is: Which would be the most performant and viable solution
> when it comes to retrieving streaming data or the server continuously
> pushing data to the client once the client registers itself? It would be
> much appreciated if you could share your similar experiences with such
> requirements.
>
> TIA,
> sasuke
> --
> View this message in context:
> http://old.nabble.com/Application-requiring-streaming-data-tp28550128p28550128.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
>  
>


[flexcoders] ImageSnapshots, embedded binary, and local-with-networking

2010-05-13 Thread kazoobrewer
I'm having issues taking ImageSnapshots in my local-with-networking SWF.

The content it doesn't like is images (Loader instances) loaded from an 
embedded blob:
 [Embed(source="payload.zip", mimeType="application/octet-stream")]
   
The blob is zipped, so there's some byte manipulation on the source data before 
going into Loader.loadBytes:
 sourceImageLoader.loadBytes(data, 
 new LoaderContext(false, ApplicationDomain.currentDomain, null));

I've tried with a null LoaderContext to no avail as well.

Is there any setting I can use to bless the data sufficiently to make this 
scenario work?

Thanks much,
michael


SecurityError: Error #2148: SWF file file:///C|/flexworkspace/app.swf cannot 
access local resource file:///C|/flexworkspace/app.swf/[[DYNAMIC]]/1. Only 
local-with-filesystem and trusted local SWF files may access local resources.
at flash.display::BitmapData/draw()
at 
mx.graphics::ImageSnapshot$/captureBitmapData()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\graphics\ImageSnapshot.as:188]
at 
mx.graphics::ImageSnapshot$/captureImage()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\graphics\ImageSnapshot.as:282]





[flexcoders] AS3 to .NET 3.5 WCF Service

2010-05-13 Thread inteliarchs
Hello, 

Thank you for your response. Has anyone ventured down the path of writing a AS3 
to WCF Service without using FluorineFx or WebORB? I have a project requirement 
not to use these tools (yikes) :) 

Please provide me with an example if you have done this so I can hit the ground 
running. 

Peace,
Inteliarchs




Re: [flexcoders] How do i install the debug player?

2010-05-13 Thread Oleg Sivokon
Sorry, this may upset you, but FB and Flash player aren't really related...
also there's no need to install standalone player, it's just not a program
that requires installation, after you run any copy of it it will create a
file association to SWF files (will make itself a default program to open
files with SWF extension). You may also do that from "folder options"
dialog. It is true they may try to change that to whatever version of player
they came bundled with right when you install them, but later they never try
to change that.
Silly thing about FB though is you cannot configure it to use the copy of
the flash player that you want... it has no such setting... Regarding your
other issue with unistaller, I personally never had it, but, this page seem
to have some good info (although dated)
http://kb.mozillazine.org/Flash#Windows_and_Mac . Some other adobe products
may sometimes try to install their own versions of player. This issue was
discussed several times and Adobe promised to do something about it in the
future releases...
Since I need multiple different versions of Flash player for testing, I
first was switching the SDKs (every SDK comes with the set of debug players
- find them in the runtimes folder), but that's not comfortable, so, I move
them to the Program Files/Flash Player/version/{debug|release}. Could sound
a little messy, but once I made it a habit any time I need to get a new
standalone version I just put it there, it never gave me troubles.

Best.

Oleg


[flexcoders] How do i install the debug player?

2010-05-13 Thread Clark Stevenson
Hey guys.

I installed FB4 tonight for the 60 day trial and also Flash.

Everything was great but obviously i need a debug player as some .dll was
not found.

I downloaded the latest debug from here:

http://www.adobe.com/support/flashplayer/downloads.html


Firstly:

Active x wont install because it complains that i have a new version of the
flash player and i should goto the standard download of the player in order
to update.

The firefox plugin installed ok, but thats really slow from launching

I also downloaded a 5mb projector debugger... flashplayer_10_sa_debug   <---
this is what i want! So i dont need to wait for a browser to kick in.



So I headed over to the uninstaller page:

http://kb2.adobe.com/cps/141/tn_14157.html

Ran it, restarted Windows.


I tried to install the Active X plugin again and got the same deal It
informs me i have a newer version already installed.


I got rid of Flash and FB4, restarted, reinstalled both, then when i opened
FB4 i got "You must install the flash player" on the welcome tab.


I did an other hour of trying but then FB4 started giving me "Java point
exception" or something like that when i tried to hit Debug.


I then spent a while going through the preferences trying to find some
option to launch the debugger directly with flashplayer_10_sa_debug,exe but
i couldnt find an option.


So thats pretty much sapped my evening. Does everyone have a clue how i can
simply install FB4 and a Debug player? Is there some order i should install
CS5 FB4 Debug Players? Can i copy flashplayer_10_sa_debug to a folder where
FB4 will recognise it and if so where?

Trace() What a dear friend.

Thanks for your time on this.

Clark.


[flexcoders] Deleting row datagrid | Itemrenderer shows incorrect data

2010-05-13 Thread ilikeflex
Hi

I want to remove the row of datagrid. In one of the columns i have checkbox as 
item renderer.I select checkbox and i delete the row.But the challenge, i am 
facing is that when i remove the row from datagrid, the next row's checkbox 
becomes selected which i do not want. How can i avoid this?? Please see the 
test case below.

Any pointers are highly appreciated.

Thanks
ilikeflex

I have a sample test case

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


























[flexcoders] how do i make a function call to a class bindable?

2010-05-13 Thread luvfotography
how do I make a function call to a package bindable?

when I call the public function clear(), the bindable class doesn't get 
updated??  ie student.fname or student.lname

ex:

package {
  [Bindable]
  public class student{
 private var _fname:String;
 private var _lname:String;
  
  public function student( fname:String, lname:String):void {
 _fname = fname;
 _lname = lname;
  }
 
  public function clear():void {
 _lname = '';
_fname = '';
}

public function set fname(value:String):void {
   _fname = value;
}
public function get fname():String {
return _fname;
}
public function set lname(value:String):void {
_lname = value;
}
public function get lname():String {
return _lname
}
}
}

}



Re: [flexcoders] Re: Strange Behavior When Loading Sub Application

2010-05-13 Thread Alex Harui
Thinking about this a bit more, every child of the sub-swf except its 
systemmanager should get an ADD_TO_STAGE around the time of applicationComplete 
in the sub-swf.  Flex builds the SWF’s ui off-stage.  So maybe there’s 
something else going on.


On 5/13/10 12:01 PM, "jmbo...@bellsouth.net"  wrote:






Robotlegs uses the ADD_TO_STAGE to auto-magically mediate view components so 
dispatching 1 event would not work...I would have to dispatch 1 for each 
component.  I can manually mediate the components, but that is a lot of work 
for a large app and takes the "magic" away from RL.  I will just have to pursue 
another strategy.  Thanks for your confirmation Alex!

Jim

--- In flexcoders@yahoogroups.com  , Alex 
Harui  wrote:
>
> Flex SWFs must be on-stage in order to load.  Are you worried about missing 
> an ADD_TO_STAGE event?  Maybe send a fake one on applicationComplete.
>
>
> On 5/13/10 7:51 AM, "jmbo...@..."  wrote:
>
>
>
>
>
>
> Alex,
>
> Your suggestion will work and in fact, that is the way we were doing it. 
> Unfortunately, we needed to create a Robotlegs context so that we can listen 
> for ADD_TO_STAGE events and allow it to automatically mediator our view 
> components (see below).  That is why I added the sub-app as a child later.  
> Any other ideas how to make the current code work?
>
> // Inject dependencies into the module and initiate the context since 
> autoload is set
> var subApp:IModule = event.moduleApp;
> injector.injectInto(subApp);
>
> // Make sure the content fills the page
> var subAppComponent:SubAppBase = SubAppBase(subApp);
> subAppComponent.percentHeight = 100;
> subAppComponent.percentWidth = 100;
>
> /* Add to contentViewStack here based upon position
>Simply add as a child to the stub canvas that already
>exists for the module
>  */
> var index:int = _moduleArray.getItemIndex(swf);
> var canvas:Canvas = Canvas(contentViewStack.getChildAt(index));
>
> canvas.addChild(subAppComponent);
>
> --- In flexcoders@yahoogroups.com   
>  , Alex Harui  wrote:
> >
> > Try adding the SWFLoader to the canvas before you load it.
> >
> >
> > On 5/12/10 12:40 PM, "jmboone@"  wrote:
> >
> >
> >
> >
> >
> >
> > Hi,
> >
> > I am experiencing an odd problem and I hope someone knows why.  I am 
> > loading a sub-application using SWFLoader.  I listen for the Event.COMPLETE 
> > command. Once the swf is loaded, I then add a listener to the SystemManager 
> > for the swf and listen for the FlexEvent.APPLICATION_COMPLETE event.  At 
> > that point, I add the application as a child to a Canvas that exists in a 
> > view stack (see code below).  This is great, the content loads, but it 
> > doesn't seem to load correctly.  The legends in my charts are not oriented 
> > the way they should be and whenever I roll over an item with a tooltip, I 
> > get errors like the following error:
> >
> > TypeError: Error #1009: Cannot access a property or method of a null object 
> > reference.
> > at mx.managers::SystemManager/get 
> > toolTipChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1178]
> > at 
> > mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:3030]
> >
> > Does anyone have any clue what is going on??  Thanks,
> >
> > Jim
> >
> > !! snippet where swf is loaded 
> >
> > ..
> > var loader:SWFLoader = null;
> > if (content.contentType == ContentData.SWF)
> > {
> > var uri:String = content.contentUri;
> >
> > var loaderContext:LoaderContext = new LoaderContext();
> > loaderContext.applicationDomain = ApplicationDomain.currentDomain;
> > loaderContext.securityDomain = SecurityDomain.currentDomain;
> >
> > /* Create the swf loader and add it as a child to a canvas
> >  * so that it will have a place to display on the display list
> >  */
> > loader = new SWFLoader();
> > loader.scaleContent = true;
> > loader.loaderContext = loaderContext;
> > loader.addEventListener(Event.COMPLETE, onLoadingComplete);
> > loader.addEventListener(IOErrorEvent.IO_ERROR, onModuleLoadError);
> > loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, 
> > onModuleLoadError);
> > loader.load(uri);
> > .
> >
> > private function onLoadingComplete(event:Event):void
> > {
> > var swfLoader:SWFLoader = event.currentTarget as SWFLoader;
> > if (swfLoader != null && swfLoader.content != null)
> > {
> > /* Create an annoymous listener that dispatches an event when the module is 
> > ready to show */
> > sm.addEventListener(FlexEvent.APPLICATION_COMPLETE, 
> > function(flexEvent:FlexEvent):void
> > {
> > var cmEvent:ContentManagementEvent = new 
> > ContentManagementEvent(ContentManagementEvent.CONTENT_READY_TO_SHOW);
> > cmEvent.moduleLoader = swfLoader;
> > // Grab a reference to the module application itself
> > if (flexEve

Re: [flexcoders] how to style a ComboBox - Dropdown ?

2010-05-13 Thread Nick Middleweek
ah ha... ComboBox.dropdownFactory = "Class factory that creates an
mx.controls.List"




On 13 May 2010 19:45, Nick Middleweek  wrote:

> ok, cool... Thanks Alex,
>
> Does it say that in the docs? I can't see it and have been stumped on
> similar things like this before when a styleProperty refers to another
> .stylename
>
> Cheers,
> Nick
>
>
>
>
>
> On 13 May 2010 18:30, Alex Harui  wrote:
>
>>
>>
>> It depends on the dropdown.  The default is List.
>>
>>
>>
>> On 5/13/10 7:46 AM, "Nick Middleweek"  wrote:
>>
>>
>>
>>
>>
>>
>> Hi, I'm trying to find all the CSS options that are available so I can
>> style up my ComboBox - Dropdown menu. Looking at the Language Reference I
>> can see all the Styles available for hte ComboBox itself but one of the
>> properties is called dropdownStyleName. What I'm stumped with now, is where
>> to look in the Adobe Flex docs on what options I'm allowed to use to create
>> a CSS style which I can then assign to CompboBox.dropdownStyleName ? Cheers,
>> Nick
>>
>>
>>
>>
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe System, Inc.
>> http://blogs.adobe.com/aharui
>>  
>>
>
>


[flexcoders] Re: Strange Behavior When Loading Sub Application

2010-05-13 Thread jmbo...@bellsouth.net
Robotlegs uses the ADD_TO_STAGE to auto-magically mediate view components so 
dispatching 1 event would not work...I would have to dispatch 1 for each 
component.  I can manually mediate the components, but that is a lot of work 
for a large app and takes the "magic" away from RL.  I will just have to pursue 
another strategy.  Thanks for your confirmation Alex!

Jim

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Flex SWFs must be on-stage in order to load.  Are you worried about missing 
> an ADD_TO_STAGE event?  Maybe send a fake one on applicationComplete.
> 
> 
> On 5/13/10 7:51 AM, "jmbo...@..."  wrote:
> 
> 
> 
> 
> 
> 
> Alex,
> 
> Your suggestion will work and in fact, that is the way we were doing it. 
> Unfortunately, we needed to create a Robotlegs context so that we can listen 
> for ADD_TO_STAGE events and allow it to automatically mediator our view 
> components (see below).  That is why I added the sub-app as a child later.  
> Any other ideas how to make the current code work?
> 
> // Inject dependencies into the module and initiate the context since 
> autoload is set
> var subApp:IModule = event.moduleApp;
> injector.injectInto(subApp);
> 
> // Make sure the content fills the page
> var subAppComponent:SubAppBase = SubAppBase(subApp);
> subAppComponent.percentHeight = 100;
> subAppComponent.percentWidth = 100;
> 
> /* Add to contentViewStack here based upon position
>Simply add as a child to the stub canvas that already
>exists for the module
>  */
> var index:int = _moduleArray.getItemIndex(swf);
> var canvas:Canvas = Canvas(contentViewStack.getChildAt(index));
> 
> canvas.addChild(subAppComponent);
> 
> --- In flexcoders@yahoogroups.com  , 
> Alex Harui  wrote:
> >
> > Try adding the SWFLoader to the canvas before you load it.
> >
> >
> > On 5/12/10 12:40 PM, "jmboone@"  wrote:
> >
> >
> >
> >
> >
> >
> > Hi,
> >
> > I am experiencing an odd problem and I hope someone knows why.  I am 
> > loading a sub-application using SWFLoader.  I listen for the Event.COMPLETE 
> > command. Once the swf is loaded, I then add a listener to the SystemManager 
> > for the swf and listen for the FlexEvent.APPLICATION_COMPLETE event.  At 
> > that point, I add the application as a child to a Canvas that exists in a 
> > view stack (see code below).  This is great, the content loads, but it 
> > doesn't seem to load correctly.  The legends in my charts are not oriented 
> > the way they should be and whenever I roll over an item with a tooltip, I 
> > get errors like the following error:
> >
> > TypeError: Error #1009: Cannot access a property or method of a null object 
> > reference.
> > at mx.managers::SystemManager/get 
> > toolTipChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1178]
> > at 
> > mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:3030]
> >
> > Does anyone have any clue what is going on??  Thanks,
> >
> > Jim
> >
> > !! snippet where swf is loaded 
> >
> > ..
> > var loader:SWFLoader = null;
> > if (content.contentType == ContentData.SWF)
> > {
> > var uri:String = content.contentUri;
> >
> > var loaderContext:LoaderContext = new LoaderContext();
> > loaderContext.applicationDomain = ApplicationDomain.currentDomain;
> > loaderContext.securityDomain = SecurityDomain.currentDomain;
> >
> > /* Create the swf loader and add it as a child to a canvas
> >  * so that it will have a place to display on the display list
> >  */
> > loader = new SWFLoader();
> > loader.scaleContent = true;
> > loader.loaderContext = loaderContext;
> > loader.addEventListener(Event.COMPLETE, onLoadingComplete);
> > loader.addEventListener(IOErrorEvent.IO_ERROR, onModuleLoadError);
> > loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, 
> > onModuleLoadError);
> > loader.load(uri);
> > .
> >
> > private function onLoadingComplete(event:Event):void
> > {
> > var swfLoader:SWFLoader = event.currentTarget as SWFLoader;
> > if (swfLoader != null && swfLoader.content != null)
> > {
> > /* Create an annoymous listener that dispatches an event when the module is 
> > ready to show */
> > sm.addEventListener(FlexEvent.APPLICATION_COMPLETE, 
> > function(flexEvent:FlexEvent):void
> > {
> > var cmEvent:ContentManagementEvent = new 
> > ContentManagementEvent(ContentManagementEvent.CONTENT_READY_TO_SHOW);
> > cmEvent.moduleLoader = swfLoader;
> > // Grab a reference to the module application itself
> > if (flexEvent.currentTarget.application is IModule)
> > {
> > cmEvent.moduleApp = flexEvent.currentTarget.application as IModule;
> > }
> > dispatch(cmEvent);
> >
> > });
> > }
> > }
> > }
> >
> > !! snippet when adding to Canvas 
> >
> > if (event.moduleApp != null)
> > {
> > Logger.debug("Setting parentInjector and starting the RL context for :" + 
> > moduleId)

Re: [flexcoders] how to style a ComboBox - Dropdown ?

2010-05-13 Thread Nick Middleweek
ok, cool... Thanks Alex,

Does it say that in the docs? I can't see it and have been stumped on
similar things like this before when a styleProperty refers to another
.stylename

Cheers,
Nick




On 13 May 2010 18:30, Alex Harui  wrote:

>
>
> It depends on the dropdown.  The default is List.
>
>
>
> On 5/13/10 7:46 AM, "Nick Middleweek"  wrote:
>
>
>
>
>
>
> Hi, I'm trying to find all the CSS options that are available so I can
> style up my ComboBox - Dropdown menu. Looking at the Language Reference I
> can see all the Styles available for hte ComboBox itself but one of the
> properties is called dropdownStyleName. What I'm stumped with now, is where
> to look in the Adobe Flex docs on what options I'm allowed to use to create
> a CSS style which I can then assign to CompboBox.dropdownStyleName ? Cheers,
> Nick
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>  
>


Re: [flexcoders] Flex 4 - Datagrid column header and data problem

2010-05-13 Thread Alex Harui
That is expected.  A "." in the dataField means that the column should
display sub-properties of complex objects.  You can set the headerText
separately from the dataField.


On 5/13/10 7:18 AM, "Kovács Richárd"  wrote:

> Dear List,
> 
> I am new to flex, and to the list as well.
> 
> I have a very strange behaviour which I cannot really understand.
> 
> There is a Datagrid in my app, and there is an arraycollection
> connecting to it. The column's headers of the Datagrid come from another
> arraycollection. The header sometimes contains dots ("."). When it does,
> the column header appears correctly but the data in the column does not
> appear at all! There are rows, but no values!
> 
> I have tested it, and when the column header should contain a dot, the
> values disappear.
> 
> First of all please let me know if this is a "normal" behaviour or I am
> doing something terribly wrong.
> 
> I didn't want to include a whole bunch of source code in the first
> email, so let me know if you need any.
> 
> 
> 
> Thanks in advance,
> Richard
> 
> 
> 
> 
> --
> 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-1e6207
> 9f6847
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
> 
> 
> 

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



Re: [flexcoders] Re: Strange Behavior When Loading Sub Application

2010-05-13 Thread Alex Harui
Flex SWFs must be on-stage in order to load.  Are you worried about missing an 
ADD_TO_STAGE event?  Maybe send a fake one on applicationComplete.


On 5/13/10 7:51 AM, "jmbo...@bellsouth.net"  wrote:






Alex,

Your suggestion will work and in fact, that is the way we were doing it. 
Unfortunately, we needed to create a Robotlegs context so that we can listen 
for ADD_TO_STAGE events and allow it to automatically mediator our view 
components (see below).  That is why I added the sub-app as a child later.  Any 
other ideas how to make the current code work?

// Inject dependencies into the module and initiate the context since autoload 
is set
var subApp:IModule = event.moduleApp;
injector.injectInto(subApp);

// Make sure the content fills the page
var subAppComponent:SubAppBase = SubAppBase(subApp);
subAppComponent.percentHeight = 100;
subAppComponent.percentWidth = 100;

/* Add to contentViewStack here based upon position
   Simply add as a child to the stub canvas that already
   exists for the module
 */
var index:int = _moduleArray.getItemIndex(swf);
var canvas:Canvas = Canvas(contentViewStack.getChildAt(index));

canvas.addChild(subAppComponent);

--- In flexcoders@yahoogroups.com  , Alex 
Harui  wrote:
>
> Try adding the SWFLoader to the canvas before you load it.
>
>
> On 5/12/10 12:40 PM, "jmbo...@..."  wrote:
>
>
>
>
>
>
> Hi,
>
> I am experiencing an odd problem and I hope someone knows why.  I am loading 
> a sub-application using SWFLoader.  I listen for the Event.COMPLETE command. 
> Once the swf is loaded, I then add a listener to the SystemManager for the 
> swf and listen for the FlexEvent.APPLICATION_COMPLETE event.  At that point, 
> I add the application as a child to a Canvas that exists in a view stack (see 
> code below).  This is great, the content loads, but it doesn't seem to load 
> correctly.  The legends in my charts are not oriented the way they should be 
> and whenever I roll over an item with a tooltip, I get errors like the 
> following error:
>
> TypeError: Error #1009: Cannot access a property or method of a null object 
> reference.
> at mx.managers::SystemManager/get 
> toolTipChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1178]
> at 
> mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:3030]
>
> Does anyone have any clue what is going on??  Thanks,
>
> Jim
>
> !! snippet where swf is loaded 
>
> ..
> var loader:SWFLoader = null;
> if (content.contentType == ContentData.SWF)
> {
> var uri:String = content.contentUri;
>
> var loaderContext:LoaderContext = new LoaderContext();
> loaderContext.applicationDomain = ApplicationDomain.currentDomain;
> loaderContext.securityDomain = SecurityDomain.currentDomain;
>
> /* Create the swf loader and add it as a child to a canvas
>  * so that it will have a place to display on the display list
>  */
> loader = new SWFLoader();
> loader.scaleContent = true;
> loader.loaderContext = loaderContext;
> loader.addEventListener(Event.COMPLETE, onLoadingComplete);
> loader.addEventListener(IOErrorEvent.IO_ERROR, onModuleLoadError);
> loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onModuleLoadError);
> loader.load(uri);
> .
>
> private function onLoadingComplete(event:Event):void
> {
> var swfLoader:SWFLoader = event.currentTarget as SWFLoader;
> if (swfLoader != null && swfLoader.content != null)
> {
> /* Create an annoymous listener that dispatches an event when the module is 
> ready to show */
> sm.addEventListener(FlexEvent.APPLICATION_COMPLETE, 
> function(flexEvent:FlexEvent):void
> {
> var cmEvent:ContentManagementEvent = new 
> ContentManagementEvent(ContentManagementEvent.CONTENT_READY_TO_SHOW);
> cmEvent.moduleLoader = swfLoader;
> // Grab a reference to the module application itself
> if (flexEvent.currentTarget.application is IModule)
> {
> cmEvent.moduleApp = flexEvent.currentTarget.application as IModule;
> }
> dispatch(cmEvent);
>
> });
> }
> }
> }
>
> !! snippet when adding to Canvas 
>
> if (event.moduleApp != null)
> {
> Logger.debug("Setting parentInjector and starting the RL context for :" + 
> moduleId);
>
> // Make sure the content fills the page
> var subAppComponent:SubAppBase = SubAppBase(subApp);
> subAppComponent.percentHeight = 100;
> subAppComponent.percentWidth = 100;
>
> /* Add to contentViewStack here based upon position
>Simply add as a child to the stub canvas that already
>exists for the module
>  */
> var index:int = _moduleArray.getItemIndex(swf);
> var canvas:Canvas = Canvas(contentViewStack.getChildAt(index));
>
> canvas.addChild(subAppComponent);
> }
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>






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


Re: [flexcoders] how to style a ComboBox - Dropdown ?

2010-05-13 Thread Alex Harui
It depends on the dropdown.  The default is List.


On 5/13/10 7:46 AM, "Nick Middleweek"  wrote:






Hi, I'm trying to find all the CSS options that are available so I can style up 
my ComboBox - Dropdown menu. Looking at the Language Reference I can see all 
the Styles available for hte ComboBox itself but one of the properties is 
called dropdownStyleName. What I'm stumped with now, is where to look in the 
Adobe Flex docs on what options I'm allowed to use to create a CSS style which 
I can then assign to CompboBox.dropdownStyleName ? Cheers, Nick





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


[flexcoders] Application requiring streaming data

2010-05-13 Thread sasuke

Hi all,

I'm currently working on an use case/application which is something along
the following lines:
When the user successfully logs in the application, he would be shown a
graph/some statistical data. This data would be real time in the sense that
it would be updated with a granularity of around 100ms at the server which
needs to be pushed ASAP to the client.

Now, using services like WebServices, HttpService etc. would be a
performance killer in my case given the time/resources taken during
connection creation/tear down. Using long lived connections for HTTP might
end up failing if the proxy server decides to "cache" the response till the
stream is closed. Also, given that HTTP is a request oriented protocol, the
client would have to "beg" for changes before the server sends them to the
client.

So my question is: Which would be the most performant and viable solution
when it comes to retrieving streaming data or the server continuously
pushing data to the client once the client registers itself? It would be
much appreciated if you could share your similar experiences with such
requirements.

TIA,
sasuke
-- 
View this message in context: 
http://old.nabble.com/Application-requiring-streaming-data-tp28550128p28550128.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Flex 4 - Datagrid column header and data problem

2010-05-13 Thread Kovács Richárd
Dear List,

I am new to flex, and to the list as well.

I have a very strange behaviour which I cannot really understand.

There is a Datagrid in my app, and there is an arraycollection
connecting to it. The column's headers of the Datagrid come from another
arraycollection. The header sometimes contains dots ("."). When it does,
the column header appears correctly but the data in the column does not
appear at all! There are rows, but no values!

I have tested it, and when the column header should contain a dot, the
values disappear.

First of all please let me know if this is a "normal" behaviour or I am
doing something terribly wrong.

I didn't want to include a whole bunch of source code in the first
email, so let me know if you need any.



Thanks in advance,
Richard




--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
flexcoders-dig...@yahoogroups.com 
flexcoders-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Re: Strange Behavior When Loading Sub Application

2010-05-13 Thread jmbo...@bellsouth.net
Alex,

Your suggestion will work and in fact, that is the way we were doing it. 
Unfortunately, we needed to create a Robotlegs context so that we can listen 
for ADD_TO_STAGE events and allow it to automatically mediator our view 
components (see below).  That is why I added the sub-app as a child later.  Any 
other ideas how to make the current code work?


// Inject dependencies into the module and 
initiate the context since autoload is set
var subApp:IModule = event.moduleApp;
injector.injectInto(subApp);

// Make sure the content fills the page
var subAppComponent:SubAppBase = 
SubAppBase(subApp);
subAppComponent.percentHeight = 100;
subAppComponent.percentWidth = 100;

/* Add to contentViewStack here based upon 
position
   Simply add as a child to the stub canvas 
that already
   exists for the module
 */
var index:int = _moduleArray.getItemIndex(swf);
var canvas:Canvas = 
Canvas(contentViewStack.getChildAt(index));

canvas.addChild(subAppComponent);


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Try adding the SWFLoader to the canvas before you load it.
> 
> 
> On 5/12/10 12:40 PM, "jmbo...@..."  wrote:
> 
> 
> 
> 
> 
> 
> Hi,
> 
> I am experiencing an odd problem and I hope someone knows why.  I am loading 
> a sub-application using SWFLoader.  I listen for the Event.COMPLETE command. 
> Once the swf is loaded, I then add a listener to the SystemManager for the 
> swf and listen for the FlexEvent.APPLICATION_COMPLETE event.  At that point, 
> I add the application as a child to a Canvas that exists in a view stack (see 
> code below).  This is great, the content loads, but it doesn't seem to load 
> correctly.  The legends in my charts are not oriented the way they should be 
> and whenever I roll over an item with a tooltip, I get errors like the 
> following error:
> 
> TypeError: Error #1009: Cannot access a property or method of a null object 
> reference.
> at mx.managers::SystemManager/get 
> toolTipChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1178]
> at 
> mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:3030]
> 
> Does anyone have any clue what is going on??  Thanks,
> 
> Jim
> 
> !! snippet where swf is loaded 
> 
> ..
> var loader:SWFLoader = null;
> if (content.contentType == ContentData.SWF)
> {
> var uri:String = content.contentUri;
> 
> var loaderContext:LoaderContext = new LoaderContext();
> loaderContext.applicationDomain = ApplicationDomain.currentDomain;
> loaderContext.securityDomain = SecurityDomain.currentDomain;
> 
> /* Create the swf loader and add it as a child to a canvas
>  * so that it will have a place to display on the display list
>  */
> loader = new SWFLoader();
> loader.scaleContent = true;
> loader.loaderContext = loaderContext;
> loader.addEventListener(Event.COMPLETE, onLoadingComplete);
> loader.addEventListener(IOErrorEvent.IO_ERROR, onModuleLoadError);
> loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onModuleLoadError);
> loader.load(uri);
> .
> 
> private function onLoadingComplete(event:Event):void
> {
> var swfLoader:SWFLoader = event.currentTarget as SWFLoader;
> if (swfLoader != null && swfLoader.content != null)
> {
> /* Create an annoymous listener that dispatches an event when the module is 
> ready to show */
> sm.addEventListener(FlexEvent.APPLICATION_COMPLETE, 
> function(flexEvent:FlexEvent):void
> {
> var cmEvent:ContentManagementEvent = new 
> ContentManagementEvent(ContentManagementEvent.CONTENT_READY_TO_SHOW);
> cmEvent.moduleLoader = swfLoader;
> // Grab a reference to the module application itself
> if (flexEvent.currentTarget.application is IModule)
> {
> cmEvent.moduleApp = flexEvent.currentTarget.application as IModule;
> }
> dispatch(cmEvent);
> 
> });
> }
> }
> }
> 
> !! snippet when adding to Canvas 
> 
> if (event.moduleApp != null)
> {
> Logger.debug("Setting parentInjector and starting the RL context for :" + 
> moduleId);
> 
> // Make sure the content fills the page
> var subAppComponent:SubAppBase = SubAppBase(subApp);
> subAppComponent.percentHeight = 100;
> subAppComponent.percentWidth = 100;
> 
> /* Add to contentViewStack here based upon position
>Simply add as a child to the stub canvas that already
>exists for the module
>  *

[flexcoders] Re: Folder-style dragOver highlight on tree

2010-05-13 Thread Amy


--- In flexcoders@yahoogroups.com, Richard Rodseth  wrote:
>
> I'm now aware of dropIndicatorSkin and found an example that
> customized the skin to do this:
> 
>   g.beginFill(0xa1bde2, 0.5);
>   g.drawRect(-5, -1, w, 23);
> 
> which is obviously a bit, er, hard-coded.
> 
> The location and height for the skin appear to be set for drawing a
> line between nodes. Recall that I just want to highlight the node
> itself, as though it were being selected.
> 
> Tree.showDropFeedback and ListBase.showDropFeedback are quite large
> methods (with side-effects) to be overriding. Is that my best option,
> or can I have my skin access the tree node?
> 
> Recommendations or examples appreciated.I feel sure someone must have
> used a tree to represent a folder hierarchy.
> Thanks.

Hi, Richard;

I am not guaranteeing this will be the case for what you are trying to do, but 
I have found when trying to customize ListBase components that often the large 
methods will have smaller, protected, methods that you can find and hook into 
if you're willing to dig through the class structure to find them.

-Amy



[flexcoders] Re: unable to see the design view on sdk upgrade

2010-05-13 Thread mitek17
Yep, this is a typical bug-free Flex behaviour

Try to delete all project from the workspace, restart FB and recreate projects 
from the scratch.


--- In flexcoders@yahoogroups.com, "sudeshdas"  wrote:
>
> Hi all,
>   My previous SDK was 3.0 now i have upgraded my sdk to 3.4.
> When I upgraded I am not able to see the design view. It is giving the 
> message "This component is based on Application, which is not a visual 
> component". can any one help me to fix this problem
> thanks
> Sudesh
>




[flexcoders] Need your help to do my mini project.

2010-05-13 Thread Sathya
Hello,
  I have to do my mini project. My guide advices me to do in cairngorm 
framework. And i have the required soft-wares (Flex Builder 3, Flex Builder 3 
Plugin, Eclipse 3.4, 3.5 and 3.6 , Cairngorm plugin (bin files) and Zend studio 
for eclipse etc..). But i do not know how to merge merge all these things.
  I noticed the steps in 
"http://www.technyforum.com/forum/yaf_postsm19_Cairngorm-Plugin-with-Flex-Builder-3-Eclipse-plugin-and-Make-it-working-with-Cairngorm-221.aspx";.
 But i can not move on the 5th step and can not merge the softwares.
  So Need steps to merge all these things (installation steps) to do my 
cairngorm project in "Caingorm framework" (Cairngorm plugin with flex in 
eclipse)..
  Help me..



[flexcoders] Re: Issue:Authentication issue on edge server + LCDS 3.1 java based loadtesting tool

2010-05-13 Thread Mete Atamel
Hi Sanjit,

First off, ChannelSet#login and ChannelSet#logout are the preferred ways of 
authenticating with BlazeDS/LCDS. Producer/Consumer/RemoteObject#setCredentials 
would work but the problem with setCredentials method is that it doesn't return 
an AsyncToken and hence you can't listen for success/failure. Also, 
setCredentials method does not send the credentials to the server until the 
Channel is connected, it simply caches them and sends them along with the 
connect request. The problem is if there's a failure as the Channel connects 
(eg. RemoteObject method doesn't exist) and an authentication failure too (eg. 
wrong credentials), then distinguishing between the RemoteObject failure with 
the authentication failure becomes difficult. So, that's why you should use 
ChannelSet#login/logout before doing anything else, and once the authentication 
is successful, go ahead with what you need to do. BlazeDS source tree has an 
example of this here:

http://tinyurl.com/27y2zd5

Second, the load-testing-tool in LCDS 3.1 does not support authentication or 
SSL (RTMPS, HTTPS) yet. By default, the LCDS Edge Server requires that clients 
are authenticated at the edge tier before the request is forwarded to the 
backing LCDS app. This is for security purposes but the good news is that for 
testing purposes, there's a switch called "require-authentication" which is set 
to true by default and you can set that to false under GatewayService 
configuration:


   
  
 false
   ...

That basically disables the requirement that clients are authenticated at the 
edge tier. 

This should enable you to test your Edge+LCDS app without needing to add 
authentication stuff in the load-testing-tool.

Mete Atamel
Data Services Team, Adobe Systems
http://meteatamel.wordpress.com/

--- In flexcoders@yahoogroups.com, "sanjitcs"  wrote:
>
> I am using LCDS 3.1 java based load testing tool to generate 100 concurrent 
> consumer to subscribe to the topic. 
> Since I am using edge server to communicate with application server. It dose 
> not be able to subscribe the consumer because getway service is not be able 
> to authenticate client.
> I am getting Following error.
> 
> Exception in thread "main" java.lang.RuntimeException: Consumer '0' failed to 
> subscribe:
> Flex Message (flex.messaging.messages.ErrorMessage) 
> clientId = C06AF337-0D68-2A86-C855-8AA0BC025252
> correlationId = D383DB46-081D-9083-A00B-81B06DD4AA31
> destination = application_data
> messageId = C06B06BF-0C3F-F7CF-1701-B1EA4F1FB678
> timestamp = 1273679434799
> timeToLive = 0
> body = null
> hdr(DSErrorHint) = true
> code =  Server.Authentication
> message =  Gateway service 'gateway-to-app' requires an authenticated 
> client. Please login before interacting with any gateway service destinations.
> details =  null
> rootCause =  null
> body =  null
> extendedData =  null
>   at javaclientexamples.LCDSDriver.doMain(LCDSDriver.java:274)
>   at javaclientexamples.LCDSDriver.main(LCDSDriver.java:131)
> 
> 
> In Flex client we are using setCredential of consumer class to set credential 
> to authenticate client.
> 
> But i am not be able to set credential for consumer in java based load 
> testing tool. Consumer /MessageAgent/ ChannelSet class does not have 
> setCredential  method. is there any way to set the credential in 
> consumer/Channel so that it can subscribe. 
> 
> Or any tool which can help me to generate 100 simultaneous user load on 
> server (edge server + application) and do load testing for messaging on  
> RTMP/RTMPS protocol.
>




[flexcoders] unable to see the design view on sdk upgrade

2010-05-13 Thread sudeshdas
Hi all,
  My previous SDK was 3.0 now i have upgraded my sdk to 3.4.
When I upgraded I am not able to see the design view. It is giving the message 
"This component is based on Application, which is not a visual component". can 
any one help me to fix this problem
thanks
Sudesh