[flexcoders] Application file doesn't launch

2007-05-31 Thread Kevin
Does anyone know the reason an flex application would not launch and  
instead just fail silently in Eclipse?

I am trying to run the main application file and the launcher starts  
up, but then stops and nothing is launched in the browser.  However,  
if I create a new blank test project, then everything works fine.   
There must be something in this project that is causing it to not  
launch.

I am trying to rebuild a project from my SVN after a hard drive crash.

Thanks, Kevin


RE: [flexcoders] Re: Treat a string as a reference to an object?

2007-05-31 Thread Gordon Smith
I'm not sure what obj1, obj2, etc. are in your example. But if they're
instance variables in your class, then
 
obj1.foo
this.obj1.foo
this.obj1["foo"]
this["obj1"].foo
this["obj1"]["foo"]
 
are all equivalent. So you can look up a property by name on an object
by name as
 
this[object_name][property_name]
 
Keep in mind that when you write a class in MXML, the id's of MXML tags
become instance variables of the class. For example, if you have
 

 
then
 
this["b"]["label"]
 
will be "OK".
 
- Gordon
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of tedgies
Sent: Friday, May 25, 2007 9:35 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Treat a string as a reference to an object?



Thanks Gordon,

Following your example, can you create the name of the root object 
dynamically and have it be treated as a valid property reference at 
runtime? 

example: If i wanted obj1.foo, obj2.foo, or objsome_string.foo

thanks,

Ted

--- In flexcoders@yahoogroups.com 
, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> > I was wondering if Flex/Actionscript allows you to create 
references 
> > to object properties on the fly with a dynamically created 
string. 
> 
> Yes. If obj is an object and s is the String "foo", then obj[s] is
> obj.foo.
> 
> - Gordon
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of tedgies
> Sent: Friday, May 25, 2007 10:43 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Treat a string as a reference to an object?
> 
> 
> 
> Hi,
> 
> I was wondering if Flex/Actionscript allows you to create 
references 
> to object properties on the fly with a dynamically created string. 
> For example i would like to add a new series to a chart series at 
> runtime and dynamically create the reference to dataprovider (an 
> httpservice) with a string.
> 
> var numJournals:String = new String;
> numJournals = 3;
> var series = chartC.series;
> var dataXMLStr:String = new String;
> var newSeries:LineSeries = new LineSeries;
> dataXMLStr = "series" + numJournals + ".lastResult.item";
> newSeries.dataProvider = dataXMLStr
> 
> series.push(newSeries)
> chartC.series = series;
> 
> The problem is that on the 7th line above newSeries does not 
> recognize dataXMLStr as a reference to my httpservice dataprovider. 
> So is there a function i can use to make dataXMLStr appear as a 
> reference to my dataprovider, e.g. so flex will read:
> 
> newSeries.dataProvider = series3.lastResult.item
> 
> thanks,
> Ted
>



 


[flexcoders] Re: Disable Clicks while on busyCursor

2007-05-31 Thread Bjorn Schultheiss
This is quite slow.
I wait for the app to disable, then any animations running while the
app is disabled lag.



--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Did you try Application.application.enabled = false?
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Troy Gilbert
> Sent: Thursday, May 31, 2007 10:19 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Disable Clicks while on busyCursor
> 
>  
> 
> Is it just me, or is it a bit surprising that we've got to hack
> something together to handle this? Come on, Adobe... what's a proper
> solution (and why wasn't it built into the CursorManager!)? I've got
> enough asynchronous problems to deal with than have to worry that the
> user's going to go off willy-nilly clicking buttons while the busy
> cursor is being shown. I understand that some folks may not want it to
> *always* prevent mouse clicks, but a little boolean flag (or two) in the
> CursorManager that prevents mouse clicks and/or focus changes/keyboard
> events would be very, very nice. 
> 
> Troy.
> 
> 
> 
> On 5/31/07, Anthony Lee <[EMAIL PROTECTED]
>  > wrote:
> 
> >> - Make all your active components register themselves then loop
> through 
> >> and disable/enable them according to your busy state 
> 
> > Too taxing on cpu...
> 
> How many components are we talking about?
> 
> Hack #3
> Generate an Alert and position it outside the viewable area. They're
> modal by default... meaning the user shouldn't be able to click on
> anything till you clear it. 
> 
> Anthony
>




RE: [flexcoders] My problems with Events

2007-05-31 Thread Gordon Smith
If you're listening for MouseEvent.CLICK, you're not going to get it
when the mouse pointer simply enters anything. You get it only when you
click the mouse button!
 
If you want to detect entering and leaving sprites, use
MouseEvent.ROLL_OVER and MouseEvent.ROLL_OUT.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jairokan
Sent: Sunday, May 27, 2007 6:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] My problems with Events



Hi,
I'm doing a little application example while learning different
topics. I'm in the Events topic now ,which I'm still struggling to
understand (Capture, bubble phases). The application is very simple
having a display list as follows.
MainSprite
ChildSprite
TextField

The Child Sprite has a certain dimension width, height. It contains
the Text Field, width also dimension set smaller than Child Sprite.
I've added an EventListener to the Child Sprite, the Event type is
CLICK. The event handler will change the backgroung of the Child Sprite.

The problem is that the event is triggered only if the mouse pointer
enters the TextFiled area, which is a non expected behaviour. The
Event should be dispatched as soon as the mouse pointer enters the
Child Sprite area. 
Can please someone explain brievely if this is the correct behaviour
and what should I do to trigger the handler event as soon as the mouse
pointer enters the Child Sprite are, not until it goes the the text
field area.
Thanks 



 


RE: {Disarmed} [flexcoders] Just getting started, hitting walls...

2007-05-31 Thread Gordon Smith
> Hello Flex Community, 
> I am a very experienced CF developer, and I want to get into Flex. 
 
Based on your first impressions, how does the support from the Flex
community compare with than in the ColdFusion community?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave @ VitalPodcasts.com
Sent: Wednesday, May 30, 2007 1:04 PM
To: flexcoders@yahoogroups.com
Subject: Re: {Disarmed} [flexcoders] Just getting started, hitting
walls...



Thanks for all the help everyone!



 


RE: [flexcoders] How to use UIComponentDescriptor "type" property

2007-05-31 Thread Gordon Smith
Lets say that your custom component class is MyComponent. Are you trying
to determine whether the descriptor is for any instance of MyComponent,
or for a particular instance of MyComponent?
 
If it is the latter, I would do
 
if (someDescriptor.type == MyComponent)
 
rather than
 
if (someDescriptor.type.toString() == "class MyComponent")
 
In other words, use MyComponent as a Class literal value.
 
If it is the former, do
 
if (someDescriptor == myComponentInstance.descriptor)
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gary_mangum
Sent: Wednesday, May 30, 2007 3:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to use UIComponentDescriptor "type" property



I want to use the 'type' property of the UIComponentDescriptor object
to find out if the component that it is describing is my custom
component.

The only way I have been able to do this so far is by calling
toString() on the 'type' property and doing a string compare with the
name of my custom component. This seems all wrong. It seems like I
should be able to do a compare with the 'type' property as is, or use
the 'is' operator or something, but so far I have been unsuccessful in
my attempts.

Any thoughts? I think I am missing something basic and obvious on
this one. :-)

Thanks again!



 


Re: [flexcoders] AutoComplete component?

2007-05-31 Thread Kevin

thanks!  - kevin

On Jun 1, 2007, at 1:35 AM, Brendan Meutzner wrote:

Not sure what happened to it, but here's the swc at least... hope  
this attachment works...


Brendan


On 5/31/07, Kevin < [EMAIL PROTECTED]> wrote:
Does anyone know what happened to the AutoComplete component? I
can't seem to find it in the Adobe Exchange anymore. i just had a
hard drive crash and I am trying to reinstall my swc libs for my
project.

Is there another good AutoComplete component out there?

Thanks, Kevin




--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca







[flexcoders] AutoComplete component?

2007-05-31 Thread Kevin
Does anyone know what happened to the AutoComplete component?  I  
can't seem to find it in the Adobe Exchange anymore.  i just had a  
hard drive crash and I am trying to reinstall my swc libs for my  
project.

Is there another good AutoComplete component out there?

Thanks, Kevin


RE: [flexcoders] Question about delete

2007-05-31 Thread Gordon Smith
Just to be pedantically correct...
 
In AS3 you can't destroy any object... only the garbage collector can. But by 
nulling the (only) var referring to your Podz instance, it becomes elegible for 
garbage collection at some point in the future.
 
Setting the var to null is not the only way to release the reference to the 
Podz instance.. Setting it to refer to a second Podz instance would make the 
first instance eligible to be GCd. Or if the var was of type Object or *, you 
could set it to 17 or "abc", but null is the obvious convention.
 
And if the var is a local variable, then that var automatically goes out of 
scope at the end of the function (not at the end of its block!) and the Podz 
instance becomes GC-eligible then.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of André 
Rodrigues Pena
Sent: Wednesday, May 30, 2007 3:30 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Question about delete



Olsen,
var tmpPod:Podz;
you have already created a pointer. But in order to destroy it, you set it as 
null. 


On 5/30/07, Alex Harui < [EMAIL PROTECTED]  > wrote: 



No pointers in AS3, just references.  As soon as you set tmpPod=null, 
the instance of Podz is eligible for garbage collection.

 





From: flexcoders@yahoogroups.com [mailto: flexcoders@ 
 yahoogroups.com  ] On Behalf Of 
Christopher Olsen
Sent: Wednesday, May 30, 2007 11:02 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question about delete

 

Hello,

Quick question.. The following doesn't work says it must be dynamically 
defined... how do we make something a pointer?

var tmpPod:Podz = new Podz();
delete(tmpPod);










-- 
André Rodrigues Pena

LOCUS
www.locus.com.br  

Blog
www.techbreak.org   

 


RE: [flexcoders] Re: Is there any way to call super.super.method in AS3?

2007-05-31 Thread Gordon Smith
Alex meant to say "If a method is overridden, you can NOT skip around
the override like you can in some other languages." And you can't
directly, with super.super. But you can, indirectly.
 
The way the framework codes around the lack of super.super is to use the
following pattern:
 
class A
{
function f()
{
doSomething();
}
}
 
class B extends A
{
// This will hide A's f()
override function f()
{
doSomethingElse();
}
 
// But this makes A's f() available as B's $f
final function $f()
{
super.f();
}
}
 
class C extends B
{
override function f()
{
$f(); // call A's f() -- which is effectively super.super.f()
}
}
 
Using $ in the name is just a convention which indicates that you're
getting the original, un-overridden function. We also make it final to
guarantee that it remains un-overridden.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Wednesday, May 30, 2007 2:10 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Is there any way to call
super.super.method in AS3?



Sorry, but I think you're wrong or misunderstood.  If a method is
overridden, you can skip around the override like you can in some other
languages



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of justinbuser
Sent: Wednesday, May 30, 2007 10:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Is there any way to call super.super.method in
AS3?



--- In flexcoders@yahoogroups.com, "wpding" <[EMAIL PROTECTED]> wrote:
>
> I want to override a method of a super class. and I can use
> super.method to invoke the corresponding method of the super class.
> 
> But how i can call a method of the super super class.
> for example.
> Class A{
> protected function myMethod(){}
> }
> Class B extends A{
> override protected function myMethod(){}
> }
> 
> Class C extends B{
> override protected function myMethod(){}
> }
> 
> Is it possible to call A.myMethod in the function C.MyMethod?
> 
> Thanks
>
Yes, exactly how you wrote it.  However in order to have the top level
function actually run before adding methods etc... with level 2 you need
to call super.myMethod(); from B or not override it at all in B to be
able to access it's functionality! from C.  In other words, if you
override a function and then try to override it again in a class
extending the one with the original override and don't call the super
version in the intermediate class then you end up with an empty function
at the end.

JjB

-#As always I could be completely wrong, but it's not likely#-

 


RE: [flexcoders] Re: Actionscript SAX Parser ?

2007-05-31 Thread Gordon Smith
I'd be interested to know what your use case is that requires a SAX
parser. How large is your XML? Did you run into a memory or performance
problem with AS3's E4X capabilities?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of powertool786
Sent: Thursday, May 31, 2007 6:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Actionscript SAX Parser ?



The XML4JS SAX Parser seems to be written pretty reasonably... I think
I'll have a go at automatically porting it to AS3.0 with a Perl script.

If it works at all, I'll continue by doing some profiling, then fill
out the API a little. 

I don't need much working for my purposes.

-David

--- In flexcoders@yahoogroups.com 
, "Peter Hall" <[EMAIL PROTECTED]> wrote:
> Just last week, I had an unsuccessful look around for an AS3 SAX 
> parser. I thought about making one myself, but couldn't justify the
> time to fit inside the project schedule.
> 
> Peter



 


Re: [flexcoders] Re: Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread Derek Vadneau

[quote by Troy Gilbert]
"Not in the constructor."

Assuming your SWF is being loaded into another SWF.

[quote by Alex Harui]
"The stage should be there for the root class right away."

If your SWF is the main (root) SWF, then Alex is correct. Although listening
for ADDED_TO_STAGE would be the safest way since it means never having to
refactor your code if it ever is loaded by another SWF.

Also, ADDED_TO_STAGE is only triggered if the loaded SWF is added to the
display list. If you load the SWF and do nothing with it, the event will
never fire and the SWF won't have a stage property value.


On 5/31/07, Troy Gilbert <[EMAIL PROTECTED]> wrote:


  Not in the constructor. During the constructor of a Sprite it has not
yet been added. What you need to do in your constructor is:

this.addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);

And then in handleAddedToStage() method of your class this.stage will be
valid. If you need to know when you're removed from the stage (which, AFAIK,
won't happen to your root class in an AS3 project, but will happen to other
classes, potentially) is to listen for REMOVED_FROM_STAGE.

If you wanna know when this.parent is valid, listen for Event.ADDED.

Troy.



On 5/31/07, Alex Harui < [EMAIL PROTECTED]> wrote:
>
>Sorry, didn't read the whole thing.
>
>
>
> The stage should be there for the root class right away.
>
>
>
> -Alex
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED]
> *On Behalf Of *Michael Schmalle
> *Sent:* Thursday, May 31, 2007 4:17 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Re: Accessing the illusive stage Object
> through sprite (a near impossible feat)
>
>
>
> Alex,
>
> I think he said he was using an AS3 project. There is no
> applicationComplete event right?
>
> Peace, Mike
>
> On 5/31/07, *Alex Harui* < [EMAIL PROTECTED]> wrote:
>
> applciationComplete
>
>
>
> systemManager.stage should be available to you at initialize
>
>
>   --
>
> * From:* flexcoders@yahoogroups.com [mailto: flexcoders@ yahoogroups.com]
> *On Behalf Of *patricklemiuex
> *Sent:* Thursday, May 31, 2007 2:15 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: Accessing the illusive stage Object through
> sprite (a near impossible feat)
>
>
>
> Michael,
>
> Thanks so much, where was that event hiding? I was using a hackish
> timer to do the job. However, your solution doesn't work from within
> the class that I create (haven't tried outside yet). Is there a way
> to do this all from inside the class I am using, or does the event
> listener have to sit outside the class?
>
> Really, I think it would have been better, but maybe it's not even
> possible to make the constructor function of classes automatically
> have access to the stage object on instantiation?
>
> Also, to trap keyboard events the only way I could make it works is
> the following:
>
> stage.focus = this.parent;
> this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> this.stage.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
>
> --- In flexcoders@yahoogroups.com ,
> "Michael Schmalle"
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > The stage object does not get defined until right at the end of the
> players
> > init cycle.
> >
> > Try listening to the Sprites Event.ADDED_TO_STAGE event, then access
> the
> > stage object.
> >
> > Peace, Mike
> >
> > On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:
> > >
> > > Dear Actionscript wizards:
> > >
> > > I have an all as3.0 project.
> > >
> > > I can never seem to access the stage object (I've posted several
> times
> > > and never can get any appropriate solutions)? i thought this was
> > > automatic with every class that extends sprite... I get a null
> object
> > > reference trying to access the stage object. I must be doing
> > > something incorrectly, though I have studied this in a few places.
> > >
> > > public class AbstractSlideView extends Sprite
> > > {
> > > protected var _data:PictureProviderXML;
> > > //protected var _data:PictureProvider;
> > > private var _paramObj:Object;
> > >
> > > public function AbstractSlideView() {
> > > var timer:Timer = new Timer(1000,1);
> > > timer.addEventListener(TimerEvent.TIMER, installVars);
> > > timer.start();
> > > this.stage.focus = this;
> > > this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> > > this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
> > > }
> > >
> > >
> > >
> >
> >
> >
> > --
> > Teoti Graphix
> > http://www.teotigraphix.com
> >
> > Blog - Flex2Components
> > http://www.flex2components.com
> >
> > You can find more by solving the problem then by 'asking the
> question'.
> >
>
>
>
>
> --
> Teoti Graphix
> http://www.teotigraphix.com
>
> Blog - Flex2Components
> http://www.flex2components.com
>
> You can find more by solving the problem then by 'asking the question'.
>
>
 





--

Derek Vadneau


[flexcoders] Re: Tooltip in itemeditor of datagrid BUG or... WIsh...

2007-05-31 Thread nxzone
Is not a custom tooltip... It a custom itemeditor in the datagrid.
This itemeditor is a textinput with a validator.

When the text change the validator validate and show a red border with
a tooltip... Something like this



RE: [flexcoders] Re: Brainstorming; Dynamic Conditionals in MXML

2007-05-31 Thread Gordon Smith
> c'mon adobe guys! you can do it ;)
 
When we implemented , we considered whether to add
conditional tags like . We decided against it on the grounds that
it would be confusing about whether these tags worked at compile time or
at runtime. We felt that dynamic runtime logic belongs in script, not in
declarative syntax.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Aldo Bucchi
Sent: Thursday, May 31, 2007 5:41 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Brainstorming; Dynamic Conditionals in MXML



ok,

just realized that you can accomplish something similar by using
navigators... just set creationPolicy="auto" and conditionally set the
selectedIndex... only it will just work under some particular
circumstances and is quite hacky.

i need to destroy children when the condition changes, to avoid
parameter problems... but still. that only leaves me with binding
issues.

OTOH, the ideal way would be to create a custom component that
implements IRepeater so that containers don't add it, and then play
with createChildrenFromDescriptors and such.

i just gave the latter a try and got it kinda working, but it would
take too much time to make it work with bindings and stabilize
it. i give up.

c'mon adobe guys!
you can do it ;)

best,
Aldo

On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]
 > wrote:
