[flexcoders] Re: RTE when setting spark gridcolumn visible property (f

2011-10-10 Thread bhaq1972
Yes agreed. In our newer applications we do that.

Just curious, if a column is defined as visible=false in mxml. That wouldn't be 
a memory consumption would it? 




--- In flexcoders@yahoogroups.com, valdhor valdhorlists@... wrote:

 If that is the use case I would have built that data grid and columns on the 
 fly in ActionScript. Why bother having columns in memory that you don't use?
 
 --- In flexcoders@yahoogroups.com, bhaq1972 mbhaque@ wrote:
 
  The problem doesn't exist if the code is executed in the preintialize or 
  creationComplete event. However, I didn't want to mention that because it 
  takes the focus away from what looks like a bug in initialize. Why would 
  one column give a runtime error and the other not?
  Halo datagrid doesnt have this problem.
  
  In our scenario, some columns have no relevance to certain customers. 
  Instead of removing the column from the mxml, we store the column info (in 
  this case make invisible) in the database.
  During the datagrid initialze we make it invisible. The creationcomplete 
  event would be too late because by then the column would have rendered (for 
  a split second).
  
  Preinitialize would be ok...but other parts of my code (unrelated to this 
  problem) are failing because preinitialize is too early. i can't bare any 
  more code rewrites(but i suppose it keeps me in a job).
  
  
  
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   The column probably hasn't been created yet. Try the creationcomplete 
   event of the datagrid.
   
   --- In flexcoders@yahoogroups.com, bhaq1972 mbhaque@ wrote:
   
I get a runtime error when I set the gridcolumn.visible property during 
a datagrid initialize event. There is no problem's
if its the first gridcolumn. Looks like a bug?

Can anyone suggest a workaround? 


s:DataGrid initialize=makeColumnInvisible()
  s:columns
s:ArrayList
s:GridColumn id=gc0 dataField=col0 headerText=col0/
s:GridColumn id=gc1 dataField=col1 headerText=col0/

..
public function makeColumnInvisible():void
{
   gc1.visible = false;  // causes a RTE
   gc0.visible = false;  // doesnt give a problem
..   


RangeError: Error #1125: The index 1 is out of range 0.
at 
spark.components.gridClasses::GridDimensions/setTypicalCellWidth()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1325]
at 
spark.components.gridClasses::GridDimensions/columns_visibleChangedHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1840]
at 
spark.components.gridClasses::GridDimensions/columnsCollectionChanged()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1800]
at 
spark.components::Grid/columns_collectionChangeHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Grid.as:4429]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at spark.components.gridClasses::GridColumn/set 
visible()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridColumn.as:1564]
...
   
  
 





[flexcoders] binding controls with Xml in flex

2011-10-10 Thread Asad Zaidi
hello every body,
i need to bind Xml with my flex controls. by binding i mean that data should 
flow in both directions, from xml to control and also control to xml. for e.g 
there is textinput binded with xml tag. i want value of xml should be displayed 
in text input but if user changes the value and submitt form then value in xml 
should get update automatically. But i am unable to get 2nd scenario. kindly 
help me its very urgent. 

thnks in advance.

Zaidi.


[flexcoders] reading pdf book into air app

2011-10-10 Thread Gustavo Duenas
can I read a pdf book into an air app or do I have to call it to be  
read by the adobe reader?
Also can I read the pdf into air using an mx: HTML component from a  
title window?

Thanks for your help.

gustavo



