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

2011-10-05 Thread bhaq1972
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] data visualization with time line

2011-10-05 Thread steveroger_flex
Hello Guys...

From last 2 months, I am working on a flex data visualization with time line. 
I am trying to make data presentation for my application some what like this 
http://www.humblesoftware.com/finance/index#finance

I have spent so many hours but don't get what I wanna.
Main points are.
Having ArrayCollection with data (-mm-dd, y-value)
using plot chart with month-year on x-axis
we can change year-month range from hslider and data reflect on plot chart.

I failed in hslider  chart value synchronization.

Any idea?

Thank you,

Steve Roger.



Re: RV: [flexcoders] combobox problem

2011-10-05 Thread Alex Harui
Reduce the test case down to about 20 lines and post it and tell us where you 
set a breakpoint.  Remember that the dataProvider will be null until the 
CallResponder returns with data.


On 10/4/11 8:22 PM, Rodolfo Bibolotti Ramírez rockdolf...@yahoo.com wrote:







Hi,

I don’t know what id is because the dataProvider not has data and the program 
not enter to the loop.

I’d like to know why the dataProvider is empty when in the browser the combo 
has data.

Thanks.

Rodolfo.



De: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] En nombre de 
Angelo Anolin
Enviado el: lunes, 03 de octubre de 2011 7:30 a.m.
Para: flexcoders@yahoogroups.com
Asunto: Re: [flexcoders] combobox problem



In your function: public function BuscarParametroId(parametroId:int = 0):void



How do you know that the keyword this refers to the combobox?



Could you try exchanging the word this to an ID of the combo box and see what 
happens?









From: Rodolfo Bibolotti Ramírez rockdolf...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Saturday, October 1, 2011 12:13:53 PM
Subject: [flexcoders] combobox problem





Hi,



I’m just learning Flash Builder and I have a problem with the combobox.



I have a datagrid and every time I change a cell it load a form with the 
details.



It Works fine.



Now, in the form I have defined a combobox that it’s loaded with data using the 
flex data wizard. It is loaded OK. The labels are OK.  The data contains the 
label and the code of the label.



My problema is that I want to pass to the combo the code of any element and 
that the combo should locate that value and show the respective label.  I 
implemented a function that should look up on the dataProvider but when I debug 
the program the dataProvider is empty.



This is the event that calls the forma and call the combo’s function:



   protected function 
grdDatos_selectionChangeHandler(event:GridSelectionEvent):void

 {

   currentState = sttMantenimiento;



   
libro_contable1.BuscarParametroId(tipoVoucher.libro_contable.id );



 }



In the form:





   s:FormItem label=Origen

   partes:cbbParametros dominio=32 id=libro_contable1 /

   /s:FormItem







This is the combo definition:





?xml version=1.0 encoding=utf-8?

s:ComboBox xmlns:fx=http://ns.adobe.com/mxml/2009;

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

 xmlns:parametrosservice=services.parametrosservice.*

 creationComplete=comboBox_creationCompleteHandler(event)

 labelField=descripcion xmlns:valueObjects=valueObjects.*



 fx:Script

   ![CDATA[

 import mx.collections.ArrayCollection;

 import mx.events.FlexEvent;



 [Bindable]

 public var dominio:int;



 protected function 
comboBox_creationCompleteHandler(event:FlexEvent):void

 {

   getParametrosResult.token = 
parametrosService.getParametros(dominio);

 }



 // 
http://www.forta.com/blog/index.cfm/2006/11/22/Flex-ComboBox-With-selectedValue-Support



 public function BuscarParametroId(parametroId:int = 0):void

 {

   for (var i:int=0; i  this.dataProvider.length - 1; i++)

   {

if ( this.dataProvider[i].id == parametroId )

{

  this.selectedIndex = i;

  // this.dispatchEvent( new ListEvent( 
ListEvent.CHANGE ) ) // since we are changing it we need to dispatch it

  break;

}



   }



 }



   ]]

 /fx:Script



 fx:Declarations

   s:CallResponder id=getParametrosResult/

   parametrosservice:ParametrosService id=parametrosService 