> Hi Guys,
>
> Has anyone flirted with the idea of creating MXML
> conditional-structure components that can be used to dynamically
> generate interfaces??
>
> just to be more graphical... something like this
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> it just makes a lot of sense...
> any ideas
>
> best,
> Aldo
>
>
> --
> : Aldo Bucchi :
> mobile +56 9 8429 8300
>

-- 
: Aldo Bucchi :
mobile +56 9 8429 8300


 


Re: [flexcoders] Hyperlink in datagrid

2007-05-31 Thread Derek Vadneau

You could setup a hyperlink by creating a custom cellrenderer, but the
easier way would be to listen for the change event. That will give you the
rowIndex and columnIndex so you can get the data for the cell pressed and
execute the navigateToURL (or whatever other code) based on that data.


On 5/31/07, Ekta Aggarwal <[EMAIL PROTECTED]> wrote:


  Hi,

I am displaying some data in a datagrid where dataprovider is a XML file.
Now, I have a requirement where I need to provide a hyperlink on each data
cell of the datagrid, so that clicking on the item can take me to some other
page. e.g.


--
column1column2
-
 FailPass
 FailPass
--

Clicking on fail/pass should display the log results.

Any idea, how to provide the hyperlink?

Regards,
Ekta


Ekta Gupta

 www.geocities.com/aggarwalekta

--
Take the Internet to Go: Yahoo!Go puts the Internet in your 
pocket:mail,
 news, photos more.

 





--

Derek Vadneau


Re: [flexcoders] TabNavigator/ToggleButtonBar Style conflict

2007-05-31 Thread Derek Vadneau

Thank you for the workaround, it will work great for my project.

Now, I can maybe understand that it's perhaps not a bug but it definitely is
a shortcoming of the style system and docs.

There is no mention of Tab in the docs. I had to go look for the class in
the SDK just to know how you got that.

Also, other than searching through the component code, the only method given
for setting the styles on the components is what I gave. In fact I got that
from the Adobe style explorer app.

