RE: [flexcoders] Re: addchild error

2007-03-27 Thread Alex Harui
Ok, but why would you want to add the same view twice?  Do you want to add two 
different instances?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wifi19
Sent: Wednesday, March 28, 2007 12:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: addchild error




Hie, and thanks

i'd like make a windows with every page that i want to print before 
printing to select it

addpage is for print job isn't it ?

--- In flexcoders@yahoogroups.com  , "Alex 
Harui" <[EMAIL PROTECTED]> wrote:
>
> You can't add a child twice. Did you mean to call addPage?
> 
> 
> 
> From: flexcoders@yahoogroups.com   
[mailto:flexcoders@yahoogroups.com  ] On 
Behalf Of wifi19
> Sent: Tuesday, March 27, 2007 1:57 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] addchild error
> 
> 
> 
> I am having some trouble with addchild
> 
> var thePrintView:FormPrintView = new FormPrintView();
> 
> //myHbox.addChild(thePrintView); 
> var _caPan:Canvas = new Canvas();
> 
> _caPan.height=300;
> _caPan.width = 200;
> 
> 
> _caPan.addChild(thePrintView);
> _caPan.addChild(thePrintView);
> 
> second addchild generate a error
> 
> RangeError: Error #2006: L'index indiqué sort des limites.
> at flash.display::DisplayObjectContainer/getChildAt()
> at mx.core::Container/getChildAt()
> at mx.core::UIComponent/set document()
> at 
> 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addin 
 
 > 
> gChild()
> at 
> 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC 
 
 > 
> hild()
> at mx.core::Container/addChildAt()
> at mx.core::Container/addChild()
> at MyLoginForm/process()
> at MyLoginForm/___TitleWindow1_initialize()
> at 
> 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
> entFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at mx.core::UIComponent/dispatchEvent()
> at mx.core::UIComponent/set processedDescriptors()
> at mx.core::Container/createComponentsFromDescriptors()
> at mx.containers::Panel/createComponentsFromDescriptors()
> at mx.core::Container/mx.core:Container::createChildren()
> at mx.containers::Panel/mx.containers:Panel::createChildren()
> at mx.core::UIComponent/initialize()
> at mx.core::Container/initialize()
> at MyLoginForm/initialize()
> at 
> 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: 
 
 > 
> :childAdded()
> at 
> 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: 
 
 > 
> :rawChildren_addChildAt()
> at mx.managers::SystemManager/addChild()
> at mx.managers::PopUpManagerImpl/addPopUp()
> at mx.managers::PopUpManager$/addPopUp()
> at print/doPrint()
> at print/__printDG_click()
>



 


[flexcoders] Re: addchild error

2007-03-27 Thread wifi19

Hie, and thanks

i'd like make a windows with every page that i want to print before 
printing to select it

addpage is for print job isn't it ?


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> You can't add a child twice.  Did you mean to call addPage?
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of wifi19
> Sent: Tuesday, March 27, 2007 1:57 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] addchild error
> 
> 
> 
> I am having some trouble with addchild
> 
> var thePrintView:FormPrintView = new FormPrintView();
> 
> //myHbox.addChild(thePrintView); 
> var _caPan:Canvas = new Canvas();
> 
> _caPan.height=300;
> _caPan.width = 200;
> 
> 
> _caPan.addChild(thePrintView);
> _caPan.addChild(thePrintView);
> 
> second addchild generate a error
> 
> RangeError: Error #2006: L'index indiqué sort des limites.
> at flash.display::DisplayObjectContainer/getChildAt()
> at mx.core::Container/getChildAt()
> at mx.core::UIComponent/set document()
> at 
> 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addin
  
> gChild()
> at 
> 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC
  
> hild()
> at mx.core::Container/addChildAt()
> at mx.core::Container/addChild()
> at MyLoginForm/process()
> at MyLoginForm/___TitleWindow1_initialize()
> at 
> 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
> entFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at mx.core::UIComponent/dispatchEvent()
> at mx.core::UIComponent/set processedDescriptors()
> at mx.core::Container/createComponentsFromDescriptors()
> at mx.containers::Panel/createComponentsFromDescriptors()
> at mx.core::Container/mx.core:Container::createChildren()
> at mx.containers::Panel/mx.containers:Panel::createChildren()
> at mx.core::UIComponent/initialize()
> at mx.core::Container/initialize()
> at MyLoginForm/initialize()
> at 
> 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal:
  
> :childAdded()
> at 
> 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal:
  
> :rawChildren_addChildAt()
> at mx.managers::SystemManager/addChild()
> at mx.managers::PopUpManagerImpl/addPopUp()
> at mx.managers::PopUpManager$/addPopUp()
> at print/doPrint()
> at print/__printDG_click()
>




[flexcoders] Re: Sorting Datagrid column headers

2007-03-27 Thread jason vancleave
I did this as a somewhat hardcoded solution, I only have a few 
sections in the app so if this helps anyone or if anyone knows a more 
efficent way:

var arrayToMatch:Array = new Array
("id", "disabled",  "date", "title", "content");
//
var tmpArray:Array = new Array();
// 
datagridColumns = datagrid.columns;
//
for(var i:Number=0; i wrote:
>
> You probably have to get children() from the XML and create your own
> array of DataGridColumns at runtime.
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of jason vancleave
> Sent: Tuesday, March 27, 2007 1:19 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Sorting Datagrid column headers
> 
> 
> 
> I am using a DataGrid with a dataprovider of xml. This is working 
> fine with the exception of the column headers being ordered 
> alphabetically instead of copying the XML structure.
> 
> The DataGrid would format the following xml with column headers in 
> the order of
> disabled, id, media, ordernumber, title
> 
> The docs in DataGrid.columns talks about a way to "explictly set" 
> this but I can't find a good example. I am thinking maybe there is 
an 
> easier way to sort the data higher up the chain.
> 
> Thanks,
> Jason
> 
> 
> 
> 
> 
> 1
> 0
> HomeContent
> 0
> AVLibrary2.swf
> 
> 
> 2
> 0
> HomeContent
> 1
> reelcutweb.jpg
> 
> 
> 3
> 0
> HomeContent
> 2
> OMARBONELESSAD.jpg
> 
> 
> 
>




Re: [flexcoders] Re: New Adobe Products and Flex

2007-03-27 Thread Bjorn Schultheiss

loving it..

On 28/03/2007, at 3:30 PM, Matt Chotin wrote:



Wait till you guys see the Doritos plugin J



From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss

Sent: Tuesday, March 27, 2007 10:20 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: New Adobe Products and Flex



Its probably Kevin 'Escobar' Lynch who comes up with this.



On 28/03/2007, at 2:57 PM, hank williams wrote:




wow. thats funny.

Hank

On 27 Mar 2007 18:42:52 -0700, Doug McCune <[EMAIL PROTECTED]>  
wrote:


We're talking about a company (Macromedia) that had code names for  
products like "Blaze" and "8 Ball". Somehow a product release date  
of 4/20 seems to make sense...





On 27 Mar 2007 17:02:19 -0700, Nancy Gill <[EMAIL PROTECTED]> wrote:



ah .. Amazon.  I heard they jumped their NDA by close to a week.   
Too bad.


Officially, there has been no specific date given .. at least not  
to the testing teams.






Thanks,

Nancy



- Original Message -

From: Paul Whitelock

To: flexcoders@yahoogroups.com

Sent: Tuesday, March 27, 2007 4:57 PM

Subject: [flexcoders] Re: New Adobe Products and Flex



I've seen it pop up a few places on the web, but most notably it's the
date that Amazon lists as the ship date. It's probably just a "best
guess" that Adobe gave to retailers, but I'm hoping that it's an
accurate guess :-)

Paul

--- In flexcoders@yahoogroups.com, "Nancy Gill" <[EMAIL PROTECTED]> wrote:
>
> Where did you hear April 20th? I have asked and looked extensively
and haven't found anyone who knows a specific date. The press release
says "during April and May" for the web and design suite products ..
but nowhere have I found a specific published date.
>
> where did you see this date?
>
> Thanks,
>
> Nancy Gill
> Adobe Community Expert
> Author: Dreamweaver 8 e-book for the DMX Zone
> Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
> Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
Beginner''s
> Guide, Mastering Macromedia Contribute
> Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
Development





No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date:  
3/26/2007 2:31 PM
























RE: [flexcoders] Re: New Adobe Products and Flex

2007-03-27 Thread Matt Chotin
Wait till you guys see the Doritos plugin :-)

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bjorn Schultheiss
Sent: Tuesday, March 27, 2007 10:20 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: New Adobe Products and Flex

 

Its probably Kevin 'Escobar' Lynch who comes up with this.

 

On 28/03/2007, at 2:57 PM, hank williams wrote:





wow. thats funny.

Hank

On 27 Mar 2007 18:42:52 -0700, Doug McCune <[EMAIL PROTECTED]
 > wrote:

We're talking about a company (Macromedia) that had code names for
products like "Blaze" and "8 Ball". Somehow a product release date of
4/20 seems to make sense...





On 27 Mar 2007 17:02:19 -0700, Nancy Gill <[EMAIL PROTECTED]
 > wrote:

 

ah .. Amazon.  I heard they jumped their NDA by close to a week.  Too
bad.

Officially, there has been no specific date given .. at least not to the
testing teams.

 

 

Thanks,

Nancy

 

- Original Message -

From: Paul Whitelock  

To: flexcoders@yahoogroups.com
 

Sent: Tuesday, March 27, 2007 4:57 PM

Subject: [flexcoders] Re: New Adobe Products and Flex

 

I've seen it pop up a few places on the web, but most notably
it's the
date that Amazon lists as the ship date. It's probably just a
"best
guess" that Adobe gave to retailers, but I'm hoping that it's an
accurate guess :-)

Paul

--- In flexcoders@yahoogroups.com
 , "Nancy Gill" <[EMAIL PROTECTED]> wrote:
>
> Where did you hear April 20th? I have asked and looked
extensively
and haven't found anyone who knows a specific date. The press
release
says "during April and May" for the web and design suite
products ..
but nowhere have I found a specific published date.
> 
> where did you see this date?
> 
> Thanks,
> 
> Nancy Gill
> Adobe Community Expert
> Author: Dreamweaver 8 e-book for the DMX Zone
> Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
> Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
A
Beginner''s
> Guide, Mastering Macromedia Contribute
> Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web
Development

 





 

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date:
3/26/2007 2:31 PM

 

 





 

 

 

 

 



Re: [flexcoders] Re: New Adobe Products and Flex

2007-03-27 Thread Bjorn Schultheiss

Its probably Kevin 'Escobar' Lynch who comes up with this.

On 28/03/2007, at 2:57 PM, hank williams wrote:


wow. thats funny.

Hank


On 27 Mar 2007 18:42:52 -0700, Doug McCune <[EMAIL PROTECTED]>  
wrote:
We're talking about a company (Macromedia) that had code names for  
products like "Blaze" and "8 Ball". Somehow a product release date  
of 4/20 seems to make sense...





On 27 Mar 2007 17:02:19 -0700, Nancy Gill <[EMAIL PROTECTED]> wrote:

ah .. Amazon.  I heard they jumped their NDA by close to a week.   
Too bad.
Officially, there has been no specific date given .. at least not  
to the testing teams.



Thanks,
Nancy

- Original Message -
From: Paul Whitelock
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 27, 2007 4:57 PM
Subject: [flexcoders] Re: New Adobe Products and Flex

I've seen it pop up a few places on the web, but most notably it's the
date that Amazon lists as the ship date. It's probably just a "best
guess" that Adobe gave to retailers, but I'm hoping that it's an
accurate guess :-)

Paul

--- In flexcoders@yahoogroups.com, "Nancy Gill" <[EMAIL PROTECTED]> wrote:
>
> Where did you hear April 20th? I have asked and looked extensively
and haven't found anyone who knows a specific date. The press release
says "during April and May" for the web and design suite products ..
but nowhere have I found a specific published date.
>
> where did you see this date?
>
> Thanks,
>
> Nancy Gill
> Adobe Community Expert
> Author: Dreamweaver 8 e-book for the DMX Zone
> Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
> Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
Beginner''s
> Guide, Mastering Macromedia Contribute
> Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
Development




No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date:  
3/26/2007 2:31 PM












Re: [flexcoders] List Control with checkbox items

2007-03-27 Thread Doug McCune

Not sure if this is what you were asking, but here's what I came up with:

http://dougmccune.com/blog/2007/03/27/list-control-for-the-one-armed-man/

Doug

On 3/27/07, Rick Root <[EMAIL PROTECTED]> wrote:


  On 3/27/07, Clint Tredway <[EMAIL PROTECTED]> wrote:
>
> here is a couple of ideas. (I didnt test these, but either 'should
> work')
>
> 1. have a function tied to the click event of the checkbox that adds
> that index to the selectedItems of the list control
>
> 2. when submitting the info, loop through the list and check to see if
> any check boxes are checked.
>
> option 1 would mean you would need to change how your itemRenderer is
> built, but it should work.
>


Good ideas.. I'll give them a try tomorrow!

Thanks for the response.

Rick

 



Re: [flexcoders] Hi

2007-03-27 Thread Nasir Siddiqui

When we make flex application that is to be written in MXML file and it is
compiled into swf file it defines the interface of the application. Action
Scripting can also be done in MXML file or in Separate .as file and XML is
used for different purposes.

On 3/27/07, eshpaleti <[EMAIL PROTECTED]> wrote:


   can somebody tell me the flow of Flex Application and when to write
the code in MXML and when to write in normal XML .

regards,
Eshwar

 



[flexcoders] wanted to share...

2007-03-27 Thread Clint Tredway
I posted this on the component list, but I know not all of you are on
that list. I made a simple Count Down Timer component and I am sharing
it.

http://www.clinttredway.com/components/CountDownTimer.zip

Feel free to do whatever you wish with it.

-- 
http://indeegrumpee.spaces.live.com/


Re: [flexcoders] Re: New Adobe Products and Flex

2007-03-27 Thread hank williams

wow. thats funny.

Hank

On 27 Mar 2007 18:42:52 -0700, Doug McCune <[EMAIL PROTECTED]> wrote:


  We're talking about a company (Macromedia) that had code names for
products like "Blaze" and "8 Ball". Somehow a product release date of 4/20
seems to make sense...



On 27 Mar 2007 17:02:19 -0700, Nancy Gill <[EMAIL PROTECTED]> wrote:
>
>ah .. Amazon.  I heard they jumped their NDA by close to a week.  Too
> bad.
> Officially, there has been no specific date given .. at least not to the
> testing teams.
>
>
> Thanks,
> Nancy
>
>
> - Original Message -
>  *From:* Paul Whitelock <[EMAIL PROTECTED]>
> *To:* flexcoders@yahoogroups.com
> *Sent:* Tuesday, March 27, 2007 4:57 PM
> *Subject:* [flexcoders] Re: New Adobe Products and Flex
>
>  I've seen it pop up a few places on the web, but most notably it's the
> date that Amazon lists as the ship date. It's probably just a "best
> guess" that Adobe gave to retailers, but I'm hoping that it's an
> accurate guess :-)
>
> Paul
>
> --- In flexcoders@yahoogroups.com, "Nancy Gill" <[EMAIL PROTECTED]> wrote:
> >
> > Where did you hear April 20th? I have asked and looked extensively
> and haven't found anyone who knows a specific date. The press release
> says "during April and May" for the web and design suite products ..
> but nowhere have I found a specific published date.
> >
> > where did you see this date?
> >
> > Thanks,
> >
> > Nancy Gill
> > Adobe Community Expert
> > Author: Dreamweaver 8 e-book for the DMX Zone
> > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
> > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
> Beginner''s
> > Guide, Mastering Macromedia Contribute
> > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
> Development
>
>  --
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date:
> 3/26/2007 2:31 PM
>
>
 



[flexcoders] newbie question: Timer across components..

2007-03-27 Thread iilsley

Is it possible to have a Timer in one component and have another
component
execute a function when that timer fires ?

eg:

Comp1 has a timer set for 3 seconds ..

In Comp2 I want to 'capture' the TimerEvent.TIMER from Comp1 to execute
a function defined in Comp2..

---
I currently have something working but I kinda feel its just not the
right way .. :) ..

In Comp2 I have

Application.application.ti.addEventListener(TimerEvent.TIMER,fired);

where 'ti' is the Timer .

Is there a better way to listen for the event  ?


Thanks





[flexcoders] labelRenderer problem

2007-03-27 Thread Mikhail Shevchuk

Hello, group.

I have to render labels for horizontal axis, so I use the following MXML
code:

   


Where MyLabelRenderer.mxml is just a MXML component inhereted from Label. I
assigned an init()
function to the creationComplete event. In that function I can set any text
to the 'text' property of the
instance. But how can I get the default value of that text (I need to cut it
if it is too long)? Like this.data in ItemRenderer.
--
A vivid and creative mind characterizes you.


Re: [flexcoders] Global access in AS3

2007-03-27 Thread André Rodrigues Pena

Troy, thanks for the help. My Singleton works fine now, I'm gonna see how
does Monostate work.

And Petro. I don't see how your sugestion may help me.