showBusyCursor=true/

   valueObjects:Parametro id=parametroVO/

 /fx:Declarations



 s:AsyncListView list={getParametrosResult.lastResult}/



/s:ComboBox







FlashBuilder for PHP, versión 4.5



The load of the data in the combo was defined with the wizard.



The VO:



class Parametro

{

   public $id;

   public $dominio;

   public $parametro;

   public $descripcion;

   public $abreviacion;

   public $mascara_valor;

   public $orden;

   public $estado;

   public $valor_equivalente;

   public $valor_numerico;

   public $usuario_creacion;

   public $fecha_creacion;

   public $usuario_modificacion;

   public $fecha_modificacion;





The label is “descripción”.  I’m passing the id to the combo to locate it in 
the respective label.





Thanks.





Rodolfo.









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


[flexcoders] Re: background image with Flex?

2011-10-05 Thread BIOSMonkey
There is no direct way to do this, at least in the 3.x SDK (we are still 
standardized on flex 3).

However for a workaround try this:
http://alekkus.com/blog/2009/02/flex-tutorial-setting-tile-image-as-background/

I use a modified version of this component for banners to create a repeating 
background with a movable right image that slides on top as the window is 
resized.


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

 
 Basically a website background image is made to repeat itself seamlessly 
 either horizontally or vertically or both.
 
 May I use a small image as background and let it repeat like web page?
 how to do that?
 
 Thanks
 
 Mark





[flexcoders] Using the restrict property for a textfield - \u is not working?

2011-10-05 Thread BIOSMonkey
I am trying to set a numeric code range (versus entering string characters) for 
the restrict property of a text field.  The documentation states that this can 
be achieved via the unicode escape sequence, such as \u0030-\u0039.  But I 
cannot get this to work.  

Even trying single character such as

mx:TextInput id=tt width=100% restrict=\u0030/

is failing. As I understand it, this should only allow the number 0 to be 
entered, but it does not work.  Instead, I am able to enter 0, 3, and u, so the 
\u seems to be ignored.

Am I missing something simple?



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

2011-10-05 Thread valdhor
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] vimeo feed into flex

2011-10-05 Thread Gustavo Duenas
Hi mates and colleagues!!
Does everyone knows a step by step tutorial about how can I read a  
video feed from vimeo into my flex project?

Any help is appreciated.

Gus


[flexcoders] Flash builder mobile Flash Remoting

2011-10-05 Thread Dan Pride
I am developing a FB 4.51 mobile app and am interested in using Flash Remoting 
from the Coldfusion server rather than web services. Does anyone have real 
world experience using Flash Builder on mobile via Remoting? How is it? Do most 
phones that run air handle it well?
Thanks


[flexcoders] help making a feed using vimeo api xml output

2011-10-05 Thread Gustavo Duenas

Hi I have this code, I have only the relevant part


?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute width=1100 height=768  
creationComplete={feedLoader2.send()}
  backgroundImage=iglesiaBack.jpg  backgroundGradientAlphas=[1.0,  
1.0] backgroundGradientColors=[#08, #2C1DF0]


mx:Script
![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;

private function onRes2(event:ResultEvent):void{
_vimeo= new XMLList(event.result.status);
}



}
private function onFault(event:FaultEvent):void{
Alert.show(Unable to load feed from church, 
error);
}

[Bindable] private var _vimeo:XMLList;
]]
/mx:Script

	mx:HTTPService id=feedLoader2 url=http://vimeo.com/api/v2/iglesiafls/videos.xml 
 resultFormat=e4x result=onRes2(event) fault=onFault(event)/



	mx:VBox width=344 height=334 backgroundColor=#060606  
verticalCenter=206 left=692 backgroundAlpha=0.0

mx:Repeater id=repeat2 dataProvider={_vimeo}
		mx:Text text={repeat2.currentItem.video.title} color=#F5FBFC  
fontSize=14/
		mx:Text text={repeat2.currentItem.video.description}  
color=#F5FAFB/

/mx:Repeater
/mx:VBox

/mx:WindowedApplication


Looks good but I don't get why I read nothing eventhough the xml is  
there, some help really appreciated.


Gus