Re: [flexcoders] Re: Updating renderer properties

2010-01-08 Thread Aaron Hardy
Thanks for sharing your thoughts and examples. In my case I decided to pass
in a model with a property into the renderers.  The model is passed into the
renderer by specifying it as a property value in the renderer class
factory.  The model doesn't ever get replaced after that, but the property
inside the model does.  I can't say any solution really strikes my fancy,
but this seemed to be the most appropriate.

Again, thanks for the discussion.

Aaron

On Fri, Jan 8, 2010 at 9:07 AM, valdhor  wrote:

>
>
> I set up a quick test bed based on your original post and using a static
> variable in the renderer(s) and it worked rather well. It may not be what
> you are after but I will post the example here for others that may want to
> use this.
>
> Application:
> 
> http://www.adobe.com/2006/mxml";
> layout="vertical" width="700">
> 
> 
> 
>  rowCount="{initDG.length}">
> 
>  itemRenderer="Renderers.CompanyRenderer"/>
> 
> 
>  itemRenderer="Renderers.CityRenderer"/>
> 
> 
> 
> 
> 
> 
> 
>
> CityRenderer.as:
> package Renderers
> {
> import mx.controls.*;
> import mx.controls.dataGridClasses.DataGridListData;
>
> public class CityRenderer extends Text
> {
> public static var textColor:String = "#00";
>
> public function CityRenderer()
> {
> super();
> }
>
> override public function set data(value:Object):void
> {
> super.data = value;
> if(value != null)
> {
> text = value[DataGridListData(listData).dataField];
> }
> }
>
> override protected function updateDisplayList(unscaledWidth:Number,
> unscaledHeight:Number):void
> {
> super.updateDisplayList(unscaledWidth, unscaledHeight);
> setStyle("color", CityRenderer.textColor);
> }
> }
> }
>
> CompanyRenderer.as:
> package Renderers
> {
> import mx.controls.*;
> import mx.controls.dataGridClasses.DataGridListData;
>
> public class CompanyRenderer extends Text
> {
> public static var textColor:String = "#00";
>
> public function CompanyRenderer()
> {
> super();
> }
>
> override public function set data(value:Object):void
> {
> super.data = value;
> if(value != null)
> {
> text = value[DataGridListData(listData).dataField];
> }
> }
>
> override protected function updateDisplayList(unscaledWidth:Number,
> unscaledHeight:Number):void
> {
> super.updateDisplayList(unscaledWidth, unscaledHeight);
> setStyle("color", CompanyRenderer.textColor);
> }
> }
> }
>
>
> --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> >
> > I haven't tried this so I have no idea if it would work but why not just
> create a static variable inside your renderer class and change that as
> required?
> >
> > --- In flexcoders@yahoogroups.com, Aaron Hardy aaronius9er@ wrote:
> > >
> > > I think there might be a misunderstanding. If it's a transient property
> on
> > > the data objects that come through the data provider, I would have to
> change
> > > the property for all the objects in the data provider to be the same
> value
> > > since I want all the renderers to change in the same way. For example,
> > > let's say all my renderers say "Woot: " and then the data's text value.
> > > Then at runtime, the user, in a different part of the app, enters
> "Niner"
> > > into a text input and therefore I want all my renderers to now say
> "Niner: "
> > > and then the data's text value. In my case, the word "Niner" really has
> > > nothing to do with the data, it's almost more about the "style" of the
> > > renderers--or what the renderers look like around the actual data. If I
> > > were to use the transient property of the data provider objects, I'd
> have to
> > > loop through all of them and set the property's value to "Niner". I'm
> not
> > > sure if that's what you were suggesting, but that seems dirtier to me
> than
> > > referencing a separate model from the renderers.
> > >
> > > I'm interested in understanding your analysis of this though even if we
> may
> > > disagree in the end.
> > >
> > > Aaron
> > >
> > > On Thu, Jan 7, 2010 at 5:13 PM, turbo_vb TimHoff@ wrote:
> > >
> > > >
> > > >
> > > > Sure, but you don't necessarily need a model to use a VO; it can just
> be
> > > > the strongly typed object that the dataProvider uses for its items.
> If you
> > > > then change the transient properties of that VO, the set data method
> of the
> > > > itemRenderer will work out of the box; and you can then adjust the
> renderer.
> > > > You're right in feeling dirty having an itemRenderer reference a
> model. But
> > > > reacting to changes in the data is fine. IMHO.
> > > >
> > > >
> > > >

RE: [SPAM] [flexcoders] Properly display html entities in datagrid

2010-01-08 Thread Tracy Spratt
So I understand that the data is not html, but just has some html encoded
entities in it correct?

 

You can manually convert the data yourself.  Regular expressions are
probably a better way to go, but I do not use them enough to be comfortable
with them, and use a function like this:

public static function htmlDecode(s:String):String

