[flexcoders] loading attributes in a flex custom tag

2008-07-07 Thread Fernando Wermus
Hi all!
 I have a custom component made by myself. I have to asign the values
from the tag's attributes to some object when they are being created in the
constructor custom component time. The problem is that Flex doesn't load the
attributes when it calls the the constructor and therefore I cant
constructor the component. I hope you understand.

Thanks!

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: [flexcoders] loading attributes in a flex custom tag

2008-07-07 Thread Fernando Wermus
What about the order? Flex loads randomly the attributes. I have one called
autoplay that if it is set in true play a song, but first I need Flex sets
the url attribute. How can I manage this?

Thnks

On Mon, Jul 7, 2008 at 10:50 AM, Tracy Spratt [EMAIL PROTECTED] wrote:

Don't set them in the constructor, implement them as public
 properties.  If variables, make the [Bindable], or use getter/setter methods
 for full control.



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Fernando Wermus
 *Sent:* Monday, July 07, 2008 1:30 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] loading attributes in a flex custom tag



 Hi all!

  I have a custom component made by myself. I have to asign the values
 from the tag's attributes to some object when they are being created in the
 constructor custom component time. The problem is that Flex doesn't load the
 attributes when it calls the the constructor and therefore I cant
 constructor the component. I hope you understand.



 Thanks!

 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus
 http://mientretiempo.blogspot.com/

 




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: [flexcoders] loading attributes in a flex custom tag

2008-07-07 Thread Fernando Wermus
I make it work overrading this function, but I don' t know why this is the
convenient way.


updateDisplayList

*override* *protected* *function* updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):*void*{

*if*(*this*._autoPlay  *this*.source!=*null*){

*this*.play();

}

}
If autoplay is true and source has the info, then play the music.





On Mon, Jul 7, 2008 at 12:54 PM, Tracy Spratt [EMAIL PROTECTED] wrote:

That would be a good candidate for a setter funcion.

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Fernando Wermus
 *Sent:* Monday, July 07, 2008 3:26 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] loading attributes in a flex custom tag



 What about the order? Flex loads randomly the attributes. I have one called
 autoplay that if it is set in true play a song, but first I need Flex sets
 the url attribute. How can I manage this?



 Thnks

 On Mon, Jul 7, 2008 at 10:50 AM, Tracy Spratt [EMAIL PROTECTED]
 wrote:

 Don't set them in the constructor, implement them as public properties.  If
 variables, make the [Bindable], or use getter/setter methods for full
 control.



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Fernando Wermus
 *Sent:* Monday, July 07, 2008 1:30 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] loading attributes in a flex custom tag



 Hi all!

  I have a custom component made by myself. I have to asign the values
 from the tag's attributes to some object when they are being created in the
 constructor custom component time. The problem is that Flex doesn't load the
 attributes when it calls the the constructor and therefore I cant
 constructor the component. I hope you understand.



 Thanks!

 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus
 http://mientretiempo.blogspot.com/




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus
 http://mientretiempo.blogspot.com/

 




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] Drag and drop. From an image to a box

2008-07-21 Thread Fernando Wermus
I have a strange behavior for me as a newbie. I have an image which I drop
to a box. The image is accepted if only if the box is white. I cannot figure
it out the reason of this behavior.

The code,


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; height=641
mx:Model id=modelo
jugadores
jugador
nombreFernando/nombre
posicion16/posicion
potencia100%/potencia
fotoimagenes/foto.jpg/foto
/jugador
jugador
nombreAgustin/nombre
posicion10/posicion
potencia90%/potencia
fotoimagenes/foto.jpg/foto
/jugador
jugador
nombreEzequiel/nombre
posicion1/posicion
potencia10%/potencia
fotoimagenes/foto.jpg/foto
/jugador
/jugadores
/mx:Model
mx:Script
![CDATA[
import mx.events.DragEvent;
import mx.containers.Box;
import mx.managers.DragManager;
import mx.core.DragSource;

public function mouseMove(event:MouseEvent):void{
// Get the drag initiator component from the event object.
var dragInitiator:Image = event.currentTarget as Image;

// Create a DragSource object.
var dragSource:DragSource = new DragSource();

var dragProxy:Image = new Image();
dragProxy.source = event.currentTarget.source;
dragProxy.width=dragInitiator.width;
dragProxy.height=dragInitiator.height;

// Call the DragManager doDrag() method to start the drag.
DragManager.doDrag(dragInitiator, dragSource, event,
dragProxy);
}
// Called if the user drags a drag proxy onto the drop target.
private function dragEnterHandler(event:DragEvent):void
{
trace(entre);

var dropTarget:Box=event.currentTarget as Box;
DragManager.acceptDragDrop(dropTarget);
trace(acepto:  + event.currentTarget);

}

]]
/mx:Script
mx:Box
mx:Panel width=542 height=404 layout=absolute
mx:Image id=sdf x=0 y=0 width=407 height=364
source=imagenes/partido.jpg /
mx:Image id=asd source=imagenes/foto.jpg width=24
height=28 x=290 y=104 mouseMove=mouseMove(event); /
mx:Box backgroundColor=#FF x=10 y=10 width=226
height=344 id=canchaDelantera dragEnter=dragEnterHandler(event); /