On 27 Mar 2007 15:45:50 -0700, Troy Gilbert <[EMAIL PROTECTED]> wrote:


  public class MySingleton
{
private static var _instance:MySingleton;
public static function get instance():MySingleton
{
if (!_instance) _instance = new MySingleton();
return _instance;
}

public function MySingleton()
{
if (_instance) throw new Error("MySingleton is a singleton but has
been constructed twice!");
}
}

That works for me. There's also a technique where you use an internal
class (visible only within the AS source file) as a parameter to the
constructor, thus causing the compiler to complain if anyone calls the
constructor from outside that source file, but I find that throwing the
error is enough.

Another option is to go with a Monostate, which doesn't require any
trickery in ActionScript. In a Monostate, you can create as many instances
of the class as you want but they're all basically just facades onto a
single instance (usually implemented as just having private static members).
In some cases I like the Monostate better because, depending on the
application, its easier to switch to not being an "oop global" if need be.

Troy.




On 3/27/07, Petro Bochan <[EMAIL PROTECTED]> wrote:
>
>Hi,
>
>
>
> As a side note, you might try to place your .AS file in the root
> directory (along with your main .MXML application file) and define all the
> necessary methods there. The methods should be all public though but the
> advantage is that you are not even required to define a package. Methods
> shouldn't be even static.
>
>
>
> Cheers,
>
> Petro
>
>
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED]
> *On Behalf Of *Andre Rodrigues Pena
> *Sent:* Monday, March 26, 2007 11:50 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Global access in AS3
>
>
>
> Hi all,
>
> My problem is: I need some data classes to be global so that I can
> access them without to have to establish unnecessary references.
>
> I tried to create a Singleton class the way we're used to do in Java,
> and I got 2 problems:
>
> 1) It's not possible to define a private constructor
> 2) The instance created in the getInstance() method is not keeping the
> data, I don't know why
>
> What do I do to have globally accessible structures in AS3?
>
> --
> André Rodrigues Pena
>
> LOCUS
> www.locus.com.br
>
> Blog
> www.techbreak.org
>
>
 





--
André Rodrigues Pena

LOCUS
www.locus.com.br

Blog
www.techbreak.org


RE: [flexcoders] Re: Bad Results referencing local variables in nested loops

2007-03-27 Thread Gordon Smith
I noticed two peculiarities in your code: You declare
myAnimationFunction() and myEventFunction() in verifyContainer() to
return void rather than Boolean. But when I declare them to return
Boolean and actually return true, I still see your problem.
 
In stepping through it in the FlexBuilder debugger, it appears that the
scope chain is different when the second item is processed than when the
first one was. I think you've found an AS3 compiler codegen bug
involving nested anonymous functions. I'll forward this to a compiler
engineer.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rod Perkins
Sent: Tuesday, March 27, 2007 5:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Bad Results referencing local variables in
nested loops



I had a typo in the post for a line in the setup function. The line:

"[v:" + vItemNo + " i:" + itemNo + " a: " + aItemNo + " e: " + 
eItemNo + "]"

should be:

"[v:" + pageNo+ " i:" + itemNo + " a: " + aItemNo + " e: " + eItemNo 
+ "]"

- rod

--- In flexcoders@yahoogroups.com 
, "Rod Perkins" <[EMAIL PROTECTED]> 
wrote:
>
> 
> I have been having a great time using ActionScript 3.0 and Flex 
but 
> I have encountered problems which seem to be caused by Flexbuilder 
> or the Flashplayer runtime. The following problem is based on a 
> situation I have in my application uses a data structure of 
embedded 
> objects. I replicated the problem using arrays instead of the 
> classes I had used. The example may seemed contrived but 
reproduces 
> the problem without duplicating the complexity of my application.
> 
> The structure was based on data structure of page objects, which 
> contains several cell items. Each item has a list of animations, 
> and each animation has a list trigger events references. So the 
> nested structure looked like the following:
> 
> Pages (instance 1)
> Item (instance 1)
> Animation (instance 1)
> Events (instance 1)
> Events (instance 2)
> Animation (instance 2)
> Events (instance 1)
> Events (instance 2)
> Item (instance 2)
> Animation (instance 1)
> Events (instance 1)
> Events (instance 2)
> Animation (instance 2)
> Events (instance 1)
> Events (instance 2)
> 
> The setup function in my example creates this structure using 
> arrays. The function "goodResult" traverses the structure using 
> nested for-loops. Nested local variables at different scoping 
> levels are referenced and displayed during the inner most loop for 
> the Events (instance 1 & 2). This produces the expected result. 
> Good Results
> 500 200 [v:0 i:0 a: 0 e: 0]
> 500 200 [v:0 i:0 a: 0 e: 1]
> 500 200 [v:0 i:0 a: 1 e: 0]
> 500 200 [v:0 i:0 a: 1 e: 1]
> 500 200 [v:0 i:1 a: 0 e: 0]
> 500 200 [v:0 i:1 a: 0 e: 1]
> 500 200 [v:0 i:1 a: 1 e: 0]
> 500 200 [v:0 i:1 a: 1 e: 1]
> 
> The "badResult" function traverses the structure using the OO 
> technique of enumeration (iterator) functions. Among other 
reasons, 
> I used this approach to make the code more readable and compact by 
> hiding the loop from the caller and the typecasting the values 
> automatically. The caller is required to send a Function which is 
> then called during each pass (iterator) ofthe loop. The nested 
> local variables this time are not displayed properly. During the 
> first call, the results for Events (instance 1) is correct, but 
> Events (instance 2) is incorrect. Subsequent calls to 
> the "badResult" function display erroneous results. 
> 
> Bad Results - first iteration - first event loop good, second loop 
> bad
> 500 200 [v:0 i:0 a: 0 e: 0]
> 500 200 [v:0 i:0 a: 0 e: 1]
> 500 200 [v:0 i:0 a: 1 e: 0]
> 500 200 [v:0 i:0 a: 1 e: 1]
> 500 59369881 [v:0 i:1 a: 0 e: 0]
> 500 59369881 [v:0 i:1 a: 0 e: 1]
> 500 59369881 [v:0 i:1 a: 1 e: 0]
> 500 59369881 [v:0 i:1 a: 1 e: 1]
> Bad Results - second iteration - both loops bad
> 2 500 [v:0 i:0 a: 0 e: 0]
> 2 500 [v:0 i:0 a: 0 e: 1]
> 2 500 [v:0 i:0 a: 1 e: 0]
> 2 500 [v:0 i:0 a: 1 e: 1]
> 2 500 [v:0 i:1 a: 0 e: 0]
> 2 500 [v:0 i:1 a: 0 e: 1]
> 2 500 [v:0 i:1 a: 1 e: 0]
> 2 500 [v:0 i:1 a: 1 e: 1]
> Bad Results - third iteration - both loops bad
> 2 500 [v:0 i:0 a: 0 e: 0]
> 2 500 [v:0 i:0 a: 0 e: 1]
> 2 500 [v:0 i:0 a: 1 e: 0]
> 2 500 [v:0 i:0 a: 1 e: 1]
> 2 500 [v:0 i:1 a: 0 e: 0]
> 2 500 [v:0 i:1 a: 0 e: 1]
> 2 500 [v:0 i:1 a: 1 e: 0]
> 2 500 [v:0 i:1 a: 1 e: 1]
> 
> I don't know if the problem is with the enumeration function calls 
> or stack references during nested scope (this is not recursion so 
> the stack depth should not be that great). The example is simple 
so 
> you can play around with it. It does make me worry about using 
> Functions or nested function calls.
> 
> Here is the code for the example.
> 
> Regards,
> 
> Rod Perkins
> 
> ---
> package 
> {
> 
> import flash.display.Sprite;
> import flash.events.Event;
> 
> public class BuildError_2 extends Sprite
> {
> private var _pages : Array = new Array();
>

Re: [flexcoders] onChange()

2007-03-27 Thread Bjorn Schultheiss
run the debugger, or use some trace message in your costCalc(), it  
should be easy to determine.


Else send me the whole file...


On 28/03/2007, at 11:59 AM, Jeremy Watson wrote:



I'm calling on onCreationCompletel(event)

 creationComplete="onCreationComplete(event); "

//Alert.show(RequestType);
  if (RequestType == "1")
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts();
CostCalc()
   }
  }


Here is one of the text boxes in which I call the CostCalc()

change="CostCalc()"  text="{remoteService.qryDrawdown.lastResult 
[0].CattleAvgWeightKg}" />

That's pretty much it.
The function CostCalc() is just doing basic math calculation. i.e.  
a + b


does that help at all.

Jeremy


- Original Message 
From: Bjorn Schultheiss <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, 28 March, 2007 10:59:57 AM
Subject: Re: [flexcoders] onChange()

Send through more of your code.

Are you calling this logic on the creationComplete event?


On 28/03/2007, at 10:43 AM, Jeremy Watson wrote:



AnyoneAm I calling the function correctly in flex  
actionscript?


J.

- Original Message 
From: Jeremy Watson <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, 27 March, 2007 7:48:38 AM
Subject: [flexcoders] onChange()


Howdy again.

The flex application that I'm building is really quite simple  
which is good cause I'm learning flex. However that said.. in html  
we have onLoad() which we put on a page. I have built a function  
called CostCalc() everytime someone changes a field it will  
recalculate each field. I got that working perfectly.


However, when I first load the page up with values every value in  
the form is 0.00 until I make a change to a field. I know that in  
flex we have creationComplete= "onCreationCompl ete(event) ; " but  
when I put in the function call CostCalc() it doesn't seem to  
work. Below is the code. Disregard the RequestType stuff. I'm  
switching states based on the URL.


//Alert.show( RequestType) ;
  if (RequestType == "1")
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts( );
CostCalc()
   }
  }



Send instant messages to your online friendshttp:// 
au.messenger.yahoo.com



Send instant messages to your online friends http:// 
au.messenger.yahoo.com






Send instant messages to your online friends http:// 
au.messenger.yahoo.com







RE: [flexcoders] Re: Whatever happened to Peter Ent's scrolling text ticker?

2007-03-27 Thread Gordon Smith
I think you'll get more predictable timing. doLater() [sorry - I really
meant callLater()] doesn't guarantee anything about how much later it
might be.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of simonjpalmer
Sent: Tuesday, March 27, 2007 2:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Whatever happened to Peter Ent's scrolling
text ticker?



any particular reason why?

--- In flexcoders@yahoogroups.com 
, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> I recommend using a Timer rather than calling doLater().
> 
> - Gordon
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of simonjpalmer
> Sent: Monday, March 26, 2007 12:39 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Whatever happened to Peter Ent's scrolling
> text ticker?
> 
> 
> 
> Thanks! Simple when you see it, but I didn't know about the magic
> doLater() function... sometimes the simplest things are the best.
> 
> As a matter of interest has anyone used this approach for handling
> lazy loading of data?
> 
> --- In flexcoders@yahoogroups.com


> , Steve Hagenlock  wrote:
> >
> >
http://weblogs.macromedia.com/pent/archives/flex/ticker/tickerText.zip


>

>
> 
> > 
> > simonjpalmer wrote:
> > > Anyone know what became of it? The markme.com code link on his
blog
> > > leads nowhere. Anyone have the code they could share with me?
> > >
> > > http://weblogs.macromedia.com/pent/archives/2004/12/ticker.cfm
 
>  > 
> > >
> > > Thanks
> > >
> > > Simon
> > >
> > >
> > > 
> > >
> --
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date:
> 3/23/2007 3:27 PM
> > >
> >
>



 


[flexcoders] Quickest way to turn a result from mySQL into a chart

2007-03-27 Thread Patrick Lemiuex
Question:

I've been given a day or less to make a chart application and I need  
to pop some webstats into a flex chart.  What's the simplest way to  
take a result from Amfphp remoting wapping into an array collection  
and then populate a chart?

Does anybody have any quick examples?

Thanks,
Patrick


RE: [flexcoders] Re: UIComponent: focus problem?

2007-03-27 Thread Alex Harui
That means you haven't added the component as a child of some other
component on the stage (like the main app).  You have to be on the
display list in order to get keystrokes.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of carlo.cavallieri
Sent: Tuesday, March 27, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: UIComponent: focus problem?



if in my component i add this line of code

trace(systemManager) i get "null"

> public function Stage()
> {
> super();
> 
trace(systemManager);
> 
> }

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> You component must implement IFocusManagerComponent if you want it to
> receive focus.
> 
> public class Stage extends UIComponent implements
IFocusManagerComponent
> 
> If you want to capture all keystrokes, listen to the stage.
> 
> systemManager.stage.addEventListener( KeyboardEvent.KEY_DOWN,
onKeyDown
> );
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of carlo.cavallieri
> Sent: Tuesday, March 27, 2007 1:47 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] UIComponent: focus problem?
> 
> 
> 
> Hi,
> 
> i have a simple "Test Component" that display the key pressed by the
> user, but it doesn't log anything
> 
> package
> {
> import flash.display.*;
> import flash.events.*;
> import mx.core.*;
> 
> public class Stage extends UIComponent
> {
> 
> public function Stage()
> {
> super();
> 
> //height = 300;
> //width = 400;
> 
> //
> // keyboard binding
> //
> addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );
> 
> }
> 
> private function onKeyDown( event:KeyboardEvent ):void
> {
> trace("Key Code: "+event.keyCode);
> }
> 
> }
> }
> 
> Where i'm wrong?
>



 


Re: [flexcoders] onChange()

2007-03-27 Thread Jeremy Watson
I'm calling on onCreationCompletel(event)   

 creationComplete="onCreationComplete(event); "   

//Alert.show(RequestType);
  if (RequestType == "1")
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts();
CostCalc()
   }
  }
 

Here is one of the text boxes in which I call the CostCalc()


That's pretty much it. 
The function CostCalc() is just doing basic math calculation. i.e. a + b 

does that help at all.

Jeremy


- Original Message 
From: Bjorn Schultheiss <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, 28 March, 2007 10:59:57 AM
Subject: Re: [flexcoders] onChange()









  



Send through more of your code.
Are you calling this logic on the creationComplete event?



On 28/03/2007, at 10:43 AM, Jeremy Watson wrote:



AnyoneAm I calling the function correctly in flex actionscript?

J.

- Original Message 
From: Jeremy Watson <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, 27 March, 2007 7:48:38 AM
Subject: [flexcoders] onChange()



Howdy again. 

The flex application that I'm building is really quite simple which is good 
cause I'm learning flex. However that said.. in html we have onLoad() which we 
put on a page. I have built a function called CostCalc() everytime someone 
changes a field it will recalculate each field. I got that working perfectly. 

However, when I first load the page up with values every value in the form is 
0.00 until I make a change to a field. I know that in flex we have 
creationComplete= "onCreationCompl ete(event) ; " but when I put in the 
function call CostCalc() it doesn't seem to work. Below is the code. Disregard 
the RequestType stuff. I'm switching states based on the URL. 

//Alert.show( RequestType) ;
  if (RequestType == "1")
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts( );
CostCalc()
   }
  }




Send instant messages to your online friends http://au.messenger.yahoo.com





Send instant messages to your online friends http://au.messenger.yahoo.com









  















Send instant messages to your online friends http://au.messenger.yahoo.com 

RE: [flexcoders] Scaling Custom Components

2007-03-27 Thread Alex Harui
Nope, it is essentially an array.  If I have
 
var a:Array = [ "Nate", "Alex"];
a[2] = "Bjorn";
a.shift();
a[2] is no longer "Bjorn", you are now at a[1].



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bjorn Schultheiss
Sent: Tuesday, March 27, 2007 6:19 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Scaling Custom Components



Hey Alex,

if 0 == childA
can you insert childB at 99 for example.

if so if you remove childA does childB's index change?

can you ensure that you're child will remain at an index?



On 28/03/2007, at 11:12 AM, Alex Harui wrote:




Children renumber after one is removed
 
0 = childA
1 = childB
2 = childC
 
After removeChildAt(0)
 
0 = childB
1 = childC
 
Look at the code for removeAllChildren.
 
It will either removeChildAt(0) j times or iterate backwards.



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson
Sent: Tuesday, March 27, 2007 5:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Scaling Custom Components



I have a custom component that adds multiple shapes during
UpdateDisplayList. When I scale the browser it calls update
display
list and draws over all of my shapes.

I have tried:

j = this.numChildren;
for (i=0; i

RE: [flexcoders] Re: Custom Component Width when 100%?

2007-03-27 Thread Alex Harui
In theory, if you started with UIComponent, you need to implement a
measure() method to tell the parent how big you want to be.  That parent
will then call setActualSize which should result in your
updateDisplayList being called with non-zero values.  Again, if
extending UIComponent, you should be able to draw or add shapes in
updateDisplayList without causing a second call to updateDisplayList
providing that your measure() method returns the same values and nobody
else called invalidateDisplayList.
 
It feels like you're not quite following the formula somehwere.  You
could post the class code I suppose...



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Tuesday, March 27, 2007 4:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Component Width when 100%?



Ahhh HA! I was reading the adobe documentation and it turns out that
when you do addchild() it calls updateDisplayList again. This is why
my program wasn't working, I had an infinite loop when I called
addchild.

I fixed it by adding an if function with a flag.
if (_newBackground){
...
}

Since my updatedisplaylist was being called twice, once with 0
unscaledWidth and once with an unscaledWidth, I had to add another
condition.
if (_newBackground && unscaledWidth != 0) {
...
}

Now I can't seem to get the component to scale with the rest of the
app when the browser window opens. I'm going to start a new thread
for that question.

-Nate

--- In flexcoders@yahoogroups.com 
, "Nate Pearson" <[EMAIL PROTECTED]> wrote:
>
> So I think i got unScaledWidth to work during UpdateDisplayList. When
> I debug it seems like it's called twice. Once with 0 unscaledWidth
> and once with the correct unScaledWidth. Should I be worrying about
> this? I didn't override the measure function. Should I?
> 
> So to draw in UpdateDisplayList you have to manipulate graphics like
this:
> graphics.lineStyle(0,0x00, 0);
> graphics.beginFill(0xff, 1);
> graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
> graphics.endFill(); 
> 
> But what if I want to draw shapes or UIcomponents? That's why It
> wasn't working for me before, i was drawing like this:
> var shape:Shape = new Shape();
> shape.graphics.lineStyle(0,0x00, 0);
> shape.graphics.beginFill(0xff, 1);
> shape.graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
> shape.graphics.endFill();
> //When i do the add child my program won't load!
> //addChild(shape);
> 
> I watched Ely's component video and it says I can add UIComponents,
> sprites and shapes to UpdateDisplayList. Does anyone know what I'm
> doing wrong?
> 
> Thanks!
> 
> -Nate
> 
> 
> --- In flexcoders@yahoogroups.com
 , "Alex Harui"  wrote:
> >
> > You can always call validateNow() to force validation, but you
shouldn't
> > be drawing in commitProperties in most cases. Most drawing should
be in
> > updateDisplayList
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com
 
[mailto:flexcoders@yahoogroups.com 
] On
> > Behalf Of Nate Pearson
> > Sent: Monday, March 26, 2007 3:53 PM
> > To: flexcoders@yahoogroups.com 

> > Subject: [flexcoders] Re: Custom Component Width when 100%?
> > 
> > 
> > 
> > I can't seem to get the width/height at measure() or
> > updateDisplayList(). Is there a specific function I have to call?
> > 
> > Isn't there a way to get the height/width before measure? I'm
drawing
> > during commit properties so I would like to get it then. 
> > 
> > Thanks for your reply.
> > 
> > --- In flexcoders@yahoogroups.com
 

> > , "Alex Harui"  wrote:
> > >
> > > It depends on when you ask. Components have a multi-stage
validation
> > > mechanism. Their properties get set in stage1, measured in stage2,
> > > layed out in stage 3. Until measurement, they are zero
width/height
> > > 
> > > 
> > > 
> > > From: flexcoders@yahoogroups.com
 

> > [mailto:flexcoders@yahoogroups.com
 

> > ] On
> > > Behalf Of Nate Pearson
> > > Sent: Monday, March 26, 2007 1:09 PM
> > > To: flexcoders@yahoogroups.com
 
 
> > > Subject: [flexcoders] Custom Component Width when 100%?
> > > 
> > > 
> > > 
> > > I created a custom component that works great when the width is
> > > specified. However, when I try to set the width to a percent (of
the
> > > parent) it returns 0. How to I reference the parent's width? I
tried
> > > getExplicitOrMeasuredWidth but it didn't work.
> > > 
> > > Thanks in advance for the help.
> > >
> >
>



 


Re: [flexcoders] Re: New Adobe Products and Flex

2007-03-27 Thread Doug McCune

We're talking about a company (Macromedia) that had code names for products
like "Blaze" and "8 Ball". Somehow a product release date of 4/20 seems to
make sense...


On 27 Mar 2007 17:02:19 -0700, Nancy Gill <[EMAIL PROTECTED]> wrote:


   ah .. Amazon.  I heard they jumped their NDA by close to a week.  Too
bad.
Officially, there has been no specific date given .. at least not to the
testing teams.


Thanks,
Nancy


- Original Message -
*From:* Paul Whitelock <[EMAIL PROTECTED]>
*To:* flexcoders@yahoogroups.com
*Sent:* Tuesday, March 27, 2007 4:57 PM
*Subject:* [flexcoders] Re: New Adobe Products and Flex

 I've seen it pop up a few places on the web, but most notably it's the
date that Amazon lists as the ship date. It's probably just a "best
guess" that Adobe gave to retailers, but I'm hoping that it's an
accurate guess :-)

Paul

--- In flexcoders@yahoogroups.com, "Nancy Gill" <[EMAIL PROTECTED]> wrote:
>
> Where did you hear April 20th? I have asked and looked extensively
and haven't found anyone who knows a specific date. The press release
says "during April and May" for the web and design suite products ..
but nowhere have I found a specific published date.
>
> where did you see this date?
>
> Thanks,
>
> Nancy Gill
> Adobe Community Expert
> Author: Dreamweaver 8 e-book for the DMX Zone
> Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
> Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
Beginner''s
> Guide, Mastering Macromedia Contribute
> Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
Development

 --

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 3/26/2007
2:31 PM

 



Re: [flexcoders] List Control with checkbox items

2007-03-27 Thread Doug McCune

What are you trying to do? Say you've got:

_ item 1
_ item 2
_ item 3
_ item 4
_ item 5
_ item 6

If I click the checkbox on item 2, then I click the checkbox on item 5, is
that supposed to select all items between item 2 and item 5? So would it
then look like:

_ item 1
* item 2
* item 3
* item 4
* item 5
_ item 6

Is that what you're talking about? So each time you click a checkbox it
would scan and select all items above the one they clicked until it got to
one that's already clicked?

Doug