{ 

  s=s.split("&").join("&"); 

  s=s.split(""").join("\"");

  s=s.split("'").join("'"); 

  s=s.split("/<").join("");

  s=s.split(">").join(">"); 

  return s;

}

 

The replace() function might be better as well.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of s_grollins
Sent: Friday, January 08, 2010 9:42 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Properly display html entities in datagrid

 

  

Hello everyone,

I've recently come across a problem at work where in much of the data we're
getting is showing up in the data-grid as:

The tags show and the " quotes " aren't converted!

This is a problem and I'd like to be able to display this correctly:

The tags show and the " quotes " aren't converted!

We don't necessarily have too much control over the data, so I'm not
entirely sure how/why the items are coming up like this when some items come
up with characters like < > in them. For instance: "This is an item > This
is another item > In a breadcrumb trail". This shows up correctly. I'm not
sure what exactly should be done. But again since we don't have
control/access to the data, it cannot be changed or substituted or converted
to other formats. I thought of using htmlText but that doesn't work if I
have data like the "breadcrumb string" above because it interprets the '<'
characters as opening tags and doesn't render the entire data:

[Bindable]
private var testString:String = "6  "seven"";

 
 

Any suggestions would definitely be appreciated, I'm sure I'm probably not
the only person that's come across this :( But basically we just need all
characters like: < to be converted to '<' and & to be '&' meanwhile
data that was encoded properly, data that has '<' and '&' showing up
correctly should be left the same.

Thanks in advance for any help :)





[flexcoders] Properly display html entities in datagrid

Hello everyone,

I've recently come across a problem at work where in much of the data
we're getting is showing up in the data-grid as:

The tags show and the " quotes " aren't converted!

This is a problem and I'd like to be able to display this correctly:

The tags show and the " quotes " aren't converted!

We don't necessarily have too much control over the data, so I'm not
entirely sure how/why the items are coming up like this when some items
come up with characters like < > in them. For instance: "This is an item
> This is another item > In a breadcrumb trail". This shows up
correctly. I'm not sure what exactly should be done. But again since we
don't have control/access to the data, it cannot be changed or
substituted or converted to other formats. I thought of using htmlText
but that doesn't work if I have data like the "breadcrumb string" above
because it interprets the '<' characters as opening tags and doesn't
render the entire data:

[Bindable]
private var testString:String = "6 
"seven"";

 
 

Any suggestions would definitely be appreciated, I'm sure I'm probably
not the only person that's come across this :( But basically we just
need all characters like: < to be converted to '<' and & to be
'&' meanwhile data that was encoded properly, data that has '<' and '&'
showing up correctly should be left the same.

Thanks in advance for any help :)



[flexcoders] Re: Equivalent ant command for "copylocale en_US fr_FR"

Nevermind, I was missing the jvmarg. Here is the solution:





 
 


--- In flexcoders@yahoogroups.com, "tungchau81"  wrote:
>
> I tried the following ant command, but it did not work
> 
>  maxmemory="512m"
> failonerror="true">
> 
> 
> 
> 
> I keep getting the following error:
>  [echo] running copylocale en_US da
>  [java] Exception in thread "main" java.lang.NullPointerException
>  [java] at java.io.File.(File.java:222)
>  [java] at flex2.tools.CopyLocale.checkArguments(CopyLocale.java:126)
>  [java] at flex2.tools.CopyLocale.run(CopyLocale.java:94)
>  [java] at flex2.tools.CopyLocale.main(CopyLocale.java:46)
> 
> 
> Is there anyway to make the ant call work?
> 
> Tung Chau
>




Re: [flexcoders] Caringorm vs PureMVC

Thanks. I may choose PureMVC. I am looking at Fabrication now and see if it 
simplifies a little.
Pat





From: Kevin Benz 
To: flexcoders@yahoogroups.com
Sent: Fri, January 8, 2010 9:01:03 AM
Subject: Re: [flexcoders] Caringorm vs PureMVC

I prefer PureMVC as if you have any multi-platform development (say Flex and 
PHP, Flex and Java), there are PureMVC implementations for each platform. You 
can leverage PureMVC knowledge across platform teams, (hopefully) get better 
code, implement more cohesive standards, manage risk etc, etc etc. If 
developers cross teams, they are better prepared.

K


On Jan 7, 2010, at 4:00 PM, Patricia Han wrote:

>
>
>
>  >
>
> 
>
>
>Hi Everyone,
>
>I need to pick up a framework to use, either Caringorm or PureMVC. Any 
>suggestion on this?
>Thanks for any advice.
>
>Patricia Han
>
>
>
>
>
>

Kevin F. Benz
kb...@kbenz.com - (425) 785-7100
http://www.kbenz.com - http://www.linkedin.com/in/kbenz


  

RE: [SPAM] [SPAM] [flexcoders] Re: Passing parameters into Component Item Renderers

Each instance of the renderer's set data() will get called when the
dataProvider is updated using the collection API.  Set data(). In
conjunction with commitProperties is usually where item level work should
happen.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of criptopus
Sent: Friday, January 08, 2010 6:13 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [SPAM] [flexcoders] Re: Passing parameters into Component
Item Renderers

 

  

That sounds a lot easier, maybe there is some listener I can add for changes
made in the Array Collection, hmm! Will have a look at that tomorrow.

Thanks Stephen





Re: [flexcoders] Extending interfaces

Shouldn't it be:

public function set data(value:*):void
{
_data = value;
}

Jamie

On Fri, Jan 8, 2010 at 5:58 AM, bmsleite  wrote:

>
>
> Hi everyone,
>
> I hope you guys can help me out with this doubt regarding interfaces that
> extends from other interfaces.
>
> The scenario is the following:
>
> ImplementationClass -implements-> InterfaceB -extends-> InterfaceA
>
> A code example:
>
> public interface InterfaceA
> {
> function get data():*;
> }
>
> public interface InterfaceB extends InterfaceA
> {
> function set data(value:*):void;
> }
>
> public class ImplementationClass implements InterfaceB
> {
> private var _data:*;
>
> public function Implementation(){}
>
> public function set data(value:*):void
> {
> _data = data;
> }
>
> public function get data():*
> {
> return _data;
> }
>
> }
>
> Now, the question is, is this possible? If I write something like this:
>
> var impl:InterfaceB = new ImplementationClass();
> impl.data = "something";
>
> Should this be possible? Well, possible I know that it isn't because this
> gives me an "Ambigous reference to data" error, but isn't this a logical
> implementation, am I missing something here?
>
> Probably the cause for this behaviour has to do with the way that getters
> and setters are implemented in AS3, if that's the case, can anyone explain
> me, or give me some ideas how this works internally?
>
> Thank you for your time.
>
> Bruno Leite
>
>  
>


[flexcoders] Extending interfaces

Hi everyone,

I hope you guys can help me out with this doubt regarding interfaces that 
extends from other interfaces.

The scenario is the following:

ImplementationClass -implements-> InterfaceB -extends-> InterfaceA

A code example:

public interface InterfaceA
{
   function get data():*;
}


public interface InterfaceB extends InterfaceA
{
   function set data(value:*):void;   
}


public class ImplementationClass implements InterfaceB
{   
   private var _data:*;

   public function Implementation(){}

   public function set data(value:*):void 
   {
   _data = data;
   }

   public function get data():* 
   {
   return _data;
   }

}

Now, the question is, is this possible? If I write something like this:

var impl:InterfaceB = new ImplementationClass();
impl.data = "something";

Should this be possible? Well, possible I know that it isn't because this gives 
me an "Ambigous reference to data" error, but isn't this a logical 
implementation, am I missing something here?

Probably the cause for this behaviour has to do with the way that getters and 
setters are implemented in AS3, if that's the case, can anyone explain me, or 
give me some ideas how this works internally?

Thank you for your time.

Bruno Leite



[flexcoders] Equivalent ant command for "copylocale en_US fr_FR"

I tried the following ant command, but it did not work






I keep getting the following error:
 [echo] running copylocale en_US da
 [java] Exception in thread "main" java.lang.NullPointerException
 [java] at java.io.File.(File.java:222)
 [java] at flex2.tools.CopyLocale.checkArguments(CopyLocale.java:126)
 [java] at flex2.tools.CopyLocale.run(CopyLocale.java:94)
 [java] at flex2.tools.CopyLocale.main(CopyLocale.java:46)


Is there anyway to make the ant call work?

Tung Chau



[SPAM] [flexcoders] Re: Passing parameters into Component Item Renderers

That sounds a lot easier, maybe there is some listener I can add for changes 
made in the Array Collection, hmm! Will have a look at that tomorrow.

Thanks Stephen



RE: [SPAM] [flexcoders] Re: Passing parameters into Component Item Renderers

You would not.  Item level display should be handled through the data item.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of criptopus
Sent: Friday, January 08, 2010 5:38 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Re: Passing parameters into Component Item
Renderers

 

  

Of cause, thanks for the reassurance.

Just one more thing though, how would I with the routine I currently have
effect a tick box in the same data grid. So that if I should tick this item
renderers tick box another item renderers tick box will also be ticked in
the same row.

@v@ Stephen Brown





[flexcoders] Re: Passing parameters into Component Item Renderers

Of cause, thanks for the reassurance.

Just one more thing though, how would I with the routine I currently have 
effect a tick box in the same data grid. So that if I should tick this item 
renderers tick box another item renderers tick box will also be ticked in the 
same row.

@v@ Stephen Brown



Re: [flexcoders] Caringorm vs PureMVC

Thanks a lot. I will look at them.
Pat





From: Jatin Nanda 
To: flexcoders@yahoogroups.com
Sent: Thu, January 7, 2010 6:49:20 PM
Subject: Re: [flexcoders] Caringorm vs PureMVC

   
@ Patricia


There are a few alternatives and each has its own advantages and disadvantages: 
-

- Swiz (uses dependancy injection)
- Mate
- RobotLegs

Try www.insideria.com

There are number of articles on different frameworks.

Hope this helps.





2010/1/8 Pankaj Munjal 

>
>
>
>
>
>
>
>
>
>
>
>
>
>  >
>
>>
> 
>>  
> 
>Hi,
> 
>if you are going to play more with UI then go for PMVC and if you are going to 
>play more with Business layer the CRM is best .
> Thanks,
>Pankaj
>
>
>
>
>
>

 From: Patricia Han 
>To: flexcod...@yahoogro ups.com
>Sent: Thu, January 7, 2010 7:00:01 PM
>Subject: [flexcoders] Caringorm vs PureMVC
>
>
>  
>Hi Everyone,
>
>I need to pick up a framework to use, either Caringorm or PureMVC. Any 
>suggestion on this?
>Thanks for any advice.
>
>Patricia Han
>
>
>
>
>

 


  

Re: [flexcoders] Caringorm vs PureMVC

Thanks, Pankaj! I may go with PureMVC. I got a suggestion from a friend that if 
go with PureMVC, Fabrication can help. What do you think? Fabrication is build 
on top of PureMVC. It just created some convenient classes and methods.

Thanks again.

Patricia





From: Pankaj Munjal 
To: flexcoders@yahoogroups.com
Sent: Thu, January 7, 2010 6:44:18 PM
Subject: Re: [flexcoders] Caringorm vs PureMVC

   
Hi,
 
if you are going to play more with UI then go for PMVC and if you are going to 
play more with Business layer the CRM is best .
 Thanks,
Pankaj 





 From: Patricia Han 
To: flexcod...@yahoogro ups.com
Sent: Thu, January 7, 2010 7:00:01 PM
Subject: [flexcoders] Caringorm vs PureMVC

  
Hi Everyone,

I need to pick up a framework to use, either Caringorm or PureMVC. Any 
suggestion on this?
Thanks for any advice.

Patricia Han





 


  

RE: [SPAM] [flexcoders] current flex app size?

Maybe the stage is not the same size as the container, or gets set at a
different time.  The resize event is dispatched by the application
container, so you should use that.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Friday, January 08, 2010 5:10 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] current flex app size?

 

  

I trace stage.width when I resize the screen.

but why it always 1248 and not change?

why?

Thanks

Mark





[flexcoders] current flex app size?

I trace  stage.width when I resize the screen.

but why it always 1248 and not change?

why?

Thanks

Mark



[flexcoders] spark list

anyone know what happened to the "selectable" property from the 
mx.controls.List?



RE: [SPAM] [flexcoders] Text with bold and normal formatting

There are low-level ways to get at pieces of text, but I think that will be
fairly difficult.

 

".pass dynamic fields." What do you mean by that, and how are you doing it
with the text property?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of cvsikh
Sent: Friday, January 08, 2010 4:30 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Text with bold and normal formatting

 

  

Hi,

I was curious to know if it is possible to have both bold and normal text in
a text component? I know this can be achieved using htmltext however I am
not interested in using that since you cannot pass dynamic fields to it.





RE: [SPAM] [flexcoders] Compiling Resource Modules-Is there any way to avoid running 'copylocale'

Not that I know of.  I have created a .bat file that I have folks run.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of tungchau81
Sent: Friday, January 08, 2010 4:05 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Compiling Resource Modules-Is there any way to
avoid running 'copylocale'

 

  

Is there anyway to automate the process of running 'copylocale' so that new
developer does not have to manually run the command in their $FLEX_HOME?

Any advice is greatly appreciated,
Tung Chau





Re: [flexcoders] Text with bold and normal formatting


Hi,

You can extend the Text component and change its textField 
 
property's text format.


var normal:TextFormat=new TextFormat();
var bold:TextFormat=new TextFormat();

normal.bold=false;
bold.bold=true;

//set the first 5 characters to bold
this.textField.setTextFormat(bold, 0, 5);

//set the next 5 chars to normal
this.textField.setTextFormat(normal, 5, 10);


Tibor.

www.tiborballai.com


cvsikh wrote:
 


Hi,

I was curious to know if it is possible to have both bold and normal 
text in a text component? I know this can be achieved using htmltext 
however I am not interested in using that since you cannot pass 
dynamic fields to it.







[flexcoders] Text with bold and normal formatting

Hi,

I was curious to know if it is possible to have both bold and normal text in a 
text component?  I know this can be achieved using htmltext however I am not 
interested in using that since you cannot pass dynamic fields to it.



Re: [flexcoders] Re: Passing parameters into Component Item Renderers

That depends on weather or not you'll have multiple users logged into 
the same "session".


A static member is unique in the scope of a loaded application.
I doubt that you'll have multiple users logged into the same browser 
session so this wouldn't be a problem.


Tibor.

www.tiborballai.com



criptopus wrote:
 

With using a static public variable is their any chance that multiple 
users will inter fear with each others


comps.librCntr.librFold.itemRend.tickBox.allowEdit

values?

- Stephen






[flexcoders] Compiling Resource Modules-Is there any way to avoid running 'copylocale'

Is there anyway to automate the process of running 'copylocale' so that new 
developer does not have to manually run the command in their $FLEX_HOME?

Any advice is greatly appreciated,
Tung Chau



[flexcoders] Re: Passing parameters into Component Item Renderers

With using a static public variable is their any chance that multiple users 
will inter fear with each others

comps.librCntr.librFold.itemRend.tickBox.allowEdit

values?

- Stephen



Re: [flexcoders] Cross Domain File


Hi Dan,

No, in your case, the data will be considered local to your server from 
the flash player's perspective.


Tibor.

www.tiborballai.com



Dan Pride wrote:
 

If I am accessing a database from another server with php files which 
sits on my server, does flash consider that as data from an outside 
source (since it appears to come from a file on my server even tho its 
pulling from a foreign database)?







[flexcoders] Cross Domain File

If I am accessing a database from another server with php files which sits on 
my server, does flash consider that as data from an outside source (since it 
appears to come from a file on my server even tho its pulling from a foreign 
database)?


  


[flexcoders] Re: Passing parameters into Component Item Renderers

Excellent I managed it...

comps.librCntr.librFold.itemRend.tickBox.allowEdit = true;

blooming long but it works.

I even bound the static public variable to enable property and it worked.

Thanks very much.

- Stephen



Re: [flexcoders] Re: Passing parameters into Component Item Renderers

Yes, you define a static public var allowEdit:Boolean; in your item 
renderer.
that variable will be a member of the class, rather then a member of a 
specific instance.
Only a single copy of allowEdit exists, regardless of how many instances 
of your renderer you have.


Thus, you can get/modify it's value by referring to it using the class name:

MyRendererName.allowEdit=true;

Note, MyRenderName is the class name, not a specific instance!

Once your user logs in, you can set the allowEedit value:

if (username=="pete") MyRendererName.allowEdit=true;

inside your renderer, you can refer to the allowEdit property just as if 
it was a class member.



Tibor.

www.tiborballai.com





criptopus wrote:
 


My item renderer is as follows:-

===code


http://www.adobe.com/2006/mxml 
" horizontalAlign="center">






===code

So are you saying I set up a:: Static Public var allowEdit:Boolian; :: 
in here and how do I define it from the Datagrid, do I have to include 
it and set an instance up of it, that doesn't sound right to me. - I'm 
only a beginner any code hints would be great.







[flexcoders] Re: Passing parameters into Component Item Renderers

My item renderer is as follows:-

===code


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





===code

So are you saying I set up a:: Static Public var allowEdit:Boolian; :: in here 
and how do I define it from the Datagrid, do I have to include it and set an 
instance up of it, that doesn't sound right to me. - I'm only a beginner any 
code hints would be great.



[flexcoders] Re: Passing parameters into Component Item Renderers

As Tibor says.

Check out the example posted earlier today - 
http://tech.groups.yahoo.com/group/flexcoders/message/151364

--- In flexcoders@yahoogroups.com, Tibor Ballai  wrote:
>
> Hi Stephen,
> 
> You can define a static property in your item renderer which you can set 
> to the appropriate value based on who logged in before displaying the table.
> Or, alternatively, you can use a singleton to define and check who 
> logged in.
> 
> Tibor.
> 
> www.tiborballai.com
> 
> criptopus wrote:
> >  
> >
> > I have an item renderer for a column of a table and I want to display 
> > the column of the table in a different way independent of the data 
> > that is sent to the item renderer.
> >
> > For example if John is logged in I want the column to use two radio 
> > buttons and if Pete is logged in I want the column to use tick boxes.
> >
> > I was toying with setting up a public variable inside the item 
> > renderer but when and where do I pass the variable in if each row runs 
> > separately?
> >
> > Any ideas?
> >
> > - Stephen Brown
> >
> >
>




Re: [flexcoders] Passing parameters into Component Item Renderers


Hi Stephen,

You can define a static property in your item renderer which you can set 
to the appropriate value based on who logged in before displaying the table.
Or, alternatively, you can use a singleton to define and check who 
logged in.


Tibor.

www.tiborballai.com

criptopus wrote:
 

I have an item renderer for a column of a table and I want to display 
the column of the table in a different way independent of the data 
that is sent to the item renderer.


For example if John is logged in I want the column to use two radio 
buttons and if Pete is logged in I want the column to use tick boxes.


I was toying with setting up a public variable inside the item 
renderer but when and where do I pass the variable in if each row runs 
separately?


Any ideas?

- Stephen Brown






[flexcoders] Passing parameters into Component Item Renderers

I have an item renderer for a column of a table and I want to display the 
column of the table in a different way independent of the data that is sent to 
the item renderer.

For example if John is logged in I want the column to use two radio buttons and 
if Pete is logged in I want the column to use tick boxes.

I was toying with setting up a public variable inside the item renderer but 
when and where do I pass the variable in if each row runs separately?

Any ideas?

- Stephen Brown



[flexcoders] Re: Flex 3.5 - And Text Flow

I'm going to pass on TextFlow until I get Flash Builder 4 in Flex Builder 3 the 
Design view is just blank when trying to work with it.

- Stephen

--- In flexcoders@yahoogroups.com, Andriy Panas  wrote:
>
> Hi Stephen,




[flexcoders] Re: Flex LineChart. Show only line.

Just set showLabels="false" on the AxisRenderers.

-TH

--- In flexcoders@yahoogroups.com, "Slackware"  wrote:
>
> I'm using a mx:LineChart. And I need to show just the line (no vertical and 
> horizontal labels). Is that possible? How? 
> 
> Many thanks.
>




[flexcoders] Flex LineChart. Show only line.

I'm using a mx:LineChart. And I need to show just the line (no vertical and 
horizontal labels). Is that possible? How? 

Many thanks.



Re: [flexcoders] Caringorm vs PureMVC

I prefer PureMVC as if you have any multi-platform development (say Flex and PHP, Flex and Java), there are PureMVC implementations for each platform. You can leverage PureMVC knowledge across platform teams, (hopefully) get better code, implement more cohesive standards, manage risk etc, etc etc. If developers cross teams, they are better prepared.KOn Jan 7, 2010, at 4:00 PM, Patricia Han wrote:




 



Hi Everyone,I need to pick up a framework to use, either Caringorm or PureMVC. Any suggestion on this?Thanks for any advice.Patricia Han



 










Kevin F. Benzkb...@kbenz.com - (425) 785-7100http://www.kbenz.com - http://www.linkedin.com/in/kbenzbegin:vcard
version:3.0
prodid:Microsoft-Entourage/12.17.0.090302
UID:C3AAA4E9-F33F-44F1-BDA3-4FB66E5D3D25
fn;charset=utf-8:Kevin Benz
n;charset=utf-8:Benz;Kevin;;;
nickname;charset=utf-8:Rusty Zoomer
title;charset=utf-8:President & CEO
org;charset=utf-8:InterKnack Corporation;
note;charset=utf-8:Skype-In: (425) 296-6961\nLinkedIn: http://www.linkedin.com/in/kbenz
url;charset=utf-8;type=home:http://www.kbenz.com
adr;charset=utf-8;type=work:;;13400 NE 20th Street\, Suite 49;Bellevue;WA;98005-2026;United States of America
label;charset=utf-8;type=work:13400 NE 20th Street\, Suite 49\nBellevue\, WA 98005-2026\nUnited States of America
adr;charset=utf-8;type=home;type=pref:;;14802 SE 66th St;Bellevue;WA;98006;United States of America
label;charset=utf-8;type=home;type=pref:14802 SE 66th St\nBellevue\, WA 98006\nUnited States of America
tel;charset=utf-8;type=home:(425) 747-2450
tel;charset=utf-8;type=work:(425) 785-7100
tel;charset=utf-8;type=work;type=fax:(425) 401-1840
tel;charset=utf-8;type=cell:(425) 785-7100
email;charset=utf-8;type=internet;type=pref;type=work:kb...@interknack.com
email;charset=utf-8;type=internet;type=work:kb...@kbenz.com
X-ms-imaddress;charset=utf-8;type=home;type=pref:kb...@interknack.com (MSN)
end:vcard




Re: [Spam] RE: [SPAM] [flexcoders] Re: Problem Casting an Object to a known type

Thanks for the reply Tracy...

I am using mx:WebService, not HTTP Service, my mistake :)


I'll keep you all posted with progress..


Cheers,
Nick




2010/1/8 Tracy Spratt 

>
>
>  Yeah, I really suspect the problem is on the server side.  I don’t recall
> specifically using 4 or more levels of xml, but I would be very surprised if
> the e4x implementation had a problem like that.  You plan to test it is a
> good one.
>
>
>
> A question: You say you are HTTPService, but are also using SOAP?  SOAP is
> typically used with WebService calls.  Are you manually building a SOAP
> message and then sending it using the HTTPService protocol?  Is the SAP web
> service layer is a standard SOAP web service implementation, why are you not
> using WebService?
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
> Behalf Of *bhaq1972
> *Sent:* Friday, January 08, 2010 4:44 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [SPAM] [flexcoders] Re: Problem Casting an Object to a known
> type
>
>
>
>
>
> Hi Nick
> If the returned object has 3 nested levels its xml but if it 4 nested
> levels its not?
>
> Do you use flexbuilder debugger? It might be worth putting a breakpoint at
> the point where you return from the httpserviceand examining it. It
> might not be a object which can be typecasted to ContactPerson().
>
> Are you sure its a Compiler error or was it a Runtime error?
>
> Bodrul
>
> --- In flexcoders@yahoogroups.com , Nick
> Middleweek  wrote:
> >
> > Hello...
> >
> > We've just run into a problem... Has anyone else come across this before?
> >
> > We're making HTTP Service calls and we're getting back nested data. We
> have
> > set the resultFormat="e4x" which we then parse into known Object types,
> such
> > a IContactData, IInvoiceDetails...
> >
> > The Problem: With some service calls, the data returned has 4 or more
> levels
> > of nested data. In these cases, Flex isn't giving us XML. It is just
> > returning an untyped Object with the nested data.
> >
> > If the returned data has 3 levels or less of nested data then we get XML.
> >
> >
> > We then thought, ok... The untyped Object returned by Flex does have all
> the
> > properties required to Cast it to our typed Object, e.g. IContactData...
> >
> > But we are getting a "Coercion failed" message by the Compiler. Here's a
> > basic example of the problem...
> >
> >
> > var myPerson : Object = new Object();
> > myPerson.age = "25";
> > myPerson.sex = "dunno"
> > myPerson.name = "Nick";
> >
> >
> > var myContact : ContactPerson = new ContactPerson();
> > myContact = ContactPerson(myPerson);
> > // Where ContactPerson is a typed Object with age, sex and name String
> > properties.
> >
> >
> >
> > So has anyone managed to solve the 4 levels of nested data problem from
> an
> > HTTP Service call?
> >
> > and :)
> >
> > Why can't we cast an untyped Object into a typed Object? :)
> >
> >
> > Cheers guys...
> >
> > Nick
> >
>   
>


[flexcoders] Re: Updating renderer properties

I set up a quick test bed based on your original post and using a static
variable in the renderer(s) and it worked rather well. It may not be
what you are after but I will post the example here for others that may
want to use this.

Application:

http://www.adobe.com/2006/mxml";
layout="vertical" width="700">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


CityRenderer.as:
package Renderers
{
 import mx.controls.*;
 import mx.controls.dataGridClasses.DataGridListData;

 public class CityRenderer extends Text
 {
 public static var textColor:String = "#00";

 public function CityRenderer()
 {
 super();
 }

 override public function set data(value:Object):void
 {
 super.data = value;
 if(value != null)
 {
 text = value[DataGridListData(listData).dataField];
 }
 }

 override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 setStyle("color", CityRenderer.textColor);
 }
 }
}

CompanyRenderer.as:
package Renderers
{
 import mx.controls.*;
 import mx.controls.dataGridClasses.DataGridListData;

 public class CompanyRenderer extends Text
 {
 public static var textColor:String = "#00";

 public function CompanyRenderer()
 {
 super();
 }

 override public function set data(value:Object):void
 {
 super.data = value;
 if(value != null)
 {
 text = value[DataGridListData(listData).dataField];
 }
 }

 override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 setStyle("color", CompanyRenderer.textColor);
 }
 }
}


--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> I haven't tried this so I have no idea if it would work but why not
just create a static variable inside your renderer class and change that
as required?
>
> --- In flexcoders@yahoogroups.com, Aaron Hardy aaronius9er@ wrote:
> >
> > I think there might be a misunderstanding.  If it's a transient
property on
> > the data objects that come through the data provider, I would have
to change
> > the property for all the objects in the data provider to be the same
value
> > since I want all the renderers to change in the same way.  For
example,
> > let's say all my renderers say "Woot: " and then the data's text
value.
> > Then at runtime, the user, in a different part of the app, enters
"Niner"
> > into a text input and therefore I want all my renderers to now say
"Niner: "
> > and then the data's text value.  In my case, the word "Niner" really
has
> > nothing to do with the data, it's almost more about the "style" of
the
> > renderers--or what the renderers look like around the actual data. 
If I
> > were to use the transient property of the data provider objects, I'd
have to
> > loop through all of them and set the property's value to "Niner". 
I'm not
> > sure if that's what you were suggesting, but that seems dirtier to
me than
> > referencing a separate model from the renderers.
> >
> > I'm interested in understanding your analysis of this though even if
we may
> > disagree in the end.
> >
> > Aaron
> >
> > On Thu, Jan 7, 2010 at 5:13 PM, turbo_vb TimHoff@ wrote:
> >
> > >
> > >
> > > Sure, but you don't necessarily need a model to use a VO; it can
just be
> > > the strongly typed object that the dataProvider uses for its
items. If you
> > > then change the transient properties of that VO, the set data
method of the
> > > itemRenderer will work out of the box; and you can then adjust the
renderer.
> > > You're right in feeling dirty having an itemRenderer reference a
model. But
> > > reacting to changes in the data is fine. IMHO.
> > >
> > >
> > > -TH
> > >
> > > --- In flexcoders@yahoogroups.com ,
Aaron
> > > Hardy  wrote:
> > > >
> > > > Yes, I suppose the line of what is or is not a style can be
blurry at
> > > > times. In any case, using transient properties inside a VO is
what I was
> > > > eluding in the first item of "things I've thought of", the
downside being
> > > > that a model/VO of some type is needed in order to keep the
renderer
> > > > notified of updates to the property. In other words, I don't see
a viable
> > > > way of creating a "foobar" property inside the renderer and
keeping it
> > > > updated from an external source. Instead, the renderer would
need access
> > > to
> > > > a model that was set at instantiation through the renderer class
factory.
> > > > The renderer would then watch the model for changes to its
"foobar"
> > > > property.
> > > 

[flexcoders] Zend Eclipse Install

Does it matter if I install Flex then the php eclipse plugin, or the other way 
around?
Thanks
Dan Pride


  


RE: [SPAM] [flexcoders] How to get Flex application current size(height and Width)?

The resize event should give you the current width and height.  I use this
successfully:

** Runs on application resize event */

 private function onResize(oEvent:Event):void

 {

   if (_popup) {//test for existence
of popup

 _popup.x =  this.width - 360;  //re-position the
popup

   }

 }//onResize

 

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Wednesday, January 06, 2010 10:04 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] How to get Flex application current size(height
and Width)?

 

  

Hi,

I try to use resize Event,but I only can get oldHeight and oldWidth.
how to get Flex app current Height and Width?

Please give me a idea for this.

Thanks a lot

Mark





RE: [SPAM] [flexcoders] Re: Is my ItemRenderer on the last Row of data?

If your renderer implements the IDropInListItemRenderer (something like
that), you can access the dataProvider (or get the dataProvider from the
model)  then you can use getChildIndex() for a collection or childIndex() in
xml to get the item index.  If that index equals the dataProvider.length -
1, it is the last item.

 

I have used this technique to dynamically number the lines in a DataGrid.
That example is www.cflex.net   I believe.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Matthew
Sent: Wednesday, January 06, 2010 3:22 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Re: Is my ItemRenderer on the last Row of data?

 

  

Very nice solution, Valdhor, thank you. I do, however, need it for the very
last row of data (visible or non-visible). 

In the meantime, I've added an extra property to my data that will allow me
to get what I need. So, instead of figuring out what label to put on a
button by deciphering whether the renderer is rendering the last row of
data, I just use a new 'label' property. 

Maybe a bit hackish, but it works. 

Thank you for your help. 

Matt

--- In flexcod...@yahoogro  ups.com,
"valdhor"  wrote:
>
> That kinda depends on what you mean by the "last row of data". If you
> mean the last visible row (Which is the last row rendered - the renderer
> is only called for visible data) then you can try this...
> 
> package
> {
> import mx.collections.ArrayCollection;
> import mx.controls.*;
> import mx.controls.dataGridClasses.DataGridListData;
> 
> public class myRenderer extends Text
> {
> public function myRenderer()
> {
> super();
> }
> 
> override public function set data(value:Object):void
> {
> super.data = value;
> if(value != null)
> {
> text = value[DataGridListData(listData).dataField];
> if(listData.rowIndex == (owner as DataGrid).rowCount -
> 1)
> {
> trace("Rendering the last row");
> }
> }
> }
> }
> }
> --- In flexcod...@yahoogro  ups.com,
"Matthew"  wrote:
> >
> > Hi,
> >
> > I know the answer to this question before asking it but hopefully
> someone has a found a way to do this.
> >
> > Is there a way to know (in my override of set data() method) whether
> my item renderer is rendering the last row of data?
> >
> > thanks for any help on this one,
> >
> > matt
> >
>





[flexcoders] Re: Incompatibilities between SWC libraries and Flash Builder Beta 2?

Thanks Jeff for your response.

I'm currently using the last version of the Flex component Kit for Flash. Seems 
like the only issue with Flash Pro (Flex 4) with those SWC created on Flash CS4 
is that I lose the design view. Everything else seems to be working.

Is there any option to create a Flex 4 fully compatible SWC library from Flash 
CS4?

Thanks.

--- In flexcoders@yahoogroups.com, "Jeff"  wrote:
>
>  Although I've never tried to use a Flex SWC in Flash Pro or a Flash Pro SWC 
> in Flex; I was under the impression that the SWC File format was different 
> for Flex and Flash Professional; therefore you cannot use a SWC from one with 
> the other.
> 
> 
>  You'll want to look into the Flex Component Kit for Flash:
> http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1273018
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "Slackware"  wrote:
> >
> > Is that possible? Whenever I add a SWC library created on Flash CS4, I lose 
> > the design view on Flash Builder Beta.
> > Could anyone confirm this?
> > 
> > Many Thanks.
> >
>




RE: [SPAM] [flexcoders] Re: Problem Casting an Object to a known type

Yeah, I really suspect the problem is on the server side.  I don't recall
specifically using 4 or more levels of xml, but I would be very surprised if
the e4x implementation had a problem like that.  You plan to test it is a
good one.

 

A question: You say you are HTTPService, but are also using SOAP?  SOAP is
typically used with WebService calls.  Are you manually building a SOAP
message and then sending it using the HTTPService protocol?  Is the SAP web
service layer is a standard SOAP web service implementation, why are you not
using WebService?

 

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of bhaq1972
Sent: Friday, January 08, 2010 4:44 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Re: Problem Casting an Object to a known type

 

  

Hi Nick
If the returned object has 3 nested levels its xml but if it 4 nested levels
its not?

Do you use flexbuilder debugger? It might be worth putting a breakpoint at
the point where you return from the httpserviceand examining it. It
might not be a object which can be typecasted to ContactPerson().

Are you sure its a Compiler error or was it a Runtime error?

Bodrul

--- In flexcod...@yahoogro  ups.com,
Nick Middleweek  wrote:
>
> Hello...
> 
> We've just run into a problem... Has anyone else come across this before?
> 
> We're making HTTP Service calls and we're getting back nested data. We
have
> set the resultFormat="e4x" which we then parse into known Object types,
such
> a IContactData, IInvoiceDetails...
> 
> The Problem: With some service calls, the data returned has 4 or more
levels
> of nested data. In these cases, Flex isn't giving us XML. It is just
> returning an untyped Object with the nested data.
> 
> If the returned data has 3 levels or less of nested data then we get XML.
> 
> 
> We then thought, ok... The untyped Object returned by Flex does have all
the
> properties required to Cast it to our typed Object, e.g. IContactData...
> 
> But we are getting a "Coercion failed" message by the Compiler. Here's a
> basic example of the problem...
> 
> 
> var myPerson : Object = new Object();
> myPerson.age = "25";
> myPerson.sex = "dunno"
> myPerson.name = "Nick";
> 
> 
> var myContact : ContactPerson = new ContactPerson();
> myContact = ContactPerson(myPerson);
> // Where ContactPerson is a typed Object with age, sex and name String
> properties.
> 
> 
> 
> So has anyone managed to solve the 4 levels of nested data problem from an
> HTTP Service call?
> 
> and :)
> 
> Why can't we cast an untyped Object into a typed Object? :)
> 
> 
> Cheers guys...
> 
> Nick
>





[flexcoders] Re: NumericStepper override class

 I think your best bet is going to be to extend the NumericStepper, add some 
properties for disabling / enabling the buttons as appropriate.

 If you're interested in hiring someone to help, I'd be more than happy to 
discuss and contact me off list.



--- In flexcoders@yahoogroups.com, Eric Dunn  wrote:
>
> Let me explain further. 
> 
> I have several of numeric steppers (this number will vary) that will need to 
> total 100. So I have a method that adds the numeric steppers and sets to a 
> variable. I then want to check that variable and disable the up arrow on the 
> steppers if the value is >= 100, so that the only option is to move a value 
> down. 
> 
> Eric W Dunn 
> Adaption Technologies 
> 281-465-3326 
> ed...@... 
> 
> - Original Message - 
> From: "claudiu ursica"  
> To: flexcoders@yahoogroups.com 
> Sent: Friday, January 8, 2010 3:33:53 AM 
> Subject: Re: [flexcoders] NumericStepper override class 
> 
> 
> 
> 
> 
> 
> 
> 
> Do you need to disable it for the whole range of numbers or just for some of 
> them ? 
> C 
> 
> 
> 
> 
> From: Eric Dunn  
> To: flexcoders  
> Sent: Thu, January 7, 2010 11:43:03 PM 
> Subject: [flexcoders] NumericStepper override class 
> 
> 
> 
> 
> 
> I have the need to disable the up arrow and/or down arrow on a series of 
> numericSteppers .. 
> 
> 
> I believe I will need to create a new class that extends the NumericStepper 
> class. I have studied the numericStepper class and not sure what I need to 
> override or exactly what needs to written. 
> 
> Any advice or a direction to look at to assist me? 
> 
> Eric W Dunn 
> Adaption Technologies 
> 281-465-3326 
> ed...@adpt-tech. com
>

-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust




[flexcoders] Re: Incompatibilities between SWC libraries and Flash Builder Beta 2?

 Although I've never tried to use a Flex SWC in Flash Pro or a Flash Pro SWC in 
Flex; I was under the impression that the SWC File format was different for 
Flex and Flash Professional; therefore you cannot use a SWC from one with the 
other.


 You'll want to look into the Flex Component Kit for Flash:
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1273018



--- In flexcoders@yahoogroups.com, "Slackware"  wrote:
>
> Is that possible? Whenever I add a SWC library created on Flash CS4, I lose 
> the design view on Flash Builder Beta.
> Could anyone confirm this?
> 
> Many Thanks.
>




Re: [flexcoders] NumericStepper override class

Let me explain further. 

I have several of numeric steppers (this number will vary) that will need to 
total 100. So I have a method that adds the numeric steppers and sets to a 
variable. I then want to check that variable and disable the up arrow on the 
steppers if the value is >= 100, so that the only option is to move a value 
down. 

Eric W Dunn 
Adaption Technologies 
281-465-3326 
ed...@adpt-tech.com 

- Original Message - 
From: "claudiu ursica"  
To: flexcoders@yahoogroups.com 
Sent: Friday, January 8, 2010 3:33:53 AM 
Subject: Re: [flexcoders] NumericStepper override class 








Do you need to disable it for the whole range of numbers or just for some of 
them ? 
C 




From: Eric Dunn  
To: flexcoders  
Sent: Thu, January 7, 2010 11:43:03 PM 
Subject: [flexcoders] NumericStepper override class 





I have the need to disable the up arrow and/or down arrow on a series of 
numericSteppers .. 


I believe I will need to create a new class that extends the NumericStepper 
class. I have studied the numericStepper class and not sure what I need to 
override or exactly what needs to written. 

Any advice or a direction to look at to assist me? 

Eric W Dunn 
Adaption Technologies 
281-465-3326 
ed...@adpt-tech. com 






[flexcoders] Incompatibilities between SWC libraries and Flash Builder Beta 2?

Is that possible? Whenever I add a SWC library created on Flash CS4, I lose the 
design view on Flash Builder Beta.
Could anyone confirm this?

Many Thanks.



[flexcoders] Re: Updating renderer properties



--- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
>
> We're not so off really, I hear what you're saying.  Now we're getting a 
> better idea of the use-case.  In this case, all of the itemRenderers need to 
> be controlled the same way; by changing their styles and/or labels.  So let's 
> go up a level.  Extend the List, or whatever.  Both the dataProvider and the 
> collection of itemRenderers are there, so you could do it either way from the 
> parent.  

This has already been done, at flexdiary.blogspot.com.  You can download the 
source from the DataGrid_withStyle or TileList_withStyle and just pop either in 
your project and use the styleFunction just like you would with an 
AdvancedDataGrid.

But my dad used to tell a great joke about "you can lead a horse to the 
daughter, but you can't make him wink." So whatever ;)


-Amy



[flexcoders] Re: background color without gradient on an ApplicationControlBar?

This works for me...

ApplicationControlBar
{
 backgroundColor: #003867;
 color: #ff;
}

along with...

ApplicationControlBar
{
 fillAlphas: 1, 1;
 fillColors: #003867, #003867;
 color: #ff;
}

along with...



--- In flexcoders@yahoogroups.com, "Stefaan_Nachtergaele" 
wrote:
>
> desired: a solid dark blue background with white color text.
>
> How I'm trying it:
> ApplicationControlBar {
> fillAlphas: 1.0,1.0;
> fillColors: #003867, #003867;
> color: white;
> }
>
> What I'm getting:
> Dark blue to white gradient near the top.
>
> Anyone know how to do this?
> Thanks.
>



[flexcoders] Re: Updating renderer properties

I haven't tried this so I have no idea if it would work but why not just create 
a static variable inside your renderer class and change that as required?

--- In flexcoders@yahoogroups.com, Aaron Hardy  wrote:
>
> I think there might be a misunderstanding.  If it's a transient property on
> the data objects that come through the data provider, I would have to change
> the property for all the objects in the data provider to be the same value
> since I want all the renderers to change in the same way.  For example,
> let's say all my renderers say "Woot: " and then the data's text value.
> Then at runtime, the user, in a different part of the app, enters "Niner"
> into a text input and therefore I want all my renderers to now say "Niner: "
> and then the data's text value.  In my case, the word "Niner" really has
> nothing to do with the data, it's almost more about the "style" of the
> renderers--or what the renderers look like around the actual data.  If I
> were to use the transient property of the data provider objects, I'd have to
> loop through all of them and set the property's value to "Niner".  I'm not
> sure if that's what you were suggesting, but that seems dirtier to me than
> referencing a separate model from the renderers.
> 
> I'm interested in understanding your analysis of this though even if we may
> disagree in the end.
> 
> Aaron
> 
> On Thu, Jan 7, 2010 at 5:13 PM, turbo_vb  wrote:
> 
> >
> >
> > Sure, but you don't necessarily need a model to use a VO; it can just be
> > the strongly typed object that the dataProvider uses for its items. If you
> > then change the transient properties of that VO, the set data method of the
> > itemRenderer will work out of the box; and you can then adjust the renderer.
> > You're right in feeling dirty having an itemRenderer reference a model. But
> > reacting to changes in the data is fine. IMHO.
> >
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com , Aaron
> > Hardy  wrote:
> > >
> > > Yes, I suppose the line of what is or is not a style can be blurry at
> > > times. In any case, using transient properties inside a VO is what I was
> > > eluding in the first item of "things I've thought of", the downside being
> > > that a model/VO of some type is needed in order to keep the renderer
> > > notified of updates to the property. In other words, I don't see a viable
> > > way of creating a "foobar" property inside the renderer and keeping it
> > > updated from an external source. Instead, the renderer would need access
> > to
> > > a model that was set at instantiation through the renderer class factory.
> > > The renderer would then watch the model for changes to its "foobar"
> > > property.
> > >
> > > Aaron
> > >
> > > On Thu, Jan 7, 2010 at 2:58 PM, turbo_vb  wrote:
> > >
> > > >
> > > >
> > > > If it's a pure style, then yes that is a viable approach. However, if
> > it's
> > > > something like changing text (characters, not styles), then you might
> > want
> > > > to use [Transient] properties in a VO and/or use states in the
> > itemRenderer.
> > > >
> > > >
> > > > -TH
> > > >
> > > > --- In flexcoders@yahoogroups.com 
> > > >  > 40yahoogroups.com>, Aaron
> > > > Hardy  wrote:
> > > > >
> > > > > Good point. So maybe I have to categorize everything as being data
> > (in
> > > > > which case it hangs out with the data object) or style (in which case
> > it
> > > > > would be applied to all the renderers and can be ran through the
> > various
> > > > > style mechanisms). To be clear, the changes (that aren't
> > data-dependent)
> > > > > being made to the renderers in my case can even be text and other
> > such
> > > > > things which may not normally be thought of as "styles" but in
> > reality it
> > > > > seems they actually are styles and could be treated as such.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Aaron
> > > > >
> > > > > On Thu, Jan 7, 2010 at 1:23 PM, turbo_vb  wrote:
> > > > >
> > > > > >
> > > > > >
> > > > > > One thought, since you're taking about a style, is to assign a
> > > > styleName to
> > > > > > the itemRenderer and update the backgroundColor style of the
> > > > > > StyleDeclaration when the user changes the color. You may need to
> > > > override
> > > > > > the styleChanged() method the itemRenderer, to handle the update.
> > > > > >
> > > > > > -TH
> > > > > >
> > > > > >
> > > > > > --- In flexcoders@yahoogroups.com 
> > > > > >  > 40yahoogroups.com> >
> > > > 40yahoogroups.com>, Aaron
> > > >
> > > > > > Hardy  wrote:
> > > > > > >
> > > > > > > Hey folks. I have a renderer that needs information that is not
> > based
> > > > on
> > > > > > > the "data" object it's associated with. Essentially what I have
> > is in
> > > > > > View
> > > > > > > A of the app is a color selector. In View B, I have a tilelist
> > with a
> > > > > > > custom renderer. All the renderers in the tile list display their
> > > > data
> > > > > > > using the color that was selected in Part A. The way I see it,
> > the
> > > > color

[flexcoders] Datagrid issue


Folks,

I am seeing a strange display issue in my data grid.



Datagrids typically have background colors for alternate rows. But in my
case, when I run my app in certain PCs only some COLUMNS have these
alternate background colors, and others dont have it ! I have no clue
what is going on or how to debug this.



Anyone else seen this issue or have any clue what may be happening here
?



I have  a screen shot of this problem at

http://forums.adobe.com/servlet/JiveServlet/download/2503093-33403/flexi\
ssue.PNG






- Rony



[flexcoders] Flash Builder 4 HTML wrapper issue

I just started to try out FB4 the other day. When I uncheck the
settings to "Generate HTML Wrapper" and place my own custom HTML in
there and publish, it deletes my HTML file. This wasn't the
functionality in FB3.

Has anyone experienced this issue? Any clue how I can create custom
HTML without it being deleted during project build?

Thanks
Kris


[flexcoders] NumberValidator conflicts with resourcemanager


Hi all

I have written the following test


http://www.adobe.com/2006/mxml"; layout="vertical"
 viewSourceURL="srcview/index.html">
 
 
 
 
 
 
 
 
 
 


with the following resources

package
{
 /**
  * ...
  * @author khanhpham
  */
 public class Languages
 {
 import mx.resources.IResourceManager;
 import mx.resources.ResourceBundle;

 public function Languages() {}
 public static function
setResources(resourceManager:IResourceManager):void{


 var myResources:ResourceBundle=new
ResourceBundle("en_US","myResources");
 myResources.content['TITLE']="Test";
 resourceManager.addResourceBundle(myResources);


 myResources=new ResourceBundle("vi_VN","myResources");
 myResources.content['TITLE']="TestVietNamese";
 resourceManager.addResourceBundle(myResources);

 resourceManager.update();

 }
 }

}

Now the following error occurs. When I start the application my number
validation works as expected. When I afterward switch to Vietnam the
number validator don't work anymore.

Do the following steps

1. Type in a number in the text field
2. Switch to Vietnam
3. Type in a letter => the text field does not turn into red

Any ideas?

Best regards




[flexcoders] Re: Blazeds on Godaddy

Any luck in having blazeds work on godaddy hosting account? I was thinking of 
setting it up.


--- In flexcoders@yahoogroups.com, "mslinn.com"  wrote:
>
> I am considering moving to a hosted service instead of running my own servers 
> because sysadmin takes too much time.  I'm not sure which Godaddy service you 
> use, but I learned yesterday that their shared hosted offering uses JDK 1.5 
> and Tomcat 5.
> 
> The turnkey BlazeDS is provided with Tomcat 6, and JDK 1.6 is recommended.  I 
> don't think that there is necessarily a compatibility issue, but you might 
> want to test your setup on a local machine with JDK 1.5 and Tomcat 5 just to 
> be sure.
> 
> Mike
>




[flexcoders] background color without gradient on an ApplicationControlBar?

desired: a solid dark blue background with white color text.

How I'm trying it:
ApplicationControlBar {
fillAlphas: 1.0,1.0;
fillColors: #003867, #003867;
color: white;
}

What I'm getting: 
Dark blue to white gradient near the top.

Anyone know how to do this?
Thanks.




[flexcoders] Re: Problem Casting an Object to a known type

Hi Nick
If the returned object has 3 nested levels its xml but if it 4 nested levels 
its not?

Do you use flexbuilder debugger? It might be worth putting a breakpoint at the 
point where you return from the httpserviceand examining it. It might not 
be a object which can be typecasted to ContactPerson().

Are you sure its a Compiler error or was it a Runtime error?


Bodrul












--- In flexcoders@yahoogroups.com, Nick Middleweek  wrote:
>
> Hello...
> 
> We've just run into a problem... Has anyone else come across this before?
> 
> We're making HTTP Service calls and we're getting back nested data. We have
> set the resultFormat="e4x" which we then parse into known Object types, such
> a IContactData, IInvoiceDetails...
> 
> The Problem: With some service calls, the data returned has 4 or more levels
> of nested data. In these cases, Flex isn't giving us XML. It is just
> returning an untyped Object with the nested data.
> 
> If the returned data has 3 levels or less of nested data then we get XML.
> 
> 
> We then thought, ok... The untyped Object returned by Flex does have all the
> properties required to Cast it to our typed Object, e.g. IContactData...
> 
> But we are getting a "Coercion failed" message by the Compiler. Here's a
> basic example of the problem...
> 
> 
> var myPerson : Object = new Object();
> myPerson.age = "25";
> myPerson.sex = "dunno"
> myPerson.name = "Nick";
> 
> 
> var myContact : ContactPerson = new ContactPerson();
> myContact = ContactPerson(myPerson);
> // Where ContactPerson is a typed Object with age, sex and name String
> properties.
> 
> 
> 
> So has anyone managed to solve the 4 levels of nested data problem from an
> HTTP Service call?
> 
> and :)
> 
> Why can't we cast an untyped Object into a typed Object? :)
> 
> 
> Cheers guys...
> 
> Nick
>




Re: [flexcoders] NumericStepper override class

Do you need to disable it for the whole range of numbers or just for some of 
them ?
C





From: Eric Dunn 
To: flexcoders 
Sent: Thu, January 7, 2010 11:43:03 PM
Subject: [flexcoders] NumericStepper override class

   
I have the need to disable the up arrow and/or down arrow on a series of 
numericSteppers .. 


I believe I will need to create a new class that extends the NumericStepper 
class. I have studied the numericStepper class and not sure what I need to 
override or exactly what needs to written. 

Any advice or a direction to look at to assist me?  

Eric W Dunn
Adaption Technologies
281-465-3326
ed...@adpt-tech. com