/mx:Panel
/mx:Box
!--mx:VBox
mx:Image source=imagenes/foto.JPG/
mx:Label text=nombre/
mx:Label text=posicion /
mx:Label text=potencia /
/mx:VBox--
!-- perfil --


/mx:Application

Thanks in advance.

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] Re: Drag and drop. From an image to a box

2008-07-21 Thread Fernando Wermus
I solved it doing this,

backgroundColor=#FF backgroundAlpha=0

in the box.

It is not nice! But works. Why is this behavior?

On Mon, Jul 21, 2008 at 7:43 AM, Fernando Wermus [EMAIL PROTECTED]
wrote:

 I have a strange behavior for me as a newbie. I have an image which I drop
 to a box. The image is accepted if only if the box is white. I cannot figure
 it out the reason of this behavior.

 The code,


 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; height=641
 mx:Model id=modelo
 jugadores
 jugador
 nombreFernando/nombre
 posicion16/posicion
 potencia100%/potencia
 fotoimagenes/foto.jpg/foto
 /jugador
 jugador
 nombreAgustin/nombre
 posicion10/posicion
 potencia90%/potencia
 fotoimagenes/foto.jpg/foto
 /jugador
 jugador
 nombreEzequiel/nombre
 posicion1/posicion
 potencia10%/potencia
 fotoimagenes/foto.jpg/foto
 /jugador
 /jugadores
 /mx:Model
 mx:Script
 ![CDATA[
 import mx.events.DragEvent;
 import mx.containers.Box;
 import mx.managers.DragManager;
 import mx.core.DragSource;

 public function mouseMove(event:MouseEvent):void{
 // Get the drag initiator component from the event object.
 var dragInitiator:Image = event.currentTarget as Image;

 // Create a DragSource object.
 var dragSource:DragSource = new DragSource();

 var dragProxy:Image = new Image();
 dragProxy.source = event.currentTarget.source;
 dragProxy.width=dragInitiator.width;
 dragProxy.height=dragInitiator.height;

 // Call the DragManager doDrag() method to start the drag.
 DragManager.doDrag(dragInitiator, dragSource, event,
 dragProxy);
 }
 // Called if the user drags a drag proxy onto the drop target.
 private function dragEnterHandler(event:DragEvent):void
 {
 trace(entre);

 var dropTarget:Box=event.currentTarget as Box;
 DragManager.acceptDragDrop(dropTarget);
 trace(acepto:  + event.currentTarget);

 }

 ]]
 /mx:Script
 mx:Box
 mx:Panel width=542 height=404 layout=absolute
 mx:Image id=sdf x=0 y=0 width=407 height=364
 source=imagenes/partido.jpg /
 mx:Image id=asd source=imagenes/foto.jpg width=24
 height=28 x=290 y=104 mouseMove=mouseMove(event); /
 mx:Box backgroundColor=#FF x=10 y=10 width=226
 height=344 id=canchaDelantera dragEnter=dragEnterHandler(event); /

 /mx:Panel
 /mx:Box
 !--mx:VBox
 mx:Image source=imagenes/foto.JPG/
 mx:Label text=nombre/
 mx:Label text=posicion /
 mx:Label text=potencia /
 /mx:VBox--
 !-- perfil --


 /mx:Application

 Thanks in advance.

 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus
 http://mientretiempo.blogspot.com/




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] SWF into RSS

2008-11-28 Thread Fernando Wermus
People,
  I have to insert a SWF file into a RSS, despite I know the RSS accepts
