[flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread fusionpage
I typically use code like this to call a method in the parent MXML page that 
contains the dataGrid...

mx:AdvancedDataGridColumn width=80 headerText=Launch 
dataField=contentURL
mx:itemRenderer
mx:Component

mx:Button label=Launch click=parentDocument.goDownload();/
/mx:Component
/mx:itemRenderer
/mx:AdvancedDataGridColumn

Don

--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 I know someone has encountered this before. 
 
 Better to rephrase this one I guess.
 
 I have an MXML file, where I have a method.  In that MXML file, I have a 
 datagrid, where one of the columns, I created an external itemrenderer.  The 
 itemrenderer is a button.  When I click that button, I want that button to 
 call 
 the method in the MXML file (so that I could re-use the button on other 
 datagrids).  
 
 Thanks.
 
 
 
 
 From: Angelo Anolin angelo_ano...@...
 To: flexcoders@yahoogroups.com
 Sent: Mon, 16 August, 2010 13:54:33
 Subject: [flexcoders] Method for a Datagrid Button Itemrenderer
 
   
 Hi Flexcoders,
 
 I have a datagrid and an button itemrenderer named btnRenderer.as
 
 I have set this button as an itemRenderer in one of my datagrid columns.
 
 mx:DataGridColumn id=dgColCancel width=100 itemRenderer=btnRenderer /
 
 I need to respond to an click event on button, passing some of the value from 
 the dataProvider attached to the datagrid.
 
 Should I place my codes on the mxml file where my datagrid is declared?  How 
 would the btnRenderer know that the method is called?
 
 Thanks.





[flexcoders] Re: Flexgateway sandbox violation

2010-08-02 Thread fusionpage
Thanks Alex!  Saw your post on the Adobe forums and responded there...
http://forums.adobe.com/message/3019978#3019978 

explicitly loading it via my IP address worked.

Don

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 You might want to try an explicit call to load the policy file at 
 http://www.rodomain.com/crossdomain.xml before an RO calls are made.
 
 
 On 7/31/10 10:13 AM, fusionpage fusionp...@... wrote:
 
 
 
 
 
 
 I have a flex app that is shared by many virtual sites  
 www.domain1.com/myapp, www.domain2.com/myapp, www.domain3.com/myapp, etc.  
 All the domains have virtual directories pointing to/ myapp.myapp.swf 
 calls remoteObject using the same ro endpoint  
 http://www.rodomain.com/flex2gateway/ .  I want all of these virtual sites to 
 share the same myapp but be able to call the same ro endpoint to ColdFusion.
 
 Of course, I'm getting sandbox violation that domainX.com cannot load data 
 from
 http://www.rodomain.com/flex2gateway/ .
 
 How do I allow all of the virtual domains to make the data calls to the same 
 ro endpoint url?
 
 I do have a crossdomain.xml file in the root of the server, but that does not 
 resolve the problem.  I assume I need something in my Flex code to make it 
 work, but the many postings I find on the internet related to crossdomain are 
 outdated.
 
 My environment is Flash 10.1, Flex 4.1, ColdFusion 9, Windows 2003 Server/IIS.
 
 Thanks!
 Don
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Flexgateway sandbox violation

2010-07-31 Thread fusionpage
I have a flex app that is shared by many virtual sites  www.domain1.com/myapp, 
www.domain2.com/myapp, www.domain3.com/myapp, etc.  All the domains have 
virtual directories pointing to/ myapp.myapp.swf calls remoteObject using 
the same ro endpoint  http://www.rodomain.com/flex2gateway/ .  I want all of 
these virtual sites to share the same myapp but be able to call the same ro 
endpoint to ColdFusion.

Of course, I'm getting sandbox violation that domainX.com cannot load data from 
http://www.rodomain.com/flex2gateway/ .

How do I allow all of the virtual domains to make the data calls to the same ro 
endpoint url? 

I do have a crossdomain.xml file in the root of the server, but that does not 
resolve the problem.  I assume I need something in my Flex code to make it 
work, but the many postings I find on the internet related to crossdomain are 
outdated.

My environment is Flash 10.1, Flex 4.1, ColdFusion 9, Windows 2003 Server/IIS.

Thanks!
Don

 



[flexcoders] Spark List item 0 not visible

2010-06-22 Thread fusionpage
Strange.  DataProvider contains an item at zero, but it doesn't appear visible 
in the list.  Selecting the item works fine and the data is there... it is just 
not visible.  Is this a known bug?  It occurs with/without the custom skinClass.


Any ideas?


Don


s:List id=topLeft  creationComplete=topLeft_creationCompleteHandler(event) 
  dataProvider={photosDP}  borderColor=0xff borderAlpha=0.3 
skinClass=TouchListHorizontal  width=100% height=100% 
itemRenderer=ImageRendererPhotosThumb horizontalCenter=0 verticalCenter=0
s:layout
s:HorizontalLayout   horizontalAlign=center 
verticalAlign=middle /
/s:layout
/s:List



[flexcoders] Re: Spark List item 0 not visible

2010-06-22 Thread fusionpage
This question was answered by Adobe on their Flex forum.
You have set an explicit width of mx:Image in your list renderer
http://forums.adobe.com/message/2916563#2916563

Just wanted to close the loop here in case others see the same issue.

Don 




--- In flexcoders@yahoogroups.com, fusionpage fusionp...@... wrote:

 Strange.  DataProvider contains an item at zero, but it doesn't appear 
 visible in the list.  Selecting the item works fine and the data is there... 
 it is just not visible.  Is this a known bug?  It occurs with/without the 
 custom skinClass.
 
 
 Any ideas?
 
 
 Don
 
 
 s:List id=topLeft  
 creationComplete=topLeft_creationCompleteHandler(event)   
 dataProvider={photosDP}  borderColor=0xff borderAlpha=0.3 
 skinClass=TouchListHorizontal  width=100% height=100% 
 itemRenderer=ImageRendererPhotosThumb horizontalCenter=0 
 verticalCenter=0
 s:layout
 s:HorizontalLayout   horizontalAlign=center 
 verticalAlign=middle /
 /s:layout
 /s:List





[flexcoders] Re: mutitouch for HP DX9000 Touchsmart pc?

2010-06-22 Thread fusionpage
My HP Touchsmart 300 works fine with both Gestures and raw touch points with 
Flash 10.1 and Air 2.  It worked out-of-the-box without having to go to the 
control panel Touch tab to enable touch. I suspect your model uses the same 
NextWindow drivers.

Your model might require enabling touch drivers. 

Don


--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote:

 I use windows 7 with HP DX9000 Touchsmart pc.
 
 I have install flash player 10.1 and Air 2.0.
 
 but when I didi followings
 
 trace(Multitouch.supportsGestureEvents);
 trace(Multitouch.supportsTouchEvents);
 trace(Multitouch.supportedGestures);
 trace(Multitouch.maxTouchPoints);
 
 I get the results
 
 false
 false
 null
 0
 
 How I can do now for this case? which touch pc support flash player 10.1?
 
 Thanks
 
 Mark





[flexcoders] Flex 4 image scaling for multiple devices/screens

2010-06-20 Thread fusionpage

I can't seem to get the image to appear when assigning the source at runtime? 
Works fine if the source is hardcoded.  My remoteobject calls loads to a list 
of images. On select of an image, I want to display the selected image and have 
it scale. What is the best way to do this in Flex 4?  

I know how to pass the selected image source, I just can't get it to load in a 
s:bitmapImage?  I tried to dynamically add an @Embed in AS3 and couldn't get it 
to work. I tried wrapping it with an s:Graphic and that didn't help.

mx:Image works fine, but I'm not aware of any scaling features for it. I'm 
hoping bitmapImage will give me better looking graphic/photo at different sizes.

So, let me back up: I have a touch screen application that could run on 
multiple devices/screens and resolutions. I want my image to scale based on the 
device/screen resolution. What is the best way to do this?

Thanks,
Don Kerr





[flexcoders] Re: Doug Mccune's FOAM Physics example on Flex 4/Air 2

2010-05-09 Thread fusionpage
Bill White has a nice example of spark components with Physics
http://www.billdwhite.com/wordpress/?p=256#more-256 

Thanks Bill!
Don

--- In flexcoders@yahoogroups.com, fusionpage fusionp...@... wrote:

 I tried to open the FOAM physics form example (built for Flex 3) in Flex 
 4/Air 2
 http://dougmccune.com/blog/2008/02/26/examples-from-my-360flex-session-using-open-source-community-projects/
 
 And get the compiler errors below. I've posted a comment on Doug's blog but 
 thought I'd also bounce it off this list.  Any ideas?
 
 
 compiler error is on this line in the setGravity function
 _gravityForce = new Gravity( new Vector(xValue, yValue) );
 
 public function setGravity(yValue:Number=0, xValue:Number=0):void {
 
 if(_gravityForce) {
 foam.removeGlobalForceGenerator(_gravityForce);
 }
 else {
 foam.simulate();
 }
 
 _gravityForce = new Gravity( new Vector(xValue, yValue) );
 foam.addGlobalForceGenerator(_gravityForce);
 }
 
 here are the errors:
 
 1067: Implicit coercion of a value of type __AS3__.vec:Vector to an unrelated 
 type org.generalrelativity.foam.math:Vector. PhysicsContainer.as
 
 1137: Incorrect number of arguments. Expected no more than 0. 
 PhysicsContainer.as
 
 I'm using Flash Builder 4 with Flex 4 SDK w/ Air 2 SDK.
 
 Looks like an SDK compatibility issue
 
 Any ideas?
 Thanks,
 Don





[flexcoders] Doug Mccune's FOAM Physics example on Flex 4/Air 2

2010-05-04 Thread fusionpage
I tried to open the FOAM physics form example (built for Flex 3) in Flex 4/Air 2
http://dougmccune.com/blog/2008/02/26/examples-from-my-360flex-session-using-open-source-community-projects/

And get the compiler errors below. I've posted a comment on Doug's blog but 
thought I'd also bounce it off this list.  Any ideas?


compiler error is on this line in the setGravity function
_gravityForce = new Gravity( new Vector(xValue, yValue) );

public function setGravity(yValue:Number=0, xValue:Number=0):void {

if(_gravityForce) {
foam.removeGlobalForceGenerator(_gravityForce);
}
else {
foam.simulate();
}

_gravityForce = new Gravity( new Vector(xValue, yValue) );
foam.addGlobalForceGenerator(_gravityForce);
}

here are the errors:

1067: Implicit coercion of a value of type __AS3__.vec:Vector to an unrelated 
type org.generalrelativity.foam.math:Vector. PhysicsContainer.as

1137: Incorrect number of arguments. Expected no more than 0. 
PhysicsContainer.as

I'm using Flash Builder 4 with Flex 4 SDK w/ Air 2 SDK.

Looks like an SDK compatibility issue

Any ideas?
Thanks,
Don



[flexcoders] Re: Doug Mccune's FOAM Physics example on Flex 4/Air 2

2010-05-04 Thread fusionpage
I downloaded the latest FOAM version
http://code.google.com/p/foam-as3/
and it looks like the same Vector-related errors also occurs in all their 
examples.

Looks like FOAM needs to be updated to support Flex 4/Air 2. Maybe the Vector 
name used in FOAM conflicts with a new Vector class in Flex 4 or something???

Maybe there is a quick fix to solve this one Vector error?

Don




--- In flexcoders@yahoogroups.com, fusionpage fusionp...@... wrote:

 I tried to open the FOAM physics form example (built for Flex 3) in Flex 
 4/Air 2
 http://dougmccune.com/blog/2008/02/26/examples-from-my-360flex-session-using-open-source-community-projects/
 
 And get the compiler errors below. I've posted a comment on Doug's blog but 
 thought I'd also bounce it off this list.  Any ideas?
 
 
 compiler error is on this line in the setGravity function
 _gravityForce = new Gravity( new Vector(xValue, yValue) );
 
 public function setGravity(yValue:Number=0, xValue:Number=0):void {
 
 if(_gravityForce) {
 foam.removeGlobalForceGenerator(_gravityForce);
 }
 else {
 foam.simulate();
 }
 
 _gravityForce = new Gravity( new Vector(xValue, yValue) );
 foam.addGlobalForceGenerator(_gravityForce);
 }
 
 here are the errors:
 
 1067: Implicit coercion of a value of type __AS3__.vec:Vector to an unrelated 
 type org.generalrelativity.foam.math:Vector. PhysicsContainer.as
 
 1137: Incorrect number of arguments. Expected no more than 0. 
 PhysicsContainer.as
 
 I'm using Flash Builder 4 with Flex 4 SDK w/ Air 2 SDK.
 
 Looks like an SDK compatibility issue
 
 Any ideas?
 Thanks,
 Don





[flexcoders] Re: DataGrids with large datasets Tips Tricks?

2010-03-23 Thread fusionpage
Thanks Alex.  This is very helpful and exactly in the direction of what I'm 
seeking to understand.  I appreciate it.

Have any recommended resources to learn more?

Thanks,
Don


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 It doesn't matter if you add columns at run-time or not.  The main factor is 
 how many column you are displaying and how many rows will be displayed.  And 
 note that is different from the total set of columns that could be displayed 
 and total number of data items:
 
 Example:  I have a 1 person database with 100 different statistics on 
 each person.  I set up my DataGrid to have 100 columns representing each 
 statistic, but because it won't fit on the screen I set 
 horizontalScrollPolicy=true.  Still, the DG is likely to be full screen so 
 it can show about 20 columns and 30 rows.
 
 Note that if do not set horizontalScrollPolicy=true, the DG will cram all 
 100 columns on screen.  This makes a significant difference.  Instead of 
 20x30=600 renderers, it is 100x30=3000 renderers.  The DG will take more than 
 5 times longer to set up and render 3000 renderers instead of 600 renderers, 
 memory usage will go way up, and even things like mouse tracking and CPU 
 utilization at idle time will be impacted.
 
 The next important thing to remember is that DG has a very generalized update 
 mechanism.  If it detects a change to any of the 1 person records, it 
 will refresh all of the renderers on the screen.  It does not optimize for 
 whether that renderer is associated with that data item because 
 labelFunctions and custom renderers make it possible for any data item change 
 to affect every renderer.  This is very inefficient, but we have to be this 
 conservative otherwise your renderers could miss updates.
 
 This is important in how you setup and maintain your dataProvider.  A common 
 mistake I see is to take some XML, make a new ArrayCollection, and loop 
 through the XML creating Person records and using push/addItem to add it to 
 the ArrayCollection.  Every time you do that, the AC generates a change 
 event, and if the DG is already bound, it is going to try to refresh all of 
 its renderers.
 
 So, aggregate changes.  If you are converting XML, make an array, convert 
 items and push them on the array and then set the whole array into the 
 ArrayCollection's source.
 
 HTH,
 
 
 On 3/22/10 4:28 PM, fusionpage fusionp...@... wrote:
 
 
 
 
 
 
 
 Does anyone have any tips or tricks, in general, about optimizing the Flex 
 client for best performance in populating/rendering large datasets in an 
 AdvancedDataGrid?
 
 I'm specifically NOT asking about improving the server-side.  I'm trying to 
 understand what the factors are on the Flex client-side that impact how fast 
 data loads/renders into an ADG, when the columns use in-line itemrenderers 
 and/or the columns are added at run-time.
 
 Are there any significant difference in performance when comparing different 
 design patterns or ways of generating the datagrid? e.g. does it matter if it 
 generated via pure AS3, or if you use MXML? Is performance the same no matter 
 which design pattern one uses?
 
 Assume the data is loading via a RemoteObject call.  In my case via a 
 ColdFusion CFC.
 
 Any tips, tricks, or links so I can learn more?
 
 So, far, in my experience, most of the performance issues come from the 
 server-side, but I may be ignorant on the impact of the design on the Flex 
 side.
 
 Thanks,
 Don
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] DataGrids with large datasets Tips Tricks?

2010-03-22 Thread fusionpage

Does anyone have any tips or tricks, in general, about optimizing the Flex 
client for best performance in populating/rendering large datasets in an 
AdvancedDataGrid?

I'm specifically NOT asking about improving the server-side.  I'm trying to 
understand what the factors are on the Flex client-side that impact how fast 
data loads/renders into an ADG, when the columns use in-line itemrenderers 
and/or the columns are added at run-time.

Are there any significant difference in performance when comparing different 
design patterns or ways of generating the datagrid? e.g. does it matter if it 
generated via pure AS3, or if you use MXML? Is performance the same no matter 
which design pattern one uses?

Assume the data is loading via a RemoteObject call.  In my case via a 
ColdFusion CFC.

Any tips, tricks, or links so I can learn more?

So, far, in my experience, most of the performance issues come from the 
server-side, but I may be ignorant on the impact of the design on the Flex side.

Thanks,
Don