On 27 Mar 2007 13:16:03 -0700, Clint Tredway <[EMAIL PROTECTED]> wrote:


  here is a couple of ideas. (I didnt test these, but either 'should
work')

1. have a function tied to the click event of the checkbox that adds that
index to the selectedItems of the list control

2. when submitting the info, loop through the list and check to see if any
check boxes are checked.

option 1 would mean you would need to change how your itemRenderer is
built, but it should work.

On 27 Mar 2007 13:02:37 -0700, Rick Root < [EMAIL PROTECTED]>
wrote:
>
>   Anyone else got any ideas here?
>
> On 3/27/07, Rick Root <[EMAIL PROTECTED] > wrote:
> >
> > (wow, gmail makes it difficult to quote emails from yahoo groups!)
> >
> > That almost works here's my MXML:
> >
> >> dataProvider="{parentDocument.ro.getListData.lastResult.CONTROL_CODES}"
> > labelField="TABLFLD" id="lstControlCodes"
> > rendererIsEditor="true" itemRenderer="mx.controls.CheckBox">
> >   
> > The problem here is that the checkboxes do not relate to the actual
> > selected status of the items.  For example, if I click 3 different items
> > without holding down the control key, all 3 items have checkboxes, but only
> > one (the last) is highlighted in blue.. meaning it's the only one REALLY
> > selected as far as the list control is concerned.
> >
> > Rick
> >
> >
> > --
> > CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
> > http://www.cfmbb.org
> >
>
>
>
> --
> CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
> http://www.cfmbb.org
>
>


--
http://indeegrumpee.spaces.live.com/
 



Re: [flexcoders] List Control with checkbox items

2007-03-27 Thread Rick Root

On 3/27/07, Clint Tredway <[EMAIL PROTECTED]> wrote:


here is a couple of ideas. (I didnt test these, but either 'should work')

1. have a function tied to the click event of the checkbox that adds that
index to the selectedItems of the list control

2. when submitting the info, loop through the list and check to see if any
check boxes are checked.

option 1 would mean you would need to change how your itemRenderer is
built, but it should work.




Good ideas.. I'll give them a try tomorrow!

Thanks for the response.

Rick


[flexcoders] SOLVED: Setting the Font Color for a Selected ComboBox Item

2007-03-27 Thread Paul Whitelock
I gave up on using MXML to write the list item renderer and instead
wrote it in ActionScript using a TextField. The ComboBox now doesn't
have the problem with setting list items to the color assigned to the
control.

Sometimes MXML is just more trouble than it's worth ;-)

Paul


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> In theory, if your renderer picks a new font color based on a property,
> they should be ignoring the default color always.
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Paul Whitelock
> Sent: Tuesday, March 27, 2007 7:06 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Setting the Font Color for a Selected ComboBox
> Item
> 
> 
> 
> I'm using a ComboBox with an itemRenderer to control the font color of
> items in the dropdown list (items in the dropdown list have their font
> color determined by a property value for each item).
> 
> I'd like to have the font color for the selected item in the ComboBox
> match the font color that the item has in the dropdown list. By
> default, this doesn't happen. If I do a "setStyle" on the ComboBox to
> manually set the selected item's font color to match the font color
> the item has in the list, this works to set the selected item's font
> color, but it also sets the font color for every item in the dropdown
> list (it seems to override the itemRenderer).
> 
> Is there a way that I can set the font color for a selected item in a
> ComboBox without impacting the font color (set by an itemRenderer) of
> dropdown list items?
> 
> Thanks for any tips!
> 
> Paul
>




Re: [flexcoders] Scaling Custom Components

2007-03-27 Thread Bjorn Schultheiss

Hey Alex,

if 0 == childA
can you insert childB at 99 for example.

if so if you remove childA does childB's index change?

can you ensure that you're child will remain at an index?



On 28/03/2007, at 11:12 AM, Alex Harui wrote:



Children renumber after one is removed

0 = childA
1 = childB
2 = childC

After removeChildAt(0)

0 = childB
1 = childC

Look at the code for removeAllChildren.

It will either removeChildAt(0) j times or iterate backwards.

From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson

Sent: Tuesday, March 27, 2007 5:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Scaling Custom Components

I have a custom component that adds multiple shapes during
UpdateDisplayList. When I scale the browser it calls update display
list and draws over all of my shapes.

I have tried:

j = this.numChildren;
for (i=0; i



RE: [flexcoders] Scaling Custom Components

2007-03-27 Thread Alex Harui
Children renumber after one is removed
 
0 = childA
1 = childB
2 = childC
 
After removeChildAt(0)
 
0 = childB
1 = childC
 
Look at the code for removeAllChildren.
 
It will either removeChildAt(0) j times or iterate backwards.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Tuesday, March 27, 2007 5:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Scaling Custom Components



I have a custom component that adds multiple shapes during
UpdateDisplayList. When I scale the browser it calls update display
list and draws over all of my shapes.

I have tried:

j = this.numChildren;
for (i=0; i

Re: [flexcoders] Scaling Custom Components

2007-03-27 Thread Bjorn Schultheiss
Do you require to move change any shape properties when the scale  
occurs.


If not you cant just avoid redrawing them again by setting a flag  
after they've been drawn.


If so, you could approach it a few ways.
I guess the only way you could ensure removeChildAt() to work is to  
use addChildAt() and maintain the same depth index.
you could always use removeChild() and use a reference to your shapes  
object


Bjorn


On 28/03/2007, at 10:22 AM, Nate Pearson wrote:


I have a custom component that adds multiple shapes during
UpdateDisplayList. When I scale the browser it calls update display
list and draws over all of my shapes.

I have tried:

j = this.numChildren;
for (i=0; i



RE: [flexcoders] Error: Repeater is not executing.

2007-03-27 Thread Tracy Spratt
First you are not doing the repeater quite right.  Try this:





 

The currentItem propeerty already holds a reference to the dataProvider
item that is generating the current repeater instance.

 

Second, the Label needs a text value, which will be one of the
properties on your dataProvider item objects.

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thierrybertossa
Sent: Tuesday, March 27, 2007 5:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Error: Repeater is not executing.

 

I have a repeater:





_newss, is an instance of a custom Newss Class extends ArrayCollection.

When I change _newss like this:
_newss = new Newss();

I have an error:
Error: Repeater is not executing.

Is there a way to dynamically change repeater's Dataprovider without 
having this kind of probleme.

Thanks 
Thierry

 



RE: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :

2007-03-27 Thread Alex Harui
Because it is a common problem.  Try putting a ToggleButtonBar in the
main app first to prove it one way or another.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nxzone
Sent: Tuesday, March 27, 2007 2:36 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :



Why you think this bug is due to this cause? Why loading the shared
content before should solve the "Type Coercion failed: cannot convert
mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar" ?

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Check out the shared code portion of my modules presentation at
> blogs.adobe.com/aharui
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of nxzone
> Sent: Monday, March 26, 2007 2:27 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed
:
> 
> 
> 
> Same problem ...
> Line 158 of ButtonBarButtonSkin.as... (parent.parent is a
> ToggleButtonBar not a buttonbar)
> var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null;
> 
> --- In flexcoders@yahoogroups.com


> , "lrhazi"  wrote:
> >
> > I get this annoying error often:
> > 
> > TypeError: Error #1034: Type Coercion failed: cannot convert
> > mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar
> > 
> > My app uses Modules and has a user login/logout functionality... I
get
> > the above error systematically when i logout of an account and login
> > to a second one.
> > 
> > Any hints on what to look for?
> > 
> > Thank you very much.
> > Mohamed~
> >
>



 


Re: [flexcoders] Scrollbar for small browser windows

2007-03-27 Thread Bjorn Schultheiss
By default scroll policy's are set to auto, so unless these have been  
set to 'off' you should at least be getting the mx:application  
scrollbars



On 28/03/2007, at 10:59 AM, ivansebastiansurya wrote:


Hi everyone,

I'm developing a Flex application for large monitor screen. HOwever,
when I display my application in smaller screens, the scroll bar won't
appear. Is there any way to make my application create a scrollbar as
needed?





Re: [flexcoders] onChange()

2007-03-27 Thread Bjorn Schultheiss

Send through more of your code.
Are you calling this logic on the creationComplete event?


On 28/03/2007, at 10:43 AM, Jeremy Watson wrote:



AnyoneAm I calling the function correctly in flex  
actionscript?


J.

- Original Message 
From: Jeremy Watson <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, 27 March, 2007 7:48:38 AM
Subject: [flexcoders] onChange()


Howdy again.

The flex application that I'm building is really quite simple which  
is good cause I'm learning flex. However that said.. in html we  
have onLoad() which we put on a page. I have built a function  
called CostCalc() everytime someone changes a field it will  
recalculate each field. I got that working perfectly.


However, when I first load the page up with values every value in  
the form is 0.00 until I make a change to a field. I know that in  
flex we have creationComplete= "onCreationCompl ete(event) ; " but  
when I put in the function call CostCalc() it doesn't seem to work.  
Below is the code. Disregard the RequestType stuff. I'm switching  
states based on the URL.


//Alert.show( RequestType) ;
  if (RequestType == "1")
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts( );
CostCalc()
   }
  }



Send instant messages to your online friends http:// 
au.messenger.yahoo.com



Send instant messages to your online friends http:// 
au.messenger.yahoo.com







[flexcoders] Re: Bad Results referencing local variables in nested loops

2007-03-27 Thread Rod Perkins
I had a typo in the post for a line in the setup function.  The line:

"[v:" + vItemNo + " i:" + itemNo + " a: " + aItemNo + " e: " + 
eItemNo + "]"

should be:


"[v:" + pageNo+ " i:" + itemNo + " a: " + aItemNo + " e: " + eItemNo 
+ "]"


- rod


--- In flexcoders@yahoogroups.com, "Rod Perkins" <[EMAIL PROTECTED]> 
wrote:
>
> 
> I have been having a great time using ActionScript 3.0 and Flex 
but  
> I have encountered problems which seem to be caused by Flexbuilder 
> or the Flashplayer runtime.  The following problem is based on a 
> situation I have in my application uses a data structure of 
embedded 
> objects.  I replicated the problem using arrays instead of the 
> classes I had used.  The example may seemed contrived but 
reproduces 
> the problem without duplicating the complexity of my application.
> 
> The structure was based on data structure of page objects, which 
> contains several cell items.  Each item has a list of animations, 
> and each animation has a list trigger events references.  So the 
> nested structure looked like the following:
> 
>   Pages (instance 1)
>   Item(instance 1)
>   Animation (instance 1)
>   Events (instance 1)
>   Events (instance 2)
>   Animation (instance 2)
>   Events (instance 1)
>   Events (instance 2)
>   Item(instance 2)
>   Animation (instance 1)
>   Events (instance 1)
>   Events (instance 2)
>   Animation (instance 2)
>   Events (instance 1)
>   Events (instance 2)
> 
> The setup function in my example creates this structure using 
> arrays.   The function "goodResult" traverses the structure using 
> nested for-loops.  Nested local variables at different scoping 
> levels are referenced and displayed during the inner most loop for 
> the Events (instance 1 & 2).  This produces the expected result.  
> Good Results
> 500  200  [v:0 i:0 a: 0 e: 0]
> 500  200  [v:0 i:0 a: 0 e: 1]
> 500  200  [v:0 i:0 a: 1 e: 0]
> 500  200  [v:0 i:0 a: 1 e: 1]
> 500  200  [v:0 i:1 a: 0 e: 0]
> 500  200  [v:0 i:1 a: 0 e: 1]
> 500  200  [v:0 i:1 a: 1 e: 0]
> 500  200  [v:0 i:1 a: 1 e: 1]
> 
> The "badResult" function traverses the structure using the OO 
> technique of enumeration (iterator) functions.  Among other 
reasons, 
> I used this approach to make the code more readable and compact by 
> hiding the loop from the caller and the typecasting the values 
> automatically.  The caller is required to send a Function which is 
> then called during each pass (iterator) ofthe loop.  The nested 
> local variables this time are not displayed properly.  During the 
> first call, the results for Events (instance 1) is correct, but 
> Events (instance 2) is incorrect.  Subsequent calls to 
> the "badResult" function display erroneous results.  
>  
> Bad Results - first iteration - first event loop good, second loop 
> bad
> 500  200  [v:0 i:0 a: 0 e: 0]
> 500  200  [v:0 i:0 a: 0 e: 1]
> 500  200  [v:0 i:0 a: 1 e: 0]
> 500  200  [v:0 i:0 a: 1 e: 1]
> 500  59369881  [v:0 i:1 a: 0 e: 0]
> 500  59369881  [v:0 i:1 a: 0 e: 1]
> 500  59369881  [v:0 i:1 a: 1 e: 0]
> 500  59369881  [v:0 i:1 a: 1 e: 1]
> Bad Results - second iteration - both loops bad
> 2  500  [v:0 i:0 a: 0 e: 0]
> 2  500  [v:0 i:0 a: 0 e: 1]
> 2  500  [v:0 i:0 a: 1 e: 0]
> 2  500  [v:0 i:0 a: 1 e: 1]
> 2  500  [v:0 i:1 a: 0 e: 0]
> 2  500  [v:0 i:1 a: 0 e: 1]
> 2  500  [v:0 i:1 a: 1 e: 0]
> 2  500  [v:0 i:1 a: 1 e: 1]
> Bad Results - third iteration - both loops bad
> 2  500  [v:0 i:0 a: 0 e: 0]
> 2  500  [v:0 i:0 a: 0 e: 1]
> 2  500  [v:0 i:0 a: 1 e: 0]
> 2  500  [v:0 i:0 a: 1 e: 1]
> 2  500  [v:0 i:1 a: 0 e: 0]
> 2  500  [v:0 i:1 a: 0 e: 1]
> 2  500  [v:0 i:1 a: 1 e: 0]
> 2  500  [v:0 i:1 a: 1 e: 1]
> 
> I don't know if the problem is with the enumeration function calls 
> or stack references during nested scope (this is not recursion so 
> the stack depth should not be that great). The example is simple 
so 
> you can play around with it.  It does make me worry about using 
> Functions or nested function calls.
> 
> Here is the code for the example.
> 
> Regards,
> 
> Rod Perkins
> 
> ---
> package 
> {
>   
>   import flash.display.Sprite;
>   import flash.events.Event;
> 
>   public class BuildError_2 extends Sprite
>   {
>   private var _pages : Array = new Array();
>   
>   public function enumerateEvents( _events : Array, func : 
> Function ) : void
>   {
>   for ( var x : int = 0, numItems : int = 
> _events.length; x < _events.length; x++)
>   {
>   var eventObj : Object = Object( 
> _events[x] );
>   if (f

RE: [flexcoders] Data binding will not be able to detect changes... ?

2007-03-27 Thread Tracy Spratt
You will want to use XMLListCollection or plain XML.  XMLList, like
Array, does not emit the events necessary to update the controls.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Greg Morphis
Sent: Tuesday, March 27, 2007 10:06 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Data binding will not be able to detect
changes... ?

 

Nah, the full warning is
Data binding will not be able to detect changes to XMLList "default",
need an XML instance.

I'll give that a shot though...





On 3/27/07, slangeberg <[EMAIL PROTECTED]
 > wrote:

It's because the .default node is not bindable (it's an anonymous
element of an xml object). Doesn't the warning mention something about
not implementing the IEventDispatchable (or other!) interface?

What is the best practice for this? 

I know you could point a bindable property to that node itself, but may
not be what you're looking for, such as:

[Bindable] var default: ObjectProxy;

//this should get picked up by bindings
default = DALocationsXML.default;

-Scott

 

On 27 Mar 2007 06:45:50 -0700, Greg Morphis < [EMAIL PROTECTED]
 > wrote: 

I've got an XML List
with information something like:






I have it declared in my Model as an XMLLIst: public var
DALocationsXML:XMLList;

and in one of my views, I'm trying to load the data into a List..
dataProvider="{MyModel.getInstance().DALocationsXML.default}"

I don't have an error but I have a warning telling me
Data binding will not be able to detect changes to XMLList "default",
need an XML instance.

How can I knock this warning out?







-- 

: : ) Scott 

 

 



Re: [flexcoders] onChange()

2007-03-27 Thread Jeremy Watson
AnyoneAm I calling the function correctly in flex actionscript?

J.

- Original Message 
From: Jeremy Watson <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, 27 March, 2007 7:48:38 AM
Subject: [flexcoders] onChange()









  




Howdy again. 

The flex application that I'm building is really quite simple which is good 
cause I'm learning flex. However that said.. in html we have onLoad() which we 
put on a page. I have built a function called CostCalc() everytime someone 
changes a field it will recalculate each field. I got that working perfectly. 

However, when I first load the page up with values every value in the form is 
0.00 until I make a change to a field. I know that in flex we have 
creationComplete= "onCreationCompl ete(event) ; " but when I put in the 
function call CostCalc() it doesn't seem to work. Below is the code. Disregard 
the RequestType stuff. I'm switching states based on the URL. 

//Alert.show( RequestType) ;
   
   if (RequestType == "1")
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts( );
  
  CostCalc()
   }
  }




Send instant messages to your online friends http://au.messenger .yahoo.com 

  















Send instant messages to your online friends http://au.messenger.yahoo.com 

Re: [flexcoders] Flex access to cookies

2007-03-27 Thread Clint Tredway

pass in the cookie value thru the flashVars.

On 3/27/07, Tony Obermeit <[EMAIL PROTECTED]> wrote:


  I need to access the cookies already created in the browser in order
to determine if the user has been authenticated using oracle single
sign on.

1. Which flash object / class do I use to access the cookies?

2. Anyone have tips / code to share that they've used to authenicate
user with oracle sso?

Thanks

Tony
 





--
http://indeegrumpee.spaces.live.com/


RE: [flexcoders] AS3-only HEAD request

2007-03-27 Thread Matt Chotin
Unfortunately HEAD is only supported when using HTTPService with the
Proxy, the Player doesn't allow that method.  We're hoping that Apollo
might and that a future version of the Player might as well.

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Thompson
Sent: Tuesday, March 27, 2007 10:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AS3-only HEAD request

 

The HTTPService has the ability to make a HEAD request. Is there a way
to do
the same in an ActionScript-only project? (I tried using a simple
socket,
but I can't ensure a wide-open crossdomain policy.) 

Basically, what I need to accomplish is to determine the URL of a
resource
(an MP3 or FLV) after any server redirects. This is handled
transparently by
the Player (it just follows the redirects), but I need to know the final
URL.

Thanks,
-DT

 



[flexcoders] Flex access to cookies

2007-03-27 Thread Tony Obermeit
I need to access the cookies already created in the browser in order  
to determine if the user has been authenticated using oracle single  
sign on.

1.  Which flash object / class do I use to access the cookies?

2. Anyone have tips / code to share that they've used to authenicate  
user with oracle sso?

Thanks

Tony


[flexcoders] Scaling Custom Components

2007-03-27 Thread Nate Pearson
I have a custom component that adds multiple shapes during
UpdateDisplayList.  When I scale the browser it calls update display
list and draws over all of my shapes.

I have tried:

j = this.numChildren;
for (i=0; i

Re: [flexcoders] Re: New Adobe Products and Flex

2007-03-27 Thread Nancy Gill
ah .. Amazon.  I heard they jumped their NDA by close to a week.  Too bad.
Officially, there has been no specific date given .. at least not to the 
testing teams.


Thanks,
Nancy

  - Original Message - 
  From: Paul Whitelock 
  To: flexcoders@yahoogroups.com 
  Sent: Tuesday, March 27, 2007 4:57 PM
  Subject: [flexcoders] Re: New Adobe Products and Flex


  I've seen it pop up a few places on the web, but most notably it's the
  date that Amazon lists as the ship date. It's probably just a "best
  guess" that Adobe gave to retailers, but I'm hoping that it's an
  accurate guess :-)

  Paul

  --- In flexcoders@yahoogroups.com, "Nancy Gill" <[EMAIL PROTECTED]> wrote:
  >
  > Where did you hear April 20th? I have asked and looked extensively
  and haven't found anyone who knows a specific date. The press release
  says "during April and May" for the web and design suite products ..
  but nowhere have I found a specific published date.
  > 
  > where did you see this date?
  > 
  > Thanks,
  > 
  > Nancy Gill
  > Adobe Community Expert
  > Author: Dreamweaver 8 e-book for the DMX Zone
  > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
  > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
  Beginner''s
  > Guide, Mastering Macromedia Contribute
  > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
  Development



   


--


  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 3/26/2007 
2:31 PM


[flexcoders] Re: New Adobe Products and Flex

2007-03-27 Thread Paul Whitelock
I've seen it pop up a few places on the web, but most notably it's the
date that Amazon lists as the ship date. It's probably just a "best
guess" that Adobe gave to retailers, but I'm hoping that it's an
accurate guess :-)

Paul

--- In flexcoders@yahoogroups.com, "Nancy Gill" <[EMAIL PROTECTED]> wrote:
>
> Where did you hear April 20th?  I have asked and looked extensively
and haven't found anyone who knows a specific date.  The press release
says "during April and May" for the web and design suite products ..
but nowhere have I found a specific published date.
> 
> where did you see this date?
> 
> Thanks,
> 
> Nancy Gill
> Adobe Community Expert
> Author:  Dreamweaver 8 e-book for the DMX Zone
> Co-Author:  Dreamweaver MX: Instant Troubleshooter (August, 2003)
> Technical Editor:  DMX 2004: The Complete Reference, DMX 2004: A
Beginner''s
> Guide, Mastering Macromedia Contribute
> Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
Development



[flexcoders] AS3-only HEAD request

2007-03-27 Thread Daniel Thompson
The HTTPService has the ability to make a HEAD request. Is there a way to do
the same in an ActionScript-only project? (I tried using a simple socket,
but I can't ensure a wide-open crossdomain policy.) 

Basically, what I need to accomplish is to determine the URL of a resource
(an MP3 or FLV) after any server redirects. This is handled transparently by
the Player (it just follows the redirects), but I need to know the final
URL.

Thanks,
-DT




[flexcoders] Re: Custom Component Width when 100%?

2007-03-27 Thread Nate Pearson
Ahhh HA!  I was reading the adobe documentation and it turns out that
when you do addchild() it calls updateDisplayList again.  This is why
my program wasn't working, I had an infinite loop when I called addchild.

I fixed it by adding an if function with a flag.
if (_newBackground){
...
}

Since my updatedisplaylist was being called twice, once with 0
unscaledWidth and once with an unscaledWidth, I had to add another
condition.
 if (_newBackground && unscaledWidth != 0) {
...
}

Now I can't seem to get the component to scale with the rest of the
app when the browser window opens.  I'm going to start a new thread
for that question.

-Nate


--- In flexcoders@yahoogroups.com, "Nate Pearson" <[EMAIL PROTECTED]> wrote:
>
> So I think i got unScaledWidth to work during UpdateDisplayList.  When
> I debug it seems like it's called twice.  Once with 0 unscaledWidth
> and once with the correct unScaledWidth.  Should I be worrying about
> this? I didn't override the measure function.  Should I?
> 
> So to draw in UpdateDisplayList you have to manipulate graphics like
this:
>graphics.lineStyle(0,0x00, 0);
>graphics.beginFill(0xff, 1);
>graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
>graphics.endFill();  
> 
> But what if I want to draw shapes or UIcomponents?  That's why It
> wasn't working for me before, i was drawing like this:
>var shape:Shape = new Shape();
>shape.graphics.lineStyle(0,0x00, 0);
>shape.graphics.beginFill(0xff, 1);
>shape.graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
>shape.graphics.endFill();
>//When i do the add child my program won't load!
>//addChild(shape);
> 
> I watched Ely's component video and it says I can add UIComponents,
> sprites and shapes to UpdateDisplayList.  Does anyone know what I'm
> doing wrong?
> 
> Thanks!
> 
> -Nate
> 
> 
> --- In flexcoders@yahoogroups.com, "Alex Harui"  wrote:
> >
> > You can always call validateNow() to force validation, but you
shouldn't
> > be drawing in commitProperties in most cases.  Most drawing should
be in
> > updateDisplayList
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
> > Behalf Of Nate Pearson
> > Sent: Monday, March 26, 2007 3:53 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Custom Component Width when 100%?
> > 
> > 
> > 
> > I can't seem to get the width/height at measure() or
> > updateDisplayList(). Is there a specific function I have to call?
> > 
> > Isn't there a way to get the height/width before measure? I'm drawing
> > during commit properties so I would like to get it then. 
> > 
> > Thanks for your reply.
> > 
> > --- In flexcoders@yahoogroups.com

> > , "Alex Harui"  wrote:
> > >
> > > It depends on when you ask. Components have a multi-stage validation
> > > mechanism. Their properties get set in stage1, measured in stage2,
> > > layed out in stage 3. Until measurement, they are zero width/height
> > > 
> > > 
> > > 
> > > From: flexcoders@yahoogroups.com

> > [mailto:flexcoders@yahoogroups.com

> > ] On
> > > Behalf Of Nate Pearson
> > > Sent: Monday, March 26, 2007 1:09 PM
> > > To: flexcoders@yahoogroups.com
 
> > > Subject: [flexcoders] Custom Component Width when 100%?
> > > 
> > > 
> > > 
> > > I created a custom component that works great when the width is
> > > specified. However, when I try to set the width to a percent (of the
> > > parent) it returns 0. How to I reference the parent's width? I tried
> > > getExplicitOrMeasuredWidth but it didn't work.
> > > 
> > > Thanks in advance for the help.
> > >
> >
>




[flexcoders] Bad Results referencing local variables in nested loops

2007-03-27 Thread Rod Perkins

I have been having a great time using ActionScript 3.0 and Flex but  
I have encountered problems which seem to be caused by Flexbuilder 
or the Flashplayer runtime.  The following problem is based on a 
situation I have in my application uses a data structure of embedded 
objects.  I replicated the problem using arrays instead of the 
classes I had used.  The example may seemed contrived but reproduces 
the problem without duplicating the complexity of my application.

The structure was based on data structure of page objects, which 
contains several cell items.  Each item has a list of animations, 
and each animation has a list trigger events references.  So the 
nested structure looked like the following:

Pages (instance 1)
Item(instance 1)
Animation (instance 1)
Events (instance 1)
Events (instance 2)
Animation (instance 2)
Events (instance 1)
Events (instance 2)
Item(instance 2)
Animation (instance 1)
Events (instance 1)
Events (instance 2)
Animation (instance 2)
Events (instance 1)
Events (instance 2)

The setup function in my example creates this structure using 
arrays.   The function "goodResult" traverses the structure using 
nested for-loops.  Nested local variables at different scoping 
levels are referenced and displayed during the inner most loop for 
the Events (instance 1 & 2).  This produces the expected result.  
Good Results
500  200  [v:0 i:0 a: 0 e: 0]
500  200  [v:0 i:0 a: 0 e: 1]
500  200  [v:0 i:0 a: 1 e: 0]
500  200  [v:0 i:0 a: 1 e: 1]
500  200  [v:0 i:1 a: 0 e: 0]
500  200  [v:0 i:1 a: 0 e: 1]
500  200  [v:0 i:1 a: 1 e: 0]
500  200  [v:0 i:1 a: 1 e: 1]

The "badResult" function traverses the structure using the OO 
technique of enumeration (iterator) functions.  Among other reasons, 
I used this approach to make the code more readable and compact by 
hiding the loop from the caller and the typecasting the values 
automatically.  The caller is required to send a Function which is 
then called during each pass (iterator) ofthe loop.  The nested 
local variables this time are not displayed properly.  During the 
first call, the results for Events (instance 1) is correct, but 
Events (instance 2) is incorrect.  Subsequent calls to 
the "badResult" function display erroneous results.  
 
Bad Results - first iteration - first event loop good, second loop 
bad
500  200  [v:0 i:0 a: 0 e: 0]
500  200  [v:0 i:0 a: 0 e: 1]
500  200  [v:0 i:0 a: 1 e: 0]
500  200  [v:0 i:0 a: 1 e: 1]
500  59369881  [v:0 i:1 a: 0 e: 0]
500  59369881  [v:0 i:1 a: 0 e: 1]
500  59369881  [v:0 i:1 a: 1 e: 0]
500  59369881  [v:0 i:1 a: 1 e: 1]
Bad Results - second iteration - both loops bad
2  500  [v:0 i:0 a: 0 e: 0]
2  500  [v:0 i:0 a: 0 e: 1]
2  500  [v:0 i:0 a: 1 e: 0]
2  500  [v:0 i:0 a: 1 e: 1]
2  500  [v:0 i:1 a: 0 e: 0]
2  500  [v:0 i:1 a: 0 e: 1]
2  500  [v:0 i:1 a: 1 e: 0]
2  500  [v:0 i:1 a: 1 e: 1]
Bad Results - third iteration - both loops bad
2  500  [v:0 i:0 a: 0 e: 0]
2  500  [v:0 i:0 a: 0 e: 1]
2  500  [v:0 i:0 a: 1 e: 0]
2  500  [v:0 i:0 a: 1 e: 1]
2  500  [v:0 i:1 a: 0 e: 0]
2  500  [v:0 i:1 a: 0 e: 1]
2  500  [v:0 i:1 a: 1 e: 0]
2  500  [v:0 i:1 a: 1 e: 1]

I don't know if the problem is with the enumeration function calls 
or stack references during nested scope (this is not recursion so 
the stack depth should not be that great). The example is simple so 
you can play around with it.  It does make me worry about using 
Functions or nested function calls.

Here is the code for the example.

Regards,

Rod Perkins

---
package 
{

import flash.display.Sprite;
import flash.events.Event;

public class BuildError_2 extends Sprite
{
private var _pages : Array = new Array();

public function enumerateEvents( _events : Array, func : 
Function ) : void
{
for ( var x : int = 0, numItems : int = 
_events.length; x < _events.length; x++)
{
var eventObj : Object = Object( 
_events[x] );
if (func.call( this, x, numItems, 
eventObj ) == false) break;
}
}

public function enumerateAnimations( _anim : Array, func : 
Function ) : void
{
for ( var x : int = 0, numItems : int = 
_anim.length; x < _anim.length; x++)
{
var animObj : Object = Object( _anim
[x] );
if (func.call( this, x, numItems, 
animObj ) == false) break;
  

[flexcoders] Scrollbar for small browser windows

2007-03-27 Thread ivansebastiansurya
Hi everyone,

I'm developing a Flex application for large monitor screen.  HOwever, 
when I display my application in smaller screens, the scroll bar won't 
appear.  Is there any way to make my application create a scrollbar as 
needed?

Thanks,

Ivan.



Re: [flexcoders] Global access in AS3

2007-03-27 Thread Troy Gilbert

public class MySingleton
{
   private static var _instance:MySingleton;
   public static function get instance():MySingleton
   {
   if (!_instance) _instance = new MySingleton();
   return _instance;
   }

   public function MySingleton()
   {
   if (_instance) throw new Error("MySingleton is a singleton but has
been constructed twice!");
   }
}

That works for me. There's also a technique where you use an internal class
(visible only within the AS source file) as a parameter to the constructor,
thus causing the compiler to complain if anyone calls the constructor from
outside that source file, but I find that throwing the error is enough.

Another option is to go with a Monostate, which doesn't require any trickery
in ActionScript. In a Monostate, you can create as many instances of the
class as you want but they're all basically just facades onto a single
instance (usually implemented as just having private static members). In
some cases I like the Monostate better because, depending on the
application, its easier to switch to not being an "oop global" if need be.

Troy.



On 3/27/07, Petro Bochan <[EMAIL PROTECTED]> wrote:


   Hi,



As a side note, you might try to place your .AS file in the root directory
(along with your main .MXML application file) and define all the necessary
methods there. The methods should be all public though but the advantage is
that you are not even required to define a package. Methods shouldn't be
even static.



Cheers,

Petro


  --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Andre Rodrigues Pena
*Sent:* Monday, March 26, 2007 11:50 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Global access in AS3



Hi all,

My problem is: I need some data classes to be global so that I can
access them without to have to establish unnecessary references.

I tried to create a Singleton class the way we're used to do in Java,
and I got 2 problems:

1) It's not possible to define a private constructor
2) The instance created in the getInstance() method is not keeping the
data, I don't know why

What do I do to have globally accessible structures in AS3?

--
André Rodrigues Pena

LOCUS
www.locus.com.br

Blog
www.techbreak.org

 



Re: [flexcoders] New Adobe Products and Flex

2007-03-27 Thread Nancy Gill
Where did you hear April 20th?  I have asked and looked extensively and haven't 
found anyone who knows a specific date.  The press release says "during April 
and May" for the web and design suite products .. but nowhere have I found a 
specific published date.

where did you see this date?

Thanks,

Nancy Gill
Adobe Community Expert
Author:  Dreamweaver 8 e-book for the DMX Zone
Co-Author:  Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor:  DMX 2004: The Complete Reference, DMX 2004: A Beginner''s
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development



  - Original Message - 
  From: Paul Whitelock 
  To: flexcoders@yahoogroups.com 
  Sent: Tuesday, March 27, 2007 5:58 AM
  Subject: [flexcoders] New Adobe Products and Flex


  In case you weren't aware, there seem to be a lot of goodies in the
  new Adobe products for Flex developers. In particular, check out these
  three CS3 packages (click the "Feature Tour" button for some of the
  highlights):

  Fireworks CS3:

  http://www.adobe.com/products/fireworks/?xNav=WPFW

  Flash Professional CS3:

  http://www.adobe.com/products/flash/?xNav=WPFL

  Illustrator CS3:

  http://www.adobe.com/products/illustrator/?xNav=PPIL

  Can't wait for April 20th!

  Paul



   


--


  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 3/26/2007 
2:31 PM


Re: [flexcoders] Are Events OK in the MVC (S) pattern

2007-03-27 Thread Troy Gilbert

Brett,

Events are actually an a pretty fundamental component of an MVC
implementation. Events are most often used by the model to notify the view
and/or controller of changes (Observer pattern).

If your model is responding to *any* events then its really not acting as a
model in the traditional MVC sense. Models should be "pure" data, they
should basically represent state and contain no behavior. The exception, of
course, are structural behaviors like collection management
(ArrayCollection) or notification (Bindable). If you have parts of your
model that are listening for events that's a good indicator (in my book)
that your model needs some refactoring to truly be MVC. I tend to work
toward the goal of the model having only properties, no methods.

Troy.


On 3/25/07, rumpleminzeflickr <[EMAIL PROTECTED]> wrote:


  Hi there,

I'm building a flex app using MVS and it seems to me events can break
the MVC pattern?

I.e a event in the ui layer could trigger something directly in the
model etc..

Is it recommended to use Events in this way or am I being totally dumb
here.?

Any feedback appreciated..

Many thanks,

Brett

 



Re: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :

2007-03-27 Thread Robert Cadena
howdy,

i'm not sure what classes are defined in your modules or if you're using 
load-externs and external-library-path when compiling your module 
projects.  but what i have found is that if a module has a class linked 
in that is the exact same class (and comes from the same swc, say 
framework.swc) as another module, and you try to cast an object obtained 
from that module into the exact same class of another module then you 
will get a type coercion error.

so, my guess is that loading the shared content first loads the 
component into the "correct" applicationDomain.

to avoid guessing when to load what, use load-externs or 
external-library-path to so you can link in a component into a module 
when you know that the component is also linked from the code that 
loaded the module.  Specially if the modules have to "share" objects 
between each other.

alex harui's presentation of the class loading mechanism at 360flex was 
very helpful.

/r
http://www.searchcoders.com/flex/?applicationDomain+coercion
http://blog.searchcoders.com/


nxzone wrote:
> Why you think this bug is due to this cause? Why loading the shared
> content before should solve the "Type Coercion failed: cannot convert
> mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar" ?
> 
> 
> --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>> Check out the shared code portion of my modules presentation at
>> blogs.adobe.com/aharui
>>
>> 
>>
>> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
>> Behalf Of nxzone
>> Sent: Monday, March 26, 2007 2:27 PM
>> To: flexcoders@yahoogroups.com
>> Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :
>>
>>
>>
>> Same problem ...
>> Line 158 of ButtonBarButtonSkin.as... (parent.parent is a
>> ToggleButtonBar not a buttonbar)
>> var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null;
>>
>> --- In flexcoders@yahoogroups.com 
>> , "lrhazi"  wrote:
>>> I get this annoying error often:
>>>
>>> TypeError: Error #1034: Type Coercion failed: cannot convert
>>> mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar
>>>
>>> My app uses Modules and has a user login/logout functionality... I get
>>> the above error systematically when i logout of an account and login
>>> to a second one.
>>>
>>> Any hints on what to look for?
>>>
>>> Thank you very much.
>>> Mohamed~
>>>
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
> 
> 
> 
> 


[flexcoders] Re: IoC framework for Action Script

2007-03-27 Thread jwp2k_uva
I have to agree with you, Carlos.  It would be nice have a package
like "SpringAS" or something of the sort in Cairngorm or else where. 

- Jae 

--- In flexcoders@yahoogroups.com, "Carlos Rovira" <[EMAIL PROTECTED]>
wrote:
>
> An IoC flex solution would really useful. The possibilities to
inyect code
> at runtime and configure your application by xml joined with the code
> reduction acomplised with reflexion would be the next step...maybe
the next
> iteration for frameworks like Cairngorm?. Hope so ;).
> 
> 27 Mar 2007 10:00:54 -0700, Matt Chotin <[EMAIL PROTECTED]>:
> >
> >Not that I'm aware of.
> >
> > Matt
> >
> >  --
> > *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *jwp2k_uva
> > *Sent:* Tuesday, March 27, 2007 12:46 AM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] Re: IoC framework for Action Script
> >
> >  Matt, Adobe, et al.
> >
> > Has there been any progress in the area of IoC for ActionScript?
> >
> > - Jae
> >
> >
> > --- In flexcoders@yahoogroups.com , Matt
> > Chotin  wrote:
> > >
> > > For those unfamiliar with the terms IoC and Dependency Injection
(like
> > > myself) Martin Fowler writes it up here:
> > > http://www.martinfowler.com/articles/injection.html
> > >  .
> > >
> > >
> > >
> > > I don't know of a framework in AS right now that does anything like
> > this.
> > > Cairngorm does provide the concept of a ServiceLocator and I think
> > would be
> > > the right place to add this kind of framework as well.
> > >
> > >
> > >
> > > If you're interested in contributing this sort of thing you
should let
> > > Steven and the rest of the advisory board know :-)
> > >
> > >
> > >
> > > Matt
> > >
> > >
> > >
> > > _
> > >
> > > From: David Solis [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, February 23, 2005 9:06 AM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: [flexcoders] IoC framework
> > >
> > >
> > >
> > >
> > > Is there an IoC (aka Dependency Injection) framework for
ActionScript?
> > >
> > > Regards
> > >
> > > D.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > _
> > >
> > > Yahoo! Groups Links
> > >
> > > * To visit your group on the web, go to:
> > > http://groups.yahoo.com/group/flexcoders/
> > > 
> > >
> > > * To unsubscribe from this group, send an email to:
> > >
[EMAIL PROTECTED]
> > >

> >
> > >
> > > * Your use of Yahoo! Groups is subject to the Yahoo!
> > >  Terms of Service.
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> ::| Carlos Rovira
> ::| http://www.carlosrovira.com
> ::| http://www.madeinflex.com
>




Re: [flexcoders] Randomizing Array (from actionscript cookbook3 and other places)

2007-03-27 Thread Patrick Lemiuex

Alex:

The error was actually in my next line of code however the debugger  
wasn't stopping at the right line.  Silly me.


The code works fine.

Thanks,
Patrick

Yeah, the error was on the next
On Mar 26, 2007, at 10:51 AM, Alex Harui wrote:



This compiles and runs for me.



private function init():void

{

function randomSort(a, b) {

return Math.random()>.5 ? -1 : 1;

}



var numbers:Array = new Array();



for (var n:int=0;n<10;n++){

numbers[n] = n;

}

numbers.sort(randomSort);

trace(numbers);

}



From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of {reduxdj}

Sent: Saturday, March 24, 2007 11:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Randomizing Array (from actionscript  
cookbook3 and other places)




I am getting an error with the following code

TypeError: Error #1006: value is not a function.
at com.me.data::PictureProviderXML/::handleComplete()


function randomSort(a, b) {
return Math.random()>.5 ? -1 : 1;
}

var numbers:Array = new Array();

for (var n:int=0;n



[flexcoders] Re: FDS/Hibernate/MySql data update question

2007-03-27 Thread jwp2k_uva
Robert, 

Thanks for the design input.  I guess there is no helping it if I want
MySql database to have heterogeneous accessors.  My preliminary search
indicates that Oracle my be the only db that supports change event. 

By the way, nice work with SearchCoders.com/felx app.  It looks awesome.

- Jae


--- In flexcoders@yahoogroups.com, Robert Cadena <[EMAIL PROTECTED]> wrote:
>
> Jae,
> glad to help.  I doubt there is a change event support in the jdbc 
> connector, but I may be wrong.
> 
> One way you'd be able to notify your fds webapp that a change occurred 
> is to expose an internal facing service (webservice,restful, jms?) to 
> your other app.
> 
> For example, our searchcoders.com/flex app runs a couple of shell 
> scripts to perform maintenance and email retrieval at periodic 
> intervals.  I wanted to keep track of when new messages were downloaded 
> from the group and indexed in a simple flex-based admin console.  so, 
> when the batch script finishes dling and indexing stuff it makes a curl 
> request to an internal-facing server running fds, which sends an update 
> event over a transaction, just as i described in my reply.  then my 
> admin client, which is already connected to the internal server fds 
> instance, receives a push update.  Of course, i could have simply had 
> the shell script send me an email, but, we're testing out how to work 
> and integrate fds and wanted to see this sort of notification strategy 
> in action.
> 
> /r
> http://www.searchcoders.com/flex/?dataservicetransaction+php+net
> 
> 
> 
> jwp2k_uva wrote:
> > Robert,
> > 
> > Thanks a million for pointing out DataServiceTransaction ;)  This is
> > awesome.  
> > 
> > I wonder now whether there is a db change event support in MySql/JDBC
> > connector that allows a java object to call DataServiceTranaction
> > functions as you described below whenever the database of interest is
> > changed regardless of who (.NET, PHP, etc.) changed it. 
> > 
> > You've been a great help.  Thanks, again.
> > 
> > - Jae 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "robert_cadena"  wrote:
> >> Hi,
> >>
> >> if i understand you correctly you want to tell a flex client that a
> >> change in a db row occurred, yet the change was not initiated by that
> >> client and/or you're not in the middle of an assembler operation?
 For
> >> example, if some other non-flex related entity changed a db row you
> >> want to notify the flex client.  
> >>
> >> If this is the case have a look at the "DataServiceTransaction" class
> >> in the FDS javadocs.  You create a new transaction using that class'
> >> "begin" static method.  Here's some pseudocode:
> >>
> >> tx = DataServiceTransaction.begin();
> >> tx.updateItem("destination_name", newVersion, prevVersion,
changesList);
> >> tx.commit();
> >>
> >> This bit of code will send an update event to the clients subscribed
> >> to destination.
> >>
> >> Keep in mind you have to be within the same webapp as the FDS.  
> >>
> >> Hope that helps.
> >>
> >> /r
> >> http://www.searchcoders.com/flex/?dataservicetransaction
> >>
> >>
> >>
> >> --- In flexcoders@yahoogroups.com, "jwp2k_uva"  wrote:
> >>> Dear Flexcoders,
> >>>
> >>> In a FDS/Hibernate/MySql setup, what happens if a data row is
directly
> >>> updated in the MySql database?  Is there a simple way to update the
> >>> flex application with the updated data row?
> >>>
> >>> Thanks a million.
> >>>
> > 
> > 
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> > Yahoo! Groups Links
> > 
> > 
> > 
> >
>




[flexcoders] Re: Custom Component Width when 100%?

2007-03-27 Thread Nate Pearson
So I think i got unScaledWidth to work during UpdateDisplayList.  When
I debug it seems like it's called twice.  Once with 0 unscaledWidth
and once with the correct unScaledWidth.  Should I be worrying about
this? I didn't override the measure function.  Should I?

So to draw in UpdateDisplayList you have to manipulate graphics like this:
   graphics.lineStyle(0,0x00, 0);
   graphics.beginFill(0xff, 1);
   graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
   graphics.endFill();  

But what if I want to draw shapes or UIcomponents?  That's why It
wasn't working for me before, i was drawing like this:
   var shape:Shape = new Shape();
   shape.graphics.lineStyle(0,0x00, 0);
   shape.graphics.beginFill(0xff, 1);
   shape.graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
   shape.graphics.endFill();
   //When i do the add child my program won't load!
   //addChild(shape);

I watched Ely's component video and it says I can add UIComponents,
sprites and shapes to UpdateDisplayList.  Does anyone know what I'm
doing wrong?

Thanks!

-Nate


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> You can always call validateNow() to force validation, but you shouldn't
> be drawing in commitProperties in most cases.  Most drawing should be in
> updateDisplayList
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Nate Pearson
> Sent: Monday, March 26, 2007 3:53 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Custom Component Width when 100%?
> 
> 
> 
> I can't seem to get the width/height at measure() or
> updateDisplayList(). Is there a specific function I have to call?
> 
> Isn't there a way to get the height/width before measure? I'm drawing
> during commit properties so I would like to get it then. 
> 
> Thanks for your reply.
> 
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > It depends on when you ask. Components have a multi-stage validation
> > mechanism. Their properties get set in stage1, measured in stage2,
> > layed out in stage 3. Until measurement, they are zero width/height
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of Nate Pearson
> > Sent: Monday, March 26, 2007 1:09 PM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] Custom Component Width when 100%?
> > 
> > 
> > 
> > I created a custom component that works great when the width is
> > specified. However, when I try to set the width to a percent (of the
> > parent) it returns 0. How to I reference the parent's width? I tried
> > getExplicitOrMeasuredWidth but it didn't work.
> > 
> > Thanks in advance for the help.
> >
>




[flexcoders] Re: UIComponent: focus problem?

2007-03-27 Thread carlo.cavallieri
if in my component i add this line of code

trace(systemManager) i get "null"


> public function Stage()
> {
>   super();
> 
trace(systemManager);
> 
> }



--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> You component must implement IFocusManagerComponent if you want it to
> receive focus.
>  
> public class Stage extends UIComponent implements IFocusManagerComponent
>  
> If you want to capture all keystrokes, listen to the stage.
>  
> systemManager.stage.addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown
> );
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of carlo.cavallieri
> Sent: Tuesday, March 27, 2007 1:47 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] UIComponent: focus problem?
> 
> 
> 
> Hi,
> 
> i have a simple "Test Component" that display the key pressed by the
> user, but it doesn't log anything
> 
> package
> {
> import flash.display.*;
> import flash.events.*;
> import mx.core.*;
> 
> public class Stage extends UIComponent
> {
> 
> public function Stage()
> {
> super();
> 
> //height = 300;
> //width = 400;
> 
> //
> // keyboard binding
> //
> addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );
> 
> }
> 
> private function onKeyDown( event:KeyboardEvent ):void
> {
> trace("Key Code: "+event.keyCode);
> }
> 
> }
> }
> 
> Where i'm wrong?
>




[flexcoders] Re: TypeError: Error #1034: Type Coercion failed :

2007-03-27 Thread nxzone
Why you think this bug is due to this cause? Why loading the shared
content before should solve the "Type Coercion failed: cannot convert
mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar" ?


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Check out the shared code portion of my modules presentation at
> blogs.adobe.com/aharui
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of nxzone
> Sent: Monday, March 26, 2007 2:27 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :
> 
> 
> 
> Same problem ...
> Line 158 of ButtonBarButtonSkin.as... (parent.parent is a
> ToggleButtonBar not a buttonbar)
> var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null;
> 
> --- In flexcoders@yahoogroups.com 
> , "lrhazi"  wrote:
> >
> > I get this annoying error often:
> > 
> > TypeError: Error #1034: Type Coercion failed: cannot convert
> > mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar
> > 
> > My app uses Modules and has a user login/logout functionality... I get
> > the above error systematically when i logout of an account and login
> > to a second one.
> > 
> > Any hints on what to look for?
> > 
> > Thank you very much.
> > Mohamed~
> >
>




[flexcoders] Personalized Popup

2007-03-27 Thread leoaraguas
Hi, i need to make a popup that show me an image that represent the 
item selected (one of my tilelist that is showed using render) can 
anyone help me please? Its just like an image explorer.

Thanks





[flexcoders] Re: Whatever happened to Peter Ent's scrolling text ticker?

2007-03-27 Thread simonjpalmer
any particular reason why?

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> I recommend using a Timer rather than calling doLater().
>  
> - Gordon
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of simonjpalmer
> Sent: Monday, March 26, 2007 12:39 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Whatever happened to Peter Ent's scrolling
> text ticker?
> 
> 
> 
> Thanks! Simple when you see it, but I didn't know about the magic
> doLater() function... sometimes the simplest things are the best.
> 
> As a matter of interest has anyone used this approach for handling
> lazy loading of data?
> 
> --- In flexcoders@yahoogroups.com 
> , Steve Hagenlock  wrote:
> >
> > http://weblogs.macromedia.com/pent/archives/flex/ticker/tickerText.zip
> 
> 
> > 
> > simonjpalmer wrote:
> > > Anyone know what became of it? The markme.com code link on his blog
> > > leads nowhere. Anyone have the code they could share with me?
> > >
> > > http://weblogs.macromedia.com/pent/archives/2004/12/ticker.cfm
>  
> > >
> > > Thanks
> > >
> > > Simon
> > >
> > >
> > > 
> > >
> --
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date:
> 3/23/2007 3:27 PM
> > >
> >
>




[flexcoders] Re: Setting the Font Color for a Selected ComboBox Item

2007-03-27 Thread Paul Whitelock
The itemRenderer is very simple. The source is below -- is there another
that way I should code it? Thanks for any suggestions!

Paul


http://www.adobe.com/2006/mxml"; backgroundAlpha="1"
horizontalScrollPolicy="off" verticalScrollPolicy="off" >

 
 .normal {
 color: #0B333C;
 }
 .inactive {
 color: #AA;
 font-weight: bold;
 }
 

 




--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> The key will be in your renderer code for the ComboBox.  How did you
set
> up coloring?
>
> On occasion, the entire List is destroyed and re-created which can
reset
> your renderers.
>
> -Alex
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of Paul Whitelock
> Sent: Tuesday, March 27, 2007 8:40 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Setting the Font Color for a Selected
ComboBox
> Item
>
>
>
> Yes, that's what I would have thought too :-)
>
> On the ComboBox close event this is all I'm doing:
>
> if (cb.selectedItem.status == "a") cb.setStyle("color", "#0B333C");
> else cb.setStyle("color", "#AA");
>
> If I select an item in the list that has the color #0B333C (the
> default dark gray font color for list items), then everything is fine
> (the #AA items in the list stay red and the #0B333C items in the
> list stay gray).
>
> If I select a list item that has the red color, then when the
> setStyle("color", "#AA") executes all of the list items are
> rendered in red (#AA).
>
> A odd thing is that if I next select one of the (now red) list items
> that should be gray, then when the cb.setStyle("color", "#0B333C")
> executes the list items are rendered properly (gray items are gray and
> red items are red).
>
> It seems it's only when setStyle changes the color to something other
> than the default that the itemRenderer no longer has an effect. When
> the color is changed back to the default, then the itemRenderer works
> again.
>
> Very strange, and very irritating :-)
>
> Paul
>
>
> --- In flexcoders@yahoogroups.com