And if I had a TabBar component in my project (I don't but bare with me) it
would take on the style I set with Tab, which I would expect, but not
necessarily want.

When I explicitly set a style for a component I expect that it takes on that
style. I understand what you mean by TypeSelectors and inheritance, but that
just means the style system (or code implementing it) might be flawed. When
I set a style for ToggleButtonBar, I would expect ALL instances of
ToggleButtonBar to take on that style. However, in the case of the
TabNavigator (and any other component that contains other components) when
there is a way to explicitly affect a child instance within, that should be
honoured.

Going back to my code, I would expect that the text in each TabNavigator tab
might be red (because of the ToggleButtonBar styles), but they aren't. Only
the first and last are. And I would expect that the cornerRadius set by the
TabNavigator style be honoured. If I set the cornerRadius as you mention in
mytoggleButtonBarFirstButtonStyle, I would expect the TabNavigator style to
override that style. Why? Because that style was explicitly set for the
TabNavigator's children.

A simplified example, but just to show where my head is at: Take an HTML
page with CSS. If I have a list item of an unordered list and specify a
style for li to be color:#FF and font-weight:bold, the text would be red
and bold. If I set a particular list item to use a class style where the
color is #FF, that one list item would be blue and bold. That would be
my expectation anyhow.

Hopefully you get my meaning.

Thanks for you time!



On 5/31/07, Michael Schmalle <[EMAIL PROTECTED]> wrote:


  Hi,

The reason it doesn't work is because TypeSelectors order in inheritance.

Tab {
cornerRadius: 20;
}

Solves your Problem. This is not a bug.

Since you are setting a firstButtonStyleName on an actual selector,
TabNavigator will not pick it up since it is undefined to begin with and now
defined on the super class TypeSelector of TabBar.

If you set

.mytoggleButtonBarFirstButtonStyle {color: #FF;cornerRadius: 0;}

You will see that changes the radius of the first tab button.

Peace, Mike


On 5/31/07, Derek Vadneau <[EMAIL PROTECTED]> wrote:
>
>   Code follows...
>
> Setting styles for ToggleButtonBar overrides styles set for buttons of
> TabNavigator.
>
> The TabNavigator uses the ToggleButtonBar (actually, TabBar, which
> extends ToggleButtonBar) for the "tabs".
>
> What happens is if I set styles for the TabNavigator tabs, they are
> ignored if I also set styles for the ToggleButtonBar.
>
> Here is the code:
>
> 
> http://www.adobe.com/2006/mxml"; xmlns="*"
> layout="absolute">
> 
> TabNavigator {
> cornerRadius: 0;
> tabStyleName: "myTabButtonStyle";
> firstTabStyleName: "myTabFirstButtonStyle";
> lastTabStyleName: "myTabLastButtonStyle";
> selectedTabTextStyleName: "myTabSelectedButtonStyle";
> }
> .myTabButtonStyle {cornerRadius: 20;}
> .myTabFirstButtonStyle {cornerRadius: 20;}
> .myTabLastButtonStyle {cornerRadius: 20;}
> .myTabSelectedButtonStyle {cornerRadius: 20;}
>
> ToggleButtonBar {
> buttonStyleName: "mytoggleButtonBarButtonStyle";
> firstButtonStyleName: "mytoggleButtonBarFirstButtonStyle";
> lastButtonStyleName: "mytoggleButtonBarLastButtonStyle";
> selectedButtonTextStyleName: "mytoggleButtonBarSelectedButtonStyle";
> }
> .mytoggleButtonBarButtonStyle {color: #FF;}
> .mytoggleButtonBarFirstButtonStyle {color: #FF;}
> .mytoggleButtonBarLastButtonStyle {color: #FF;}
> .mytoggleButtonBarSelectedButtonStyle {color: #FF;}
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
>
> All I'm trying to do is set the cornerRadius of the tabs to be some
> value - I've exagerrated the value here and left out style properties
> for the ToggleButtonBar buttons just so it's obvious what's going on.
>
> The outside TabNavigator only has one tab and that takes on the style
> of the TabNavigator selectedTab style. The inner TabNavigator shows
> that the first and last buttons take on the ToggleButtonBar styles but
> the middle button takes on the TabNavigator style.
>
> If you comment out the ToggleButtonBar styles the TabNavigator styles
> are applied properly.
>
> As a workaround I can specify the styleName of the ToggleButtonBar I'm
> using so that the style is specific to that instance rather than
> global to all components.
>
> I would classify this as a bug, unless someone can convince me why
> this is expected behaviour.
>
> --
>
> Derek Vadneau
>



-

Re: [flexcoders] Error #1009 - Problem running swf on production server

2007-05-31 Thread Flexing...

This is basically a null pointer exception.
In your itemrenderer you must be trying to access the variable of an  
object to probably display the value.

The object in this case is null.
You need to add nullity check in your code.


On Jun 1, 2007, at 12:19 AM, sarah_e_boys wrote:



I get the following error when I try and run my application on a
production server:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at samples::MyTreeItemRenderer/set data()

The application works fine if I reference it with http://localhost or
run if from Flex Builder. I hope it is something very simple regarding
a reference to the MyTreeItemRenderer.as class not being compiled into
the swf file. I would be grateful for any suggestions...







Re: [flexcoders] Re: Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread Troy Gilbert

Not in the constructor. During the constructor of a Sprite it has not yet
been added. What you need to do in your constructor is:

this.addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);

And then in handleAddedToStage() method of your class this.stage will be
valid. If you need to know when you're removed from the stage (which, AFAIK,
won't happen to your root class in an AS3 project, but will happen to other
classes, potentially) is to listen for REMOVED_FROM_STAGE.

If you wanna know when this.parent is valid, listen for Event.ADDED.

Troy.


On 5/31/07, Alex Harui <[EMAIL PROTECTED]> wrote:


   Sorry, didn't read the whole thing.



The stage should be there for the root class right away.



-Alex


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Michael Schmalle
*Sent:* Thursday, May 31, 2007 4:17 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Re: Accessing the illusive stage Object
through sprite (a near impossible feat)



Alex,

I think he said he was using an AS3 project. There is no
applicationComplete event right?

Peace, Mike

On 5/31/07, *Alex Harui* < [EMAIL PROTECTED]> wrote:

applciationComplete



systemManager.stage should be available to you at initialize


 --

*From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED] *On
Behalf Of *patricklemiuex
*Sent:* Thursday, May 31, 2007 2:15 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: Accessing the illusive stage Object through
sprite (a near impossible feat)



Michael,

Thanks so much, where was that event hiding? I was using a hackish
timer to do the job. However, your solution doesn't work from within
the class that I create (haven't tried outside yet). Is there a way
to do this all from inside the class I am using, or does the event
listener have to sit outside the class?

Really, I think it would have been better, but maybe it's not even
possible to make the constructor function of classes automatically
have access to the stage object on instantiation?

Also, to trap keyboard events the only way I could make it works is
the following:

stage.focus = this.parent;
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.stage.addEventListener(KeyboardEvent.KEY_UP,keyHandler);

--- In flexcoders@yahoogroups.com , "Michael
Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> The stage object does not get defined until right at the end of the
players
> init cycle.
>
> Try listening to the Sprites Event.ADDED_TO_STAGE event, then access the
> stage object.
>
> Peace, Mike
>
> On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:
> >
> > Dear Actionscript wizards:
> >
> > I have an all as3.0 project.
> >
> > I can never seem to access the stage object (I've posted several times
> > and never can get any appropriate solutions)? i thought this was
> > automatic with every class that extends sprite... I get a null object
> > reference trying to access the stage object. I must be doing
> > something incorrectly, though I have studied this in a few places.
> >
> > public class AbstractSlideView extends Sprite
> > {
> > protected var _data:PictureProviderXML;
> > //protected var _data:PictureProvider;
> > private var _paramObj:Object;
> >
> > public function AbstractSlideView() {
> > var timer:Timer = new Timer(1000,1);
> > timer.addEventListener(TimerEvent.TIMER, installVars);
> > timer.start();
> > this.stage.focus = this;
> > this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> > this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
> > }
> >
> >
> >
>
>
>
> --
> Teoti Graphix
> http://www.teotigraphix.com
>
> Blog - Flex2Components
> http://www.flex2components.com
>
> You can find more by solving the problem then by 'asking the question'.
>




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

 



[flexcoders] Re: Socket Connection to Port 80 on Serving Host

2007-05-31 Thread powertool786

> Why do I need to implement an XMLSocket server, to open a Socket 
> to a service on my server that isn't an XMLSocket service? Why 
> can't it get the information it needs from an HTTP resource?

It would seem that the Flash designers/implementors thought that
perhaps the ubiquity of the Flash plug-in for deployed web browsers is
such that unfettered server access could promote a market for
bot/drone developers and privacy eroding spyware/malware.

I can't really see it myself. I guess they thought that Flash would
not be as widely deployed if there was any sort of media noise related
to security problems it might cause for the user.
 
> It seems as though the intent is to prevent the Flash player from
> communicating, using Sockets, to any standard HTTP server setup
> (port 80 open, nothing else). Why?

Any standard HTTP server or mail, or DNS, or other server on its
standard (low) port. The only option seems to be to write your own
generic TCP proxy, then host it on your own bandwidth... sigh.

That certainly does cut down the usefulness of Flash as an application
platform. 

In the past, I've deployed a Flex app on XULRunner and used the XPCOM
socket apis. Very fragile, hard to debug, and seemingly pointless.

I see it as a show-stopper (in consideration of Flash) for small
projects that require decent access to external resources (sans
hosting bandwidth)... I just have to use another language for those
projects.

-David.







[flexcoders] Error #1009 - Problem running swf on production server

2007-05-31 Thread sarah_e_boys

I get the following error when I try and run my application on a 
production server:

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at samples::MyTreeItemRenderer/set data()


The application works fine if I reference it with http://localhost or 
run if from Flex Builder. I hope it is something very simple regarding 
a reference to the MyTreeItemRenderer.as class not being compiled into 
the swf file.  I would be grateful for any suggestions...



[flexcoders] Re: Brainstorming; Dynamic Conditionals in MXML

2007-05-31 Thread Aldo Bucchi
jjeje

IT WORKS!!!
I can now build my UI declaratively from an XML spec...
needs some tweaking to allow runtime reassignment of the condition
property... but is fine for one time generation ( or within a
repeater. dirty trick )

i forgot to call validateNow() after creating the child



On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> The component below gets to instantiate its chid correctly but it
> doesn't show up in the displaylist.
>
> any clues??
>
> package foo.conditionals
> {
> import mx.containers.HBox;
>
> /**
>  *
>  * Does not support changing the condition property at runtime yet
>  *
>  * @author abucchi
>  *
>  */
> public class ConditionalContainer extends HBox
> {
>
> private var _condition:Boolean;
>
> public function get condition():Boolean
> {
> return _condition;
> }
>
> public function set condition( value:Boolean ):void
> {
> _condition = value;
> }
>
> override public function createComponentsFromDescriptors(
> recurse:Boolean = true ):void
> {
>
> if ( childDescriptors.length == 0 )
> return; // no children specified
>
> if ( condition ) // condition met, create first child
> {
> createComponentFromDescriptor( 
> childDescriptors[0] , recurse );
> }
> else if ( childDescriptors.length == 2 ) // not met, 
> create second
> child if specified
> {
> createComponentFromDescriptor( 
> childDescriptors[1] , recurse );
> }
>
> }
>
> }
>
> }
>
>
>
> 
>
>
>  condition="true"
> paddingBottom="0" paddingLeft="0" paddingRight="0" 
> paddingTop="0"
> >
>
> 
>
> 
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
> > ok,
> >
> > just realized that you can accomplish something similar by using
> > navigators... just set creationPolicy="auto" and conditionally set the
> > selectedIndex... only it will just work under some particular
> > circumstances and is quite hacky.
> >
> > i need to destroy children when the condition changes, to avoid
> > parameter problems... but still. that only leaves me with binding
> > issues.
> >
> > OTOH, the ideal way would be to create a custom component that
> > implements IRepeater so that containers don't add it, and then play
> > with createChildrenFromDescriptors and such.
> >
> > i just gave the latter a try and got it kinda working, but it would
> > take too much time to make it work with bindings and stabilize
> > it. i give up.
> >
> > c'mon adobe guys!
> > you can do it ;)
> >
> > best,
> > Aldo
> >
> > On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
> > > Hi Guys,
> > >
> > > Has anyone flirted with the idea of creating MXML
> > > conditional-structure components that can be used to dynamically
> > > generate interfaces??
> > >
> > > just to be more graphical... something like this
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > it just makes a lot of sense...
> > > any ideas
> > >
> > > best,
> > > Aldo
> > >
> > >
> > > --
> > > : Aldo Bucchi :
> > > mobile +56 9 8429 8300
> > >
> >
> >
> > --
> > : Aldo Bucchi :
> > mobile +56 9 8429 8300
> >
>
>
> --
> : Aldo Bucchi :
> mobile +56 9 8429 8300
>


-- 
: Aldo Bucchi :
mobile +56 9 8429 8300


[flexcoders] Re: Brainstorming; Dynamic Conditionals in MXML

2007-05-31 Thread Aldo Bucchi
Hi all,

The component below gets to instantiate its chid correctly but it
doesn't show up in the displaylist.

any clues??

package foo.conditionals
{
import mx.containers.HBox;

/**
 *
 * Does not support changing the condition property at runtime yet
 *
 * @author abucchi
 *
 */
public class ConditionalContainer extends HBox
{

private var _condition:Boolean;

public function get condition():Boolean
{
return _condition;
}

public function set condition( value:Boolean ):void
{
_condition = value;
}

override public function createComponentsFromDescriptors(
recurse:Boolean = true ):void
{

if ( childDescriptors.length == 0 )
return; // no children specified

if ( condition ) // condition met, create first child
{
createComponentFromDescriptor( 
childDescriptors[0] , recurse );
}
else if ( childDescriptors.length == 2 ) // not met, 
create second
child if specified
{
createComponentFromDescriptor( 
childDescriptors[1] , recurse );
}

}   

}

}



   



























On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
> ok,
>
> just realized that you can accomplish something similar by using
> navigators... just set creationPolicy="auto" and conditionally set the
> selectedIndex... only it will just work under some particular
> circumstances and is quite hacky.
>
> i need to destroy children when the condition changes, to avoid
> parameter problems... but still. that only leaves me with binding
> issues.
>
> OTOH, the ideal way would be to create a custom component that
> implements IRepeater so that containers don't add it, and then play
> with createChildrenFromDescriptors and such.
>
> i just gave the latter a try and got it kinda working, but it would
> take too much time to make it work with bindings and stabilize
> it. i give up.
>
> c'mon adobe guys!
> you can do it ;)
>
> best,
> Aldo
>
> On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
> > Hi Guys,
> >
> > Has anyone flirted with the idea of creating MXML
> > conditional-structure components that can be used to dynamically
> > generate interfaces??
> >
> > just to be more graphical... something like this
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > it just makes a lot of sense...
> > any ideas
> >
> > best,
> > Aldo
> >
> >
> > --
> > : Aldo Bucchi :
> > mobile +56 9 8429 8300
> >
>
>
> --
> : Aldo Bucchi :
> mobile +56 9 8429 8300
>


-- 
: Aldo Bucchi :
mobile +56 9 8429 8300


[flexcoders] Re: Brainstorming; Dynamic Conditionals in MXML

2007-05-31 Thread Aldo Bucchi
ok,

just realized that you can accomplish something similar by using
navigators... just set creationPolicy="auto" and conditionally set the
selectedIndex... only it will just work under some particular
circumstances and is quite hacky.

i need to destroy children when the condition changes, to avoid
parameter problems... but still. that only leaves me with binding
issues.

OTOH, the ideal way would be to create a custom component that
implements IRepeater so that containers don't add it, and then play
with createChildrenFromDescriptors and such.

i just gave the latter a try and got it kinda working, but it would
take too much time to make it work with bindings and stabilize
it. i give up.

c'mon adobe guys!
you can do it ;)

best,
Aldo

On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> Has anyone flirted with the idea of creating MXML
> conditional-structure components that can be used to dynamically
> generate interfaces??
>
> just to be more graphical... something like this
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> it just makes a lot of sense...
> any ideas
>
> best,
> Aldo
>
>
> --
> : Aldo Bucchi :
> mobile +56 9 8429 8300
>


-- 
: Aldo Bucchi :
mobile +56 9 8429 8300


Re: [flexcoders] Re: Labels on inner side of axis for Charts

2007-05-31 Thread Brendan Meutzner

Yep... thought of that... but if your label widths change that labelGap
value is bunk...  I've tried playing around with binding to the gutterWidth
and such, but have had no success so far...


Brendan


On 5/31/07, Aaron Wright <[EMAIL PROTECTED]> wrote:


  You can simply specify a negative "labelGap" for the AxisRenderer to
get the labels on the inside of the chart. It's not elegant, but...

--- In flexcoders@yahoogroups.com , "Brendan
Meutzner" <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>
> Before I go digging through the charting framework, I thought I'd see if
> anyone else has accomplished placing the labels on the inside of the
chart
> axis (and better yet, having them align left when placed there), and are
> willing to share code/ideas?
>
> Thanks,
>
> Brendan
>
> --
> Brendan Meutzner
> Stretch Media - RIA Adobe Flex Development
> [EMAIL PROTECTED]
> http://www.stretchmedia.ca
>

 





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


[flexcoders] Re: Labels on inner side of axis for Charts

2007-05-31 Thread Aaron Wright
You can simply specify a negative "labelGap" for the AxisRenderer to
get the labels on the inside of the chart. It's not elegant, but...

--- In flexcoders@yahoogroups.com, "Brendan Meutzner" <[EMAIL PROTECTED]>
wrote:
>
> Hi,
> 
> Before I go digging through the charting framework, I thought I'd see if
> anyone else has accomplished placing the labels on the inside of the
chart
> axis (and better yet, having them align left when placed there), and are
> willing to share code/ideas?
> 
> Thanks,
> 
> Brendan
> 
> -- 
> Brendan Meutzner
> Stretch Media - RIA Adobe Flex Development
> [EMAIL PROTECTED]
> http://www.stretchmedia.ca
>




[flexcoders] Re: Empty branch in a TREE - show folder instead of file icon?

2007-05-31 Thread discipl4
Keith,

It was very kind of you to provide your function to me.  This will
definitely work for me.  I was just hoping I could avoid manipulating
the xml but I suppose theres nothing too wrong with it unless the XML
is huge hehe.

Thanks a ton!

Best Regards,

- - Dan



--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote:
>
> Run this method over your XML before using it as you dataProvider.
> Probably a better way to do but it worked for me in similar situation.
> 
> var myXMLWithBranches:XML=iconizeXML(myOriginalXML);
> //---
> 
> 
> 
> private function iconizeXML(xmlobj:XML):XML
> {
>   function iconize(xml:XML):XML
>   {
>   if(xml.localName().indexOf("parent") != -1){
>   [EMAIL PROTECTED]"true";
>   }
>   var n:int=0;
>   var c:XML;
>   while(n < xml.children().length()){
>   c=xml.children()[n];
>   iconize(c);
>   n++;
>   }
>   return xml;
>   }
>   return iconize(xmlobj); 
> }
> 
> 
> 
> --Keith H--
> 
> - Original Message -
> From: discipl4 <[EMAIL PROTECTED]>
> Date: Thursday, May 31, 2007 3:19 pm
> Subject: [flexcoders] Empty branch in a TREE - show folder instead of
> file icon?
> To: flexcoders@yahoogroups.com
> 
> > Hi friends - thanks in advance for any help you can provide.  I am
> > displaying a simple XML in a TREE component and if I have an empty
> > branch, it shows up as a file icon instead of a folder - which is
> > expected.
> > 
> > My XML looks like
> > 
> > 
> > 
> >   
> > 
> > 
> > 
> > Parent one is a folder...  parent two is a file.  
> > 
> > The underlying dataprovider is an XMLListCollection.  How can I
> > declare each parent node as a branch?  I basically want to insert
> > 'isBranch=true' onto each parent node.
> > 
> > Thanks!
> > 
> > - - Dan
> > 
> >
>




[flexcoders] FW: Dynamic LineSeries based upon Array Collection?

2007-05-31 Thread Dimitrios Gianninas
forwarding...

Dimitrios Gianninas
Optimal Payments Inc.



-Original Message-
From: [EMAIL PROTECTED] on behalf of majid.tahir
Sent: Thu 5/31/2007 7:20 PM
To: [EMAIL PROTECTED]
Subject: Re: Dynamic LineSeries based upon Array Collection?
 
I am struggling with same issue.  I can dynamically create the series
in AS but it seems if I am changing the dataprovider then things dont
work.  

--- In flexcoders@yahoogroups.com, "tedgies" <[EMAIL PROTECTED]> wrote:
>
> Has anyone had any success in creating a chart with a series that 
> you can add to at runtime?  (Like Yahoo finance charts 2.0).  I 
> haven't yet seen an example where the LinSeries is based upon a 
> changing (growing) set of external xml data files.  Below i paste a 
> snippet where i try to for loop through an Array Collection and 
> create a separate httpservice call for each dataset (each baseball 
> player).  The httpservice URL is created dynamically based upon the 
> arraycollection.  I don't get any errors, but my chart will not 
> paint my data.  I think my problem is in:
> 
> newSeries.dataProvider = myService.lastResult.item;
> 
> thanks,
> Ted
> 
>   
>
>



-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'Ăªtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visĂ© ne sont pas autorisĂ©s et pourraient Ăªtre 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.



[flexcoders] Hyperlink in datagrid

2007-05-31 Thread Ekta Aggarwal
Hi,
   
  I am displaying some data in a datagrid where dataprovider is a XML file. 
Now, I have a requirement where I need to provide a hyperlink on each data cell 
of the datagrid, so that clicking on the item can take me to some other page. 
e.g. 
   
   
  --
  column1column2 
  -
   FailPass
   FailPass
  --
   
  Clicking on fail/pass should display the log results.
   
  Any idea, how to provide the hyperlink?
   
  Regards,
  Ekta



Ekta Gupta 

 www.geocities.com/aggarwalekta

   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 

[flexcoders] Re: Dynamic LineSeries based upon Array Collection?

2007-05-31 Thread Aaron Wright
You set the data provider of the series to nothing.
myService.lastResult is not set to anything until the HTTPService has
returned.

I normally call send(), and then in a seperate function handle the
complete event. Then the the lastResult will be set.

I suppose you could data bind the data provider of the line series to
the lastResult of the HTTPService via BindingUtils.

--- In flexcoders@yahoogroups.com, "tedgies" <[EMAIL PROTECTED]> wrote:
>
> Has anyone had any success in creating a chart with a series that 
> you can add to at runtime?  (Like Yahoo finance charts 2.0).  I 
> haven't yet seen an example where the LinSeries is based upon a 
> changing (growing) set of external xml data files.  Below i paste a 
> snippet where i try to for loop through an Array Collection and 
> create a separate httpservice call for each dataset (each baseball 
> player).  The httpservice URL is created dynamically based upon the 
> arraycollection.  I don't get any errors, but my chart will not 
> paint my data.  I think my problem is in:
> 
> newSeries.dataProvider = myService.lastResult.item;
> 
> thanks,
> Ted
> 
>   
>
>




[flexcoders] Re: Deploying Flex app to web server

2007-05-31 Thread arieljake
I think this is happening because you are trying to access a property 
or method of a null object reference.

:) I couldn't help myself.

But really, if this is happening after a deploy, maybe one of your web 
service calls or server data calls are failing and in your code you are 
not checking for valid data before operating on it. Make sure the paths 
you are using work on the server too, and if your data calls are to web 
pages that can be viewed in a browser directly, use a browser to view 
them to make sure there are no errors preventing valid data from being 
returned in the production environment.

--- In flexcoders@yahoogroups.com, "sarah_e_boys" <[EMAIL PROTECTED]> 
wrote:
>
> I get the following error when I deploy and access my Flex app on a 
web 
> server.  Can anyone help?
> 
> TypeError: Error #1009: Cannot access a property or method of a null 
> object reference.
>   at samples::MyTreeItemRenderer/set data()
>




RE: [flexcoders] Re: Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread Alex Harui
Sorry, didn't read the whole thing.

 

The stage should be there for the root class right away.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Schmalle
Sent: Thursday, May 31, 2007 4:17 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Accessing the illusive stage Object
through sprite (a near impossible feat)

 

Alex,

I think he said he was using an AS3 project. There is no
applicationComplete event right?

Peace, Mike

On 5/31/07, Alex Harui < [EMAIL PROTECTED]  >
wrote:

applciationComplete

 

systemManager.stage should be available to you at initialize

 



From: flexcoders@yahoogroups.com [mailto: flexcoders@
 yahoogroups.com  ] On
Behalf Of patricklemiuex
Sent: Thursday, May 31, 2007 2:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Accessing the illusive stage Object through
sprite (a near impossible feat)

 

Michael, 

Thanks so much, where was that event hiding? I was using a hackish
timer to do the job. However, your solution doesn't work from within
the class that I create (haven't tried outside yet). Is there a way
to do this all from inside the class I am using, or does the event
listener have to sit outside the class? 

Really, I think it would have been better, but maybe it's not even
possible to make the constructor function of classes automatically
have access to the stage object on instantiation?

Also, to trap keyboard events the only way I could make it works is
the following:

stage.focus = this.parent;
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.stage.addEventListener(KeyboardEvent.KEY_UP,keyHandler);

--- In flexcoders@yahoogroups.com 
, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> The stage object does not get defined until right at the end of the
players
> init cycle.
> 
> Try listening to the Sprites Event.ADDED_TO_STAGE event, then access
the
> stage object.
> 
> Peace, Mike
> 
> On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:
> >
> > Dear Actionscript wizards:
> >
> > I have an all as3.0 project.
> >
> > I can never seem to access the stage object (I've posted several
times
> > and never can get any appropriate solutions)? i thought this was
> > automatic with every class that extends sprite... I get a null
object
> > reference trying to access the stage object. I must be doing
> > something incorrectly, though I have studied this in a few places.
> >
> > public class AbstractSlideView extends Sprite
> > {
> > protected var _data:PictureProviderXML;
> > //protected var _data:PictureProvider;
> > private var _paramObj:Object;
> >
> > public function AbstractSlideView() {
> > var timer:Timer = new Timer(1000,1);
> > timer.addEventListener(TimerEvent.TIMER, installVars);
> > timer.start();
> > this.stage.focus = this;
> > this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> > this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
> > }
> >
> > 
> >
> 
> 
> 
> -- 
> Teoti Graphix
> http://www.teotigraphix.com  
> 
> Blog - Flex2Components
> http://www.flex2components.com  
> 
> You can find more by solving the problem then by 'asking the
question'.
>




-- 
Teoti Graphix
http://www.teotigraphix.com  

Blog - Flex2Components
http://www.flex2components.com  

You can find more by solving the problem then by 'asking the question'. 

 



Re: [flexcoders] Re: Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread Michael Schmalle

Alex,

I think he said he was using an AS3 project. There is no applicationComplete
event right?

Peace, Mike

On 5/31/07, Alex Harui <[EMAIL PROTECTED]> wrote:


   applciationComplete



systemManager.stage should be available to you at initialize


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *patricklemiuex
*Sent:* Thursday, May 31, 2007 2:15 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: Accessing the illusive stage Object through
sprite (a near impossible feat)



Michael,

Thanks so much, where was that event hiding? I was using a hackish
timer to do the job. However, your solution doesn't work from within
the class that I create (haven't tried outside yet). Is there a way
to do this all from inside the class I am using, or does the event
listener have to sit outside the class?

Really, I think it would have been better, but maybe it's not even
possible to make the constructor function of classes automatically
have access to the stage object on instantiation?

Also, to trap keyboard events the only way I could make it works is
the following:

stage.focus = this.parent;
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.stage.addEventListener(KeyboardEvent.KEY_UP,keyHandler);

--- In flexcoders@yahoogroups.com , "Michael
Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> The stage object does not get defined until right at the end of the
players
> init cycle.
>
> Try listening to the Sprites Event.ADDED_TO_STAGE event, then access the
> stage object.
>
> Peace, Mike
>
> On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:
> >
> > Dear Actionscript wizards:
> >
> > I have an all as3.0 project.
> >
> > I can never seem to access the stage object (I've posted several times
> > and never can get any appropriate solutions)? i thought this was
> > automatic with every class that extends sprite... I get a null object
> > reference trying to access the stage object. I must be doing
> > something incorrectly, though I have studied this in a few places.
> >
> > public class AbstractSlideView extends Sprite
> > {
> > protected var _data:PictureProviderXML;
> > //protected var _data:PictureProvider;
> > private var _paramObj:Object;
> >
> > public function AbstractSlideView() {
> > var timer:Timer = new Timer(1000,1);
> > timer.addEventListener(TimerEvent.TIMER, installVars);
> > timer.start();
> > this.stage.focus = this;
> > this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> > this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
> > }
> >
> >
> >
>
>
>
> --
> Teoti Graphix
> http://www.teotigraphix.com
>
> Blog - Flex2Components
> http://www.flex2components.com
>
> You can find more by solving the problem then by 'asking the question'.
>

 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


RE: [flexcoders] Re: Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread Alex Harui
applciationComplete

 

systemManager.stage should be available to you at initialize

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of patricklemiuex
Sent: Thursday, May 31, 2007 2:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Accessing the illusive stage Object through
sprite (a near impossible feat)

 

Michael, 

Thanks so much, where was that event hiding? I was using a hackish
timer to do the job. However, your solution doesn't work from within
the class that I create (haven't tried outside yet). Is there a way
to do this all from inside the class I am using, or does the event
listener have to sit outside the class? 

Really, I think it would have been better, but maybe it's not even
possible to make the constructor function of classes automatically
have access to the stage object on instantiation?

Also, to trap keyboard events the only way I could make it works is
the following:

stage.focus = this.parent;
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.stage.addEventListener(KeyboardEvent.KEY_UP,keyHandler);

--- In flexcoders@yahoogroups.com 
, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> The stage object does not get defined until right at the end of the
players
> init cycle.
> 
> Try listening to the Sprites Event.ADDED_TO_STAGE event, then access
the
> stage object.
> 
> Peace, Mike
> 
> On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:
> >
> > Dear Actionscript wizards:
> >
> > I have an all as3.0 project.
> >
> > I can never seem to access the stage object (I've posted several
times
> > and never can get any appropriate solutions)? i thought this was
> > automatic with every class that extends sprite... I get a null
object
> > reference trying to access the stage object. I must be doing
> > something incorrectly, though I have studied this in a few places.
> >
> > public class AbstractSlideView extends Sprite
> > {
> > protected var _data:PictureProviderXML;
> > //protected var _data:PictureProvider;
> > private var _paramObj:Object;
> >
> > public function AbstractSlideView() {
> > var timer:Timer = new Timer(1000,1);
> > timer.addEventListener(TimerEvent.TIMER, installVars);
> > timer.start();
> > this.stage.focus = this;
> > this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> > this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
> > }
> >
> > 
> >
> 
> 
> 
> -- 
> Teoti Graphix
> http://www.teotigraphix.com  
> 
> Blog - Flex2Components
> http://www.flex2components.com  
> 
> You can find more by solving the problem then by 'asking the
question'.
>

 



[flexcoders] Brainstorming; Dynamic Conditionals in MXML

2007-05-31 Thread Aldo Bucchi
Hi Guys,

Has anyone flirted with the idea of creating MXML
conditional-structure components that can be used to dynamically
generate interfaces??

just to be more graphical... something like this





  












it just makes a lot of sense...
any ideas

best,
Aldo


-- 
: Aldo Bucchi :
mobile +56 9 8429 8300


[flexcoders] Under flex Builder, is it possible to step into an app loaded by SWFLoader?

2007-05-31 Thread Tracy Spratt
For one of our clients, we make heavy use of SWFLoader to load
applications into a shell app.

This works very well but is hard to debug, since I haven't found any way
to debug the loaded apps (except for trace, of course).

Is it even possible to debug apps loaded this way?

Running the loaded apps alone is problematic, since they depend on data
(xml) passed in from the shell.  I could default this data for testing
purposes, but am hoping for some magic instead!

I have not explored modules yet.  Can you step into them in the FB
debugger?

Tracy


[flexcoders] Dynamic LineSeries based upon Array Collection?

2007-05-31 Thread tedgies
Has anyone had any success in creating a chart with a series that 
you can add to at runtime?  (Like Yahoo finance charts 2.0).  I 
haven't yet seen an example where the LinSeries is based upon a 
changing (growing) set of external xml data files.  Below i paste a 
snippet where i try to for loop through an Array Collection and 
create a separate httpservice call for each dataset (each baseball 
player).  The httpservice URL is created dynamically based upon the 
arraycollection.  I don't get any errors, but my chart will not 
paint my data.  I think my problem is in:

newSeries.dataProvider = myService.lastResult.item;

thanks,
Ted

  
   



RE: [flexcoders] Re: Charts and Business day axis

2007-05-31 Thread Ely Greenfield
 

 

 

The DateTimeAxis doesn't currently do business weeks. It's something
we're looking at adding for the next version.

 

In the meantime, you have three choice, in increasing order of
difficulty:

 

1)  Use a category axis, and deal with tiny labels

2)  Use a category axis, set dropLabels to true on your
axisRenderer, and accept that fact that you can't control the amount of
time between labels.

3)  Write a custom axis that acts like a category axis, but
generates labels based on your heuristic (i.e., only on the first of
each month, etc). You might be able to do this by extending the existing
category axis.

4)  Write a custom axis that acts like a date/time axis but drops
weekends.  This would be difficult to do with the existing date time
axis as a base class.

 

 

Ely.

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pgherveou
Sent: Thursday, May 31, 2007 2:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Charts and Business day axis

 

In fact I can not use the dateAndTimeAxis because i don t want to
display non business day. 
If I use the dateAndTime axis there will be a space and plateau
between the sunday and the monday for example.

To be clear in fact I would like the same axis as google finance charts.

--- In flexcoders@yahoogroups.com 
, "Brendan Meutzner" <[EMAIL PROTECTED]>
wrote:
>
> Look at the DateTimeAxis, and the dataUnits, labelUnits properties...
> 
> 
> Brendan
> 
> On 5/30/07, pgherveou <[EMAIL PROTECTED]> wrote:
> >
> > Hello there,
> >
> > I try to display a chart based on a one year business day axis. (no
> > week ends for the moment)
> >
> > I used a categoryAxis to draw my chart. It works perfectly. the only
> > problem is the axis. There are not enough space to display all ticks
> > and labels (one per business day).
> >
> > Ideally what I would like to do is to controls label and ticks to
> > display for example only the label of the first business day of each
> > month.
> >
> > I tried to use a custom LabelFunction to do that, but I can't fix
the
> > labelSize (they are still to small)
> >
> > Thanks in advance for your help
> >
> > Pierre
> >
> > 
> >
> 
> 
> 
> -- 
> Brendan Meutzner
> Stretch Media - RIA Adobe Flex Development
> [EMAIL PROTECTED]
> http://www.stretchmedia.ca
>

 

<><>

[flexcoders] Re: Charts and Business day axis

2007-05-31 Thread pgherveou
In fact I can not use the dateAndTimeAxis because i don t want to
display non business day. 
If I use the dateAndTime axis there will be a space and plateau
between the sunday and the monday for example.

To be clear in fact I would like the same axis as google finance charts.

--- In flexcoders@yahoogroups.com, "Brendan Meutzner" <[EMAIL PROTECTED]>
wrote:
>
> Look at the DateTimeAxis, and the dataUnits, labelUnits properties...
> 
> 
> Brendan
> 
> On 5/30/07, pgherveou <[EMAIL PROTECTED]> wrote:
> >
> >   Hello there,
> >
> > I try to display a chart based on a one year business day axis. (no
> > week ends for the moment)
> >
> > I used a categoryAxis to draw my chart. It works perfectly. the only
> > problem is the axis. There are not enough space to display all ticks
> > and labels (one per business day).
> >
> > Ideally what I would like to do is to controls label and ticks to
> > display for example only the label of the first business day of each
> > month.
> >
> > I tried to use a custom LabelFunction to do that, but I can't fix the
> > labelSize (they are still to small)
> >
> > Thanks in advance for your help
> >
> > Pierre
> >
> >  
> >
> 
> 
> 
> -- 
> Brendan Meutzner
> Stretch Media - RIA Adobe Flex Development
> [EMAIL PROTECTED]
> http://www.stretchmedia.ca
>




Re: [flexcoders] Empty branch in a TREE - show folder instead of file icon?

2007-05-31 Thread khair
Run this method over your XML before using it as you dataProvider.
Probably a better way to do but it worked for me in similar situation.

var myXMLWithBranches:XML=iconizeXML(myOriginalXML);
//---



private function iconizeXML(xmlobj:XML):XML
{
function iconize(xml:XML):XML
{
if(xml.localName().indexOf("parent") != -1){
[EMAIL PROTECTED]"true";
}
var n:int=0;
var c:XML;
while(n < xml.children().length()){
c=xml.children()[n];
iconize(c);
n++;
}
return xml;
}
return iconize(xmlobj); 
}



--Keith H--

- Original Message -
From: discipl4 <[EMAIL PROTECTED]>
Date: Thursday, May 31, 2007 3:19 pm
Subject: [flexcoders] Empty branch in a TREE - show folder instead of
file icon?
To: flexcoders@yahoogroups.com

> Hi friends - thanks in advance for any help you can provide.  I am
> displaying a simple XML in a TREE component and if I have an empty
> branch, it shows up as a file icon instead of a folder - which is
> expected.
> 
> My XML looks like
> 
> 
> 
>   
> 
> 
> 
> Parent one is a folder...  parent two is a file.  
> 
> The underlying dataprovider is an XMLListCollection.  How can I
> declare each parent node as a branch?  I basically want to insert
> 'isBranch=true' onto each parent node.
> 
> Thanks!
> 
> - - Dan
> 
> 


Re: [flexcoders] Re: Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread Michael Schmalle

Hi,

You could add a listener to that sprite from the inside or outside. Don't
know about the timing if it might already have passed from the out side.

The reason the stage object cannot be defined in the constructor is the
parent stage has not added it yet. :) That is where you get the event and
the stage is saying ok constructed object, your my child now, I will let you
know you have been added. Up until this point, the Sprite may have been
constructed but it still doesn't know about the stage which will eventually
be it's parent.

Peace, Mike

On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:


  Michael,

Thanks so much, where was that event hiding? I was using a hackish
timer to do the job. However, your solution doesn't work from within
the class that I create (haven't tried outside yet). Is there a way
to do this all from inside the class I am using, or does the event
listener have to sit outside the class?

Really, I think it would have been better, but maybe it's not even
possible to make the constructor function of classes automatically
have access to the stage object on instantiation?

Also, to trap keyboard events the only way I could make it works is
the following:

stage.focus = this.parent;
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.stage.addEventListener(KeyboardEvent.KEY_UP,keyHandler);

--- In flexcoders@yahoogroups.com , "Michael
Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> The stage object does not get defined until right at the end of the
players
> init cycle.
>
> Try listening to the Sprites Event.ADDED_TO_STAGE event, then access the
> stage object.
>
> Peace, Mike
>
> On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:
> >
> > Dear Actionscript wizards:
> >
> > I have an all as3.0 project.
> >
> > I can never seem to access the stage object (I've posted several times
> > and never can get any appropriate solutions)? i thought this was
> > automatic with every class that extends sprite... I get a null object
> > reference trying to access the stage object. I must be doing
> > something incorrectly, though I have studied this in a few places.
> >
> > public class AbstractSlideView extends Sprite
> > {
> > protected var _data:PictureProviderXML;
> > //protected var _data:PictureProvider;
> > private var _paramObj:Object;
> >
> > public function AbstractSlideView() {
> > var timer:Timer = new Timer(1000,1);
> > timer.addEventListener(TimerEvent.TIMER, installVars);
> > timer.start();
> > this.stage.focus = this;
> > this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> > this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
> > }
> >
> >
> >
>
>
>
> --
> Teoti Graphix
> http://www.teotigraphix.com
>
> Blog - Flex2Components
> http://www.flex2components.com
>
> You can find more by solving the problem then by 'asking the question'.
>

 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


Re: [flexcoders] TabNavigator/ToggleButtonBar Style conflict

2007-05-31 Thread Michael Schmalle

Hi,

The reason it doesn't work is because TypeSelectors order in inheritance.

Tab {
   cornerRadius: 20;
}

Solves your Problem. This is not a bug.

Since you are setting a firstButtonStyleName on an actual selector,
TabNavigator will not pick it up since it is undefined to begin with and now
defined on the super class TypeSelector of TabBar.

If you set

.mytoggleButtonBarFirstButtonStyle {color: #FF;cornerRadius: 0;}

You will see that changes the radius of the first tab button.

Peace, Mike

On 5/31/07, Derek Vadneau <[EMAIL PROTECTED]> wrote:


  Code follows...

Setting styles for ToggleButtonBar overrides styles set for buttons of
TabNavigator.

The TabNavigator uses the ToggleButtonBar (actually, TabBar, which
extends ToggleButtonBar) for the "tabs".

What happens is if I set styles for the TabNavigator tabs, they are
ignored if I also set styles for the ToggleButtonBar.

Here is the code:


http://www.adobe.com/2006/mxml"; xmlns="*"
layout="absolute">

TabNavigator {
cornerRadius: 0;
tabStyleName: "myTabButtonStyle";
firstTabStyleName: "myTabFirstButtonStyle";
lastTabStyleName: "myTabLastButtonStyle";
selectedTabTextStyleName: "myTabSelectedButtonStyle";
}
.myTabButtonStyle {cornerRadius: 20;}
.myTabFirstButtonStyle {cornerRadius: 20;}
.myTabLastButtonStyle {cornerRadius: 20;}
.myTabSelectedButtonStyle {cornerRadius: 20;}

ToggleButtonBar {
buttonStyleName: "mytoggleButtonBarButtonStyle";
firstButtonStyleName: "mytoggleButtonBarFirstButtonStyle";
lastButtonStyleName: "mytoggleButtonBarLastButtonStyle";
selectedButtonTextStyleName: "mytoggleButtonBarSelectedButtonStyle";
}
.mytoggleButtonBarButtonStyle {color: #FF;}
.mytoggleButtonBarFirstButtonStyle {color: #FF;}
.mytoggleButtonBarLastButtonStyle {color: #FF;}
.mytoggleButtonBarSelectedButtonStyle {color: #FF;}

















All I'm trying to do is set the cornerRadius of the tabs to be some
value - I've exagerrated the value here and left out style properties
for the ToggleButtonBar buttons just so it's obvious what's going on.

The outside TabNavigator only has one tab and that takes on the style
of the TabNavigator selectedTab style. The inner TabNavigator shows
that the first and last buttons take on the ToggleButtonBar styles but
the middle button takes on the TabNavigator style.

If you comment out the ToggleButtonBar styles the TabNavigator styles
are applied properly.

As a workaround I can specify the styleName of the ToggleButtonBar I'm
using so that the style is specific to that instance rather than
global to all components.

I would classify this as a bug, unless someone can convince me why
this is expected behaviour.

--

Derek Vadneau
 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread patricklemiuex
Michael, 

Thanks so much, where was that event hiding? I was using a hackish
timer to do the job.  However, your solution doesn't work from within
the class that I create (haven't tried outside yet).  Is there a way
to do this all from inside the class I am using, or does the event
listener have to sit outside the class?  

Really, I think it would have been better, but maybe it's not even
possible to make the constructor function of classes automatically
have access to the stage object on instantiation?


Also, to trap keyboard events the only way I could make it works is
the following:

stage.focus = this.parent;
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.stage.addEventListener(KeyboardEvent.KEY_UP,keyHandler);




--- In flexcoders@yahoogroups.com, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> The stage object does not get defined until right at the end of the
players
> init cycle.
> 
> Try listening to the Sprites Event.ADDED_TO_STAGE event, then access the
> stage object.
> 
> Peace, Mike
> 
> On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:
> >
> >   Dear Actionscript wizards:
> >
> > I have an all as3.0 project.
> >
> > I can never seem to access the stage object (I've posted several times
> > and never can get any appropriate solutions)? i thought this was
> > automatic with every class that extends sprite... I get a null object
> > reference trying to access the stage object. I must be doing
> > something incorrectly, though I have studied this in a few places.
> >
> > public class AbstractSlideView extends Sprite
> > {
> > protected var _data:PictureProviderXML;
> > //protected var _data:PictureProvider;
> > private var _paramObj:Object;
> >
> > public function AbstractSlideView() {
> > var timer:Timer = new Timer(1000,1);
> > timer.addEventListener(TimerEvent.TIMER, installVars);
> > timer.start();
> > this.stage.focus = this;
> > this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
> > this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
> > }
> >
> >  
> >
> 
> 
> 
> -- 
> Teoti Graphix
> http://www.teotigraphix.com
> 
> Blog - Flex2Components
> http://www.flex2components.com
> 
> You can find more by solving the problem then by 'asking the question'.
>




[flexcoders] Re: create new button with an icon

2007-05-31 Thread mazarflex
i finally figured it out i put the buttons in a hbox and used the 
hbox.xhilddescriptors array with a loop. once the visibility is set 
it moves them into another hbox to keep the buttons side by side. i 
am not sure how to paste the code in here where it is still aligned, 
sorrry.

public function Loop():void{
var ArCtr:int
var ArMax:int = 
Holding.childDescriptors.length
do{
callCF
(499,'toolbar',Holding.childDescriptors[ArCtr].id)
ArCtr++
//Alert.show(cmdID)
}while (ArCtr wrote:
>
> ButtonBar, if you used it, has a dataProvider that represents each
> button in the bar.  Show us some sample code so we can see what
> direction you're going in
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mazarflex
> Sent: Thursday, May 31, 2007 12:03 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: create new button with an icon
> 
>  
> 
> so i am making a toolbar each button has a specific name
> (ex."CmdInfo"). in sql i have a procedure. if you pass it "CmdInfo" 
> is returns "F" meaning visibility=false. i need to loop through all 
> of the buttons on my form and pass their names to SQL. i dont know 
> where to start i thought i had it with an array but i could not do 
> the icon or the click. ugh!!! help me please thank you 
> 
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > Button icons cannot be loaded at runtime. They must be embedded 
in 
> the
> > app.
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of mazarflex
> > Sent: Thursday, May 31, 2007 10:29 AM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] create new button with an icon
> > 
> > 
> > 
> > i have created the buttons and ran them through a Stored 
Procedure 
> to 
> > set visibility. now i am tring to asign the icons dynamically. i 
> cannot 
> > get it to work with the set style. not sure how to assign icons @ 
> run 
> > time. heres the funciton calling from an array of buttons. it 
does 
> not 
> > work. it will create the button but not the icon
> > 
> > CreateIt(cmds[1],cmds[1].icon)
> > 
> > public function CreateIt(l_cmdID:Button,l_filePath:String):void{
> > var l_cmdID:Button = new Button
> > l_cmdID.setStyle("icon",l_filePath)
> > this.HB1.addChild(l_cmdID)
> > }
> >
>




Re: [flexcoders] FlexUnit asserError()?

2007-05-31 Thread Douglas McCarroll
Just posted on my blog about this:

http://www.brightworks.com/flex_ability/?p=39

Thanks again, Angus.


Douglas McCarroll wrote:
>
> Thanks, Angus!
>
> Angus Johnson wrote:
> >
> > Douglas,
> >
> > One way to test for failure:
> >
> > try
> > {
> > ... // code that should throw exception
> > fail('Exception was not thrown');
> > }
> > catch
> > {
> > // test exception type / message etc is what is expected
> > }
> >
> > hth
> > Angus
> >
> > On 31/05/07, *Douglas McCarroll*
> > <[EMAIL PROTECTED] 
> 
> >  >> wrote:
> >
> > Hi All,
> >
> > I'd like to write FlexUnit tests that confirm that certain things
> > cause
> > my code to throw errors.
> >
> > assertError(), so to speak.
> >
> > I don't see any way to do this. Is there a way?
> >
> > Thanks in advance!
> >
> > Douglas
> >
> > -
> >
> > Douglas McCarroll
> > Flex Developer
> > http://www.brightworks.com  
> >
> > 617.459.3840
> >
> > -
> >
> >
> >
>
>  



Re: [flexcoders] Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread Michael Schmalle

Hi,

The stage object does not get defined until right at the end of the players
init cycle.

Try listening to the Sprites Event.ADDED_TO_STAGE event, then access the
stage object.

Peace, Mike

On 5/31/07, patricklemiuex <[EMAIL PROTECTED]> wrote:


  Dear Actionscript wizards:

I have an all as3.0 project.

I can never seem to access the stage object (I've posted several times
and never can get any appropriate solutions)? i thought this was
automatic with every class that extends sprite... I get a null object
reference trying to access the stage object. I must be doing
something incorrectly, though I have studied this in a few places.

public class AbstractSlideView extends Sprite
{
protected var _data:PictureProviderXML;
//protected var _data:PictureProvider;
private var _paramObj:Object;

public function AbstractSlideView() {
var timer:Timer = new Timer(1000,1);
timer.addEventListener(TimerEvent.TIMER, installVars);
timer.start();
this.stage.focus = this;
this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
}

 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


RE: [flexcoders] btn.width wont accept %

2007-05-31 Thread Alex Harui
Width is of type Number.  Through MXML black magic we detect the % and
assign to percentWidth instead.

 

So, newBtn.percentWidth = 100;

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave @ VitalPodcasts.com
Sent: Thursday, May 31, 2007 1:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] btn.width wont accept %

 

Trying to generate a Navigation...

newBtn.width = 100%; - doesnt work
newBtn.width = '100%'; - doesnt work
newBtn.width = "100%"; - doesnt work

Why can I not set a button to 100%?

 



Re: [flexcoders] btn.width wont accept %

2007-05-31 Thread Paul deCoursey
newBtn.percentWidth = 100;

Dave @ VitalPodcasts.com wrote:
> Trying to generate a Navigation...
>
> newBtn.width = 100%;  - doesnt work
> newBtn.width = '100%';  - doesnt work
> newBtn.width = "100%";  - doesnt work
>
> Why can I not set a button to 100%?
>
>
>
>
>
>   



[flexcoders] Deploying Flex app to web server

2007-05-31 Thread sarah_e_boys
I get the following error when I deploy and access my Flex app on a web 
server.  Can anyone help?

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at samples::MyTreeItemRenderer/set data()



[flexcoders] btn.width wont accept %

2007-05-31 Thread Dave @ VitalPodcasts.com
Trying to generate a Navigation...

newBtn.width = 100%;  - doesnt work
newBtn.width = '100%';  - doesnt work
newBtn.width = "100%";  - doesnt work

Why can I not set a button to 100%?






[flexcoders] Re: Empty branch in a TREE - show folder instead of file icon?

2007-05-31 Thread discipl4
Richard,

Thanks for the response.  I want my leafnodes to keep the file icon,
although I will save your code snippet for the future because that
might come in handy :)

I really want my empty branch node to be treated as a branch.  But if
you have an empty branch, apparently it shows up like a leaf.  I want
it to look like an empty folder, with the triangle next to it for
expanding but with nothing underneath it.  

If I tack isBranch="true" onto each branch node, it works.  I just
dont want to have to manipulate the xml file if theres a way to do it
on the tree.

Thanks!





--- In flexcoders@yahoogroups.com, "Richard Rodseth" <[EMAIL PROTECTED]> wrote:
>
> Not sure exactly what you're asking, but I recently did the following to
> make leaf nodes have a folder icon:
> 
>  dataProvider="{folders}" labelField="@name" showRoot="false"
> defaultLeafIcon="@Embed(source='Assets.swf',
> symbol='TreeFolderClosed')">
> 
> 
> On 5/31/07, discipl4 <[EMAIL PROTECTED]> wrote:
> >
> >   Hi friends - thanks in advance for any help you can provide. I am
> > displaying a simple XML in a TREE component and if I have an empty
> > branch, it shows up as a file icon instead of a folder - which is
> > expected.
> >
> > My XML looks like
> >
> > 
> > 
> > 
> > 
> > 
> >
> > Parent one is a folder... parent two is a file.
> >
> > The underlying dataprovider is an XMLListCollection. How can I
> > declare each parent node as a branch? I basically want to insert
> > 'isBranch=true' onto each parent node.
> >
> > Thanks!
> >
> > - - Dan
> >
> >  
> >
>




RE: [flexcoders] Re: Web Service Problems

2007-05-31 Thread Peter Farland
1. You need fds.swc from LCDS 2.5. I'll send you details offlist (it's
due out publically very very soon). 
 
Actually, are you using the flex webtier compiler on tomcat to also
compile or are you using flex builder? If you're using the webtier
compiler you could just get the new flex.war from LCDS 2.5 as it has
been updated with hotfix 2 too.
 
2. I'll help you offlist with this as I'll need some more details from
you.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of lfw_mara
Sent: Thursday, May 31, 2007 4:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Web Service Problems



Peter Thanks for your help! :)

1) I updated flex builder 2.0.1 to hotfix 2. Since I am running my
flex app using tomcat I decided to update WEB-INF/flex dir with
relevant files I found in updated Flex SDK 2. After this I can't even
compile my app I get an error. Not sure if i am doing this right?
Error is the following /
Channel definition, mx.messaging.channels.RTMPChannel, can not be found.

2) If I don't update my tomcat WEB-INF/flex.
I removed format="xml" from my request so it doesn't binding issues.
and I carefully looked at my WSDL, so my parameters have the same name
as the part(WSDL is inluded above just in case).
My send() function returns me null object, so when I debug I cannot
see the SOAP body, cuz message=null. So eventually I get an error from 
fault-faultString = Required parameter 'orderId' not found in input
arguments.

My WSDl

http://www.ofbiz.org/service/
 ">













http://schemas.xmlsoap.org/soap/http
 "/>



http://schemas.xmlsoap.org/soap/encoding/
 "
namespace="http://www.ofbiz.org/service/ 
" use="literal"/>


http://schemas.xmlsoap.org/soap/encoding/
 "
namespace="http://www.ofbiz.org/service/ 
" use="literal"/>





http://localhost:8080/webtools/control/SOAPService
 "/>




Thanks,
Regards
Marina
--- In flexcoders@yahoogroups.com 
, "Peter Farland" <[EMAIL PROTECTED]> wrote:
>
> Hmm, I've noticed that format="xml" does not support data binding. I'm
> not sure if that is a bug or just a limitation of mxmlc, but without
> format="xml" you just have normal MXML processing rules and those tags
> get converted into plain old ActionScript Objects with child elements
> becoming properties/values.
> 
> First up, you should move to Flex 2.0.1 Hotfix 2.
> Second, if you want to use data binding I suggest not using
format="xml"
> and let the WebService operation encode the SOAP request for you.
> Third, I would become very familiar with the WSDL operation message
> definition and look very closely at the parts that are defined for the
> message. The child elements should be named what the part name
attribute
> specifies as this syntax ends up being passed to a SOAPEncoder as an
> Object so it thinks you're using named parameters and thus will look
for
> parts by name. Don't worry, if the part declares an element, it will
use
> the element when encoding that particular part. If the part declares a
> type, then it will use the part name.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of lfw_mara
> Sent: Wednesday, May 30, 2007 6:10 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Web Service Problems
> 
> 
> 
> Hello!
> 
> I am trying to call web service created in OFBiz framework(it uses
> axis java web services).
> I am having two problems
> 
> 1) Here is my flex client code
> 
wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma
 
> tion?wsdl
>
 
> wsdl> "
> showBusyCursor="true" > 
>  result="controller.resultHandlerGetOrderInformation(event)">
>  
>  
> {myDataGrid.selectedItem} 
>  
>  
> 
> 
> 
> And then I do
> Application.application.ws.getOrderInformation.send();
> In soap message body my argument orderId equals to null. But if
> I pass hard coded string instead of {myDataGrid.selectedItem}. It
> works perfectly fine
> 
> 2) I tried to pass arguments thru Action Script code and I did the
> following
> 
wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma
 
> tion?wsdl
>


RE: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG or... WIsh...

2007-05-31 Thread Alex Harui
If you can post an  mini-example it will help us see what you're doing
and what kind of solution to propose.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Robert Chyko
Sent: Thursday, May 31, 2007 11:55 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG
or... WIsh...

 

I believe the displaying of the tooltip causes the itemEditor to lose
focus which fires an itemEditEnd event.. thus destroying your
itemEditor.  I had tried something similar in the past and could not get
it working so had to take a different approach.

 

If you find a solution, please repost to the list.

 

thanks

 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui
Sent: Thursday, May 31, 2007 1:39 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Tooltip in itemeditor of datagrid
BUG or... WIsh...

Do you have a custom tooltip?  Otherwise it shouldn't close.
How are you setting the tooltip?






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of nxzone
Sent: Thursday, May 31, 2007 8:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG
or... WIsh...

Nobody have a hint?

I can repeat my question as this:

How can I show the Error ToolTip after a validation in a
ITEMEDITOR of
a Datagrid... We i mouse over and show the tooltip, the item
editor is
close!!

 



RE: [flexcoders] Re: create new button with an icon

2007-05-31 Thread Alex Harui
ButtonBar, if you used it, has a dataProvider that represents each
button in the bar.  Show us some sample code so we can see what
direction you're going in

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mazarflex
Sent: Thursday, May 31, 2007 12:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: create new button with an icon

 

so i am making a toolbar each button has a specific name
(ex."CmdInfo"). in sql i have a procedure. if you pass it "CmdInfo" 
is returns "F" meaning visibility=false. i need to loop through all 
of the buttons on my form and pass their names to SQL. i dont know 
where to start i thought i had it with an array but i could not do 
the icon or the click. ugh!!! help me please thank you 

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Button icons cannot be loaded at runtime. They must be embedded in 
the
> app.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of mazarflex
> Sent: Thursday, May 31, 2007 10:29 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] create new button with an icon
> 
> 
> 
> i have created the buttons and ran them through a Stored Procedure 
to 
> set visibility. now i am tring to asign the icons dynamically. i 
cannot 
> get it to work with the set style. not sure how to assign icons @ 
run 
> time. heres the funciton calling from an array of buttons. it does 
not 
> work. it will create the button but not the icon
> 
> CreateIt(cmds[1],cmds[1].icon)
> 
> public function CreateIt(l_cmdID:Button,l_filePath:String):void{
> var l_cmdID:Button = new Button
> l_cmdID.setStyle("icon",l_filePath)
> this.HB1.addChild(l_cmdID)
> }
>

 



RE: [flexcoders] Re: Labels on inner side of axis for Charts

2007-05-31 Thread Ely Greenfield
 

 

 

Yes, this can be done with a custom axis renderer. The axis renderer can render 
into the data area, if it wants.

 

Ely.

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brendan 
Meutzner
Sent: Thursday, May 31, 2007 12:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Labels on inner side of axis for Charts

 

Throwing this one out there again... Ely, can you point me in the right 
direction to start?... it doesn't seem like this can be accomplished through a 
custom AxisRenderer, but instead might require digging into the ChartBase 
class, or subclasses of?  Just a bit of a nudge in the right direction would be 
of great help :-)  Thanks. 

Brendan



On 5/16/07, Brendan Meutzner <[EMAIL PROTECTED]> wrote: 

Hi,

Before I go digging through the charting framework, I thought I'd see if anyone 
else has accomplished placing the labels on the inside of the chart axis (and 
better yet, having them align left when placed there), and are willing to share 
code/ideas? 

Thanks,

Brendan

-- 
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]  
http://www.stretchmedia.ca 




-- 
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca 

 

<><>

[flexcoders] Re: Web Service Problems

2007-05-31 Thread lfw_mara
Peter Thanks for your help! :)