[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-10 Thread valdhor
Sorry, I am out of my depth here. I don't use ColdFusion.

All I can suggest is creating a debug file on the server and dump to the file 
to see if you are getting the desired response. After that, use Charles to see 
if the server is sending the correct response.

--- In flexcoders@yahoogroups.com, ZIONIST stinasius@... wrote:

 Hi guys, i have changed from using a cfc to using cfm. And when i do a 
 cfdump, i get the feed showing up. When i try to point flex to the cfm, and 
 run the app i get no data. Below is the code. Could someone please help.
 
 flex code
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   layout=absolute
   creationComplete=init()
   
   mx:Script
   ![CDATA[
   import mx.collections.ArrayCollection;
   import mx.rpc.events.ResultEvent;
 
   [Bindable]
   private var _rssResults:ArrayCollection;
 
   private namespace atom=http://www.w3.org/2005/Atom;;
   use namespace atom;
 
   private function processResult(event:ResultEvent):void
   {
   var xmlList:XMLList=event.result.channel.item 
 as XMLList;
   for each (var item:XML in xmlList)
   {
   var myDate:String=item.PUBLISHEDDATE;
   myDate=myDate.slice(0, 22);
   _rssResults.addItem({title: item.TITLE, 
 date: myDate});
   }
   }
 
   private function init():void
   {
   _rssResults=new ArrayCollection();
   tweetFeed.send();
   }
   ]]
   /mx:Script
 
   mx:HTTPService id=tweetFeed
   url=cfcs/twitter.cfm
   result=processResult(event)
   resultFormat=e4x/
 
   mx:List id=twitterFeed dataProvider={_rssResults}
itemRenderer=itemRenderers.tweetFeedRenderer/
 
 /mx:Application
 
 Coldfusion Code
 ===
 cfset feedurl = 
 http://search.twitter.com/search.atom?q=from%3ARealtrOnline; /
 cffeed source=#feedurl# properties=feedmeta query=feeditems /
 cfdump var= #feeditems# label= feedItems /





Re: [flexcoders] reading pdf book into air app

2011-10-10 Thread Csomák Gábor
look at theese:
adobe solution:
http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html
3rd party: http://www.devaldi.com/?p=212
or check out this to convert pdf to swf: speifically pdf2swf-
http://www.swftools.org/pdf2swf.html


On Mon, Oct 10, 2011 at 4:31 PM, Gustavo Duenas 
gdue...@leftandrightsolutions.com wrote:



 can I read a pdf book into an air app or do I have to call it to be
 read by the adobe reader?
 Also can I read the pdf into air using an mx: HTML component from a
 title window?

 Thanks for your help.

 gustavo

  



Re: [flexcoders] reading pdf book into air app

2011-10-10 Thread Csomák Gábor
oh, i see you have half of the maillist.. please use google, or duckduckgo
to search the web for solutions..

2011/10/10 Csomák Gábor csom...@gmail.com

 look at theese:
 adobe solution:
 http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html
 3rd party: http://www.devaldi.com/?p=212
 or check out this to convert pdf to swf: speifically pdf2swf-
 http://www.swftools.org/pdf2swf.html


 On Mon, Oct 10, 2011 at 4:31 PM, Gustavo Duenas 
 gdue...@leftandrightsolutions.com wrote:



 can I read a pdf book into an air app or do I have to call it to be
 read by the adobe reader?
 Also can I read the pdf into air using an mx: HTML component from a
 title window?

 Thanks for your help.

 gustavo

  





Re: [flexcoders] Re: RTE when setting spark gridcolumn visible property (f

2011-10-10 Thread Alex Harui
Even columns with visible=false get instantiated when declared in MXML.


On 10/10/11 3:36 AM, bhaq1972 mbha...@hotmail.com wrote:






Yes agreed. In our newer applications we do that.

Just curious, if a column is defined as visible=false in mxml. That wouldn't be 
a memory consumption would it?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
valdhor valdhorlists@... wrote:

 If that is the use case I would have built that data grid and columns on the 
 fly in ActionScript. Why bother having columns in memory that you don't use?

 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
 bhaq1972 mbhaque@ wrote:
 
  The problem doesn't exist if the code is executed in the preintialize or 
  creationComplete event. However, I didn't want to mention that because it 
  takes the focus away from what looks like a bug in initialize. Why would 
  one column give a runtime error and the other not?
  Halo datagrid doesnt have this problem.
 
  In our scenario, some columns have no relevance to certain customers. 
  Instead of removing the column from the mxml, we store the column info (in 
  this case make invisible) in the database.
  During the datagrid initialze we make it invisible. The creationcomplete 
  event would be too late because by then the column would have rendered (for 
  a split second).
 
  Preinitialize would be ok...but other parts of my code (unrelated to this 
  problem) are failing because preinitialize is too early. i can't bare any 
  more code rewrites(but i suppose it keeps me in a job).
 
 
 
 
  --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
  valdhor valdhorlists@ wrote:
  
   The column probably hasn't been created yet. Try the creationcomplete 
   event of the datagrid.
  
   --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
   bhaq1972 mbhaque@ wrote:
   
I get a runtime error when I set the gridcolumn.visible property during 
a datagrid initialize event. There is no problem's
if its the first gridcolumn. Looks like a bug?
   
Can anyone suggest a workaround?
   
   
s:DataGrid initialize=makeColumnInvisible()
  s:columns
s:ArrayList
s:GridColumn id=gc0 dataField=col0 headerText=col0/
s:GridColumn id=gc1 dataField=col1 headerText=col0/
   
..
public function makeColumnInvisible():void
{
   gc1.visible = false;  // causes a RTE
   gc0.visible = false;  // doesnt give a problem
..
   
   
RangeError: Error #1125: The index 1 is out of range 0.
at 
spark.components.gridClasses::GridDimensions/setTypicalCellWidth()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1325]
at 
spark.components.gridClasses::GridDimensions/columns_visibleChangedHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1840]
at 
spark.components.gridClasses::GridDimensions/columnsCollectionChanged()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1800]
at 
spark.components::Grid/columns_collectionChangeHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Grid.as:4429]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at spark.components.gridClasses::GridColumn/set 
visible()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridColumn.as:1564]
...
   
  
 







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