html, I found some problems to insert inline a SWF into a RSS. Is there any
problem doing that?

Thanks in advance.

ps: I' ve read something about it in this list. The text is shown below,

I agree with Jeff. I have been building an app that includes an rss
reader and found that html formatted RSS entries work pretty well --
it even properly displays links and images. The one problem
(ironically) was that it can't display inline flash--like YouTube
videos. So I tried the iframe approach but decided in the end to parse
out any unsupported html tags and just display it in Flex. Much
cleaner that way. In your case its even easier since you'll have
control of the html you use in your help files.


Thk!

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: [flexcoders] Tons of errors using FlexBuilder on Ubuntu

2008-12-26 Thread Fernando Wermus
In my case, it is much worse. I cant even install it. I tried to install it
with many Eclipses in Ubunt 8.04 in my laptop. The fact is that it only runs
in Ubuntu 7.04  7.10 according to Adobe's page. We are thinking to move to
Mac definitily, because Linux isn't a good bet. Adobe is not really
interested in a full support.

Bye!

On Wed, Dec 24, 2008 at 2:54 PM, Tyler Kocheran rfkroc...@gmail.com wrote:

   Now, before I start, I know that FlexBuilder Linux is in beta still and
 a lot of stuff isn't working. With that said, I'm experiencing a lot of
 problems that I don't think other people are experiencing.

 I'm using Ubuntu as my OS, and Ganymede for my Eclipse version with Flash
 Player 10 release version. (I can't seem to install Flash 10 Debug Players,
 does anyone know how to do that on Ubuntu?) When I try to compile my
 application, it launches fine (when i Run it, not when I Debug it.
 Debugging doesn't work because I don't have a debug player installed.)
 However, I'm getting nothing when it runs, just a big blue application that
 does nothing. I can't visually add anything to the display list, I can't log
 anything out to Arthropod, I basically can't do anything.

 When I try to embed my application via SWFObject, that's no working either.
 I get the alternative content every time.

 Now here are my questions, I'm going to try and discover the answers ASAP
 for them, but if you know anything, could you help me out?
 Does FlexBuilder for Linux need to be installed on a Europa release?
 Does FlexBuilder for Linux *require* you to use Flash Player 9 release and
 debug players?
 Will using the Flex ant tasks resolve some of the problems I'm having?

 Any help is much appreciated! Merry Christmas, everyone!
 http://ubuntuforums.org/showthread.php?p=6432138#post6432138

 - TK

 --
 And do this, knowing the time, that now it is high time to awake out of
 sleep;
 for now our salvation is nearer than when we first believed.
  




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] Clearspring and facebook

2009-01-07 Thread Fernando Wermus
Dear,
  I am trying developing a widget for facebook with clearspring using
the facebook api. But I didn't find any documentation about. Does anyone
have try it? Where is this info?

Thanks in advance!

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: [flexcoders] Re: Clearspring and facebook

2009-01-13 Thread Fernando Wermus
I've read it and there are old version which doesnt work anymore. I am
having some problems with the html that use the js bridge and de swfobject.
The problem is that the facebook api has changed and I tried several times
to figurite out how to solve it without any luck. I was wondering if
clearspring has worked with facebook api, but I couldn't find any
documentation.

Thanks!

On Wed, Jan 7, 2009 at 5:12 PM, valdhor valdhorli...@embarqmail.com wrote:

   As this is the Flex Coders list, have you read these:

 http://hybridhacking.com/tutorials/building-facebook-applications-with-flex

 http://code.google.com/p/facebook-actionscript-api/

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Fernando Wermus

 fernando.wer...@... wrote:
 
  Dear,
  I am trying developing a widget for facebook with clearspring
 using
  the facebook api. But I didn't find any documentation about. Does anyone
  have try it? Where is this info?
 
  Thanks in advance!
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
  http://mientretiempo.blogspot.com/
 

  




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] maven compile flex project

2009-04-02 Thread Fernando Wermus
Hi Folks,
  I am looking for a maven plugin and a pom.xml example for compiling
and for generating a swf.
  Which is the best plugin you have tested it?
  Do you have an example which compile, generate swf and copy to another
project the swf file generated? I am needing to integrate with several
projects in the same workspace too.

Thanks in advance!

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] goal: copy-flex-resources to webapp/myFolder