1) I updated flex builder 2.0.1 to hotfix 2. Since I am running my
flex app using tomcat I decided to update WEB-INF/flex dir with
relevant files I found in updated Flex SDK 2. After this I can't even
compile my app I get an error. Not sure if i am doing this right?
Error is the following /
Channel definition, mx.messaging.channels.RTMPChannel, can not be found.

2) If I don't update my tomcat WEB-INF/flex.
I removed format="xml" from my request so it doesn't binding issues.
and I carefully looked at my WSDL, so my parameters have the same name
 as the part(WSDL is inluded above just in case).
My send() function returns me null object, so when I debug I cannot
see the SOAP body, cuz message=null. So eventually I get an error from 
fault-faultString = Required parameter 'orderId' not found in input
arguments.

My WSDl

http://www.ofbiz.org/service/";>













http://schemas.xmlsoap.org/soap/http"/>



http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://www.ofbiz.org/service/"; use="literal"/>


http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://www.ofbiz.org/service/"; use="literal"/>





http://localhost:8080/webtools/control/SOAPService"/>





Thanks,
Regards
Marina
--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:
>
> Hmm, I've noticed that format="xml" does not support data binding. I'm
> not sure if that is a bug or just a limitation of mxmlc, but without
> format="xml" you just have normal MXML processing rules and those tags
> get converted into plain old ActionScript Objects with child elements
> becoming properties/values.
>  
> First up, you should move to Flex 2.0.1 Hotfix 2.
> Second, if you want to use data binding I suggest not using format="xml"
> and let the WebService operation encode the SOAP request for you.
> Third, I would become very familiar with the WSDL operation message
> definition and look very closely at the parts that are defined for the
> message. The child elements should be named what the part name attribute
> specifies as this syntax ends up being passed to a SOAPEncoder as an
> Object so it thinks you're using named parameters and thus will look for
> parts by name. Don't worry, if the part declares an element, it will use
> the element when encoding that particular part. If the part declares a
> type, then it will use the part name.
>  
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of lfw_mara
> Sent: Wednesday, May 30, 2007 6:10 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Web Service Problems
> 
> 
> 
> Hello!
> 
> I am trying to call web service created in OFBiz framework(it uses
> axis java web services).
> I am having two problems
> 
> 1) Here is my flex client code
>  wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma
> tion?wsdl
>  wsdl> "
> showBusyCursor="true" > 
>  result="controller.resultHandlerGetOrderInformation(event)">
>  
>  
> {myDataGrid.selectedItem} 
>  
>  
> 
> 
> 
> And then I do
> Application.application.ws.getOrderInformation.send();
> In soap message body my argument orderId equals to null. But if
> I pass hard coded string instead of {myDataGrid.selectedItem}. It
> works perfectly fine
> 
> 2) I tried to pass arguments thru Action Script code and I did the
> following
>  wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma
> tion?wsdl
>  wsdl> "
> showBusyCursor="true" />
> 
> And in Action Script
> var selectedOrderId:string =
> Application.application.myDataGrid.selectedItem.value;
> Application.application.ws.getOrderInformation(selectedOrderId);
> 
> I also tried
>  wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma
> tion?wsdl
>  wsdl> "
> showBusyCursor="true" >  result="controller.resultHandlerGetOrderInformation(event)"/>
> 
> 
> And in Action Script
> var selectedOrderId:string =
> Application.application.myDataGrid.selectedItem.value;
> 
> Application.application.ws.getOrderInformation.send(selectedOrderId);
> 
> When I look in the soap message body it doesn't have the wrapper for
> the name of the operation, it contains only argument with its value
> and flex gives me an error
> 
> [RPC Fault faultString="Error #1009: Cannot access a property or
> method of a null object reference." faultCode="DecodingError"
> faultDetail="null"]
> at
> mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::proce
> ssResult  ()
> at
> mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resu
> ltHandler  ()
> at mx.rpc::Responder/result()
> at mx.rpc::Asy