> , "Alex Harui" aharui@ wrote:
> >
> > In theory, if your renderer picks a new font color based on a
> property,
> > they should be ignoring the default color always.
> >
> > 
> >
> > From: flexcoders@yahoogroups.com

> [mailto:flexcoders@yahoogroups.com

> ] On
> > Behalf Of Paul Whitelock
> > Sent: Tuesday, March 27, 2007 7:06 AM
> > To: flexcoders@yahoogroups.com 
> > Subject: [flexcoders] Setting the Font Color for a Selected ComboBox
> > Item
> >
> > I'm using a ComboBox with an itemRenderer to control the font color
of
> > items in the dropdown list (items in the dropdown list have their
font
> > color determined by a property value for each item).
> >
> > I'd like to have the font color for the selected item in the
ComboBox
> > match the font color that the item has in the dropdown list. By
> > default, this doesn't happen. If I do a "setStyle" on the ComboBox
to
> > manually set the selected item's font color to match the font color
> > the item has in the list, this works to set the selected item's font
> > color, but it also sets the font color for every item in the
dropdown
> > list (it seems to override the itemRenderer).
> >
> > Is there a way that I can set the font color for a selected item in
a
> > ComboBox without impacting the font color (set by an itemRenderer)
of
> > dropdown list items?
> >
> > Thanks for any tips!
> >
> > Paul
> >
>



RE: [flexcoders] addchild error

2007-03-27 Thread Alex Harui
You can't add a child twice.  Did you mean to call addPage?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wifi19
Sent: Tuesday, March 27, 2007 1:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] addchild error



I am having some trouble with addchild

var thePrintView:FormPrintView = new FormPrintView();

//myHbox.addChild(thePrintView); 
var _caPan:Canvas = new Canvas();

_caPan.height=300;
_caPan.width = 200;


_caPan.addChild(thePrintView);
_caPan.addChild(thePrintView);

second addchild generate a error

RangeError: Error #2006: L'index indiqué sort des limites.
at flash.display::DisplayObjectContainer/getChildAt()
at mx.core::Container/getChildAt()
at mx.core::UIComponent/set document()
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addin 
 
gChild()
at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC 
 
hild()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
at MyLoginForm/process()
at MyLoginForm/___TitleWindow1_initialize()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
entFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.core::UIComponent/set processedDescriptors()
at mx.core::Container/createComponentsFromDescriptors()
at mx.containers::Panel/createComponentsFromDescriptors()
at mx.core::Container/mx.core:Container::createChildren()
at mx.containers::Panel/mx.containers:Panel::createChildren()
at mx.core::UIComponent/initialize()
at mx.core::Container/initialize()
at MyLoginForm/initialize()
at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: 
 
:childAdded()
at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: 
 
:rawChildren_addChildAt()
at mx.managers::SystemManager/addChild()
at mx.managers::PopUpManagerImpl/addPopUp()
at mx.managers::PopUpManager$/addPopUp()
at print/doPrint()
at print/__printDG_click()



 


RE: [flexcoders] UIComponent: focus problem?

2007-03-27 Thread Alex Harui
You component must implement IFocusManagerComponent if you want it to
receive focus.
 
public class Stage extends UIComponent implements IFocusManagerComponent
 
If you want to capture all keystrokes, listen to the stage.
 
systemManager.stage.addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown
);



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of carlo.cavallieri
Sent: Tuesday, March 27, 2007 1:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] UIComponent: focus problem?



Hi,

i have a simple "Test Component" that display the key pressed by the
user, but it doesn't log anything

package
{
import flash.display.*;
import flash.events.*;
import mx.core.*;

public class Stage extends UIComponent
{

public function Stage()
{
super();

//height = 300;
//width = 400;

//
// keyboard binding
//
addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );

}

private function onKeyDown( event:KeyboardEvent ):void
{
trace("Key Code: "+event.keyCode);
}

}
}

Where i'm wrong?



 


RE: [flexcoders] textInput for passwords

2007-03-27 Thread Karl Johnson
Set displayAsPassword to "true" on the text input field.

 

Karl

Cynergy

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Chad Gray
Sent: Tuesday, March 27, 2007 5:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] textInput for passwords

 

How do you get a text input to hide the characters you type in like you
do with  in HTML?

 



[flexcoders] Re: textInput for passwords

2007-03-27 Thread Shaun
displayAsPassword = true

shaun

--- In flexcoders@yahoogroups.com, "Chad Gray" <[EMAIL PROTECTED]> wrote:
>
> How do you get a text input to hide the characters you type in like 
you do with  in HTML?
>




[flexcoders] textInput for passwords

2007-03-27 Thread Chad Gray
How do you get a text input to hide the characters you type in like you do with 
 in HTML?



[flexcoders] Re: Modules not positioning children correctly

2007-03-27 Thread Shaun
Here is the link to the release notes.  Check out the known issues 
section as there are some other useful tidbits in there that tripped 
me up until I read through it.

http://www.adobe.com/support/documentation/en/flex/2/releasenotes_flex
201_sdk.html

Shaun


--- In flexcoders@yahoogroups.com, "Mark Doberenz" <[EMAIL PROTECTED]> 
wrote:
>
> Thanks for that.  I'd rather do that than have an empty class.
> 
> I couldn't find this info in the release notes though.  I did find a
> reference to Modules, but nothing about Modules not sizing to 100%.
> 
> Mark
> 
> On 27 Mar 2007 13:12:14 -0700, Shaun <[EMAIL PROTECTED]> wrote:
> >
> >   Try setting percentWidth and percentHeight to 100 in your module
> > tag. This is a known issue posted on the 2.0.1 release notes page,
> > and setting percentWidth works around it.
> >
> > Shaun
> >
> > --- In flexcoders@yahoogroups.com , "Mark
> > Doberenz" 
> > wrote:
> > >
> > > Well, in case anyone else has this issue, I found a bit of a 
hack
> > to get it
> > > to work.
> > > I just created an mxml class called CustomModule.mxml and this 
is
> > all that's
> > > in it:
> > >
> > > 
> > > > http://www.adobe.com/2006/mxml"; 
width="100%"
> > > > height="100%">
> > > > 
> > >
> > >
> > > Now, whenever I make a new module, I just point it to the
> > CustomModule
> > > class as the main class to use, and everything resizes/positions
> > fine. I'm
> > > not sure why, but I'll take it.
> > >
> > > Just to make sure, I changed one of my modules to point to
> > mx:Module again,
> > > and the children didn't resize/position correctly. Setting it 
back
> > to
> > > CustomModule made it all work again.
> > >
> > > Hopefully this can help someone.
> > > Mark
> > >
> > >
> > > On 3/27/07, Mark Doberenz  wrote:
> > > >
> > > > I'm having issues with modules and I'm hoping someone can 
help me.
> > > >
> > > > Create a module project and layout the module using the 
following
> > code:
> > > >
> > > > > 
> > > > > http://www.adobe.com/2006/mxml";
> > layout="absolute"
> > > > > width="100%" height="100%">
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > >
> > > >
> > > > Compile it and then create another project that is an 
application
> > that
> > > > only has a ModuleLoader that points the the above module like 
the
> > following:
> > > >
> > > >
> > > > > 
> > > > > http://www.adobe.com/2006/mxml";
> > > > > layout="absolute">
> > > > > 
> > > > >  file:///PATH_TO_ABOVE_MODULE.swf
> > > > > 
> > > > > 
> > > > >
> > > >
> > > >
> > > > The module in Flex Builder will appear correctly where the 
tree
> > controller
> > > > is placed at 0,66 and spans 100% x 100%.
> > > > However, when the module is loaded into the Application,
> > everything is
> > > > placed correctly, but the tree seems to use a minimumWidth and
> > minimumHeight
> > > > value instead of the 100% x 100%.
> > > >
> > > > Has anyone seen this issue before?
> > > >
> > > > Mark
> > > >
> > >
> >
> >  
> >
>




[flexcoders] addchild error

2007-03-27 Thread wifi19
I am having some trouble with addchild

  var   thePrintView:FormPrintView = new FormPrintView();

//myHbox.addChild(thePrintView); 
var _caPan:Canvas = new Canvas();
 
  _caPan.height=300;
  _caPan.width = 200;
 

_caPan.addChild(thePrintView);
_caPan.addChild(thePrintView);

second addchild generate a error

RangeError: Error #2006: L'index indiqué sort des limites.
at flash.display::DisplayObjectContainer/getChildAt()
at mx.core::Container/getChildAt()
at mx.core::UIComponent/set document()
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addin
gChild()
at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC
hild()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
at MyLoginForm/process()
at MyLoginForm/___TitleWindow1_initialize()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
entFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.core::UIComponent/set processedDescriptors()
at mx.core::Container/createComponentsFromDescriptors()
at mx.containers::Panel/createComponentsFromDescriptors()
at mx.core::Container/mx.core:Container::createChildren()
at mx.containers::Panel/mx.containers:Panel::createChildren()
at mx.core::UIComponent/initialize()
at mx.core::Container/initialize()
at MyLoginForm/initialize()
at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal:
:childAdded()
at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal:
:rawChildren_addChildAt()
at mx.managers::SystemManager/addChild()
at mx.managers::PopUpManagerImpl/addPopUp()
at mx.managers::PopUpManager$/addPopUp()
at print/doPrint()
at print/__printDG_click()




[flexcoders] UIComponent: focus problem?

2007-03-27 Thread carlo.cavallieri
Hi,

i have a simple "Test Component" that display the key pressed by the
user, but it doesn't log anything

package
{
   import flash.display.*;
   import flash.events.*;
   import mx.core.*;

   public class Stage extends UIComponent
   {

 public function Stage()
 {
   super();

   //height = 300;
   //width = 400;

   //
   // keyboard binding
   //
   addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );

 }

 private function onKeyDown( event:KeyboardEvent ):void
 {
   trace("Key Code: "+event.keyCode);
 }

   }
}


Where i'm wrong?





RE: [flexcoders] FDS sitting behind SSL accelerator

2007-03-27 Thread Seth Hodgson
Hi,

First, I'd recommend grabbing the 2.5 beta release on labs which supports this 
deployment more naturally than the 2.0.1 release.

If you're using HTTP based channels you'd want to define your channel 
definition like so:


  https://{ip for your BIG-IP}" 
class="flex.messaging.endpoints.HTTPEndpoint" />
...

The server-side endpoint class is HTTPEndpoint (non-secure) but the client-side 
channel class is SecureHTTPChannel and the endpoint url that is compiled into 
the swf is secure (https). The endpoint url needs to point to your accelerator 
and that in turn needs to connect back to the proper FDS url.

If you're using RTMP, you'd want a channel definition like:


  
  
...
...
  
...

You use  and  to specify the IP and port that the 
server-side RTMP endpoint will listen for RTMP connections on. The IP and port 
values in the endpoint url string will reference your accelerator, and after 
the SSL handshake it will need to do TCP pass through back to the bind-address 
and bind-port that FDS is configured to use.

HTH,
Seth


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of box110a
Sent: Tuesday, March 27, 2007 9:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FDS sitting behind SSL accelerator

We're working on our production environment design and would like to
put FDS behind an SSL accelerator (H.A.) like nCipher's nFast or a
BIG-IP server. We haven't purchased any hardware yet, so a proof of
concept will require something like apache/mod_jk/mod_ssl. Has anybody
had any success doing this with FDS.

What I can't figure out is how do I set up my
data-managment-config.xml destination channels?  If my FDS server is
sitting in the DMZ talking plain text, how do I get my clients to talk
SSL if they are compiled (by FDS) if they're using the same config files?

so It should look like this:
[client] -ssl-> [H.A. & passthrough to DMZ] -plain text-> FSD


any thoughts? 
 


Re: [flexcoders] Re: Modules not positioning children correctly

2007-03-27 Thread Mark Doberenz

Thanks for that.  I'd rather do that than have an empty class.

I couldn't find this info in the release notes though.  I did find a
reference to Modules, but nothing about Modules not sizing to 100%.

Mark

On 27 Mar 2007 13:12:14 -0700, Shaun <[EMAIL PROTECTED]> wrote:


  Try setting percentWidth and percentHeight to 100 in your module
tag. This is a known issue posted on the 2.0.1 release notes page,
and setting percentWidth works around it.

Shaun

--- In flexcoders@yahoogroups.com , "Mark
Doberenz" <[EMAIL PROTECTED]>
wrote:
>
> Well, in case anyone else has this issue, I found a bit of a hack
to get it
> to work.
> I just created an mxml class called CustomModule.mxml and this is
all that's
> in it:
>
> 
> > http://www.adobe.com/2006/mxml"; width="100%"
> > height="100%">
> > 
>
>
> Now, whenever I make a new module, I just point it to the
CustomModule
> class as the main class to use, and everything resizes/positions
fine. I'm
> not sure why, but I'll take it.
>
> Just to make sure, I changed one of my modules to point to
mx:Module again,
> and the children didn't resize/position correctly. Setting it back
to
> CustomModule made it all work again.
>
> Hopefully this can help someone.
> Mark
>
>
> On 3/27/07, Mark Doberenz <[EMAIL PROTECTED]> wrote:
> >
> > I'm having issues with modules and I'm hoping someone can help me.
> >
> > Create a module project and layout the module using the following
code:
> >
> > > 
> > > http://www.adobe.com/2006/mxml";
layout="absolute"
> > > width="100%" height="100%">
> > > 
> > > 
> > > 
> > > 
> > > 
> >
> >
> > Compile it and then create another project that is an application
that
> > only has a ModuleLoader that points the the above module like the
following:
> >
> >
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > layout="absolute">
> > > 
> > >  file:///PATH_TO_ABOVE_MODULE.swf
> > > 
> > > 
> > >
> >
> >
> > The module in Flex Builder will appear correctly where the tree
controller
> > is placed at 0,66 and spans 100% x 100%.
> > However, when the module is loaded into the Application,
everything is
> > placed correctly, but the tree seems to use a minimumWidth and
minimumHeight
> > value instead of the 100% x 100%.
> >
> > Has anyone seen this issue before?
> >
> > Mark
> >
>

 



RE: [flexcoders] Re: Setting the Font Color for a Selected ComboBox Item

2007-03-27 Thread Alex Harui
The key will be in your renderer code for the ComboBox.  How did you set
up coloring?
 
On occasion, the entire List is destroyed and re-created which can reset
your renderers.
 
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Whitelock
Sent: Tuesday, March 27, 2007 8:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Setting the Font Color for a Selected ComboBox
Item



Yes, that's what I would have thought too :-)

On the ComboBox close event this is all I'm doing:

if (cb.selectedItem.status == "a") cb.setStyle("color", "#0B333C");
else cb.setStyle("color", "#AA"); 

If I select an item in the list that has the color #0B333C (the
default dark gray font color for list items), then everything is fine
(the #AA items in the list stay red and the #0B333C items in the
list stay gray).

If I select a list item that has the red color, then when the
setStyle("color", "#AA") executes all of the list items are
rendered in red (#AA).

A odd thing is that if I next select one of the (now red) list items
that should be gray, then when the cb.setStyle("color", "#0B333C")
executes the list items are rendered properly (gray items are gray and
red items are red).

It seems it's only when setStyle changes the color to something other
than the default that the itemRenderer no longer has an effect. When
the color is changed back to the default, then the itemRenderer works
again.

Very strange, and very irritating :-)

Paul


--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> In theory, if your renderer picks a new font color based on a
property,
> they should be ignoring the default color always.
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of Paul Whitelock
> Sent: Tuesday, March 27, 2007 7:06 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Setting the Font Color for a Selected ComboBox
> Item 
> 
> I'm using a ComboBox with an itemRenderer to control the font color of
> items in the dropdown list (items in the dropdown list have their font
> color determined by a property value for each item).
> 
> I'd like to have the font color for the selected item in the ComboBox
> match the font color that the item has in the dropdown list. By
> default, this doesn't happen. If I do a "setStyle" on the ComboBox to
> manually set the selected item's font color to match the font color
> the item has in the list, this works to set the selected item's font
> color, but it also sets the font color for every item in the dropdown
> list (it seems to override the itemRenderer).
> 
> Is there a way that I can set the font color for a selected item in a
> ComboBox without impacting the font color (set by an itemRenderer) of
> dropdown list items?
> 
> Thanks for any tips!
> 
> Paul
>



 