[flexcoders] Re: help with a repeater

2011-10-10 Thread valdhor
As I said, it is easier to package up the items into a component and
repeat that. To that end, here is an example (Unfortunately, it appears
that vimeo is set up not to allow embedding. It does work with other web
sites however):

Application:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical xmlns:Vimeo=Vimeo.*
creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;
 import mx.collections.XMLListCollection;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.ResultEvent;

 private var vimeoListArrayColl:ArrayCollection;

 private function onCreationComplete():void
 {
 vimeoService.send();
 }

 private function onResult(event:ResultEvent):void
 {
 vimeoListArrayColl = event.result.videos.video as
ArrayCollection;
 vimeoRepeater.dataProvider = vimeoListArrayColl;
 }

 private function onFault(event:FaultEvent):void
 {

 }
 ]]
 /mx:Script
 mx:Repeater id=vimeoRepeater
 Vimeo:VimeoList vimeoItem={vimeoRepeater.currentItem}/
 /mx:Repeater
 mx:HTTPService id=vimeoService
url=http://vimeo.com/api/v2/iglesiafls/videos.xml;
resultFormat=object result=onResult(event) fault=onFault(event)/
/mx:Application

VimeoList.mxml:
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 mx:Script
 ![CDATA[
 import mx.managers.PopUpManager;

 [Bindable] public var vimeoItem:Object;

 private function openWindowVimeo(event:MouseEvent):void
 {
 var myVimeoWindow:VimeoWindow =
PopUpManager.createPopUp(this, VimeoWindow, true) as VimeoWindow;
 myVimeoWindow.windowTitle = vimeoItem.title;
 myVimeoWindow.iFrameSource = vimeoItem.url;
 PopUpManager.centerPopUp(myVimeoWindow);
 }
 ]]
 /mx:Script
 mx:Image source={vimeoItem.thumbnail_medium} width=200
height=150/
 mx:Text id=titleText text={vimeoItem.title} color=#F5FBFC
fontSize=14 width=300/
 mx:Text text={vimeoItem.description} color=#F5FAFB
width=300/
 mx:Text text={vimeoItem.url}/
 mx:Button name={vimeoItem.title} label=ver video
click=openWindowVimeo(event) enabled=true/
/mx:VBox