[flexcoders] TabNavigator/ToggleButtonBar Style conflict

2007-05-31 Thread Derek Vadneau
Code follows...

Setting styles for ToggleButtonBar overrides styles set for buttons of
TabNavigator.

The TabNavigator uses the ToggleButtonBar (actually, TabBar, which
extends ToggleButtonBar) for the "tabs".

What happens is if I set styles for the TabNavigator tabs, they are
ignored if I also set styles for the ToggleButtonBar.

Here is the code:


http://www.adobe.com/2006/mxml"; xmlns="*"
layout="absolute">

TabNavigator {
   cornerRadius: 0;
   tabStyleName: "myTabButtonStyle";
   firstTabStyleName: "myTabFirstButtonStyle";
   lastTabStyleName: "myTabLastButtonStyle";
   selectedTabTextStyleName: "myTabSelectedButtonStyle";
}
.myTabButtonStyle {cornerRadius: 20;}
.myTabFirstButtonStyle {cornerRadius: 20;}
.myTabLastButtonStyle {cornerRadius: 20;}
.myTabSelectedButtonStyle {cornerRadius: 20;}

ToggleButtonBar {
   buttonStyleName: "mytoggleButtonBarButtonStyle";
   firstButtonStyleName: "mytoggleButtonBarFirstButtonStyle";
   lastButtonStyleName: "mytoggleButtonBarLastButtonStyle";
   selectedButtonTextStyleName: "mytoggleButtonBarSelectedButtonStyle";
}
.mytoggleButtonBarButtonStyle {color: #FF;}
.mytoggleButtonBarFirstButtonStyle {color: #FF;}
.mytoggleButtonBarLastButtonStyle {color: #FF;}
.mytoggleButtonBarSelectedButtonStyle {color: #FF;}

















All I'm trying to do is set the cornerRadius of the tabs to be some
value - I've exagerrated the value here and left out style properties
for the ToggleButtonBar buttons just so it's obvious what's going on.

The outside TabNavigator only has one tab and that takes on the style
of the TabNavigator selectedTab style. The inner TabNavigator shows
that the first and last buttons take on the ToggleButtonBar styles but
the middle button takes on the TabNavigator style.

If you comment out the ToggleButtonBar styles the TabNavigator styles
are applied properly.

As a workaround I can specify the styleName of the ToggleButtonBar I'm
using so that the style is specific to that instance rather than
global to all components.

I would classify this as a bug, unless someone can convince me why
this is expected behaviour.

-- 

Derek Vadneau


[flexcoders] Re: Labels on inner side of axis for Charts

2007-05-31 Thread Brendan Meutzner

Throwing this one out there again... Ely, can you point me in the right
direction to start?... it doesn't seem like this can be accomplished through
a custom AxisRenderer, but instead might require digging into the ChartBase
class, or subclasses of?  Just a bit of a nudge in the right direction would
be of great help :-)  Thanks.

Brendan


On 5/16/07, Brendan Meutzner <[EMAIL PROTECTED]> wrote:


Hi,

Before I go digging through the charting framework, I thought I'd see if
anyone else has accomplished placing the labels on the inside of the chart
axis (and better yet, having them align left when placed there), and are
willing to share code/ideas?

Thanks,

Brendan

--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


[flexcoders] Accessing the illusive stage Object through sprite (a near impossible feat)

2007-05-31 Thread patricklemiuex
Dear Actionscript wizards:

I have an all as3.0 project.

I can never seem to access the stage object (I've posted several times
and never can get any appropriate solutions)?  i thought this was
automatic with every class that extends sprite... I get a null object
reference trying to access the stage object.  I must be doing
something incorrectly, though I have studied this in a few places.


public class AbstractSlideView extends Sprite 
{
protected var _data:PictureProviderXML;
//protected var _data:PictureProvider;
private var _paramObj:Object;

public function AbstractSlideView() {
var timer:Timer = new Timer(1000,1);
timer.addEventListener(TimerEvent.TIMER, installVars);
timer.start();
this.stage.focus = this;
this.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
this.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
}



[flexcoders] Re: coldfusion wizard

2007-05-31 Thread David
Sounds like a path problem. Make sure you check your syntax for each
component to see if the root folder is first. IE - if you have a
website path of mysite/flexapp/etc and your components are in the
flexapp, they won't be found. Make sure your components say
mysite.flexapp.component . 
Hope this helps,
David


--- In flexcoders@yahoogroups.com, "bghoward3" <[EMAIL PROTECTED]> wrote:



>
> hello
> 
> i have succesfully used the coldfusion wizard to connect to mysql db 
> and read the required information on a master/datagrid page, however 
> when i try to launch the detail page or if i make a master/detail 
> page and select a record from which to populate the details with i 
> recieve an error
> 
> the error reads:
> (mx.rpc::Fault)#0
> errorID=0
> faultCode="Server.Processing"
> faultDetail = "Please check that the given name is correct and that 
> the component exists."
> faultString="Could not find the ColdFusion Component
> remoteTestTwo.components.cfgenerated.masterdetail.hot_topicsBean."
> message = "faultCode: Server.Prcessing ...
> name = "Error"
> rootCause=(null)
> 
> the error box will go away when the ok is clicked but  the detail 
> info does not populate
> 
> when i look at my project structure i do in fact have a file called
> "hot_topicsBean.cfc" in the defined directory so i am not sure what 
> is happening here
> 
> any direction greatly appreciated
>




[flexcoders] Dynamic Icon for Button

2007-05-31 Thread Matt
Is there any way to dynamically load a "icon" for a Button at runtime
instead of embedding it?  If not, is there any third-party components
that add support for this or am I left to do this for myself?



[flexcoders] Re: Empty branch in a TREE - show folder instead of file icon?

2007-05-31 Thread discipl4
Sorry - I forgot to state... this xml is coming from a webservice ..
so .. I cant just change my XML to say isBranch=true :):)  Unless the
solution is to append that attribute onto each node programatically.

Thanks!!

- - Dan 


--- In flexcoders@yahoogroups.com, "discipl4" <[EMAIL PROTECTED]> wrote:
>
> Hi friends - thanks in advance for any help you can provide.  I am
> displaying a simple XML in a TREE component and if I have an empty
> branch, it shows up as a file icon instead of a folder - which is
> expected.
> 
> My XML looks like
> 
> 
>  
>
>  
> 
> 
> Parent one is a folder...  parent two is a file.  
> 
> The underlying dataprovider is an XMLListCollection.  How can I
> declare each parent node as a branch?  I basically want to insert
> 'isBranch=true' onto each parent node.
> 
> Thanks!
> 
> - - Dan
>




Re: [flexcoders] Empty branch in a TREE - show folder instead of file icon?

2007-05-31 Thread Richard Rodseth

Not sure exactly what you're asking, but I recently did the following to
make leaf nodes have a folder icon:




On 5/31/07, discipl4 <[EMAIL PROTECTED]> wrote:


  Hi friends - thanks in advance for any help you can provide. I am
displaying a simple XML in a TREE component and if I have an empty
branch, it shows up as a file icon instead of a folder - which is
expected.

My XML looks like







Parent one is a folder... parent two is a file.

The underlying dataprovider is an XMLListCollection. How can I
declare each parent node as a branch? I basically want to insert
'isBranch=true' onto each parent node.

Thanks!

- - Dan

 



[flexcoders] CSS Gurus: Different StyleManagers within one Application???

2007-05-31 Thread Aldo Bucchi
Hi all,

I have two different applications ( swfs ) that are loaded at runtime
using two SWFLoaders inside a third application ( that acts mainly as
a shell ).
I need their CSS styles, skinning, etc to be independent... but the
behaviour I get is that their styles get merged ( first one loaded
wins ).

Is it possible to achieve this separation??

What I am doing is something similar to the Flex Style Explorer, but
the controls used to tweak styles at runtime have to be stylable using
an independent, inmutable CSS file... their styling MUST NOT be
affected by any runtime modifications.

I cannot create specific class selectors for these controls, because
the CSS file already exists and makes use of type selectors as well.

One obvious solution is to make two completely separate applications
and have them talk through a LocalConnection. But this leads to some
unwanted layout problems in my specific case ( ColorPickers on the
controls application won't be able to hover over the other app, thus
not leaving them enough real estate to display correctly ).

Thanks,
Aldo


-- 
: Aldo Bucchi :
mobile +56 9 8429 8300


RE: [flexcoders] Array errors

2007-05-31 Thread Tracy Spratt
This error occurs because of the way the Flex compiler converts the mxml
into an as class before compiling the swf.  homeNav does not yet exist
when you make the assignment in the second line.

 

The fix is to do all posible initialization in a function, rather than
in the "root" of the script block.  Call that init function using the
creationComplete event.


public var homeNav:Array; 

Private function initApp():void {

  homeNav = new Array();

  homeNav[0] = "12";


 

This would probably work as well:

public var homeNav:Array = ["12"];

 

But it is a good habit to do most of the work in a function.

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave @ VitalPodcasts.com
Sent: Thursday, May 31, 2007 12:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Array errors

 

Im copy and pasting known working examples, and my Flex Builder keeps 
giving me an error... Since Im copying an pasting from help docs.. I 
have no clue why this wont work.

...

So here is what im trying to do.


public var homeNav:Array = new Array(); 
homeNav[0] = "12";


Yet it shows an error on "homeNav[0] = "12";" line
- Access of undefined property homeNav

Help!!! :)

 



[flexcoders] Empty branch in a TREE - show folder instead of file icon?

2007-05-31 Thread discipl4
Hi friends - thanks in advance for any help you can provide.  I am
displaying a simple XML in a TREE component and if I have an empty
branch, it shows up as a file icon instead of a folder - which is
expected.

My XML looks like


 
   
 


Parent one is a folder...  parent two is a file.  

The underlying dataprovider is an XMLListCollection.  How can I
declare each parent node as a branch?  I basically want to insert
'isBranch=true' onto each parent node.

Thanks!

- - Dan



[flexcoders] Progress Bar/Screen Refresh

2007-05-31 Thread jayparnau
Is there any way to force a progress bar to update during a long 
process? I am looping through a lot of data, and I want the progress 
bar to indicate what percentage has been processed. I guess I'm 
looking for the actionscript equivalent of a .NET DoEvents.



[flexcoders] Re: URL parameters into mx:application

2007-05-31 Thread Rohan Pinto
i asked the question too soon: i found the answer here:
http://tech.groups.yahoo.com/group/flexcoders/message/71471


sorry folks.

Rohan Pinto
http://konkan.tv

--- In flexcoders@yahoogroups.com, "Rohan Pinto" <[EMAIL PROTECTED]> wrote:
>
> how do I pass URL parameters into my application ? I need to be able
> to pass URL parameters into my app in order to display the appropriate
> components based on the URL... any advise ?
>




[flexcoders] Re: create new button with an icon

2007-05-31 Thread mazarflex
so i am making a toolbar each button has a specific name
(ex."CmdInfo"). in sql i have a procedure. if you pass it "CmdInfo" 
is returns "F" meaning visibility=false. i need to loop through all 
of the buttons on my form and pass their names to SQL. i dont know 
where to start i thought i had it with an array but i could not do 
the icon or the click. ugh!!! help me please thank you 

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Button icons cannot be loaded at runtime.  They must be embedded in 
the
> app.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mazarflex
> Sent: Thursday, May 31, 2007 10:29 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] create new button with an icon
> 
>  
> 
> i have created the buttons and ran them through a Stored Procedure 
to 
> set visibility. now i am tring to asign the icons dynamically. i 
cannot 
> get it to work with the set style. not sure how to assign icons @ 
run 
> time. heres the funciton calling from an array of buttons. it does 
not 
> work. it will create the button but not the icon
> 
> CreateIt(cmds[1],cmds[1].icon)
> 
> public function CreateIt(l_cmdID:Button,l_filePath:String):void{
> var l_cmdID:Button = new Button
> l_cmdID.setStyle("icon",l_filePath)
> this.HB1.addChild(l_cmdID)
> }
>




Re: {Disarmed} [flexcoders] URL parameters into mx:application

2007-05-31 Thread Jurgen Beck
You do this the same way you would with a Flash application. You can use 
flashvars to do that, which become available in your application.


Look for info on Flex and flashvars.

Jurgen

Rohan Pinto wrote:


how do I pass URL parameters into my application ? I need to be able
to pass URL parameters into my app in order to display the appropriate
components based on the URL... any advise ?

 


[flexcoders] URL parameters into mx:application

2007-05-31 Thread Rohan Pinto
how do I pass URL parameters into my application ? I need to be able
to pass URL parameters into my app in order to display the appropriate
components based on the URL... any advise ?



RE: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG or... WIsh...

2007-05-31 Thread Robert Chyko
I believe the displaying of the tooltip causes the itemEditor to lose
focus which fires an itemEditEnd event.. thus destroying your
itemEditor.  I had tried something similar in the past and could not get
it working so had to take a different approach.
 
If you find a solution, please repost to the list.
 
thanks
 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui
Sent: Thursday, May 31, 2007 1:39 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Tooltip in itemeditor of datagrid
BUG or... WIsh...





Do you have a custom tooltip?  Otherwise it shouldn't close.
How are you setting the tooltip?




  _  


From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of nxzone
Sent: Thursday, May 31, 2007 8:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG
or... WIsh...



Nobody have a hint?

I can repeat my question as this:

How can I show the Error ToolTip after a validation in a
ITEMEDITOR of
a Datagrid... We i mouse over and show the tooltip, the item
editor is
close!!





 



[flexcoders] layout help

2007-05-31 Thread Rohan Pinto
hi folks,

i'm building this app (a video sharing app) and am having issues with
layout..

app URL: http://demo.rohanpinto.com 

if you notice the right TileWindow titled "Desktop Control" i have an
accordion which loads data from my backend webservice...

here's the issue:
in the control titled "Video Channels"
i can't seem to get the vertical scrollbar to work.. (i need to
DISABLE the horizontal scrollbar and enable just the vertical scrollbar)