2009-04-06 Thread Fernando Wermus
Hi all!
 I need to achieve the goal to copy my swf file to my webapp project.
But Flexnojo copies to webapp folder, instead webapp/myFolder... I couldn't
find enough info to get this work.

Any help? This is the plugin I am trying to set up.

   plugin
groupIdorg.sonatype.flexmojos/groupId
artifactIdflexmojos-maven-plugin/artifactId
version3.1.0/version
configuration
buildOutputDirectory/flex/buildOutputDirectory
/configuration
executions
execution
goals
  goalcopy-flex-resources/goal
/goals
  /execution
/executions
 /plugin

Thanks in advance.

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] mvn archetype:create -DarchetypeGroupId=com.droff -DarchetypeArtifactId=blazeds-xdoclet-spring-hibernate-archetype -DarchetypeVersion=1.0 -DgroupId=com.droff -DartifactId=test

2009-04-09 Thread Fernando Wermus
I got this error. The same with Cairnorgm archetypes. Does anyone have a
good archetype to begin testing and integrating java/cairngorm/etc?


[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).


Project ID: info.flex-mojos:flex-compiler-mojo

Reason: POM 'info.flex-mojos:flex-compiler-mojo' not found in repository:
Unable to download the artifact from any repository

  info.flex-mojos:flex-compiler-mojo:pom:2.0-alpha3


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: [flexcoders] Fwd: Problem to extend HTTPService

2009-04-09 Thread Fernando Wermus
How could you resolve the namespace issue? I need to compile a mxml with
mxmlc, but It cant resolve the namespace.

On Mon, Apr 28, 2008 at 7:51 AM, doodoonn2000 vincent.au...@online.frwrote:

   Hello all !
 I got the same compilation resolution error.
 in the same context (HTTPService extension.)

 How could i figure out this *namespace* (or dynamic property) issue ?

 i wrote :
 ...
 xmlns:me=com.foo.flex.components.*
 ...
 me:HTTPServiceCustom id=loginRequest
 url={Master.ROOT}
 destination=/Login?action=connect
 useProxy=false
 resultFormat=e4x
 me:request

 it's here !!! testgaga/test (can't resolve test to a
 component implementation.)

 /me:request
 /me:HTTPServiceCustom

 Any knowledge ???

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, vive
 fir3f...@... wrote:

 Hello,

 I am trying to extend HTTPService to add some processing of the result
 before returning it however I have some problem when I try to compile.
 My component is very simple right now:

 package bnp.rpc.http.mxml
 {
 import mx.rpc.http.mxml.HTTPService;
 import mx.rpc.events.ResultEvent;
 import mx.controls.Alert;

 public class ExtendedHTTPService extends HTTPService
 {
 public function ExtendedHTTPService(url:String):void
 {
 this.addEventListener(ResultEvent.RESULT, this.onInternalResult,
 true, 0, true) ;
 }

 private function onInternalResult(event:ResultEvent):void
 {
 mx.controls.Alert.show('Hello world!') ;
 }
 }
 }

 And the declaration of the HTTPServices in the application looks like:

 mx:HTTPService
 id=testservice1
 url=./test.pl
 resultFormat=text
 method=POST
 result=onExternalResult(event) ;
 
 mx:request xmlns=
 p1toto/p1
 /mx:request
 /mx:HTTPService

 mxml:ExtendedHTTPService
 id='testservice2'
 url=./test.pl
 resultFormat=text
 method=POST
 result=onExternalResult(event) ;
 
 mxml:request xmlns=
 p1toto/p1
 /mxml:request
 /mxml:ExtendedHTTPService

 The problem is that I can't compile because I get the following error:

 Could not resolve p1 to a component implementation.

 for the ExtendedHTTPService declaration. I cannot understand why. I
 did not even tried to overload the request property ?!?!
 Does anyone have an idea ?

 Thanks in advance !!

 --- End forwarded message ---

  




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] compiling error because a namespace (maven + flex mojos)

2009-04-09 Thread Fernando Wermus
I am compiling a mxml which has a namespace (Caingorm one). I got an
compiling exception because it couldnt resolve the namespace. How do I solve
this using mxmlc? Actually I am using flex mojos plugin (for maven)

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] about swfObject Flex

2009-05-07 Thread Fernando Wermus
Hi all,
  I am using swfobject.js to pass parameters to my Flex component. I