VimeoWindow.mxml:
?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical width=800 height=600
 xmlns:flexiframe=http://code.google.com/p/flex-iframe/;
 title={windowTitle}
 showCloseButton=true
 close=titleWindow_close(event);
 mx:Script
 ![CDATA[
 import mx.events.CloseEvent;
 import mx.managers.PopUpManager;

 [Bindable] public var windowTitle:String;
 [Bindable] public var iFrameSource:String;

 private function titleWindow_close(evt:CloseEvent):void
 {
 PopUpManager.removePopUp(this);
 }
 ]]
 /mx:Script
 flexiframe:IFrame id=iFrameBySource width=100% height=100%
source={iFrameSource}/
/mx:TitleWindow

You will need flex-iframe from
https://github.com/flex-users/flex-iframe/ to embed the HTML.

Note that this is a quick and dirty example with no error checking etc.
You should use this to further your understanding rather than as a basis
for production code.

--- In flexcoders@yahoogroups.com, Gustavo Duenas gduenas@... wrote:

 This repeater is making me crazy, someone can help me out.

 Hi I have a repeater that has a button and the button open a title
 window component from flex
 So far I use the name property of the button to pass the title from
 the repeater to the title of the titlewindow

 here it is:
 Vimeo is the name of the repeater
 mx:button name={vimeo.currentItem.title}

 on the as3:
 myWindow.title=event.currentTarget.name;

 so far I can open it with the names from the list.

 Also I have an html inside of the title window and I want to set its
 location from the parameters of the repeater
 so here is when it start to be hard to imagine a way to retrieve that
 information from the repeater and pass it to
 the location.

 here is my code.
 import mx.managers.PopUpManager;
  import mx.containers.*;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import flsWindow;