in the desktopcontrol mxml I have the following:





and in videochannels mxml i have the following:

   




  


could somone tell me what i'm doing wrong?

Rohan Pinto
http://konkan.tv




Re: [flexcoders] Re: Socket Connection to Port 80 on Serving Host

2007-05-31 Thread Jesse Hallam

OK -- I'll see where I might be able to redirect this.

While I'm fully aware of security restrictions -- I didn't expect to run
into them when I'm fully in control of the server and fully in control of
the client app. Making the necessary modifications ( i.e. recompiling the
httpd server!) to respond to this one xmlsocket request on my http server
"works", it just seems so unnecessary.

Thanks for the input!

On 5/31/07, Peter Farland <[EMAIL PROTECTED]> wrote:


 This really is a question for the Flash Player team and is outside of the
scope of Flex.

I will note that, while I'm not on the Flash Player team, such decisions
were made very intentionally. They're not randomly trying to make life
difficult, they've deliberately set restriction for security reasons to
avoid specific exploits.

Pete

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *lieut_data
*Sent:* Wednesday, May 30, 2007 2:59 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: Socket Connection to Port 80 on Serving Host

  Essentially, the problem boils down to this:

"If you want to connect to a socket on a different host than the one
from which the connecting SWF file was served, or if you want to
connect to a port lower than 1024 on any host, you must obtain an
xmlsocket: policy file from the host to which you are connecting."
---http://livedocs.adobe.com/flex/2/langref/flash/net/Socket.html#connect
()

Why do I need to implement an XMLSocket server, to open a Socket to a
service on my server that isn't an XMLSocket service? Why can't it get
the information it needs from an HTTP resource?