RE: [flexcoders] FDS sitting behind SSL accelerator

2007-03-27 Thread Allen Riddle
We set up our environment similar to yours. We are using apache with
mod_ssl and proxypass to route requests our flex client makes over ssl
to our flex data services app. In the flex configuration, your default
channels must be the secure channels (my-secure-http, or my-secure-amf)
and you must route your requests behind the firewall over ssl. This is
because the packet itself that is being sent up by the flex client is
encrypted. There isn't much out there on this yet, as I'm sure there
will be. The kicker is, just because the swf gets served up over https,
doesn't mean that the requests being made are over ssl, pretty bad.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of box110a
Sent: Tuesday, March 27, 2007 11:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FDS sitting behind SSL accelerator

 

We're working on our production environment design and would like to
put FDS behind an SSL accelerator (H.A.) like nCipher's nFast or a
BIG-IP server. We haven't purchased any hardware yet, so a proof of
concept will require something like apache/mod_jk/mod_ssl. Has anybody
had any success doing this with FDS.

What I can't figure out is how do I set up my
data-managment-config.xml destination channels?  If my FDS server is
sitting in the DMZ talking plain text, how do I get my clients to talk
SSL if they are compiled (by FDS) if they're using the same config
files?

so It should look like this:
[client] -ssl-> [H.A. & passthrough to DMZ] -plain text-> FSD


any thoughts? 

 



Re: [flexcoders] List Control with checkbox items

2007-03-27 Thread Clint Tredway

here is a couple of ideas. (I didnt test these, but either 'should work')

1. have a function tied to the click event of the checkbox that adds that
index to the selectedItems of the list control

2. when submitting the info, loop through the list and check to see if any
check boxes are checked.

option 1 would mean you would need to change how your itemRenderer is built,
but it should work.

On 27 Mar 2007 13:02:37 -0700, Rick Root <[EMAIL PROTECTED]> wrote:


  Anyone else got any ideas here?

On 3/27/07, Rick Root <[EMAIL PROTECTED]> wrote:
>
> (wow, gmail makes it difficult to quote emails from yahoo groups!)
>
> That almost works here's my MXML:
>
>dataProvider="{parentDocument.ro.getListData.lastResult.CONTROL_CODES}"
> labelField="TABLFLD" id="lstControlCodes"
> rendererIsEditor="true" itemRenderer="mx.controls.CheckBox">
>   
> The problem here is that the checkboxes do not relate to the actual
> selected status of the items.  For example, if I click 3 different items
> without holding down the control key, all 3 items have checkboxes, but only
> one (the last) is highlighted in blue.. meaning it's the only one REALLY
> selected as far as the list control is concerned.
>
> Rick
>
>
> --
> CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
> http://www.cfmbb.org
>



--
CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
http://www.cfmbb.org

 





--
http://indeegrumpee.spaces.live.com/


Re: [flexcoders] Capturing an event in a separate component

2007-03-27 Thread Marlon Moyer

Thanks Alex.  I was able to do this only by using the code-behind technique
from labs.adobe.com, but at least it works!



On 26 Mar 2007 11:22:17 -0700, Alex Harui <[EMAIL PROTECTED]> wrote:


   Make sure you set the bubbles=true when you construct the Event
object.  The parent should be able to listen to itself and still see it.

parent.as
class ParentComponent
{
public function ParentComponent()
{
addEventListener("bubbler", bubblerEventHandler);
}
}

child3.as

class Child3
{

private function doSomething():void
{
var event:Event = new Event("bubbler", true);
dispatchEvent(event);
}
}
 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Marlon Moyer
*Sent:* Monday, March 26, 2007 9:26 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Capturing an event in a separate component

 Given this scenario:

Parent Componet
Child1
Child2 (child of Child1)
Child3 (child of Child3)

and Child3 dispatches an event, how can I make the parent see that
event without having to pass it up between each child? I've made the
event bubble, but I can't seem to make the parent see it.

I can't seem to get the syntax for the addEventListener correct. Thanks

 





--
"I walk the shore in isolation,
While at my feet eternity,
Draws ever sweeter plans for me."


[flexcoders] Re: Modules not positioning children correctly

2007-03-27 Thread Shaun
Try setting percentWidth and percentHeight to 100 in your module 
tag.  This is a known issue posted on the 2.0.1 release notes page, 
and setting percentWidth works around it.


Shaun

--- In flexcoders@yahoogroups.com, "Mark Doberenz" <[EMAIL PROTECTED]> 
wrote:
>
> Well, in case anyone else has this issue, I found a bit of a hack 
to get it
> to work.
> I just created an mxml class called CustomModule.mxml and this is 
all that's
> in it:
> 
> 
> > http://www.adobe.com/2006/mxml"; width="100%"
> > height="100%">
> > 
> 
> 
>  Now, whenever I make a new module, I just point it to the 
CustomModule
> class as the main class to use, and everything resizes/positions 
fine.  I'm
> not sure why, but I'll take it.
> 
> Just to make sure, I changed one of my modules to point to 
mx:Module again,
> and the children didn't resize/position correctly.  Setting it back 
to
> CustomModule made it all work again.
> 
> Hopefully this can help someone.
> Mark
> 
> 
> On 3/27/07, Mark Doberenz <[EMAIL PROTECTED]> wrote:
> >
> > I'm having issues with modules and I'm hoping someone can help me.
> >
> > Create a module project and layout the module using the following 
code:
> >
> > > 
> > > http://www.adobe.com/2006/mxml"; 
layout="absolute"
> > > width="100%" height="100%">
> > > 
> > > 
> > > 
> > > 
> > > 
> >
> >
> > Compile it and then create another project that is an application 
that
> > only has a ModuleLoader that points the the above module like the 
following:
> >
> >
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > layout="absolute">
> > > 
> > >  file:///PATH_TO_ABOVE_MODULE.swf
> > > 
> > > 
> > >
> >
> >
> > The module in Flex Builder will appear correctly where the tree 
controller
> > is placed at 0,66 and spans 100% x 100%.
> > However, when the module is loaded into the Application, 
everything is
> > placed correctly, but the tree seems to use a minimumWidth and 
minimumHeight
> > value instead of the 100% x 100%.
> >
> > Has anyone seen this issue before?
> >
> > Mark
> >
>




Re: [flexcoders] List Control with checkbox items

2007-03-27 Thread Rick Root

Anyone else got any ideas here?

On 3/27/07, Rick Root <[EMAIL PROTECTED]> wrote:


(wow, gmail makes it difficult to quote emails from yahoo groups!)

That almost works here's my MXML:

  
  
The problem here is that the checkboxes do not relate to the actual
selected status of the items.  For example, if I click 3 different items
without holding down the control key, all 3 items have checkboxes, but only
one (the last) is highlighted in blue.. meaning it's the only one REALLY
selected as far as the list control is concerned.

Rick


--
CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
http://www.cfmbb.org





--
CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
http://www.cfmbb.org


[flexcoders] Re: URLRequest.requestHeaders

2007-03-27 Thread Paul DeCoursey
Alright, so here is the real problem.  FileReference.upload never
shares session/cookies/headers/(all the stuff we can't set) with the
browser or other requests made from Flash.  This is a huge problem. 
How are we supposed to manage a secure server environment when the
security issues on the client tie our hands?  I have tried every trick
in the book to get this to work and frankly I don't see any compelling
reason to continue using Flex if we can't have a bit more control over
server communication.



--- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> There are restrictions on what headers can be set.  Check the docs here
> to make sure you're OK:
> http://livedocs.adobe.com/flex/201/langref/flash/net/URLRequestHeader.ht
> ml
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Paul DeCoursey
> Sent: Monday, March 26, 2007 10:12 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] URLRequest.requestHeaders
> 
> 
> 
> Has anyone used this? I am having a lot of trouble getting requests
> to actually send those headers to the server. I'm curious if anyone
> else has had experience with them. My problem is I cannot
> authenticate to our remote servers. Some of the servers use Basic
> Authentication and some use SOAP headers. I have been able to get it
> to work by getting the session id from SOAP and passing that as to the
> services that used basic. I had to turn off basic auth and just fail
> the request if there is not a valid session. Problem now is I have no
> session on this other server and need to get one created, but I cannot
> authenticate because there are no soap handlers and Flash cannot be
> basic without prompting the user. So I was looking at sending some
> authentication tokens as headers with the requests, but they are not
> arriving at the server.
> 
> Paul
>




[flexcoders] Flex Library Project??

2007-03-27 Thread Brian Holmes
Is it possible to put mxml files in a flex library project? 



***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


[flexcoders] Re: Modules not positioning children correctly

2007-03-27 Thread Mark Doberenz

Well, in case anyone else has this issue, I found a bit of a hack to get it
to work.
I just created an mxml class called CustomModule.mxml and this is all that's
in it:



http://www.adobe.com/2006/mxml"; width="100%"
height="100%">




Now, whenever I make a new module, I just point it to the CustomModule
class as the main class to use, and everything resizes/positions fine.  I'm
not sure why, but I'll take it.

Just to make sure, I changed one of my modules to point to mx:Module again,
and the children didn't resize/position correctly.  Setting it back to
CustomModule made it all work again.

Hopefully this can help someone.
Mark


On 3/27/07, Mark Doberenz <[EMAIL PROTECTED]> wrote:


I'm having issues with modules and I'm hoping someone can help me.

Create a module project and layout the module using the following code:

> 
> http://www.adobe.com/2006/mxml"; layout="absolute"
> width="100%" height="100%">
> 
> 
> 
> 
> 


Compile it and then create another project that is an application that
only has a ModuleLoader that points the the above module like the following:


> 
> http://www.adobe.com/2006/mxml";
> layout="absolute">
> 
>  file:///PATH_TO_ABOVE_MODULE.swf
> 
> 
>


The module in Flex Builder will appear correctly where the tree controller
is placed at 0,66 and spans 100% x 100%.
However, when the module is loaded into the Application, everything is
placed correctly, but the tree seems to use a minimumWidth and minimumHeight
value instead of the 100% x 100%.

Has anyone seen this issue before?

Mark



Re: [flexcoders] Re: FDS/Hibernate/MySql data update question

2007-03-27 Thread Robert Cadena
Jae,
glad to help.  I doubt there is a change event support in the jdbc 
connector, but I may be wrong.

One way you'd be able to notify your fds webapp that a change occurred 
is to expose an internal facing service (webservice,restful, jms?) to 
your other app.

For example, our searchcoders.com/flex app runs a couple of shell 
scripts to perform maintenance and email retrieval at periodic 
intervals.  I wanted to keep track of when new messages were downloaded 
from the group and indexed in a simple flex-based admin console.  so, 
when the batch script finishes dling and indexing stuff it makes a curl 
request to an internal-facing server running fds, which sends an update 
event over a transaction, just as i described in my reply.  then my 
admin client, which is already connected to the internal server fds 
instance, receives a push update.  Of course, i could have simply had 
the shell script send me an email, but, we're testing out how to work 
and integrate fds and wanted to see this sort of notification strategy 
in action.

/r
http://www.searchcoders.com/flex/?dataservicetransaction+php+net



jwp2k_uva wrote:
> Robert,
> 
> Thanks a million for pointing out DataServiceTransaction ;)  This is
> awesome.  
> 
> I wonder now whether there is a db change event support in MySql/JDBC
> connector that allows a java object to call DataServiceTranaction
> functions as you described below whenever the database of interest is
> changed regardless of who (.NET, PHP, etc.) changed it. 
> 
> You've been a great help.  Thanks, again.
> 
> - Jae 
> 
> 
> --- In flexcoders@yahoogroups.com, "robert_cadena" <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> if i understand you correctly you want to tell a flex client that a
>> change in a db row occurred, yet the change was not initiated by that
>> client and/or you're not in the middle of an assembler operation?  For
>> example, if some other non-flex related entity changed a db row you
>> want to notify the flex client.  
>>
>> If this is the case have a look at the "DataServiceTransaction" class
>> in the FDS javadocs.  You create a new transaction using that class'
>> "begin" static method.  Here's some pseudocode:
>>
>> tx = DataServiceTransaction.begin();
>> tx.updateItem("destination_name", newVersion, prevVersion, changesList);
>> tx.commit();
>>
>> This bit of code will send an update event to the clients subscribed
>> to destination.
>>
>> Keep in mind you have to be within the same webapp as the FDS.  
>>
>> Hope that helps.
>>
>> /r
>> http://www.searchcoders.com/flex/?dataservicetransaction
>>
>>
>>
>> --- In flexcoders@yahoogroups.com, "jwp2k_uva"  wrote:
>>> Dear Flexcoders,
>>>
>>> In a FDS/Hibernate/MySql setup, what happens if a data row is directly
>>> updated in the MySql database?  Is there a simple way to update the
>>> flex application with the updated data row?
>>>
>>> Thanks a million.
>>>
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
> 
> 
> 
> 


[flexcoders] Re: remoteCredentials and CFCs

2007-03-27 Thread Maury Sword
Chad,

I normally pass the username and an encrypted password in the html 
wrapper by modifying the flashvars parameter in the 
index.template.html file and set the remote credentials in the 
creationComplete handler of the Application.  This is only needed 
when the CFC is in a directory secured by CFLogin. 


 


Maury

--- In flexcoders@yahoogroups.com, "Chad Gray" <[EMAIL PROTECTED]> wrote:
>
> I posted to the Apollo forum, but this is more of a Flex question.
> 
> How would one use this setRemoteCredentials() method?  
> 
> 
http://livedocs.adobe.com/flex/201/langref/mx/rpc/remoting/RemoteObjec
t.html#setRemoteCredentials()
> 
> Do I place it in my submitJob function in the example code below?
> 
> Here is my basic code that I am passing a job number to a cfc and I 
get a result back from it.
> 
> Also how does the CFC need to be setup to even use this 
RemoteCredentials information? 
> 
> 
> 
> 
> 
> 
> http://demo.dev/flex2gateway/";> 
> 
> 
> {jobNumber.text}
> 
> 
> 
> 
> 
> 
> 
> 
> 
>




[flexcoders] Flex added to CodeFetcher.com

2007-03-27 Thread Robert Walters
Hello,

I just added a Flex category to my open source code site
www.CodeFetcher.com

Would love if we can get a good group of Flex programmers involved.

Thanks.Rob



[flexcoders] Re: FDS/Hibernate/MySql data update question

2007-03-27 Thread jwp2k_uva
Robert,

Thanks a million for pointing out DataServiceTransaction ;)  This is
awesome.  

I wonder now whether there is a db change event support in MySql/JDBC
connector that allows a java object to call DataServiceTranaction
functions as you described below whenever the database of interest is
changed regardless of who (.NET, PHP, etc.) changed it. 

You've been a great help.  Thanks, again.

- Jae 


--- In flexcoders@yahoogroups.com, "robert_cadena" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> if i understand you correctly you want to tell a flex client that a
> change in a db row occurred, yet the change was not initiated by that
> client and/or you're not in the middle of an assembler operation?  For
> example, if some other non-flex related entity changed a db row you
> want to notify the flex client.  
> 
> If this is the case have a look at the "DataServiceTransaction" class
> in the FDS javadocs.  You create a new transaction using that class'
> "begin" static method.  Here's some pseudocode:
> 
> tx = DataServiceTransaction.begin();
> tx.updateItem("destination_name", newVersion, prevVersion, changesList);
> tx.commit();
> 
> This bit of code will send an update event to the clients subscribed
> to destination.
> 
> Keep in mind you have to be within the same webapp as the FDS.  
> 
> Hope that helps.
> 
> /r
> http://www.searchcoders.com/flex/?dataservicetransaction
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "jwp2k_uva"  wrote:
> >
> > Dear Flexcoders,
> > 
> > In a FDS/Hibernate/MySql setup, what happens if a data row is directly
> > updated in the MySql database?  Is there a simple way to update the
> > flex application with the updated data row?
> > 
> > Thanks a million.
> >
>




[flexcoders] Re: Need help with a dataGrid itemRollOver

2007-03-27 Thread Mark
Sorry, got it... 

I used listEvent and got it to work.

Thanks


public function rollOverCtry(evt:ListEvent):void {
   trace(evt.itemRenderer.data.name);
}




--- In flexcoders@yahoogroups.com, "Mark" <[EMAIL PROTECTED]> wrote:
>
> I'm afraid I still don't understand what needs to be done --
> 
>  dataProvider="{countryAndCount}" itemRollOver="itemRollOverFunction
> (event)">
> 
> 
> public function rollOverCtry(evt:Event):void {
>trace(evt);
> }
> 
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "Alex Harui"  wrote:
> >
> > For the column with dataField="name", when an itemRollOver 
occurs, 
> the
> > event.itemRenderer.data.name should be the value.
> >  
> > -Alex
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of Mark
> > Sent: Tuesday, March 27, 2007 7:40 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Need help with a dataGrid itemRollOver
> > 
> > 
> > 
> > I need to display a different image for each value in the 
> dataGrid. 
> > I'm trying to use the itemRollOver but for some reason I'm 
having 
> a 
> > hard time getting the value of the "name" column in the 
function. 
> Can 
> > someone help? I didn't post my function because I'm just trying 
to 
> > trace the value from the name column and I can't get it to work. 
> If I 
> > can get that value I'm confident I can get the image to work the 
> way I 
> > need it.
> > 
> > Thanks
> > 
> >  > dataProvider="{countryAndCount}" 
itemRollOver="itemRollOverFunction
> > (Event);>
> > 
> > 
> > 
> > 
> > 
> >
>




[flexcoders] Re: Need help with a dataGrid itemRollOver

2007-03-27 Thread Mark
I'm afraid I still don't understand what needs to be done --