private function
 openWindowVimeo(event:MouseEvent):void{
  var
 myVimeoWindow:TitleWindow= TitleWindow(PopUpManager.createPopUp(this,
 flsWindow, true));
  myVimeoWindow.width=800;
 

[flexcoders] Re: Parsing Soap Response

2011-10-10 Thread valdhor
Have you seen the training video at 
http://tv.adobe.com/watch/adc-presents/build-a-flex-application-that-connects-to-a-soap-web-service/

--- In flexcoders@yahoogroups.com, David Nester dnestertx@... wrote:

 Greetings!
  
 I have a SOAP response from a webservice that i am trying to parse to a 
 datagrid.  The information that comes back to the result handler is in the 
 format of:
  
 SOAPENV:ENVELOPE
 -- soapenv:body
 ns2:serviceResponse
 --ns2:return
 ns1:data
  
  
 I'm trying to figure out how to grab everything in ns1 and populate that 
 information to a grid.  I'm very new to flex - anyone out there who can help?
  
 Thanks so much!





[flexcoders] Re: sandbox problem someone help me

2011-10-10 Thread valdhor
These security errors are generally at the other end. ie. ustream (Or whatever 
domain you are trying to call) has to have a crossdomain.xml file that allows 
you to call it. There is nothing you can do at your end to override this. They 
have to let you access their stuff (Or provide an API to you)

--- In flexcoders@yahoogroups.com, Gustavo Duenas gusduenas@... wrote:

 Hi is there a way to load a remote swf that calls a live feed from ustream? I 
 have this viewer and I cannot load it inot air, because it keeps telling me 
 of the sandbox violation 
 even though I did the 
 Security.allowDomain(http://leftandrightsolutions.com;); in the mx:Script 
 part.
 Someone could point me out to a good tutorial or give a hand?
 
 gus





[flexcoders] Re: DataGrid column width to be calculated by headerText

2011-10-10 Thread valdhor
Nope, no quick fix.

You would need to loop over all the data and find the longest strings. You 
would then need to calculate the widths based on FontMetrics for the font you 
are using.

I have seen an example in the past so Google should be your friend.

--- In flexcoders@yahoogroups.com, kg_andrew21 grizzly33@... wrote:

 Hey guys,
 
 this is my first post, I tried searching for the issue but came up with no 
 matches, so I hope it won't be a duplicate.
 
 So what I want to do is this: have a DataGrid that has all its column's width 
 set to the greatest of these 2 values: its typicalItem's width (which without 
 specified is the dataProvider's first item) or the headerText's width so that 
 the headerText will not get cut off.
 Currently the problem is that if the typicalitem's width is smaller than the 
 headerText than the headerText is cut off, but I don't want that, I want 
 headerText to be fully displayed in all of my columns.
 
 What I can do is set the minWidth on each of the columns manually so that the 
 headerText will surely not get cut off. This works perfectly but its a lot of 
 pain to do that by hand. So my question is is there a method or quick fix to 
 prevent headerText to be cut off? One solution that I think could work is to 
 determine the width that's required by the headerText and set minWidth to 
 that for that column. 
 
 thanks,
 Andrew





[flexcoders] Re: custome list scroller issue

2011-10-10 Thread valdhor
Copy the built-in scroller code to your custom component and modify that.

--- In flexcoders@yahoogroups.com, j2me_soul j2me_soul@... wrote:

 I create a custom Scroller Skin all code designed by flash catalyst.
 My computer has two monitor when I drag the application to the other monitor 
 then switch to full screen,
 the list controller is still display as that monitor resolution.
 If I use the default list scroller the trouble is gone, the list adjust his 
 content to the monistor.
 How can I make the custome scroller skin has the same ability as the default 
 scroller.





[flexcoders] Re: binding controls with Xml in flex

2011-10-10 Thread valdhor
Google two way binding.

--- In flexcoders@yahoogroups.com, Asad Zaidi asadzaidi23@... wrote:

 hello every body,
 i need to bind Xml with my flex controls. by binding i mean that data should 
 flow in both directions, from xml to control and also control to xml. for e.g 
 there is textinput binded with xml tag. i want value of xml should be 
 displayed in text input but if user changes the value and submitt form then 
 value in xml should get update automatically. But i am unable to get 2nd 
 scenario. kindly help me its very urgent. 
 
 thnks in advance.
 
 Zaidi.





[flexcoders] Basic Web Service Question

2011-10-10 Thread David Nester
Greetings!
 
I have a project which utilizes web services for accessing data and all of the 
webservice declarations are located within the Declarations tags.  I believe 
the webservices are preloaded before the user begins interacting with the 
application, but this poses the question  Is there any way of allowing (for 
example a text input box) to be used so the user may define the target hostname 
and port combination before the services are initialized?
 
Thanks in advance!



[flexcoders] Re: DataGrid column width to be calculated by headerText

2011-10-10 Thread kg_andrew21

thanks for the answer!

--- In flexcoders@yahoogroups.com, valdhor valdhorlists@... wrote:

 Nope, no quick fix.
 
 You would need to loop over all the data and find the longest strings. You 
 would then need to calculate the widths based on FontMetrics for the font you 
 are using.
 
 I have seen an example in the past so Google should be your friend.
 
 --- In flexcoders@yahoogroups.com, kg_andrew21 grizzly33@ wrote:
 
  Hey guys,
  
  this is my first post, I tried searching for the issue but came up with no 
  matches, so I hope it won't be a duplicate.
  
  So what I want to do is this: have a DataGrid that has all its column's 
  width set to the greatest of these 2 values: its typicalItem's width (which 
  without specified is the dataProvider's first item) or the headerText's 
  width so that the headerText will not get cut off.
  Currently the problem is that if the typicalitem's width is smaller than 
  the headerText than the headerText is cut off, but I don't want that, I 
  want headerText to be fully displayed in all of my columns.
  
  What I can do is set the minWidth on each of the columns manually so that 
  the headerText will surely not get cut off. This works perfectly but its a 
  lot of pain to do that by hand. So my question is is there a method or 
  quick fix to prevent headerText to be cut off? One solution that I think 
  could work is to determine the width that's required by the headerText and 
  set minWidth to that for that column. 
  
  thanks,
  Andrew
 





[flexcoders] Electrolux

2011-10-10 Thread Dan Pride
Has anyone up here worked, or tried to work with electrolux before?