would like to know if using the same swfobject I can pass parameters to
javascript. Now, I am passing parameters from javascript to Flex component
by swfObject and from Flex to javascript by ExternalInterface. Is it
possible to use just swfObject?

Thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] about swfObject Flex

2009-05-07 Thread Fernando Wermus
Hi all,
  I am using swfobject.js to pass parameters to my Flex component. I
would like to know if using the same swfobject I can pass parameters to
javascript. Now, I am passing parameters from javascript to Flex component
by swfObject and from Flex to javascript by ExternalInterface. Is it
possible to use just swfObject?

Thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


[flexcoders] how to inject an attribute in blaze ds

2009-06-16 Thread Fernando Wermus
I am needing to inject an attribute in a service declared in blaze ds from
another web framework. Does anybody know an example on how to inject an
attribute in it?

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] HELP! Blaze ds create a session without any authentication. Then I can get connected to session scope destination!!

2009-08-04 Thread Fernando Wermus
I have two services. Both of them are session scope. I called them without
using my Custom Login, but anyway I can reach the service. I am very
sorprised with this behavior.

[WARN] HttpFlexSession has not been registered as a listener in web.xml for
this application so no events will be dispatched to
FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct
this, register flex.messaging.HttpFlexSession as a listener in web.xml.
*[DEBUG] FlexSession created with id '17d57jgu0xu01' for an Http-based
client connection.*
[INFO] Channel endpoint my-amf received request.
[DEBUG] Deserializing AMF/HTTP request
Version: 3
  (Message #0 targetURI=null, responseURI=/1)
(Array #0)
  [0] = (Typed Object #0 'flex.messaging.messages.CommandMessage')
operation = 5

This is my security set up in services-config.xml

security
security-constraint id=loginService
auth-methodCustom/auth-method
/security-constraint
login-command class=.LoginCommand server=Jetty/
/security

This are my destinations

destination id=gServiceImpl
security-constraint ref=loginService/
properties
  source..GService/source
  scopesession/scope
/properties
/destination
destination id=iServiceImpl
security-constraint ref=loginService/
properties
  source.IService/source
  scopesession/scope
/properties
/destination

I called to the destination without auth and I reach them.

I see from log that the flex session is actually created.

I havent auth so It cannot create a Flex session

Any help, would be appreciated

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] several domain using blazeds

2009-11-24 Thread Fernando Wermus
Hi all,
 I am having a problem with end points.

 I have several domains: a .com.ar and a .com.
If I compile the project and the endpoint was a .com.ar, the client wont
connect to blazeds back end when the user accesses through .com. What am I
supposed to do? Do I have to use as endpoint the ip? Does flex permit
several endpoints? I ve tried, but It seems that just take the first
endpoint.

Thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] karaoke component

2010-03-24 Thread Fernando Wermus
Hi all,
I am looking for a karaoke component. Does any one know if it exists
some to buy it?

thanks in advance


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [flexcoders] Re: karaoke component

2010-03-25 Thread Fernando Wermus
Jeff,
The karaoke is a player as well as editer. This mean that a user could
listen to a song or upload one an add the text and color it while the song
is playing.

Fernando

On Wed, Mar 24, 2010 at 3:35 PM, Jeff j...@dot-com-it.com wrote:



 What would a karaoke Component do?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Fernando
 Wermus fernando.wer...@... wrote:
 
  Hi all,
  I am looking for a karaoke component. Does any one know if it exists
  some to buy it?
 
  thanks in advance
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 

  




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] BLAZE DS AND OSIV PATTERN

2010-04-20 Thread Fernando Wermus
Hi all,
   I am using blazeds and flex without spring. I am also using remote object
and RemoteClass metatag. I would like to know how to open hibernate session
before messagebroker servlet takes into action and how to close hibernate
session after messagebroker servlet. I searched in google but I didnt find a
piece of code to implement it. This is called OSIV or open session in view
pattern, which I use with other frameworks like wicket.

thanks in advance.


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] checkbox change while I move the datagrid scroll bar

2010-04-27 Thread Fernando Wermus
Hi all,
   I just want to check and uncheck a checkbox in a datagrid. What I do is
to add or remove from the selected's collection. But I got an error index
when removing. Futhermore, the checked item change! when I move the datagrid
scroll bar. This is my code,