"A policy file obtained from an HTTP server implicitly authorizes
socket access to all ports 1024 and above; any to-ports attributes in
an HTTP policy file are ignored."
---
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=1952.html#145389

It seems as though the intent is to prevent the Flash player from
communicating, using Sockets, to any standard HTTP server setup (port
80 open, nothing else). Why?

--
Jesse Hallam
University of Waterloo Junior

--- In flexcoders@yahoogroups.com , "Jesse
Hallam" <[EMAIL PROTECTED]> wrote:
>
> I'm surprised how many walls I've run into trying to solve this, fairly
> simple problem.
>
> Essentially, I need to perform RPC style communication with the server
> hosting the .swf. The server, which is also under my control,
communicates
> custom binary data over HTTP, expecting HTTP POST requests from the
client.
> Part of its response includes custom headers to indicate the status
of the
> request, with the body containing the raw binary data needed.
>
> Of course, neither the Flex HTTPService, URLLoader, or URLStream
allow me to
> parse custom response headers (not to mention setting some strange
> restrictions on which headers I can transmit). Instead, I turned to
Sockets
> in the hopes of writing my own, more FLEXible HTTP client.
>
> Alas, I cannot seem to use Sockets to open a connection to port 80
on the
> host serving the .swf. From the following documentation:
>
>

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=1952.html#145389
>
> I learn several things:
>
> - Socket communication requires a socket policy file, distinct from a
> document policy file
> - A socket policy file must be obtained using the same communication
> protocol as the socket (i.e. a socket opened on port 501 requires a
> socket policy file from port 501)
> - A socket policy file can be used to allow port access to ports <
> 1024
> - A special syntax, 'xmlsocket://server:port/crossdomain.xml' can be
> used to request a socket policy file from a different port
> - Using loadPolicyFile and a standard document policy file, access to
> ports > 1024 are implicitly enabled, and any 'to-ports' settings
in the
> configuration file are ignored.
>
> Basically, at the end of the day, I want a .swf served from a host to be
> able to open socket connection on port 80 back to the server that
hosted it
> to do HTTP operations. I cannot seem to be able to do this unless I:
>
> - Open another port < 1024 to serve a socket policy file
> - Modify the server to respond to the Flash request for a socket
> policy file ( http://www.blog.lessrain.com/?p=512 )
>
>
> Why must it be so difficult to access the response headers from an HTTP
> connection?! This isn't a crossdomain issue at all -- this is
communication
> with the very same host that served the .swf file in the first place.
>
> Has anyone managed to overcome this issue cleanly?
> Any input from more experienced Flex coders?
>
> Any help would be greatly appreciated :)
>
> Reference post, that yielded inconclusive results:
> http://tech.groups.yahoo.com/group/flexcoders/message/71730
>
> --
> Jesse Hallam
> University of Waterloo Junior
>
> "For scarcely for a righteous man will one die: yet peradventure for
a good
> man

[flexcoders] Re: DataGrid HeaderRenderer Recreates every click

2007-05-31 Thread e_baggg
Alex-
  Thanks. The issue is when a user clicks a column header, all the
column headers are re-created and now there is no way to know what
just happened since any state of that click event is lost. So I guess
I am forced to save it outside the headerRenderer. 

I suppose I can store the column index of what was clicked, then each
column when it redraws itself can get that int (if it's not -1), look
that value up in the 'columns' array and see if itself is it. If so,
then display the appropriate up/down arrow. 

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> People do some really tricky things in customized DGs like having
> headers grow and shrink or other rows grow and shrink based on rollover
> states and selection and what not.  Right now the DG aggressively
> redraws to make sure we don't make assumptions about what can change.
> 
>  
> 
> In theory, your custom header renderers should derive their state from
> some description of the sort.  That's a good model/view design and the
> cost should be insignificant.  Maybe the way you're checking is
> non-optimal.
> 
>  
> 
> -Alex
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of e_baggg
> Sent: Thursday, May 31, 2007 10:18 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] DataGrid HeaderRenderer Recreates every click
> 
>  
> 
> I have a server-side sort on my DataGrid which means I had to
> implement my own headerRenderer to handle the click event, sort, and
> server calls. 
> 
> I am trying to create the asc/desc arrow now but I realized that any
> click event on the DataGrid instantiates a new Object of the
> headerRenderer (all of them actually). In other words, my
> headerRenderer mxml implementation, the creationComplete event gets
> called any time ANYTHING is clicked in the grid, including a row.
> 
> This is a problem for many reasons, but the most significant one being
> that I cannot store the state if the column is ascending/descending
> based on the user's click. I could store this externally in the model
> but that is very bad b/c then I'd also have to store which column was
> clicked and then the other columns have to check if it is itself and
> remove the arrow if they have one. Does anyone know why the
> headerRenderer is re-creating an instance of itself every time or
> faced this issue?
> 
> Thanks in advance.
>




RE: [flexcoders] Re: LoadModule, creating a history so the Back Button works...

2007-05-31 Thread Alex Harui
Not sure what your delivery timeframe is, but you would be a good
candidate for the new "Deep Linking" feature in the upcoming beta.  If
you can't wait that long, google for UrlKit and try that out.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave @ VitalPodcasts.com
Sent: Thursday, May 31, 2007 10:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: LoadModule, creating a history so the Back
Button works...

 

Let me Clarify

I have a TabNavigator that has 2 tabs, under the first Tab I have 4 
buttons.

When one of those buttons are clicked, I load a module in a place that 
is outside of the tab Navigator. Perhaps this isnt how its supposed to 
be used, but I want just the Tab Navigator for Navigation with another 
canvas for Content, so...



Does not exist within the TabNavigator.
And the button code on click is...

bodyModuleLoader.url = sUrl;
bodyModuleLoader.loadModule(); 

So its not a child of the tab Navigator.

 



RE: [flexcoders] Re: DataGrid edits with XMLListCollection dataprovider

2007-05-31 Thread Alex Harui
The DG default code assumes that you are pulling properties for display
and stuffing them on edit.  Your label functions are not simply property
pullers so you'll need to customize an ITEM_EDIT_END handler, call
preventDefault() and stuff it yourself.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of arieljake
Sent: Thursday, May 31, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: DataGrid edits with XMLListCollection
dataprovider

 

Update:

I do not think this is something to be done with ItemRenderer or 
ItemEditor. I have tracked this to the DataGrid itself. There is a 
line there that says:

data[property] = newValue;

This leads to entries in the data like:



my new value



when the dataField="text"

OR



my new value



when the dataField is empty.

Text is not a property of an XML object, so there is no setter. And 
setChildren does not work as a property, only a method.

How else can one get the DataGrid to save the data like:


my new value


--- In flexcoders@yahoogroups.com 
, Ariel Jakobovits <[EMAIL PROTECTED]> 
wrote:
>
> I have this file:
> 
> 
> value1
> value2
> 
> 
> output in these columns:
> 
> 
> 
> 
> 
> 
> with these label functions:
> 
> private function getFieldLabel(data:Object, 
column:DataGridColumn):String
> {
> return XML(data).localName().toString();
> }
> private function getValueLabel(data:Object, 
column:DataGridColumn):String
> {
> return XML(data).text().toString();
> }
> 
> Question: if I want to edit the value column, how do I set the text
() property of an XML node?
>

 



[flexcoders] Parallel viewstates ?

2007-05-31 Thread pdflibpilot
Is it possible to have more than one viewstate as "current".

I would like to have 2 new viewstacks function independently - show
one, the other or both at anytime.



[flexcoders] Re: LoadModule, creating a history so the Back Button works...

2007-05-31 Thread Dave @ VitalPodcasts.com
Let me Clarify

I have a TabNavigator that has 2 tabs, under the first Tab I have 4 
buttons.

When one of those buttons are clicked, I load a module in a place that 
is outside of the tab Navigator.  Perhaps this isnt how its supposed to 
be used, but I want just the Tab Navigator for Navigation with another 
canvas for Content, so...



Does not exist within the TabNavigator.
And the button code on click is...

bodyModuleLoader.url = sUrl;
bodyModuleLoader.loadModule();  


So its not a child of the tab Navigator.



RE: [flexcoders] Disable Clicks while on busyCursor

2007-05-31 Thread Alex Harui
Did you try Application.application.enabled = false?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Thursday, May 31, 2007 10:19 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Disable Clicks while on busyCursor

 

Is it just me, or is it a bit surprising that we've got to hack
something together to handle this? Come on, Adobe... what's a proper
solution (and why wasn't it built into the CursorManager!)? I've got
enough asynchronous problems to deal with than have to worry that the
user's going to go off willy-nilly clicking buttons while the busy
cursor is being shown. I understand that some folks may not want it to
*always* prevent mouse clicks, but a little boolean flag (or two) in the
CursorManager that prevents mouse clicks and/or focus changes/keyboard
events would be very, very nice. 

Troy.



On 5/31/07, Anthony Lee <[EMAIL PROTECTED]
 > wrote:

>> - Make all your active components register themselves then loop
through 
>> and disable/enable them according to your busy state 

> Too taxing on cpu...

How many components are we talking about?

Hack #3
Generate an Alert and position it outside the viewable area. They're
modal by default... meaning the user shouldn't be able to click on
anything till you clear it. 

Anthony

 

 



[flexcoders] Re: DataGrid edits with XMLListCollection dataprovider

2007-05-31 Thread arieljake
Update:

I do not think this is something to be done with ItemRenderer or 
ItemEditor. I have tracked this to the DataGrid itself. There is a 
line there that says:

data[property] = newValue;

This leads to entries in the data like:


  
my new value
  


when the dataField="text"

OR


  
my new value
  


when the dataField is empty.

Text is not a property of an XML object, so there is no setter. And 
setChildren does not work as a property, only a method.

How else can one get the DataGrid to save the data like:


  my new value


--- In flexcoders@yahoogroups.com, Ariel Jakobovits <[EMAIL PROTECTED]> 
wrote:
>
> I have this file:
> 
> 
> value1
> value2
> 
> 
> output in these columns:
> 
> 
> 
> 
> 
> 
> with these label functions:
> 
> private function getFieldLabel(data:Object, 
column:DataGridColumn):String
> {
> return XML(data).localName().toString();
> }
> private function getValueLabel(data:Object, 
column:DataGridColumn):String
> {
> return XML(data).text().toString();
> }
> 
> Question: if I want to edit the value column, how do I set the text
() property of an XML node?
>




RE: [flexcoders] textarea minHeight

2007-05-31 Thread Alex Harui
Verticalscrollposition will be something like 0, 1, 2 and you probably
need 100, 112, 124.

 

Try {Math.max(100, t2.verticalScrollPosition * 12)}

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bhaq1972
Sent: Thursday, May 31, 2007 2:02 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] textarea minHeight

 

Aim - I want the minimum height of a textarea to be 100 and then 
grow as more newlines are added.

this nearly works except the minimum height isn't 100



also tried 



but doesn't quite work.

Any help appreciated.

-Bod

 



RE: [flexcoders] TabNavigator selectedIndex property

2007-05-31 Thread Alex Harui
Might be timing.  Try setting selectedIndex either before or after
adding children or maybe later via callLater

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of james.tundra
Sent: Wednesday, May 30, 2007 5:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] TabNavigator selectedIndex property

 

Hey all,

I've run into a problem when trying to set the selectedIndex property
on a TabNavigator. The TabNavigator is set in mxml, however I am
adding and removing children with AS3 at runtime depending on what
node the user clicks in a Tree control (hope that makes sense). The
children are doing what they are supposed to (i.e. attaching and
removing, and getting initialised with whatever data I pass to them).
But when the selectedIndex is, say, 3 and then the user clicks a tree
node forcing the TabNavigator to remove and reload children, I am
trying to reset the selectedIndex property back to 0 (to show the
first tab) - this part works, that tabnavigator shows the right tab,
but the tab button that appears selected is still the old property (3
in this scenario). 

So is this a display problem or the way that I am adding/removing
children? I have tried invalidateDisplayList() and callLater, but
nothing seems to help. Hope someone has some insight...

Cheers.

 



RE: [flexcoders] LoadModule, creating a history so the Back Button works...

2007-05-31 Thread Alex Harui
Not sure I understand.  If you put ModuleLoaders as children of a
TabNavigator and enable History in the HTML wrapper, it should just
work.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave @ VitalPodcasts.com
Sent: Thursday, May 31, 2007 8:08 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LoadModule, creating a history so the Back Button
works...

 

How would I do this?
Currently I have a TabNavigator, and when I click on tabs, it creates 
something that enables a browser history, how do I use whatever its 
doing to create my own history item? 

basically in the tabnavigator I have buttons that load a module, it 
would be nice to enable the back button to load the previous module.

any ideas? Thanks in Advance

 



RE: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG or... WIsh...

2007-05-31 Thread Alex Harui
Do you have a custom tooltip?  Otherwise it shouldn't close.  How are
you setting the tooltip?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nxzone
Sent: Thursday, May 31, 2007 8:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG or...
WIsh...

 

Nobody have a hint?

I can repeat my question as this:

How can I show the Error ToolTip after a validation in a ITEMEDITOR of
a Datagrid... We i mouse over and show the tooltip, the item editor is
close!!

 



Re: [flexcoders] Charts and Business day axis

2007-05-31 Thread Brendan Meutzner

Look at the DateTimeAxis, and the dataUnits, labelUnits properties...


Brendan

On 5/30/07, pgherveou <[EMAIL PROTECTED]> wrote:


  Hello there,

I try to display a chart based on a one year business day axis. (no
week ends for the moment)

I used a categoryAxis to draw my chart. It works perfectly. the only
problem is the axis. There are not enough space to display all ticks
and labels (one per business day).

Ideally what I would like to do is to controls label and ticks to
display for example only the label of the first business day of each
month.

I tried to use a custom LabelFunction to do that, but I can't fix the
labelSize (they are still to small)

Thanks in advance for your help

Pierre

 





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


RE: [flexcoders] create new button with an icon

2007-05-31 Thread Alex Harui
Button icons cannot be loaded at runtime.  They must be embedded in the
app.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mazarflex
Sent: Thursday, May 31, 2007 10:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] create new button with an icon

 

i have created the buttons and ran them through a Stored Procedure to 
set visibility. now i am tring to asign the icons dynamically. i cannot 
get it to work with the set style. not sure how to assign icons @ run 
time. heres the funciton calling from an array of buttons. it does not 
work. it will create the button but not the icon

CreateIt(cmds[1],cmds[1].icon)

public function CreateIt(l_cmdID:Button,l_filePath:String):void{
var l_cmdID:Button = new Button
l_cmdID.setStyle("icon",l_filePath)
this.HB1.addChild(l_cmdID)
}

 



RE: [flexcoders] DataGrid HeaderRenderer Recreates every click

2007-05-31 Thread Alex Harui
People do some really tricky things in customized DGs like having
headers grow and shrink or other rows grow and shrink based on rollover
states and selection and what not.  Right now the DG aggressively
redraws to make sure we don't make assumptions about what can change.

 

In theory, your custom header renderers should derive their state from
some description of the sort.  That's a good model/view design and the
cost should be insignificant.  Maybe the way you're checking is
non-optimal.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of e_baggg
Sent: Thursday, May 31, 2007 10:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid HeaderRenderer Recreates every click

 

I have a server-side sort on my DataGrid which means I had to
implement my own headerRenderer to handle the click event, sort, and
server calls. 

I am trying to create the asc/desc arrow now but I realized that any
click event on the DataGrid instantiates a new Object of the
headerRenderer (all of them actually). In other words, my
headerRenderer mxml implementation, the creationComplete event gets
called any time ANYTHING is clicked in the grid, including a row.

This is a problem for many reasons, but the most significant one being
that I cannot store the state if the column is ascending/descending
based on the user's click. I could store this externally in the model
but that is very bad b/c then I'd also have to store which column was
clicked and then the other columns have to check if it is itself and
remove the arrow if they have one. Does anyone know why the
headerRenderer is re-creating an instance of itself every time or
faced this issue?

Thanks in advance.

 



Re: [flexcoders] Information on how to Create Objects on the fly with Code

2007-05-31 Thread David McGraw

Solved this,
For anyone that may need this, you have to use addChild() as Below.

var myNewButton:Button = new Button();
parent.addChild(temp);




On 5/31/07, Dave @ VitalPodcasts.com <[EMAIL PROTECTED]> wrote:


  Is there are resources out there on how to create, let's say a button,
on the fly with Code?

Im trying to create an Array, and I want to loop around it to create a
list of Buttons for navigation.





[flexcoders] create new button with an icon

2007-05-31 Thread mazarflex
i have created the buttons and ran them through a Stored Procedure to 
set visibility. now i am tring to asign the icons dynamically. i cannot 
get it to work with the set style. not sure how to assign icons @ run 
time. heres the funciton calling from an array of buttons. it does not 
work. it will create the button but not the icon

CreateIt(cmds[1],cmds[1].icon)

public function CreateIt(l_cmdID:Button,l_filePath:String):void{
var l_cmdID:Button = new Button
l_cmdID.setStyle("icon",l_filePath)
this.HB1.addChild(l_cmdID)
}



[flexcoders] Array errors

2007-05-31 Thread Dave @ VitalPodcasts.com
Im copy and pasting known working examples, and my Flex Builder keeps 
giving me an error... Since Im copying an pasting from help docs.. I 
have no clue why this wont work.

...

So here is what im trying to do.


 public var homeNav:Array = new Array();
 homeNav[0] = "12";


Yet it shows an error on "homeNav[0] = "12";" line
 - Access of undefined property homeNav


Help!!!  :)



RE: [flexcoders] BarChart - Reversing draw order?

2007-05-31 Thread Ely Greenfield
 

 

 

Nope. The all charts try to render axes consistently The 'first item' in
a category axis corresponds to zero. A horizontal axis always puts zero
on the left, and a vertical axis always  puts zero (or the lowest value)
on the bottom.  So the first item in the axis goes on the left on the
horizontal, bottom on the vertical.

 

If you wanted to change that, I'd suggest either trying to extend the
Category Axis to reverse the order in which it reports categories, or
write your own.

 

But the easiest way to do it would be to provide a separate dataProvider
to your categoryAxis that has the same values, but sorted in reverse
order. Then make sure you assign an xField to your series (if you don't
provide an xField, it just maps the items to the categories by index,
which would not work. Instead, you want to match the items to the
categories by value, which would place them in the correct spot along
your inverted category axis).

 

Ely.

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Schmitty
Sent: Thursday, May 31, 2007 10:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] BarChart - Reversing draw order?

 

I don't know if thats the correct term or not, but I'm trying to
change the behavior of the BarChart to match ColumnChart (in my mind
at least)

In the example below (modified from livedocs) theres a Column and Bar
chart side by side with a datagrid bound to the same array collection
at the bottom. When you sort the datagrid by Gold Medals, highest to
lowest, the Column chart puts the tallest block first and shortest
last. The BarChart however places the largest bar at the bottom and
the smallest at the top. I'd like to have the largest result at the
top of the BarChart.

Is there a simple attribute that I'm not seeing or will it involve
changing around how the BarChart draws itself to get it to read 'Top
to Bottom' like the ColumnChart does 'Left to Right'

Example code, sort by medals:



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











































 

<><>

RE: [flexcoders] Re: Is there any way to call super.super.method in AS3?

2007-05-31 Thread Alex Harui
Then you are stuck and have to duplicate code.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ravi Kumar Gummadi
Sent: Wednesday, May 30, 2007 11:42 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Is there any way to call
super.super.method in AS3?

 

Alex,

 

The solution is pretty good, but what if Class A and B are part of the
Flex framework and we don't have the permissions to change anyone of
them?

 

Regards

Ravi

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Thursday, May 31, 2007 11:37 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Is there any way to call
super.super.method in AS3?

 

Yes, or add another class layer between, or make the method replaceable,
or make the method in A callable directly, or add a flag

 

Adding another class layer is the purest form, but adds the weight of
another class

Extending from A might cause too much duplication of code from B

 

Replaceable methods and other tricks are kind of cheating but do work

 

Class A

{

// subclasses replace the actual function they need called

Protected var _myFunc:Function = myFuncA;

 

Protected function myFunc(a:Object, b:Object):int

{

return _myFunc(a, b);

}

 

Protected var myFuncA(a:Object, b:Object):int

{

// A's default behavior

}

}

 

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of wpding
Sent: Wednesday, May 30, 2007 6:42 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Is there any way to call super.super.method in
AS3?

 


I guess i have to extend Class C from class A directly.

I met this problem, when i tried to extend a component. In my case ,
The Class C want to replace the myMethod in this parent class Class B,
kept others unchanged.And myMethod in Class C still need to call
A.myMethod.

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Sorry, but I think you're wrong or misunderstood. If a method is
> overridden, you can skip around the override like you can in some
other
> languages
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of justinbuser
> Sent: Wednesday, May 30, 2007 10:50 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Is there any way to call super.super.method
in
> AS3?
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com
 , "wpding"  wrote:
> >
> > I want to override a method of a super class. and I can use
> > super.method to invoke the corresponding method of the super class.
> > 
> > But how i can call a method of the super super class.
> > for example.
> > Class A{
> > protected function myMethod(){}
> > }
> > Class B extends A{
> > override protected function myMethod(){}
> > }
> > 
> > Class C extends B{
> > override protected function myMethod(){}
> > }
> > 
> > Is it possible to call A.myMethod in the function C.MyMethod?
> > 
> > Thanks
> >
> Yes, exactly how you wrote it. However in order to have the top level
> function actually run before adding methods etc... with level 2 you
need
> to call super.myMethod(); from B or not override it at all in B to be
> able to access it's functionality! from C. In other words, if you
> override a function and then try to override it again in a class
> extending the one with the original override and don't call the super
> version in the intermediate class then you end up with an empty
function
> at the end.
> 
> JjB
> 
> -#As always I could be completely wrong, but it's not likely#-
>

 



[flexcoders] Re: button loop

2007-05-31 Thread mazarflex
great idead thank you very much i will try this
--- In flexcoders@yahoogroups.com, "Michael Schmalle" 
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> How are you defining the buttons dataProvider? Do you use a name in 
there?
> 
> You could create an extra name field in the dataProvider and loop 
through
> that dataProvider's index whil at the same time grabbing the button
> instance.
> 
> Then in the loop send the field dp[name] and the instance to the 
method,
> return a boolean if it is to be included.
> 
> Peace, Mike
> 
> On 5/31/07, mazarflex <[EMAIL PROTECTED]> wrote:
> >
> >   i have a toolbar and i am trying to loop through my 50 buttons 
and send
> > the name to a function. (it is really for user rights and the 
function
> > will send it to SQL to decide wether the user should have access 
to
> > that button) but the jist of it is to send a button to a function 
in a
> > loop or something. with out having to hardcode all the names of 
the
> > buttons
> >
> >  
> >
> 
> 
> 
> -- 
> Teoti Graphix
> http://www.teotigraphix.com
> 
> Blog - Flex2Components
> http://www.flex2components.com
> 
> You can find more by solving the problem then by 'asking the 
question'.
>




[flexcoders] BarChart - Reversing draw order?

2007-05-31 Thread Rick Schmitty
I don't know if thats the correct term or not, but I'm trying to
change the behavior of the BarChart to match ColumnChart (in my mind
at least)

In the example below (modified from livedocs) theres a Column and Bar
chart side by side with a datagrid bound to the same array collection
at the bottom.  When you sort the datagrid by Gold Medals, highest to
lowest, the Column chart puts the tallest block first and shortest
last.  The BarChart however places the largest bar at the bottom and
the smallest at the top.  I'd like to have the largest result at the
top of the BarChart.

Is there a simple attribute that I'm not seeing or will it involve
changing around how the BarChart draws itself to get it to read 'Top
to Bottom' like the ColumnChart does 'Left to Right'


Example code, sort by medals:



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






















 





















[flexcoders] DataGrid HeaderRenderer Recreates every click

2007-05-31 Thread e_baggg
I have a server-side sort on my DataGrid which means I had to
implement my own headerRenderer to handle the click event, sort, and
server calls. 

I am trying to create the asc/desc arrow now but I realized that any
click event on the DataGrid instantiates a new Object of the
headerRenderer (all of them actually). In other words, my
headerRenderer mxml implementation, the creationComplete event gets
called any time ANYTHING is clicked in the grid, including a row.

This is a problem for many reasons, but the most significant one being
that I cannot store the state if the column is ascending/descending
based on the user's click. I could store this externally in the model
but that is very bad b/c then I'd also have to store which column was
clicked and then the other columns have to check if it is itself and
remove the arrow if they have one. Does anyone know why the
headerRenderer is re-creating an instance of itself every time or
faced this issue?

Thanks in advance.



Re: [flexcoders] Disable Clicks while on busyCursor

2007-05-31 Thread Troy Gilbert

Is it just me, or is it a bit surprising that we've got to hack something
together to handle this? Come on, Adobe... what's a proper solution (and why
wasn't it built into the CursorManager!)? I've got enough asynchronous
problems to deal with than have to worry that the user's going to go off
willy-nilly clicking buttons while the busy cursor is being shown. I
understand that some folks may not want it to *always* prevent mouse clicks,
but a little boolean flag (or two) in the CursorManager that prevents mouse
clicks and/or focus changes/keyboard events would be very, very nice.

Troy.


On 5/31/07, Anthony Lee <[EMAIL PROTECTED]> wrote:


  >> - Make all your active components register themselves then loop
through
>> and disable/enable them according to your busy state
> Too taxing on cpu...

How many components are we talking about?

Hack #3
Generate an Alert and position it outside the viewable area. They're modal
by default... meaning the user shouldn't be able to click on anything till
you clear it.

Anthony
 



Re: [flexcoders] Can I use a variable to refer to an object's property name?

2007-05-31 Thread Paul deCoursey
Peter Demling wrote:
> (This is a fundamental question, and it' challenging to find a clear
> way to ask it):
>
> Let's say I have an ArrayCollection data source with 50 fields (which
> I do), and my user selects the name of one of these fields (let's say
> "PRODUCT") with myComboBox, so that it's now in
> "myComboBox.selectedItem.data".
>
> How can I make actionScript use this value dynamically, so that
> instead of coding a switch with 50 cases for each property like so:
>
>   
this should work for you.

return item[myComboBox.selectedItem.data];


paul
> switch(myComboBox.selectedItem.data){
>  case "PRODUCT":
>return item.PRODUCT;
>break;
>  case "FIELD2":
>return item.FIELD2;
>break;
>  case "FIELD3":
>return item.FIELD3;
>break;
> ...
> }
>
> ? Can I can instead do something like
> "item.[myComboBox.selectedItem.data]"?  Do you know what I mean? 
> Something like
> "item.getValueofNamedProperty(myComboBox.selectedItem.data);".
>
> [Without complicating the question, I ask because this would greatly
> simplify a complex charting component I'm developing, where the user
> should be able to summarize the underlying data based on any of the
> fields; so I need to know the selected property for the filter
> function, the toolTip, the sort function, etc.  Right now I'm only
> supporting 3 properties, since I'm relying on nested switch statements
> like the one above].
>
> Hopefully I'm just missing a really basic piece of actionScript
> syntax.  Many thanks for any suggestions!
>
> -Peter Demling
>  Lexington, MA
>
>
>   



Re: [flexcoders] Re: CheckBox check icon style - checkColor hardcoded?

2007-05-31 Thread Derek Vadneau

An update on this. I missed the style for the disabled colour, so the code
modification should be:

   /*
   Modified by {your name} (05/31/2007):

   The iconColor variable now gets its value from getStyle if it can,
otherwise it defaults to what was hardcoded in the CheckBoxIcon.as file.
   */
   var defaultIconColor:uint = 0x2B333C;
   var defaultIconDisabledColor:uint = 0x99;

   var iconColor:uint = defaultIconColor;
   if (getStyle('iconColor') != undefined) iconColor =
getStyle('iconColor');

   var iconDisabledColor:uint = defaultIconDisabledColor;
   if (getStyle('iconDisabledColor') != undefined) iconDisabledColor =
getStyle('iconDisabledColor');
   /*
   End modification.
   */

And down further in the code in the case "selectedDisabledIcon" section
(line 375 in the original CheckBoxIcon.as file), change:
checkColor = 0x99;

to:
iconColor = iconDisabledColor;

Also, make sure to change checkColor to iconColor (line 402 in the original
CheckBoxIcon.as file).


Alex Harui,

Will the disabled version be iconDisabledColor or disabledIconColor?
Personally, I prefer when styles are grouped in context, as in iconColor,
iconDisabledColor, iconOver, iconDisabled. Makes it easier to find styles in
the context of what you are modifying, instead of looking for states that
are related to the context, as in disabledIconColor, overIcon, disabledIcon,
etc. Two different ways to look at it, I guess.


On 5/30/07, Derek Vadneau <[EMAIL PROTECTED]> wrote:


Great, thanks! I'll modify my project to use iconColor so I won't forget
to change it when the new release happens.


On 5/30/07, Alex Harui < [EMAIL PROTECTED]> wrote:
>
>It will be called iconColor in the next release
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED]
> *On Behalf Of *ben.clinkinbeard
> *Sent:* Wednesday, May 30, 2007 3:40 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: CheckBox check icon style - checkColor
> hardcoded?
>
>
>
> My guess is that its an oversight. They probably intended to go back
> and implement it as a style and forgot about it. There was an almost
> identical situation with borderColor in DataGrid, but they fixed it, I
> think in the 2.0.1 update.
>
> Definitely submit it to the bug/wish form.
>
> Ben
>
> --- In flexcoders@yahoogroups.com , "Derek
> Vadneau" <[EMAIL PROTECTED]> wrote:
> >
> > I ran into this and thought I'd share the solution I used.
> >
> > The problem:
> > How to change the colour of the check icon in the CheckBox component?
> >
> > Solution:
> > There are a few ways to do this but here is the one I opted for since
> > it allows me to change the colour through styles.
> >
> > 1. In the Style section of your MXML file:
> > 
> > CheckBox {
> > /* Overwriting the icon skin class */
> > disabledIcon:
> ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > downIcon: ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > overIcon: ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > selectedDownIcon:
> ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > selectedDisabledIcon:
> > ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > selectedOverIcon:
> ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > selectedUpIcon:
> ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > upIcon: ClassReference("mx.skins.halo.CheckBoxIconWithCheckColor");
> > /* Our new style */
> > checkColor: #FF;
> > }
> > 
> >
> > 2. Copy the file CheckBoxIcon.as from the Flex SDK
> > 2\frameworks\source\mx\skins\halo folder into the {your project
> > folder}\mx\skins\halo.
> >
> > 3. Rename the file to CheckBoxIconWithCheckColor.as.
> >
> > 4. Comment out line 24 (the Version.as include).
> >
> > 5. Replace line 137 and 138:
> >
> > // Placeholder styles stub
> > var checkColor:uint = 0x2B333C;// added style prop
> >
> > with:
> >
> > /*
> > Modified by {your name} (05/30/2007):
> >
> > The checkColor variable now gets its value from getStyle if it can,
> > otherwise it defaults to what was hardcoded in the CheckBoxIcon.as
> > file.
> > */
> > var defaultCheckColor:uint = 0x2B333C;
> > var checkColor:uint = defaultCheckColor;
> > if (getStyle('checkColor') != undefined) checkColor =
> getStyle('checkColor');
> > /*
> > End modification.
> > */
> >
> > That's it. Now when you specify a value for the checkColor style. In
> > the style code I posted I made it red so the difference would be
> > obvious.
> >
> >
> > Gripe/Rant:
> > There is a value for the colour in the CheckBoxIcon.as file, found in
> > the mx.skins.halo folder. The value was hardcoded, for whatever crazy
> > reason. Above and below that line of code are calls to getStyle, and
> > the checkColor declaration has comments referring to it as a style.
> >
> > Why, oh why, would this be hardcoded? I can change pretty much
> > anything else in almost any component using

[flexcoders] tile list scroll via code without scroll bars

2007-05-31 Thread dnk

Hi there, I was wondering if it was possible with a tile list component to
scroll via code (IE by mouse movements) as opposed to having scroll bars? I
am trying to get this figured out as I will be using a tile list to display
a large number of thumbnails (from a sql query), and my understanding of the
tile list is that it loads the data when it is scrolled to as opposed to
loading all children like the regular tile component does. Does anyone have
any tutorials or pointers?


Re: [flexcoders] Dead space in TabNavigator

2007-05-31 Thread Michael Schmalle

Hi,

that is because the TabNavigator has a default paddingTop style of 10
pixels.

TabNavigator {
   paddingTop:0;
}

will solve it for all of them in your application.

Peace, Mike

On 5/31/07, Nick Durnell <[EMAIL PROTECTED]> wrote:


  Hi all,

All my TabNavigators have a dead space at the top (between the tab bar
and the content). For example if I have a tab which contains a green
Canvas set to 100% width and 100% height, the whole tab is green apart
from a 10 pixel stripe at the top!

Does anyone know how to get rid of this gap? I can't find any
properties or styles on TabNavigator to change this behaviour. Perhaps
this space is part of the TabBar?

Thanks,

Nick.

 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


  1   2   >