public function rollOverCtry(evt:Event):void {
   trace(evt);
}






--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> For the column with dataField="name", when an itemRollOver occurs, 
the
> event.itemRenderer.data.name should be the value.
>  
> -Alex
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Mark
> Sent: Tuesday, March 27, 2007 7:40 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Need help with a dataGrid itemRollOver
> 
> 
> 
> I need to display a different image for each value in the 
dataGrid. 
> I'm trying to use the itemRollOver but for some reason I'm having 
a 
> hard time getting the value of the "name" column in the function. 
Can 
> someone help? I didn't post my function because I'm just trying to 
> trace the value from the name column and I can't get it to work. 
If I 
> can get that value I'm confident I can get the image to work the 
way I 
> need it.
> 
> Thanks
> 
>  dataProvider="{countryAndCount}" itemRollOver="itemRollOverFunction
> (Event);>
> 
> 
> 
> 
> 
>




[flexcoders] Re:

2007-03-27 Thread craig.drabik
--- In flexcoders@yahoogroups.com, "flexjeremy" <[EMAIL PROTECTED]> wrote:
>One last thing if I
> were getting a value out of the database is there a way to say that
> item is selected? 

I've written a class that allows you to data-bind a combo similar to
how you bind a text field..  You set the valueField propertie on an
instance of this component to the field in the dataProvider that
you're using as the "data" or key field, then you bind the
bindableValue property to your dataModel in both directions.  

So, saw you have a form that you're using to track customer's
addresses, and this form is backed by a  customerAddress object with
properties like "city", "state", and "zipCode".  You also have an
ArrayCollection with state names and abbreviations - states.stateName
and states.stateCode..  You would set the combo's dataProvider to
states, and it's labelField to stateName.  For the custom properties,
you set the valueField property to stateCode, and then two-way bind
the bindableValue property to customerAddress.state.

Any time the user selects a new state from the combo, the component
will update the bindableValue property with the corresponding
valueField value - data binding changes it in your model.  When the
model changes programmatically, eg from the result of a remoting call,
data binding will update bindableValue from the model..  The
propertyChange event is issued and caught by the component, and it
calls code exactly like what's been posted to locate the item with the
corresponding key.

Code:



http://www.adobe.com/2006/mxml";
change="onChange(event)" creationComplete="setup()">







RE: [flexcoders] remoteCredentials and CFCs

2007-03-27 Thread Peter Farland
ColdFusion's adapter(s) that plug in to FDS's Remoting Service take
those remote credentials and make them available to a CFC or CFM via the
CFLOGIN scope.
 
There appear to be a few blog postings about this too.
 
http://www.google.com/search?q=CFLOGIN+Flex+setRemoteCredentials
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Chad Gray
Sent: Tuesday, March 27, 2007 12:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] remoteCredentials and CFCs



I posted to the Apollo forum, but this is more of a Flex question.

How would one use this setRemoteCredentials() method? 

http://livedocs.adobe.com/flex/201/langref/mx/rpc/remoting/RemoteObject.
html#setRemoteCredentials
 ()

Do I place it in my submitJob function in the example code below?

Here is my basic code that I am passing a job number to a cfc and I get
a result back from it.

Also how does the CFC need to be setup to even use this
RemoteCredentials information? 





http://demo.dev/flex2gateway/
 "> 


{jobNumber.text}












 


Re: [flexcoders] Re: IoC framework for Action Script

2007-03-27 Thread Carlos Rovira

An IoC flex solution would really useful. The possibilities to inyect code
at runtime and configure your application by xml joined with the code
reduction acomplised with reflexion would be the next step...maybe the next
iteration for frameworks like Cairngorm?. Hope so ;).

27 Mar 2007 10:00:54 -0700, Matt Chotin <[EMAIL PROTECTED]>:


   Not that I'm aware of.

Matt

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *jwp2k_uva
*Sent:* Tuesday, March 27, 2007 12:46 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: IoC framework for Action Script

 Matt, Adobe, et al.

Has there been any progress in the area of IoC for ActionScript?

- Jae


--- In flexcoders@yahoogroups.com , Matt
Chotin <[EMAIL PROTECTED]> wrote:
>
> For those unfamiliar with the terms IoC and Dependency Injection (like
> myself) Martin Fowler writes it up here:
> http://www.martinfowler.com/articles/injection.html
>  .
>
>
>
> I don't know of a framework in AS right now that does anything like
this.
> Cairngorm does provide the concept of a ServiceLocator and I think
would be
> the right place to add this kind of framework as well.
>
>
>
> If you're interested in contributing this sort of thing you should let
> Steven and the rest of the advisory board know :-)
>
>
>
> Matt
>
>
>
> _
>
> From: David Solis [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 23, 2005 9:06 AM
> To: flexcoders@yahoogroups.com 
> Subject: [flexcoders] IoC framework
>
>
>
>
> Is there an IoC (aka Dependency Injection) framework for ActionScript?
>
> Regards
>
> D.
>
>
>
>
>
>
>
> _
>
> Yahoo! Groups Links
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
> 
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> 

>
> * Your use of Yahoo! Groups is subject to the Yahoo!
>  Terms of Service.
>

 





--
::| Carlos Rovira
::| http://www.carlosrovira.com
::| http://www.madeinflex.com


Re: [flexcoders]Databinding two way

2007-03-27 Thread dorkie dork from dorktown

seemed to easy to be true but this works.

   
   

On 3/27/07, dorkie dork from dorktown <[EMAIL PROTECTED]>
wrote:


I have a textarea that is bound to a datagrid. It is actually bound to the
selectedItem. Whenever a user clicks a row in the datagrid the text from
selectedItem.description is displayed in the textarea. What I can't figure
out is how to bind the text in the textarea back to that property.

Usage Scenario,
The user clicks a row in the datagrid and the textarea is populated with
the datagrid.selectedItem.description value. The user then types into the
textarea and adds text to it. This value is populated back to the
datagrid.selectedItem.description property.





[flexcoders] Pre-announcing the new Flex.org

2007-03-27 Thread Mike Potter
I'm happy to announce that we've redesigned the existing Flex.org site, and I'd 
like your 
feedback on it before we push it live.

The site can be accessed online at http://www.flex.org/beta/  

The final URL for the site will be http://www.flex.org/

I'm hoping to push it live sometime next week.

The site is designed to be the website for developers who are looking to get 
started with Flex 
by highlighting all the community activities going on with Flex, as well as 
official Adobe 
resources.  If you feel that I've missed something that should be highlighted, 
please let me 
know by email ([EMAIL PROTECTED]). 

In particular, I'm looking for more applications to add to the Flex Showcase 
page, at http://
www.flex.org/beta/showcase/  If you know of any Flex based applications that 
are public, 
please forward them to me by tagging them on del.icio.us with the "flex.org" 
tag.

Thanks,

Mike



[flexcoders] FDS sitting behind SSL accelerator

2007-03-27 Thread box110a
We're working on our production environment design and would like to
put FDS behind an SSL accelerator (H.A.) like nCipher's nFast or a
BIG-IP server. We haven't purchased any hardware yet, so a proof of
concept will require something like apache/mod_jk/mod_ssl. Has anybody
had any success doing this with FDS.

What I can't figure out is how do I set up my
data-managment-config.xml destination channels?  If my FDS server is
sitting in the DMZ talking plain text, how do I get my clients to talk
SSL if they are compiled (by FDS) if they're using the same config
files?

so It should look like this:
[client] -ssl-> [H.A. & passthrough to DMZ] -plain text-> FSD


any thoughts?


RE: [flexcoders] Re: IoC framework for Action Script

2007-03-27 Thread Matt Chotin
Not that I'm aware of.
 
Matt



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jwp2k_uva
Sent: Tuesday, March 27, 2007 12:46 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: IoC framework for Action Script



Matt, Adobe, et al.

Has there been any progress in the area of IoC for ActionScript?

- Jae 


--- In flexcoders@yahoogroups.com 
, Matt Chotin <[EMAIL PROTECTED]> wrote:
>
> For those unfamiliar with the terms IoC and Dependency Injection (like
> myself) Martin Fowler writes it up here:
> http://www.martinfowler.com/articles/injection.html
 
>  > .
> 
> 
> 
> I don't know of a framework in AS right now that does anything like
this.
> Cairngorm does provide the concept of a ServiceLocator and I think
would be
> the right place to add this kind of framework as well.
> 
> 
> 
> If you're interested in contributing this sort of thing you should let
> Steven and the rest of the advisory board know :-)
> 
> 
> 
> Matt
> 
> 
> 
> _ 
> 
> From: David Solis [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 23, 2005 9:06 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] IoC framework
> 
> 
> 
> 
> Is there an IoC (aka Dependency Injection) framework for ActionScript?
> 
> Regards
> 
> D.
> 
> 
> 
> 
> 
> 
> 
> _ 
> 
> Yahoo! Groups Links
> 
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
 
>  > 
> 
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
 
>  ?subject=Unsubscribe> 
> 
> * Your use of Yahoo! Groups is subject to the Yahoo!
> 
> Terms of Service.
>



 


[flexcoders] remoteCredentials and CFCs

2007-03-27 Thread Chad Gray
I posted to the Apollo forum, but this is more of a Flex question.

How would one use this setRemoteCredentials() method?  

http://livedocs.adobe.com/flex/201/langref/mx/rpc/remoting/RemoteObject.html#setRemoteCredentials()

Do I place it in my submitJob function in the example code below?

Here is my basic code that I am passing a job number to a cfc and I get a 
result back from it.

Also how does the CFC need to be setup to even use this RemoteCredentials 
information? 






http://demo.dev/flex2gateway/";> 


{jobNumber.text}












[flexcoders] Re: Correct way to load Flex SWF IF correct player version?

2007-03-27 Thread wdsnapper
FYI, Javascript is a non-starter for us.  Sites like myspace block
script tags so the best tool we have would be an embed or object tag
and have a swf that can do what we need.

Have any of you deployed a Flex application that can be embedded in
other web pages that you do not own that do not allow anything but
embed or object tags (i.e. myspace for example)?

Believe me, I wish this were baked into the Flash player from day one
where there was a way to specify a minimum version number and the
player "did the rest and prompted for the user to update".

Thanks again.



--- In flexcoders@yahoogroups.com, Tom Chiverton <[EMAIL PROTECTED]>
wrote:
>
> On Tuesday 27 Mar 2007, wdsnapper wrote:
> > b) detect that the player needs to be upgraded to 9+ and prompt the
> > user to update.
> 
> I think you need 8 or 9 to do that.
> 
> -- 
> Tom Chiverton
> Helping to simultaneously negotiate wireless convergence
> on: http://thefalken.livejournal.com
> 
> 
> 
> This email is sent for and on behalf of Halliwells LLP.
> 
> Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2 2JF.
 A list of members is available for inspection at the registered
office. Any reference to a partner in relation to Halliwells LLP means
a member of Halliwells LLP. Regulated by the Law Society.
> 
> CONFIDENTIALITY
> 
> This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 8008.
> 
> For more information about Halliwells LLP visit www.halliwells.com.
>




Re: [flexcoders] Re: Flex 2, AMFPHP and charset

2007-03-27 Thread Rafael Guédez

Thanks Ryan,


I tried with varchar and text datatype and I got the same problem.


For example: the char "á" look fine in the flex application, but in  
the database is "á"



And my php class is like the old amfphp 1.2 without the method table.  
If I use the same flex application with AMFPHP 1.9 and the AMF0  
remotingconnection package work fine and save the correct chars in  
the DB. I'm using this old way for now,



like this:

http://www.adobe.com/devnet/flex/articles/flex2_amfphp_03.html



regards

Rafael



On Mar 27, 2007, at 11:01 AM, RadicalByte wrote:


--- In flexcoders@yahoogroups.com, Rafael Guédez <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
>
> I really don't know what to do, I'm using in the gateway:
>
>
> $gateway->setCharsetHandler( "none", "ISO-8859-1", "ISO-8859-1" );
>
>
> And running the application in the browser all the data look fine,
> but in the database this really write weird characters for special
> chars, and I need this data to see it in a normal flash web site.
>
>
> I don't know if this is a unsolved problem in this beta version. Any
> idea?
>
>
> Flex 2, AMFPHP 1.9, MySQL 4.0.26 and PHP 5.0.4
>
>
> regards
>
>
> Rafael
>

Hi Rafael,

What datatype are the fields in your DB?

How're you handling the characters in PHP (as it doesn't support  
unicode).


Cheers,
Ryan







RE: [flexcoders] Flex Builder

2007-03-27 Thread Brian Holmes
I use the plugin as well for the same reason as Clint.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of John Barrett
Sent: Tuesday, March 27, 2007 6:27 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Builder

 

Hi,
I have a question. I am just about to get Flex Builder, and i am
wondering which is the best option the stand alone or the eclipse plug
in?
I do not use eclipse that much, well sometimes but I usually use
dremweaver for ColdFusion. I like cfeclipse, I think that I am just too
used to dreamweaver.

Can I ask which version do you use? Is there a preference? I will manly
using eclipse only for flex, as I do now,and space on my machine is no
isse, and so If I have to install and extra eclipse  is no worries for
me.

Thanks,
John

 


  
   

 

 



Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo!
Games. 
 



***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


[flexcoders] Re: Setting the Font Color for a Selected ComboBox Item

2007-03-27 Thread Paul Whitelock
Yes, that's what I would have thought too :-)

On the ComboBox close event this is all I'm doing:

if (cb.selectedItem.status == "a") cb.setStyle("color", "#0B333C");
else cb.setStyle("color", "#AA");   

If I select an item in the list that has the color #0B333C (the
default dark gray font color for list items), then everything is fine
(the #AA items in the list stay red and the #0B333C items in the
list stay gray).

If I select a list item that has the red color, then when the
setStyle("color", "#AA") executes all of the list items are
rendered in red (#AA).

A odd thing is that if I next select one of the (now red) list items
that should be gray, then when the cb.setStyle("color", "#0B333C")
executes the list items are rendered properly (gray items are gray and
red items are red).

It seems it's only when setStyle changes the color to something other
than the default that the itemRenderer no longer has an effect. When
the color is changed back to the default, then the itemRenderer works
again.

Very strange, and very irritating :-)

Paul


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> In theory, if your renderer picks a new font color based on a property,
> they should be ignoring the default color always.
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Paul Whitelock
> Sent: Tuesday, March 27, 2007 7:06 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Setting the Font Color for a Selected ComboBox
> Item 
> 
> I'm using a ComboBox with an itemRenderer to control the font color of
> items in the dropdown list (items in the dropdown list have their font
> color determined by a property value for each item).
> 
> I'd like to have the font color for the selected item in the ComboBox
> match the font color that the item has in the dropdown list. By
> default, this doesn't happen. If I do a "setStyle" on the ComboBox to
> manually set the selected item's font color to match the font color
> the item has in the list, this works to set the selected item's font
> color, but it also sets the font color for every item in the dropdown
> list (it seems to override the itemRenderer).
> 
> Is there a way that I can set the font color for a selected item in a
> ComboBox without impacting the font color (set by an itemRenderer) of
> dropdown list items?
> 
> Thanks for any tips!
> 
> Paul
>




[flexcoders]Databinding two way

2007-03-27 Thread dorkie dork from dorktown

I have a textarea that is bound to a datagrid. It is actually bound to the
selectedItem. Whenever a user clicks a row in the datagrid the text from
selectedItem.description is displayed in the textarea. What I can't figure
out is how to bind the text in the textarea back to that property.

Usage Scenario,
The user clicks a row in the datagrid and the textarea is populated with the
datagrid.selectedItem.description value. The user then types into the
textarea and adds text to it. This value is populated back to the
datagrid.selectedItem.description property.


Re: [flexcoders] List Control with checkbox items

2007-03-27 Thread Rick Root

(wow, gmail makes it difficult to quote emails from yahoo groups!)

That almost works here's my MXML:

 
 
The problem here is that the checkboxes do not relate to the actual selected
status of the items.  For example, if I click 3 different items without
holding down the control key, all 3 items have checkboxes, but only one (the
last) is highlighted in blue.. meaning it's the only one REALLY selected as
far as the list control is concerned.

Rick


--
CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
http://www.cfmbb.org


Re: [flexcoders] Hi

2007-03-27 Thread Tom Chiverton
On Tuesday 27 Mar 2007, eshpaleti wrote:
>   can somebody tell me the flow of Flex Application and when to write
> the code in MXML and when to write in normal XML .

MXML is a dialect of XML that the Flex compiler can turn into a SWF flash 
file.
But I'm not sure what you are asking ?

-- 
Tom Chiverton
Helping to enthusiastically lead second-generation architectures
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[flexcoders] Re: event creation

2007-03-27 Thread JWOpitz
Also you need to override the clone method.

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Define a new class that extends flash.events.Event and call
> dispatchEvent.  Other code calls addEventListener to listen to it.
> Check out the docs
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of rikencpatel_2005
> Sent: Tuesday, March 27, 2007 5:22 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] event creation
> 
> 
> 
> how can i create my own event and assign a handler function for that 
> event?
>




RE: [flexcoders] Sorting Datagrid column headers

2007-03-27 Thread Alex Harui
You probably have to get children() from the XML and create your own
array of DataGridColumns at runtime.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jason vancleave
Sent: Tuesday, March 27, 2007 1:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sorting Datagrid column headers



I am using a DataGrid with a dataprovider of xml. This is working 
fine with the exception of the column headers being ordered 
alphabetically instead of copying the XML structure.

The DataGrid would format the following xml with column headers in 
the order of
disabled, id, media, ordernumber, title

The docs in DataGrid.columns talks about a way to "explictly set" 
this but I can't find a good example. I am thinking maybe there is an 
easier way to sort the data higher up the chain.

Thanks,
Jason





1
0
HomeContent
0
AVLibrary2.swf


2
0
HomeContent
1
reelcutweb.jpg


3
0
HomeContent
2
OMARBONELESSAD.jpg






 


  1   2   >