mx:DataGridColumn headerText=checked editable=false
rendererIsEditor=true
mx:itemRenderer
mx:Component
mx:CheckBox click=checked(this.selected, data as ComunidadVO) 
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import gestion.vo.ComunidadVO;
import gestion.model.GestionModelLocator;
public function checked(selected:Boolean, comunidadVO:ComunidadVO):void{
var
locaciones:ArrayCollection=GestionModelLocator.getInstance().locationChecked;
if (selected==true){
locaciones.addItem(comunidadVO);
}else{
var index:int=locaciones.getItemIndex(comunidadVO);
locaciones.removeItemAt(index);
}
 }
]]
/mx:Script
/mx:CheckBox
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [flexcoders] checkbox change while I move the datagrid scroll bar

2010-04-27 Thread Fernando Wermus
Oleg,
I cant associate the state with the data, and I cant find any info
about itemRendereFunction. Do you have any link about it? According to my
code, I would think this just should happen.

I re write down my code:

mx:CheckBox click=seleccionar(event) selected={seleccionado()} 
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import gestion.vo.ComunidadVO;
import gestion.model.GestionModelLocator;
 public function seleccionar(event:MouseEvent):void{
var
locaciones:ArrayCollection=GestionModelLocator.getInstance().locacionesRemotasSeleccionadas;
if (this.selected==true){
locaciones.addItem(data);
}else{
var index:int=locaciones.getItemIndex(data);
locaciones.removeItemAt(index);
}
 }
public function seleccionado():Boolean{
return
GestionModelLocator.getInstance().locacionesRemotasSeleccionadas.contains(data);
}
public function enable(comunidadVO:ComunidadVO):Boolean{
return comunidadVO.nombre!=null  comunidadVO.nombre!=;
}
]]
/mx:Script
/mx:CheckBox
/mx:Component

On Tue, Apr 27, 2010 at 3:10 PM, Oleg Sivokon olegsivo...@gmail.com wrote:



 Hi, the list based controls may reuse the item renderers, however they
 might not be aware of the changes that had happened to them. Normally you
 would store the state with the data which the renderer has to display. So
 that once the data is reset, the render appearance would reset with it. If,
 for whatever reason you cannot store the state of the renderer with the
 data, you would have to store the references to either manage the how the
 item renderers are created (by using the itemRendereFunction for example),
 or update the display of the control whenever the new (or an old new) item
 renderer is added - IMO complicated.

  




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [flexcoders] checkbox change while I move the datagrid scroll bar

2010-04-27 Thread Fernando Wermus
Oleg,
Thanks! I don't have Flex 4 so I cant try by this way. I would add the
selected attribute to the VO.


On Tue, Apr 27, 2010 at 5:53 PM, Oleg Sivokon olegsivo...@gmail.com wrote:



 Sorry, I've got that one wrong :)

 public override function set data(value:Object):void
 {
 this.checkBox.checked =  this.parentDocument.amIChecked(this);
 super.data = value;
 }

  




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] blazeds doesnt take into consideration a collection that has been filtered. It sends the whole collection.

2010-04-27 Thread Fernando Wermus
Hi all,
I am filtering an arrayCollection to get the selected user item's. I can
see that this happend smoothly, but when I send this collection to the
server, using blazeds, my backend function receives all the original
collection without filering!

what am I doing wrong?

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] mvc pattern for flex

2010-05-05 Thread Fernando Wermus
Hi all,
I was looking at Aconcagua. but there is a line of new code since a year
and a half.
Puremvc seems to be a kind of big compared to Cainrgorm.

Which options have you choosen as the best for MVC in Flex?

I know Caingorm and I dont like.

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [flexcoders] mvc pattern for flex

2010-05-07 Thread Fernando Wermus
How do you compare mate with robotlegs?

On Wed, May 5, 2010 at 1:03 PM, Steve Mathews happy...@gmail.com wrote:



 In my opinion http://www.robotlegs.org/ is the way to go.


 On Wed, May 5, 2010 at 7:46 AM, Fernando Wermus fernando.wer...@gmail.com
  wrote:



 Hi all,
 I was looking at Aconcagua. but there is a line of new code since a
 year and a half.
 Puremvc seems to be a kind of big compared to Cainrgorm.

 Which options have you choosen as the best for MVC in Flex?

 I know Caingorm and I dont like.

 thanks in advance

 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus



  




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus