RE: [flexcoders] Need to render rows in a heterogeneous mx:List differently based on each row's item data Type

2009-02-03 Thread Gregor Kiddie
The Advanced Data Grid has the concept of Renderer Providers which is
pretty much what you are looking for, but the standard list control I
don't think can handle this gracefully.

So... a single column ADG? (Though I'd shoot one of our developers is
they suggested that ;) )

I'm not sure even suggesting overriding some of the more esoteric
functions in the List will help as the recycling is almost certain to
stuff you up!

 

So no, this can't be done simply in a List control.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Thomas, Erik
Sent: 02 February 2009 21:06
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Need to render rows in a heterogeneous mx:List
differently based on each row's item data Type

 

Does anyone have a code sample of how I can supply a different
itemRenderer to a List based on the data Type of the item in any given
row?

 

I have a heterogeneous collection of Types in an ArrayCollection
(Property Sheet or User Preferences list) and want to render each row
differently based on the data Type of the row item.

 

For those of you familiar with MS WPF, it includes the notion of
something called a DataTemplate which is essentially an Item Renderer
that is used by the framework to render a particular data Type in a
heterogeneous collection or on a form. I'd like to do the same thing in
Flex within a List.

 

Is there such a notion in Flex? Can it be done simply?

 

I've tried implementing a Factory pattern where I supply a single
itemRenderer (VBox) class to the List component which is an ActionScript
class that simply overrides the data setter, and tests the Type of the
data property (the row item type) and if it's a certain Type it
instantiates or replaces a child container that properly renders the
data based on its Type. This is not a simple pattern to follow or
communicate. I'd like to find a simpler way.

 

I've also tried using a single renderer with multiple top level
components that use data binding to dynamically set includeInLayout
and visible so only one of the top level components will render. This
works, but the performance on a large list is abysmal in our ad hoc
tests. Simple renderers not using includeInLayout were much faster.

 

I've also tried using States to determine which part of the mxml to
render based on the Type, but the pattern is just too complicated and
too verbose.

 

I'm in search of the cleanest possible pattern to recreate what you get
out of the box with WPF, as I am sure someone at Adobe thought of this
(it's an amazingly common use case), but it's just a matter of my
learning how to do this.

 

Thanks for your suggestions!

 

Erik

 

Erik Thomas | Small Business Group, Intuit | Staff Engineer |
650-944-2602

 

 



Re: [flexcoders] Are flex events really thread safe?

2009-02-03 Thread Paul Andrews
- Original Message - 
From: Shyam shyammohan.sugat...@devicedriven.com
To: flexcoders@yahoogroups.com
Sent: Tuesday, February 03, 2009 10:29 AM
Subject: [flexcoders] Are flex events really thread safe?


 Consider this scenario.


 i have issued some 5 network calls form the flex client and my
 complete event Handler is one and the same for all these http calls.

 can i be 100% sure that two simultaneous controls will never execute
 the code in my event Handler ?

The flash player only has one thread of execution.

 Putting it another way: how does flex handles event synchronization?

 i have read up Ted Patrics article on the Elastic Racetrack
 (http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.php)
 but couldnt figure out the answer for the above :(

 Regards
 Shyam



[flexcoders] Re: Are flex events really thread safe?

2009-02-03 Thread Shyam
so if i write a lengthy (time consuming) operation in my event handler
i will delay flex from calling the listener even if the other network
operations completehmmm 

Thanks Paul. 



--- In flexcoders@yahoogroups.com, Paul Andrews p...@... wrote:

 - Original Message - 
 From: Shyam shyammohan.sugat...@...
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, February 03, 2009 10:29 AM
 Subject: [flexcoders] Are flex events really thread safe?
 
 
  Consider this scenario.
 
 
  i have issued some 5 network calls form the flex client and my
  complete event Handler is one and the same for all these http calls.
 
  can i be 100% sure that two simultaneous controls will never execute
  the code in my event Handler ?
 
 The flash player only has one thread of execution.
 
  Putting it another way: how does flex handles event synchronization?
 
  i have read up Ted Patrics article on the Elastic Racetrack
 
(http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.php)
  but couldnt figure out the answer for the above :(
 
  Regards
  Shyam





[flexcoders] Can PopUpMenuButton have scrollbars??

2009-02-03 Thread roopal_oswal
Hi All,

I am using PopUpMenuButton to get a dropdown menu which in turn has 
submenus. But the number of items i have in the dropdown are more.
The menu items are running out of screen. Is there any way to get 
scrollbars ?? (It doesn't support scrollbar i believe). Is there any 
dropdown tool which supports both scrollbars and submenus??

Thanks in advance,
Roopal



Re: [flexcoders] Re: Are flex events really thread safe?

2009-02-03 Thread Sam Lai
Yep. I had a similar situation - in the end, I had to rewrite the
lengthy processing code to split the task up and process a couple of
items per frame, hooking into the ENTER_FRAME event. That kept the UI
responsive, which was my main concern.

2009/2/3 Shyam shyammohan.sugat...@devicedriven.com:
 so if i write a lengthy (time consuming) operation in my event handler
 i will delay flex from calling the listener even if the other network
 operations completehmmm

 Thanks Paul.



 --- In flexcoders@yahoogroups.com, Paul Andrews p...@... wrote:

 - Original Message -
 From: Shyam shyammohan.sugat...@...
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, February 03, 2009 10:29 AM
 Subject: [flexcoders] Are flex events really thread safe?


  Consider this scenario.
 
 
  i have issued some 5 network calls form the flex client and my
  complete event Handler is one and the same for all these http calls.
 
  can i be 100% sure that two simultaneous controls will never execute
  the code in my event Handler ?

 The flash player only has one thread of execution.

  Putting it another way: how does flex handles event synchronization?
 
  i have read up Ted Patrics article on the Elastic Racetrack
 
 (http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.php)
  but couldnt figure out the answer for the above :(
 
  Regards
  Shyam




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






RE: [flexcoders] Can PopUpMenuButton have scrollbars??

2009-02-03 Thread Yves Riel
FlexLib contains a scrollable popup menu and popup menu button. Take a
look. However, there are some issues that we had to correct to get it
working the way we wanted. Maybe it will work out-of-the-box for you.
 
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=135885/stime=1233662739/nc1=4507179/nc2=3848642/nc3=5579902
http://code.google.com/p/flexlib/

 


RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Wally Kolcz
Ok, I tried both approaches and they gave me this.

loginResult 
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  columnList xmlns=http://www.newatlanta.com/bluedragon;
stringuniqname/string
stringrole/string
stringfirstName/string
stringlastName/string
  /columnList
  data xmlns=http://www.newatlanta.com/bluedragon;
ArrayOfAnyType
  anyType xsi:type=xsd:stringwkolcz/anyType
  anyType xsi:type=xsd:stringadmin/anyType
  anyType xsi:type=xsd:stringWally/anyType
  anyType xsi:type=xsd:stringKolcz/anyType
/ArrayOfAnyType
  /data
/loginResult


From: Tracy Spratt tspr...@lariatinc.com
Sent: Monday, February 02, 2009 1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help 

Yes, darn it,  missed that, 
Ryan is correct, there will a namespace problem. You can define a default 
namespace,
and not have to use the prefix in all of the expressions. default xml namespace 
=   
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security
;But you will still need to get the
expression right.  Look close at your expression and at your xml. 

Tracy Spratt 
 Lariat Services  

Flex development bandwidth available  

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Ryan Graham
Sent: Monday, February 02, 2009
4:01 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help   Looks like you're having namespace issues. The default
namespace is 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;,
so you need to use this when drilling down.   Something like:   var 
ns:Namespace = new 
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;);
 trace(xmlResult.ns::loginResult.toXMLString());   You can do this for all 
nodes with a namespace defined.   HTH,  Ryan   From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com]
On Behalf Of Wally Kolcz
Sent: Monday, February 02, 2009
1:42 PM
To:flexcoders@yahoogroups.com
Subject: re: [flexcoders] XML
walkdown Help   

Here is a more accurate output on the Blue Dragon server: 

loginResponse 
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  loginResult

columnList xmlns=http://www.newatlanta.com/bluedragon;

  stringuniqname/string

  stringrole/string

  stringfirstName/string

  stringlastName/string

/columnList

data xmlns=http://www.newatlanta.com/bluedragon;

  ArrayOfAnyType

anyType
xsi:type=xsd:stringwkolcz/anyType

anyType
xsi:type=xsd:stringadmin/anyType

anyType
xsi:type=xsd:stringWally/anyType

anyType
xsi:type=xsd:stringKolcz/anyType

  /ArrayOfAnyType

/data

  /loginResult

/loginResponse

I tried var xmlResult:XML = XML(e.result);
which gives me the above.
var xlColumns:XMLList = xmlResult.loginResponse;
which comes up blank. 

 From : Wally Kolcz
wko...@isavepets.com
Sent: Monday, February 02, 2009
11:08 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XML walkdown
Help 

I am
getting a weird return from Blue Dragon's CFC wsdl as my e.result. I need to
set this to 2 local XMLList variables but am having a devil of a time walking
down this path to the core nodes. Any ideas on how to make this usable?

Tracy has been
trying to help me, but this return item is impossible to work with. I tried
xmlColumns = loginReponse.loginReturn.columnList.columnList but
it doesn't work. Neither does the same for data.

Here is the result that is returned from Blue
Dragon:

ns1:loginResponse 
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:ns1=http://security.umich.edu.prmcprojects;
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

  loginReturn xsi:type=ns2:QueryBean
xmlns:ns2=http://rpc.xml.coldfusion;

columnList soapenc:arrayType=xsd:string[8]
xsi:type=soapenc:Array 
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;

  columnList xsi:type=xsd:string

UNIQNAME

  /columnList

  columnList
xsi:type=xsd:string

PASSWORD

  /columnList

  columnList
xsi:type=xsd:string

LASTNAME

  /columnList

  columnList
xsi:type=xsd:string

FIRSTNAME

  /columnList

  columnList
xsi:type=xsd:string

POSITION

  /columnList

  columnList
xsi:type=xsd:string

DEPARTMENT

  /columnList

  

[flexcoders] Sanbox Violation in Flex Application - Not in Actionscript Only Project

2009-02-03 Thread mrjasonroy
Has anyone ever noticed flex applications being more strict with it's
security settings asctionscript only or flash compiled applications?

I have a flex project where I am loading a player from brightcove.  I
have set my crossdomain policy files up, but I am getting sandbox
violations when trying to do certain things with the player.  To
debug, I built a flex app where nothing but the player was downloaded,
and added to a UIComponent.  I call Security.allowDomain(*) and
Security.allowInsecureDomain(*), and our crossdomain policy file
pretty much allows everything.  Here's the flex version:

http://externalreview.comparenetworks.com/cnpg/bcdebug/brightcovedebug.html

If you try to e-mail to a friend, you can't focus on the fields.  If
you remote debug this, you'll notice there are multiple security
violations.  There are no errors when debugging locally.

I copied the code exactly over to an AS project (with an adjustment
for the constructor name) and there are no security errors, and
everything works:

http://externalreview.comparenetworks.com/cnpg/bcdebugas/brightcovedebugas.html

Does anyone know what is going on that is specific to a flex project?
 How do I get around it?

Thanks!

Jason




RE: [flexcoders] Need to render rows in a heterogeneous mx:List differently based on each row's item data Type

2009-02-03 Thread Tracy Spratt
Your single renderer can show entirely different components based on the
data.  I built a Property Explorer this way, which, depending on
metadata in the dataProvider displayed a checkBox, TextInput, ComboBox,
RichTextEditor, etc.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Gregor Kiddie
Sent: Tuesday, February 03, 2009 3:15 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Need to render rows in a heterogeneous mx:List
differently based on each row's item data Type

 

The Advanced Data Grid has the concept of Renderer Providers which is
pretty much what you are looking for, but the standard list control I
don't think can handle this gracefully.

So... a single column ADG? (Though I'd shoot one of our developers is
they suggested that ;) )

I'm not sure even suggesting overriding some of the more esoteric
functions in the List will help as the recycling is almost certain to
stuff you up!

 

So no, this can't be done simply in a List control.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Thomas, Erik
Sent: 02 February 2009 21:06
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Need to render rows in a heterogeneous mx:List
differently based on each row's item data Type

 

Does anyone have a code sample of how I can supply a different
itemRenderer to a List based on the data Type of the item in any given
row?

 

I have a heterogeneous collection of Types in an ArrayCollection
(Property Sheet or User Preferences list) and want to render each row
differently based on the data Type of the row item.

 

For those of you familiar with MS WPF, it includes the notion of
something called a DataTemplate which is essentially an Item Renderer
that is used by the framework to render a particular data Type in a
heterogeneous collection or on a form. I'd like to do the same thing in
Flex within a List.

 

Is there such a notion in Flex? Can it be done simply?

 

I've tried implementing a Factory pattern where I supply a single
itemRenderer (VBox) class to the List component which is an ActionScript
class that simply overrides the data setter, and tests the Type of the
data property (the row item type) and if it's a certain Type it
instantiates or replaces a child container that properly renders the
data based on its Type. This is not a simple pattern to follow or
communicate. I'd like to find a simpler way.

 

I've also tried using a single renderer with multiple top level
components that use data binding to dynamically set includeInLayout
and visible so only one of the top level components will render. This
works, but the performance on a large list is abysmal in our ad hoc
tests. Simple renderers not using includeInLayout were much faster.

 

I've also tried using States to determine which part of the mxml to
render based on the Type, but the pattern is just too complicated and
too verbose.

 

I'm in search of the cleanest possible pattern to recreate what you get
out of the box with WPF, as I am sure someone at Adobe thought of this
(it's an amazingly common use case), but it's just a matter of my
learning how to do this.

 

Thanks for your suggestions!

 

Erik

 

Erik Thomas | Small Business Group, Intuit | Staff Engineer |
650-944-2602

 

 



RE: [flexcoders] Re: Are flex events really thread safe?

2009-02-03 Thread Tracy Spratt
Yes.  If you write a lengthy process anywhere in Flex,  it must finish
before any of *your* other code will run.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Shyam
Sent: Tuesday, February 03, 2009 6:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Are flex events really thread safe?

 

so if i write a lengthy (time consuming) operation in my event handler
i will delay flex from calling the listener even if the other network
operations completehmmm 

Thanks Paul. 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Paul Andrews p...@... wrote:

 - Original Message - 
 From: Shyam shyammohan.sugat...@...
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

 Sent: Tuesday, February 03, 2009 10:29 AM
 Subject: [flexcoders] Are flex events really thread safe?
 
 
  Consider this scenario.
 
 
  i have issued some 5 network calls form the flex client and my
  complete event Handler is one and the same for all these http calls.
 
  can i be 100% sure that two simultaneous controls will never execute
  the code in my event Handler ?
 
 The flash player only has one thread of execution.
 
  Putting it another way: how does flex handles event synchronization?
 
  i have read up Ted Patrics article on the Elastic Racetrack
 
(http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.p
hp
http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.p
hp )
  but couldnt figure out the answer for the above :(
 
  Regards
  Shyam


 



[flexcoders] AIR navigateToUrl problem

2009-02-03 Thread martinruiz87
Hi all,
I am having a problem trying to dispatch a new web request with the
navigateToUrl method.
If I put an url with the http protocol I have no problem, but if I try
to do the same with a custom protocol (like for example mylink://) I
get a security sandbox violation.
I understand that using AIR i don't have a domain with a sandbox, so I
can't use something like allowDomain (suggested by the same error
message), but I really need to be able to access my custom protocol
handler from an AIR application.

Thanks!
Martin



RE: [flexcoders] RERENDER - Need help on Nested AdvancedDataGrid as renderer on AdvancedDataGrid.

2009-02-03 Thread Tracy Spratt
What problem are you having?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Monali Gandhi
Sent: Tuesday, February 03, 2009 12:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RERENDER - Need help on Nested AdvancedDataGrid as
renderer on AdvancedDataGrid.

 

 

Hi,

Need help on Nested AdvancedDataGrid as renderer on AdvancedDataGrid.

Nested AdvancedDataGrid  also have its own renderer as nested
AdvancedDataGrid.

with scroll on all AdvancedDataGrid working on renderer too.


Kindly help,

Best Regards,
Monali

 

 

 



[flexcoders] Re: Are flex events really thread safe?

2009-02-03 Thread mmormando
No, there is no way to my knowledge that you could tell which response
object would be actually correspond to which particular call, that
would require a synchronous response and even IE 6 should be allowing
you to execute up to 2 simultaneous calls. You probably should be
using separate response methods. Actually I've never heard that the
events in flex are supposed to be thread safe...only that they are
asynchronous so they allow us to fake faster response and LOOK like
things are multi-threaded.

--- In flexcoders@yahoogroups.com, Shyam shyammohan.sugat...@...
wrote:

 Consider this scenario.
 
 
 i have issued some 5 network calls form the flex client and my
 complete event Handler is one and the same for all these http calls. 
 
 can i be 100% sure that two simultaneous controls will never execute
 the code in my event Handler ?
 
 Putting it another way: how does flex handles event synchronization? 
 
 i have read up Ted Patrics article on the Elastic Racetrack

(http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.php)
 but couldnt figure out the answer for the above :(
 
 Regards
 Shyam





[flexcoders] Re: services-config.xml question

2009-02-03 Thread tchredeemed
I am not sure that really solves the problem... as I still have to
type the server in.

Anyone know any better solutions?



[flexcoders] Announcement: Easy Data Sorting Component

2009-02-03 Thread Jeffry Houser
Hi Everyone,

 I'm pleased to announce that the first Flextras component, a 
DataSorter, is released. The DataSorter component makes it easy for you 
to implement sorting in your application and is similar to YouTube 
Playlists or Netflix Movie Queues. You can download our no cost 
developer edition at http://www.flextras.com/?c=205 .

We will be hosting a live question and answer session every Friday in 
February at 1 pm EST. You should join us because it's the best way to 
find out what we're all about. Go to 
http://experts.na3.acrobat.com/flextras/ to learn more an ask questions. 
To find out when this occurs in your time zone: 
http://www.timeanddate.com/worldclock/fixedtime.html?month=2day=6year=2009hour=13min=0sec=0p1=98
 
http://www.timeanddate.com/worldclock/fixedtime.html?month=2day=6year=2009hour=13min=0sec=0p1=98

 Here are some links to find out more:

Product Page: http://www.flextras.com/?event=ProductHomeproductID=7c=205

Demos: http://www.flextras.com/?event=ProductSamplesProductID=7c=205

Live Meeting: http://experts.na3.acrobat.com/flextras/ 

Register and Download: 
http://www.flextras.com/index.cfm?event=loginFormc=205

DataSorter Announcement: 
http://www.jeffryhouser.com/index.cfm/2009/1/29/Easy-to-Use-Interface-Components-for-Flex-Developer

Flextras Home: http://www.flextras.com/?c=205

 Now back to your regularly scheduled list questions.

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


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




[flexcoders] Re: MouseOver Event Not Firing - SOLVED

2009-02-03 Thread Geoffrey
Thanks for the reply Ryan.  I had already tried what you suggested, 
and that's how I determined that the Button wasn't registering that 
the mouse pointer was over it.  I figured something was blocking or 
intercepting the mouse position, I just couldn't figure out what.

It ended up being a style sheet issue.  The root Panel had a style 
that set header-height to 30.  Once I set that to 0 my button worked.  
BTW, if I set it to something like 10, only the lower 1/2 of the 
button would register that the mouse was over it.

I would have never figured that out if it weren't for the fact that I 
saw this happen on another UI, but I could moseOver the bottom few 
pixels of the Button because it hadn't been positioned correctly.

So, lesson learned.  Don't set a header-height if you're going to 
stick buttons up in the header area.

Thanks,
 Geoff

--- In flexcoders@yahoogroups.com, Ryan Graham ryan.gra...@... 
wrote:

 
 You need to define handlers for those components in the HBox if you 
want
 them to listen for those specific mouse events. Right now the button 
in
 the HBox is only listening for click events. Try writing handler
 functions for those additional events to start debugging:
 
  
 
 mx:Button id=backButton click=onClick(event)
 mouseOver=onMouseOver(event) mouseOut=onMouseOut(event) 
width=24
 height=20/
 
  
 
 ...
 
  
 
 private function onMouseOver(event:MouseEvent):void
 
 {
 
  
 trace(mouseOver);
 
 }
 
 
 
 private function
 onMouseOut(event:MouseEvent):void
 
 {
 
  
 trace(mouseOut);
 
 }
 
 
 
 HTH, 
 
 Ryan
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] 
On
 Behalf Of Geoffrey
 Sent: Monday, February 02, 2009 3:16 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] MouseOver Event Not Firing
 
  
 
 I have a Button that doesn't seem to know the mouse is over it. It 
 doesn't dispatch MouseOver/Out/click events.
 
 I have a Panel that has an HBox(Label/Spacer/Button) and a Canvas. 
 the Canvas gets stuff added to it dynamically via Actionscript.
 
 pre
 mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; width=100% 
 height=100%
 
 mx:HBox id=titleBox verticalAlign=middle width=100% 
 height=24
 mx:Label text=Your Tasks/
 mx:Spacer width=100%/
 mx:Button id=backButton click=onClick(event) width=24 
 height=20/
 /mx:HBox
 
 mx:Canvas id=dynamicContainer width=100% height=100%/
 
 /mx:Panel
 /pre
 
 This component is displayed after a transition effect that 'swishes' 
 it in from the right. I've done some debugging and it seems that 
 everything is getting mouseOver events except everything within the 
 HBox.
 
 Any ideas? Because I have run out of ideas.
 
 Thanks,
 Geoff
 
  
 
 
 
 This message is private and confidential. If you have received it in 
error, please notify the sender and remove it from your system.






[flexcoders] Re: RERENDER - Need help on Nested AdvancedDataGrid as renderer on AdvancedDataGrid.

2009-02-03 Thread martinruiz87
One warning, you should avoid doing that as much as possible, if the
columns are the same you could use the built-in hierarchical data
functionality.

http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_02.html

Unless you are going to nest the grids only for information, doing
that will cause you to lose control of your application.
Also you need to have in mind the performance issues, AdvanceDataGrid
is a heavyweight component, so the rendering will be very slow.
The scrollbar will not work as expected and the recycle of the
renderers will create a lot of bugs if you not understand the whole
idea behind them.

Please tell me what your problem is, I had done a lot of things like
that in the past, maybe I can help :)

Regards,
Martin

--- In flexcoders@yahoogroups.com, Monali Gandhi
monaligandhi2...@... wrote:

 
 
 Hi,
 
 Need help on Nested AdvancedDataGrid as renderer on AdvancedDataGrid.
 
 Nested AdvancedDataGrid  also have its own renderer as nested
AdvancedDataGrid.
 
 with scroll on all AdvancedDataGrid working on renderer too.
 
 
 Kindly help,
 
 Best Regards,
 Monali





[flexcoders] Re: Need Details Creating Custom UIComponents with AS3

2009-02-03 Thread Jason
Hmmm - thanks - however, the video does not play.  Does it require 
Flash player 10?

 Try Deepa's talk from MAX, it was really good on creating components 
in
 Flex 3.
 
 http://tv.adobe.com/#vi+f15384v1002
 
 I think that's the right link...
 
  
 
 Gk.
 
 Gregor Kiddie




RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Wally Kolcz
Thanks for being patient and helping me. I really need to read more about XML 
and Flex/AS3. I am so used to RemoteObjects.

Based on what was posted from Ryan:

var ns:Namespace = new 
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;);
 trace(xmlResult.ns::loginResult.toXMLString()); 

How can I step down to the columnList?

I tried var xlNames:XMLList = xmlResult.ns::loginResult.columnList;

but it came up blank too...


From: Tracy Spratt tspr...@lariatinc.com
Sent: Tuesday, February 03, 2009 6:28 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help 

Good, you are on the way. You are only one
step from your columnList.   

Tracy Spratt 
 Lariat Services  

Flex development bandwidth available  

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Wally Kolcz
Sent: Tuesday, February 03, 2009
7:54 AM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help   

Ok, I tried both approaches and they gave me this.

loginResult 
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  columnList xmlns=http://www.newatlanta.com/bluedragon;

stringuniqname/string

stringrole/string

stringfirstName/string

stringlastName/string

  /columnList

  data xmlns=http://www.newatlanta.com/bluedragon;

ArrayOfAnyType

  anyType xsi:type=xsd:stringwkolcz/anyType

  anyType xsi:type=xsd:stringadmin/anyType

  anyType xsi:type=xsd:stringWally/anyType

  anyType xsi:type=xsd:stringKolcz/anyType

/ArrayOfAnyType

  /data

/loginResult  

 From :
Tracy Spratt tspr...@lariatinc.com
Sent: Monday, February 02, 2009
1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help Yes, darn it,  missed that,  Ryan is correct, there will
a namespace problem. You can define a default namespace, and not have to 
use the
prefix in all of the expressions. default xml namespace = 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security
;But you will still need to get the expression right.  Look
close at your expression and at your xml. 

Tracy Spratt 
 Lariat Services 

Flex development bandwidth available 

 From: flexcoders@yahoogroups.com   [mailto:flexcod...@yahoogroups.com] On 
Behalf Of Ryan Graham
Sent: Monday, February 02, 2009

4:01 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help   Looks like you're having namespace issues. The default namespace
is 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;,
so you need to use this when drilling down.   Something like:   var 
ns:Namespace = new 
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;);
 trace(xmlResult.ns::loginResult.toXMLString());   You can do this for all 
nodes with a namespace defined.   HTH,  Ryan   From: flexcoders@yahoogroups.com 
  [mailto:flexcod...@yahoogroups.com]
On Behalf Of Wally Kolcz
Sent: Monday, February 02, 2009
1:42 PM
To:flexcoders@yahoogroups.com
Subject: re: [flexcoders] XML
walkdown Help   

Here is a more accurate output on the Blue Dragon server: 

loginResponse 
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  loginResult

columnList xmlns=http://www.newatlanta.com/bluedragon;

  stringuniqname/string

  stringrole/string

  stringfirstName/string

  stringlastName/string

/columnList

data xmlns=http://www.newatlanta.com/bluedragon;

  ArrayOfAnyType

anyType xsi:type=xsd:stringwkolcz/anyType

anyType xsi:type=xsd:stringadmin/anyType

anyType xsi:type=xsd:stringWally/anyType

anyType xsi:type=xsd:stringKolcz/anyType

  /ArrayOfAnyType

/data

  /loginResult

/loginResponse

I tried var xmlResult:XML = XML(e.result);
which gives me the above.
var xlColumns:XMLList = xmlResult.loginResponse;
which comes up blank. 

 From : Wally Kolcz
wko...@isavepets.com
Sent: Monday, February 02, 2009
11:08 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XML walkdown
Help 

I am
getting a weird return from Blue Dragon's CFC wsdl as my e.result. I need to
set this to 2 local XMLList variables but am having a devil of a time walking
down this path to the core nodes. Any ideas on how to make this usable?

Tracy
has been trying to help me, but this return item is impossible to work with. I
tried xmlColumns = 

RE: [flexcoders] mx.controls.* vs mx.control.TextInput affect SWF size

2009-02-03 Thread Alex Harui
If not used, it doesn't get linked in.  However, UIComponent brings in a lot 
classes.  So does ArrayCollection and HTTPService

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of tntomek
Sent: Sunday, February 01, 2009 11:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx.controls.* vs mx.control.TextInput affect SWF size


Is the Flex compiler smart enough not to include dependent objects
that are not used? Does this apply to SDK and custom classes in the
same way? What about DMV?

Do any of my unused custom classes get compiled? If I have a
Utility/Helper project that is quite large will it affect my SWF size
if i only use 5% on a particular Flex app?



RE: [flexcoders] Re: Need to render rows in a heterogeneous mx:List differently based on each row's item data Type

2009-02-03 Thread Alex Harui
I would try overriding createItemRenderer

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Amy
Sent: Monday, February 02, 2009 6:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Need to render rows in a heterogeneous mx:List 
differently based on each row's item data Type


--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
Thomas, Erik erik_tho...@...
wrote:

 Does anyone have a code sample of how I can supply a different
 itemRenderer to a List based on the data Type of the item in any
given
 row?

 I have a heterogeneous collection of Types in an ArrayCollection
 (Property Sheet or User Preferences list) and want to render each
row
 differently based on the data Type of the row item.

 For those of you familiar with MS WPF, it includes the notion of
 something called a DataTemplate which is essentially an Item
Renderer
 that is used by the framework to render a particular data Type in a
 heterogeneous collection or on a form. I'd like to do the same
thing in
 Flex within a List.

 Is there such a notion in Flex? Can it be done simply?

 I've tried implementing a Factory pattern where I supply a single
 itemRenderer (VBox) class to the List component which is an
ActionScript
 class that simply overrides the data setter, and tests the Type
of the
 data property (the row item type) and if it's a certain Type it
 instantiates or replaces a child container that properly renders the
 data based on its Type. This is not a simple pattern to follow or
 communicate. I'd like to find a simpler way.

 I've also tried using a single renderer with multiple top level
 components that use data binding to dynamically
set includeInLayout
 and visible so only one of the top level components will render.
This
 works, but the performance on a large list is abysmal in our ad hoc
 tests. Simple renderers not using includeInLayout were much
faster.

 I've also tried using States to determine which part of the mxml to
 render based on the Type, but the pattern is just too complicated
and
 too verbose.

 I'm in search of the cleanest possible pattern to recreate what you
get
 out of the box with WPF, as I am sure someone at Adobe thought of
this
 (it's an amazingly common use case), but it's just a matter of my
 learning how to do this.

I have an extended tile list on my Blog that has a styleFunction. If
you're willing to think in different directions, there's a lot you an
do with styles. Once you have the custom styles set up, it's pretty
easy and intuitive for someone else to pick it up and run with it.

HTH;

Amy



RE: [flexcoders] DataGrid mouseover

2009-02-03 Thread Alex Harui
Debug into mouseEventToItemRenderer and see why it doesn't return the correct 
renderer

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Mike Chang
Sent: Monday, February 02, 2009 12:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid mouseover


I have a data grid, and one of the columns I used ItemRenderer to have a vbox 
and an image inside as a button.
Everything looks good except the entire column where that ItemRenderer is used 
does not invoke the same mouseover events as the other columns. The mouseover 
event I was looking for is highlighting the row on mouseover and selection 
(with a darker hue).
How do I get the column to do mouseover again for the whole row?

Thanks in advance.



RE: [flexcoders] DataGridColumn dataTipFunction HELP

2009-02-03 Thread Alex Harui
Subclass DataGridColumn and add a dataTipFunction

Class MyDataGridColumn extends DataGridColumn
{
Private function dtFunction(data:Objetct):String
{
Return data[dataField];
}

Public function MyDataGridColumn()
{
dataTipFunction = dtFunction;
}
}

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of coder3
Sent: Monday, February 02, 2009 5:26 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGridColumn dataTipFunction HELP


Hi,

I have a datagrid, the datagridColumns are dynamic, so i build the columns
after i get the result.

private function buildColumn(dataFieldName:String):DataGridColumn
{
var tempArr:Array = [];
var dgc:DataGridColumn = new DataGridColumn();
dgc.showDataTips = true;
dgc.dataTipFunction = dgDataTipFunc;
dgc.dataField = dataFieldName;
tempArr.push(dgc);
:::
myDG.columns = tempArr;
}

My problem is, i also need to build a dataTip for each column i create.
since i don't know the column names, and there might be plenty. how to write
an easy dataTipFunction to show the column datafield, like the following? i
think it needs to involve an eventlistener. but not sure how.

private function dgDataTipFunc(item:Object):String
{
return item.[how to find out the mouse-over column.datafield];
}

ThankS!!!

--
View this message in context: 
http://www.nabble.com/DataGridColumn-dataTipFunction-HELP-tp21802284p21802284.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] Re: Cursor Error: Bookmark no longer valid.

2009-02-03 Thread Alex Harui
Post the full stack trace

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of luke_lee1124
Sent: Sunday, February 01, 2009 1:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cursor Error: Bookmark no longer valid.


I have the same problem, please let me know if you find a solution.
Many thanks



[flexcoders] Detect exeptions - help!!

2009-02-03 Thread oneworld95
I've run into a very frustrating situation and need your help:

 - Flex uploads a file to the server
 - The server reads it into a Java BufferedImage object. 
 - However, Java sometimes takes 40 seconds or longer to reply
 - In some cases it has difficulty reading the file. 

In the cases of problems, Flex just hangs. It doesn't reply with
anything. Is it timing out? Any help appreciated. 



RE: [flexcoders] Re: ItemEditors and rowHeight

2009-02-03 Thread Alex Harui
If you ever go back to it: If you set height instead of measuredHeight or using 
setActualSize, that could lock in explicitHeight and then the renderer won't 
resize.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Gregor Kiddie
Sent: Monday, February 02, 2009 1:19 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: ItemEditors and rowHeight

Yeah, I had variableRowHeight set to true, and I tried a whole bunch of things 
to try and get the row resized, but I've run out of time to get it working! 
I'll just have to stick the changes in a form at the side and be done.
Thanks to everyone for the suggestions!

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343
Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ
Registered Number: 1788577
Registered in the UK

Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/

The information in this internet email is confidential and is intended solely 
for the addressee. Access, copying or re-use of information in it by anyone 
else is not authorised. Any views or opinions presented are solely those of the 
author and do not necessarily represent those of INPS or any of its affiliates. 
If you are not the intended recipient please contact is.helpd...@inps.co.uk


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: 31 January 2009 05:46
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: ItemEditors and rowHeight

Can you get the row to resize in other ways outside of an edit session?  I 
assume you have variableRowHeight=true?

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Gregor Kiddie
Sent: Friday, January 30, 2009 8:23 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: ItemEditors and rowHeight

That's what I've been playing with today, but again, once the Grid is rendered, 
I can't seem to make it re-layout the rows.
I took a look at the AdvancedDataGridRendererProviders that Johannes suggested, 
but it falls under the same category.
I feel I'm missing something totally obvious, but no-one else seems to have 
found a decent solution either, so maybe not...




[flexcoders] Hand Cursor and datagrid

2009-02-03 Thread shafram
I have a datagrid and for each row I would like to show the hand
cursor (to indicate to users that it is clickable). I've tried setting
useHandCursor and buttonMode to true on the datagrid but that makes
the entire datagrid show the hand cursor. Has anyone done this before?
Is there a way to do this?



RE: [flexcoders] Re: Need Details Creating Custom UIComponents with AS3

2009-02-03 Thread Gregor Kiddie
I'm using FP10 on Firefox, I couldn't get it to work on FP9 on IE6,
though whether its IE or FP9 that's the issue, I couldn't tell...

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jason
Sent: 03 February 2009 15:06
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Need Details Creating Custom UIComponents with
AS3

 

Hmmm - thanks - however, the video does not play. Does it require 
Flash player 10?

 Try Deepa's talk from MAX, it was really good on creating components 
in
 Flex 3.
 
 http://tv.adobe.com/#vi+f15384v1002
http://tv.adobe.com/#vi+f15384v1002 
 
 I think that's the right link...
 
 
 
 Gk.
 
 Gregor Kiddie

 



[flexcoders] PrintDataGrid- autofit to content

2009-02-03 Thread cyanneus
How to force printdatagrid to auto fit with its content ?

Bcos every time I try to put more than 5 lines in one grid cell

And maybe 2 or 3 lines on another cells, when printed the columns are
squished   

the next row will automatically jump out 

To another page even if it could still be fit in one page.. 

Does anyone have the better idea to print datagrid with large data..?

Thanx in advance. :D

 



[flexcoders] Problems with Debug Version of ActiveX Flash Player in Internet Explorer 7

2009-02-03 Thread Todd
OK, out of the blue, my debug version of Flash Player 10 went belly up
when I'm trying to debug my Flex applications from Flex Builder 3.02.

I've manually done the following:
1) Uninstalled the ActiveX Flash Player using the uninstall file.
2) uninstalled with the /clean option
3) cleaned my registery
4) Used the Adobe Script reset_fp10.cmd with the Microsoft tool subinacl.
5) Done all the above with reboots in between.
6) Turned off all my SpyBot immunizations.
7) Tunred of Advanced SystemCare immunizations.
8) Tunred of my AVG anti-virus.
9) Cleaned the Flex Builder project
10) Restored the html-template files

And still, I'm left with:
Alternate HTML content should be placed here. This content requires
the Adobe Flash Player. Get Flash 

BTW, when I go to http://get.adobe.com/flashplayer/ after installing
the debug version of the ActiveX control, it says that I have it
installed.

Grrr...Anything else to try?  



[flexcoders] Removing the rollover color of the AdvancedDataGridHeader

2009-02-03 Thread João
Hello,

I am fighting with the AdvancedDataGrid to try to remove the rollover
color of the headers. We have skinned the DataGrid so it looks like:
http://www.webfuel.pt/jsaleiro/headerRollover.jpg

But as you can see, on the second image on the above url, when the
user rolls over the header, the rollover indicator spoils the design. 

Which method should I override to remove this rollover color (or
replace it with a better rolloverSkin) ?

Thanks,

João Saleiro

CTO @ Webfuel
Adobe Certified Expert
Adobe Community Expert
Co-founder of the Portuguese RIA Community 



[flexcoders] Re: DataGridColumn dataTipFunction HELP

2009-02-03 Thread jimrobson89
Hi there,

If you don't know the column names, how are you setting the value for
dgc.headerText? I think this may be the key to your problem.

- Jim

--- In flexcoders@yahoogroups.com, coder3 rrhu...@... wrote:

 
 Hi,
 
 I have a datagrid, the datagridColumns are dynamic, so i build the
columns
 after i get the result.
 
 private function buildColumn(dataFieldName:String):DataGridColumn
 { 
   var tempArr:Array = [];
   var dgc:DataGridColumn = new DataGridColumn();
   dgc.showDataTips = true;
   dgc.dataTipFunction = dgDataTipFunc;
   dgc.dataField = dataFieldName;
   tempArr.push(dgc);
 :::
   myDG.columns = tempArr;
 }
 
 My problem is, i also need to build a dataTip for each column i create.
 since i don't know the column names, and there might be plenty. how
to write
 an easy dataTipFunction to show the column datafield, like the
following? i
 think it needs to involve an eventlistener. but not sure how.
 
 
 private function dgDataTipFunc(item:Object):String 
 {
 return item.[how to find out the mouse-over column.datafield];
 }
 
 
 ThankS!!!
 
 -- 
 View this message in context:
http://www.nabble.com/DataGridColumn-dataTipFunction-HELP-tp21802284p21802284.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





RE: [flexcoders] Re: Are flex events really thread safe?

2009-02-03 Thread Tracy Spratt
The Player is multi-threaded, but user code has but a single thread.
Of course, frame behavior can make this a bit more complicated.  

 

Use AsyncToken to match a result event with a particular call.

 

There is no need to have multiple result handlers.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of mmormando
Sent: Tuesday, February 03, 2009 9:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Are flex events really thread safe?

 

No, there is no way to my knowledge that you could tell which response
object would be actually correspond to which particular call, that
would require a synchronous response and even IE 6 should be allowing
you to execute up to 2 simultaneous calls. You probably should be
using separate response methods. Actually I've never heard that the
events in flex are supposed to be thread safe...only that they are
asynchronous so they allow us to fake faster response and LOOK like
things are multi-threaded.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Shyam shyammohan.sugat...@...
wrote:

 Consider this scenario.
 
 
 i have issued some 5 network calls form the flex client and my
 complete event Handler is one and the same for all these http calls. 
 
 can i be 100% sure that two simultaneous controls will never execute
 the code in my event Handler ?
 
 Putting it another way: how does flex handles event synchronization? 
 
 i have read up Ted Patrics article on the Elastic Racetrack

(http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.p
hp
http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.p
hp )
 but couldnt figure out the answer for the above :(
 
 Regards
 Shyam


 



RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Tracy Spratt
Good, you are on the way. You are only one step from your columnList.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 7:54 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Ok, I tried both approaches and they gave me this.

loginResult
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/um
ich/security xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  columnList xmlns=http://www.newatlanta.com/bluedragon;
stringuniqname/string
stringrole/string
stringfirstName/string
stringlastName/string
  /columnList
  data xmlns=http://www.newatlanta.com/bluedragon;
ArrayOfAnyType
  anyType xsi:type=xsd:stringwkolcz/anyType
  anyType xsi:type=xsd:stringadmin/anyType
  anyType xsi:type=xsd:stringWally/anyType
  anyType xsi:type=xsd:stringKolcz/anyType
/ArrayOfAnyType
  /data
/loginResult



From: Tracy Spratt tspr...@lariatinc.com
Sent: Monday, February 02, 2009 1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

Yes, darn it,  missed that,  Ryan is correct, there will a namespace
problem.  

 

You can define a default namespace, and not have to use the prefix in
all of the expressions.

default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity ; 

 

But you will still need to get the expression right.  Look close at your
expression and at your xml.

Tracy Spratt
Lariat Services

Flex development bandwidth available



From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ryan Graham
Sent: Monday, February 02, 2009 4:01 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Looks like you're having namespace issues. The default namespace is
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/sec
urity
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity , so you need to use this when drilling down.

 

Something like:

 

var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/ed
u/umich/security);

trace(xmlResult.ns::loginResult.toXMLString());

 

You can do this for all nodes with a namespace defined.

 

HTH, 

Ryan

 

From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Monday, February 02, 2009 1:42 PM
To:flexcoders@yahoogroups.com
Subject: re: [flexcoders] XML walkdown Help

 

Here is a more accurate output on the Blue Dragon server:

loginResponse
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/um
ich/security xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  loginResult
columnList xmlns=http://www.newatlanta.com/bluedragon;
  stringuniqname/string
  stringrole/string
  stringfirstName/string
  stringlastName/string
/columnList
data xmlns=http://www.newatlanta.com/bluedragon;
  ArrayOfAnyType
anyType xsi:type=xsd:stringwkolcz/anyType
anyType xsi:type=xsd:stringadmin/anyType
anyType xsi:type=xsd:stringWally/anyType
anyType xsi:type=xsd:stringKolcz/anyType
  /ArrayOfAnyType
/data
  /loginResult
/loginResponse

I tried var xmlResult:XML = XML(e.result); which gives me the above.
var xlColumns:XMLList = xmlResult.loginResponse; which comes up blank.



From: Wally Kolcz wko...@isavepets.com
Sent: Monday, February 02, 2009 11:08 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XML walkdown Help

I am getting a weird return from Blue Dragon's CFC wsdl as my e.result.
I need to set this to 2 local XMLList variables but am having a devil of
a time walking down this path to the core nodes. Any ideas on how to
make this usable?

Tracy has been trying to help me, but this return item is impossible to
work with. I tried xmlColumns =
loginReponse.loginReturn.columnList.columnList but it doesn't work.
Neither does the same for data.

Here is the result that is returned from Blue Dragon:

ns1:loginResponse
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:ns1=http://security.umich.edu.prmcprojects;
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  loginReturn xsi:type=ns2:QueryBean
xmlns:ns2=http://rpc.xml.coldfusion;
columnList soapenc:arrayType=xsd:string[8]
xsi:type=soapenc:Array
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
  columnList xsi:type=xsd:string
  

RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Tracy Spratt
columnList will need to be prefixed with the ns:: also.  As will all
nodes.  I'd advise setting the default namespace as I posted, to make
the expressions easier.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 10:23 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Thanks for being patient and helping me. I really need to read more
about XML and Flex/AS3. I am so used to RemoteObjects.

Based on what was posted from Ryan:

var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/ed
u/umich/security);

trace(xmlResult.ns::loginResult.toXMLString());

How can I step down to the columnList?

I tried var xlNames:XMLList = xmlResult.ns::loginResult.columnList;

but it came up blank too...



From: Tracy Spratt tspr...@lariatinc.com
Sent: Tuesday, February 03, 2009 6:28 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

Good, you are on the way. You are only one step from your columnList.

 

Tracy Spratt
Lariat Services

Flex development bandwidth available



From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 7:54 AM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Ok, I tried both approaches and they gave me this.

loginResult
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/um
ich/security xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  columnList xmlns=http://www.newatlanta.com/bluedragon;
stringuniqname/string
stringrole/string
stringfirstName/string
stringlastName/string
  /columnList
  data xmlns=http://www.newatlanta.com/bluedragon;
ArrayOfAnyType
  anyType xsi:type=xsd:stringwkolcz/anyType
  anyType xsi:type=xsd:stringadmin/anyType
  anyType xsi:type=xsd:stringWally/anyType
  anyType xsi:type=xsd:stringKolcz/anyType
/ArrayOfAnyType
  /data
/loginResult



From: Tracy Spratt tspr...@lariatinc.com
Sent: Monday, February 02, 2009 1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

Yes, darn it,  missed that,  Ryan is correct, there will a namespace
problem.  

 

You can define a default namespace, and not have to use the prefix in
all of the expressions.

default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity ; 

 

But you will still need to get the expression right.  Look close at your
expression and at your xml.

Tracy Spratt
Lariat Services

Flex development bandwidth available



From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ryan Graham
Sent: Monday, February 02, 2009 4:01 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Looks like you're having namespace issues. The default namespace is
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/sec
urity, so you need to use this when drilling down.

 

Something like:

 

var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/ed
u/umich/security);

trace(xmlResult.ns::loginResult.toXMLString());

 

You can do this for all nodes with a namespace defined.

 

HTH, 

Ryan

 

From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Monday, February 02, 2009 1:42 PM
To:flexcoders@yahoogroups.com
Subject: re: [flexcoders] XML walkdown Help

 

Here is a more accurate output on the Blue Dragon server:

loginResponse
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/um
ich/security xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  loginResult
columnList xmlns=http://www.newatlanta.com/bluedragon;
  stringuniqname/string
  stringrole/string
  stringfirstName/string
  stringlastName/string
/columnList
data xmlns=http://www.newatlanta.com/bluedragon;
  ArrayOfAnyType
anyType xsi:type=xsd:stringwkolcz/anyType
anyType xsi:type=xsd:stringadmin/anyType
anyType xsi:type=xsd:stringWally/anyType
anyType xsi:type=xsd:stringKolcz/anyType
  /ArrayOfAnyType
/data
  /loginResult
/loginResponse

I tried var xmlResult:XML = XML(e.result); which gives me the above.
var xlColumns:XMLList = xmlResult.loginResponse; which comes up blank.



From: Wally Kolcz wko...@isavepets.com
Sent: Monday, February 02, 2009 11:08 AM
To: flexcoders@yahoogroups.com

[flexcoders] Custom Event and bubbling phase

2009-02-03 Thread thelordsince1984
Hi,

i have a main application and there i create a popup panel...

from the popup panel i dispacth a custom event like this

var e1:CustomLoadEvent = new CustomLoadEvent(loadModule, true);
dispatchEvent(e1);

where loadModule is the type and  the value true stands for bubbles..

then at the creationcomplete event within the main application i
create an eventlisteners for the event

addEventListener(loadModule, loadThisModule);

the loadThisModule function simple trace a string..

but it doesn't work!!Why?


Thanks in advance

Regards Lorenzo



Re: [flexcoders] RERENDER - Is there a way to force a canvas to re-render/refresh?

2009-02-03 Thread - -
Hi Erik it worked. Thanks!





From: Thomas, Erik erik_tho...@intuit.com
To: flexcoders@yahoogroups.com
Sent: Monday, February 2, 2009 6:41:14 PM
Subject: RE: [flexcoders] RERENDER - Is there a way to force a canvas to 
re-render/refresh?


There are a couple stategies that may work in different circumstances. For 
example, calling executeBindings( true) will force all bound data to requery 
their sources which essentially updates your view if it's a form and/or if it's 
the data you really want to refresh.
 
However, if you just want the entire layout to repaint without regard to 
refreshing data bindings, the sure fire way is this:
 
invalidateDisplayLi st();
validateNow( );
 
The first call to invalidate the display list *might* result in the view 
refreshing, but it only marks the view as needing a refresh and doesn't always 
immediately do so. 
 
By calling validateNow( ) after invalidating your display list, you are 
forcing the UI to repaint immediately. I think that's probably what you meant 
when you said you wanted to force a refresh.
 
You can see this pattern used all over the Flex SDK.
 
Erik



From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of Jeffry Houser
Sent: Monday, February 02, 2009 3:36 PM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] RERENDER - Is there a way to force a canvas to 
re-render/refresh?



invalidateDisplayLi st();

sailorsea21 wrote:
 Hi everyone, is there a way to force a canvas to rerender/refresh?

 Thanks.

 David


  - - --

 --
 Flexcoders Mailing List
 FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
 Alternative FAQ location: https://share. acrobat.com/ adc/document. do?docid= 
 942dbdc8- e469-446f- b4cf-1e62079f684 7
 Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. 
 comYahoo! Groups Links




 

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

 


  

[flexcoders] Stage listeners not hearing key_down events.

2009-02-03 Thread Jason Ervin
Does anyone have an example of getting the stage or any display object
to listen to all Key_Down events, even with items on the displayList.

Here is my code, which works for the mouse_down event, but keydown is
going unnoticed. Any clues as to why that this is?

Application.application.stage.addEventListener(KeyboardEvent.KEY_DOWN,
onKeyDownEvent);

Application.application.stage.addEventListener(MouseEvent.MOUSE_DOWN,
onMouseDownEvent);

also the mouse_down works in this version as well, but not the key_down.

firstdisplayobject.visual.addEventListener(KeyboardEvent.KEY_DOWN,
onKeyDownEvent);

firstdisplayobject.visual.addEventListener(MouseEvent.MOUSE_DOWN,
onMouseDownEvent);

TIA

thanks, CompletelyFrustrated



RE: [flexcoders] Re: Tree Control Drag and Drop Help

2009-02-03 Thread Yves Riel
Glad I could help! I had to to change the tree a few days ago so it
could allow droping nodes onto a branch. I spent a few hours figuring it
out so if I was able to save you time then great. If you dig deep into
the Flex Components code, you'll see that they often use mx_internal.
Also, just as a side note. If you import the namespace and that there
are no collision, i.e. no two variables share the same name, you don't
need to prefix the variable name with it's namespace. So, you could have
just written:
 
var parent:String = event.dragInitiator._dropData.parent.label
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=135844/stime=1233608798/nc1=4507179/nc2=3848642/nc3=5597441 
 


RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Ryan Graham

Yeah, notice the 2 distinct namespaces being used here:

 

The reponse/result wrapper uses
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity.

The columnList and data use http://www.newatlanta.com/bluedragon;

 

If you do as Tracy said, and set the default namespace to
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity, you would need to use the other namespace technique to let e4x
know you are looking for nodes in a different namespace than the default
as already defined. Something like:

 

default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity; 

 

var ns1:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon;);

trace(xmlResult.loginResult.ns1::columnList.toXMLString());

 

Even though the namespaces share the same base URL
(http://www.newatlanta.com/bluedragon;), the XML processing model is
unaware and doesn't care - all it sees is unique strings, each of which
defines a separate namespace using the xmlns attribute declaration.

 

HTH,

Ryan

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Tuesday, February 03, 2009 9:35 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

columnList will need to be prefixed with the ns:: also.  As will all
nodes.  I'd advise setting the default namespace as I posted, to make
the expressions easier.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 10:23 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Thanks for being patient and helping me. I really need to read more
about XML and Flex/AS3. I am so used to RemoteObjects.

Based on what was posted from Ryan:

var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/ed
u/umich/security);

trace(xmlResult.ns::loginResult.toXMLString());

How can I step down to the columnList?

I tried var xlNames:XMLList = xmlResult.ns::loginResult.columnList;

but it came up blank too...



From: Tracy Spratt tspr...@lariatinc.com
Sent: Tuesday, February 03, 2009 6:28 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

Good, you are on the way. You are only one step from your columnList.

 

Tracy Spratt
Lariat Services

Flex development bandwidth available



From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 7:54 AM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Ok, I tried both approaches and they gave me this.

loginResult
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/um
ich/security xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  columnList xmlns=http://www.newatlanta.com/bluedragon;
stringuniqname/string
stringrole/string
stringfirstName/string
stringlastName/string
  /columnList
  data xmlns=http://www.newatlanta.com/bluedragon;
ArrayOfAnyType
  anyType xsi:type=xsd:stringwkolcz/anyType
  anyType xsi:type=xsd:stringadmin/anyType
  anyType xsi:type=xsd:stringWally/anyType
  anyType xsi:type=xsd:stringKolcz/anyType
/ArrayOfAnyType
  /data
/loginResult



From: Tracy Spratt tspr...@lariatinc.com
Sent: Monday, February 02, 2009 1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

Yes, darn it,  missed that,  Ryan is correct, there will a namespace
problem.  

 

You can define a default namespace, and not have to use the prefix in
all of the expressions.

default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity ; 

 

But you will still need to get the expression right.  Look close at your
expression and at your xml.

Tracy Spratt
Lariat Services

Flex development bandwidth available



From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ryan Graham
Sent: Monday, February 02, 2009 4:01 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Looks like you're having namespace issues. The default namespace is
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/sec
urity, so you need to use this when drilling down.

 

Something like:

 

var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/ed
u/umich/security);

trace(xmlResult.ns::loginResult.toXMLString());

 

You can do this for all nodes with a namespace defined.

 

HTH, 

Ryan

 

From:flexcoders@yahoogroups.com 

[flexcoders] How to instantiate a weak reference

2009-02-03 Thread Greg Hess
Hi All,

I am implementing a cache for my application and I would like to allow
my cache to manage memory consumption(limit number of items stored). I
have done this in the past in Java by having my cache hold the only
hard references to the objects, returning weak references to the
application. When items are accessed they are pushed to the top, when
max size is reached items are popped off the bottom and the object is
available to GC and the application is able to detect and handle null
objects.

However, I cant seem to find any way to instantiate a weak reference,
how can I do this in ActionScript?

Any help much appreciated.

Thanks,

Greg


[flexcoders] Re: Accessing XML child nodes in a LineChart

2009-02-03 Thread Greg Groves
Thanks, Amy, that's what I ended up doing. Not too hard, but it does
seem to me I should be able to access the child nodes through the
dotted E4X syntax... maybe a feature request for future Flex
releases... :-)

Thanks again,

Greg

 --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 --- In flexcoders@yahoogroups.com, Greg Groves greg.groves@ 
 wrote:
 
  Thanks, I'll look at that. I was hoping for an MXML solution (mainly
  so I don't have to explain it as much ;-) ) but if ActionScript is
  necessary, so be it.
 
 The dataFunction has to be done in AS.  I think most of the rest you 
 can translate to MXML.  I just did the example that way because people 
 were complaining there wasn't a good example of doing it in as only.
 
 HTH;
 
 Amy





[flexcoders] AdvancedDatagrid static row for totals.

2009-02-03 Thread aceoohay
I have finally switched to Flex 3, and one of the reasons I have done 
this is to make use of the ADG.

In a number of places throughout my apps I have used Alex's 
FooterDataGrid and it works reasonably well. I was under the 
impression that one of the features of the ADG was going to be static 
rows for totals, or whatever you might need.

I have not found that capability. Was it wishful thinking, or is the 
feature there and I just can't find it?

Anyone info about this would be greatly appreciated.

Paul



[flexcoders] How to utilize browser specific shortcuts

2009-02-03 Thread Reto M. Kiefer
Dear all,

I know it is quite easy to use keyboard shortcuts in Flex.

But is it possible to use CTRL-P / CMD-P or any other browser related
shortcut and trigger actions in Flex instead open the print dialogue
in the browser?

Is there a difference how different browsers handle this issue? Or do
I need Java-Script in order to catch the shortcut and send the
command to Flex?

Thanks in advance

Reto


RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Wally Kolcz
If I set it your way, then what do I then do with the dot notation to get to 
the XMLList?


From: Tracy Spratt tspr...@lariatinc.com
Sent: Tuesday, February 03, 2009 8:34 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help 

columnList will need to be prefixed with
the ns:: also.  As will all nodes.  I'd advise setting the
default namespace as I posted, to make the expressions easier.   

Tracy Spratt 
 Lariat Services  

Flex development bandwidth available  

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Wally Kolcz
Sent: Tuesday, February 03, 2009
10:23 AM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help   

Thanks for being patient and helping me. I really need
to read more about XML and Flex/AS3. I am so used to RemoteObjects.

Based on what was posted from Ryan: var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;);
 trace(xmlResult.ns::loginResult.toXMLString()); 

How can I step down to the columnList?

I tried var xlNames:XMLList = xmlResult.ns::loginResult.columnList;

but it came up blank too... 

 From :
Tracy Spratt tspr...@lariatinc.com
Sent: Tuesday, February 03, 2009
6:28 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help Good, you are on the way. You are only one step from your
columnList.   

Tracy Spratt 
 Lariat Services 

Flex development bandwidth available 

 From: flexcoders@yahoogroups.com  [mailto:flexcod...@yahoogroups.com] On 
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009
7:54 AM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help   

Ok, I
tried both approaches and they gave me this.

loginResult
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  columnList
xmlns=http://www.newatlanta.com/bluedragon;

stringuniqname/string

stringrole/string

stringfirstName/string

stringlastName/string

  /columnList

  data xmlns=http://www.newatlanta.com/bluedragon;

ArrayOfAnyType

  anyType
xsi:type=xsd:stringwkolcz/anyType

  anyType
xsi:type=xsd:stringadmin/anyType

  anyType
xsi:type=xsd:stringWally/anyType

  anyType
xsi:type=xsd:stringKolcz/anyType

/ArrayOfAnyType

  /data

/loginResult 

 From : Tracy Spratt
tspr...@lariatinc.com
Sent: Monday, February 02, 2009
1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help Yes, darn it,  missed that,  Ryan is correct, there will
a namespace problem. You can define a default namespace, and not have to 
use the
prefix in all of the expressions. default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security
;But you will still need to get the expression right.  Look
close at your expression and at your xml. 

Tracy Spratt 
 Lariat Services 

Flex development bandwidth available 

 From: flexcoders@yahoogroups.com  [mailto:flexcod...@yahoogroups.com] On 
Behalf Of Ryan Graham
Sent: Monday, February 02, 2009
4:01 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML
walkdown Help   Looks like you're having namespace issues. The default namespace
is 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;,
so you need to use this when drilling down.   Something like:   var 
ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;);
 trace(xmlResult.ns::loginResult.toXMLString());   You can do this for all 
nodes with a namespace defined.   HTH,  Ryan   From: flexcoders@yahoogroups.com 
  [mailto:flexcod...@yahoogroups.com]
On Behalf Of Wally Kolcz
Sent: Monday, February 02, 2009
1:42 PM
To:flexcoders@yahoogroups.com
Subject: re: [flexcoders] XML
walkdown Help   

Here is a more accurate output on the Blue Dragon server: 

loginResponse 
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  loginResult

columnList xmlns=http://www.newatlanta.com/bluedragon;

  stringuniqname/string

  stringrole/string

  stringfirstName/string

  stringlastName/string

/columnList

data xmlns=http://www.newatlanta.com/bluedragon;

  ArrayOfAnyType

anyType xsi:type=xsd:stringwkolcz/anyType

anyType xsi:type=xsd:stringadmin/anyType

anyType xsi:type=xsd:stringWally/anyType

anyType 

Re: [flexcoders] How to instantiate a weak reference

2009-02-03 Thread Alan K
I don't understand.  Event pointers can be instanciated as weak.  Do you
mean an object with a weak reference to another?

e.g

var foo:Object = 'First';
var bar:Object = foo;

// destroy object foo
// foo still exists because of object bar

Alan  

However, I cant seem to find any way to instantiate a weak reference,
how can I do this in ActionScript?




Re: [flexcoders] XML walkdown Help

2009-02-03 Thread Steve Mathews
One trick to help while trying to get this working is to use a wildcard for
the namespace so use *::
So if you just want to shortcut to the columnList (this would assume you
don't need any of the rest of the xml).

xmlResult..*::columnList;


On Tue, Feb 3, 2009 at 10:24 AM, Wally Kolcz wko...@isavepets.com wrote:

  If I set it your way, then what do I then do with the dot notation to get
 to the XMLList?



 --
 *From*: Tracy Spratt tspr...@lariatinc.com
 *Sent*: Tuesday, February 03, 2009 8:34 AM

 *To*: flexcoders@yahoogroups.com
 *Subject*: RE: [flexcoders] XML walkdown Help


 columnList will need to be prefixed with the ns:: also.  As will all
 nodes.  I'd advise setting the default namespace as I posted, to make the
 expressions easier.



 Tracy Spratt
 Lariat Services

 Flex development bandwidth available
 --

 *From:*flexcod...@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Wally Kolcz
 *Sent:* Tuesday, February 03, 2009 10:23 AM
 *To:*flexcod...@yahoogroups.com
 *Subject:* RE: [flexcoders] XML walkdown Help



 Thanks for being patient and helping me. I really need to read more about
 XML and Flex/AS3. I am so used to RemoteObjects.

 Based on what was posted from Ryan:

 var ns:Namespace = new Namespace(
 http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security
 );

 trace(xmlResult.ns::loginResult.toXMLString());

 How can I step down to the columnList?

 I tried var xlNames:XMLList = xmlResult.ns::loginResult.columnList;

 but it came up blank too...
 --

 *From*: Tracy Spratt tspr...@lariatinc.com
 *Sent*: Tuesday, February 03, 2009 6:28 AM
 *To*: flexcoders@yahoogroups.com
 *Subject*: RE: [flexcoders] XML walkdown Help

 Good, you are on the way. You are only one step from your columnList.



 Tracy Spratt
 Lariat Services

 Flex development bandwidth available
 --

 *From:*flexcod...@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Wally Kolcz
 *Sent:* Tuesday, February 03, 2009 7:54 AM
 *To:*flexcod...@yahoogroups.com
 *Subject:* RE: [flexcoders] XML walkdown Help



 Ok, I tried both approaches and they gave me this.

 loginResult xmlns=
 http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema;
   columnList xmlns=http://www.newatlanta.com/bluedragon;
 stringuniqname/string
 stringrole/string
 stringfirstName/string
 stringlastName/string
   /columnList
   data xmlns=http://www.newatlanta.com/bluedragon;
 ArrayOfAnyType
   anyType xsi:type=xsd:stringwkolcz/anyType
   anyType xsi:type=xsd:stringadmin/anyType
   anyType xsi:type=xsd:stringWally/anyType
   anyType xsi:type=xsd:stringKolcz/anyType
 /ArrayOfAnyType
   /data
 /loginResult
 --

 *From*: Tracy Spratt tspr...@lariatinc.com
 *Sent*: Monday, February 02, 2009 1:44 PM
 *To*: flexcoders@yahoogroups.com
 *Subject*: RE: [flexcoders] XML walkdown Help

 Yes, darn it,  missed that,  Ryan is correct, there will a namespace
 problem.



 You can define a default namespace, and not have to use the prefix in all
 of the expressions.

 default xml namespace = 
 http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;;



 But you will still need to get the expression right.  Look close at your
 expression and at your xml.

 Tracy Spratt
 Lariat Services

 Flex development bandwidth available
 --

 *From:*flexcod...@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Ryan Graham
 *Sent:* Monday, February 02, 2009 4:01 PM
 *To:*flexcod...@yahoogroups.com
 *Subject:* RE: [flexcoders] XML walkdown Help



 Looks like you're having namespace issues. The default namespace is
 http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;,
 so you need to use this when drilling down.



 Something like:



 var ns:Namespace = new Namespace(
 http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security
 );

 trace(xmlResult.ns::loginResult.toXMLString());



 You can do this for all nodes with a namespace defined.



 HTH,

 Ryan



 *From:*flexcod...@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Wally Kolcz
 *Sent:* Monday, February 02, 2009 1:42 PM
 *To:*flexcod...@yahoogroups.com
 *Subject:* re: [flexcoders] XML walkdown Help



 *Here is a more accurate output on the Blue Dragon server:*

 loginResponse xmlns=
 http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema;
   loginResult
 columnList 

RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Wally Kolcz
This is the code i am using. I tried this since I have to be on the test server 
(remote) to use the BD version since i am running Adobe locally. I dont think 
trace will work. Its coming up blank:

var xmlResult:XML = XML(e.result);
default xml namespace = 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security 
; 
var ns1:Namespace = new Namespace(http://www.newatlanta.com/bluedragon;);
Alert.show(xmlResult.loginResult.ns1::columnList.toXMLString(),xlNames);


From: Ryan Graham ryan.gra...@phoenix.edu
Sent: Tuesday, February 03, 2009 9:03 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help 

Yeah, notice the 2 distinct namespaces being used here: The reponse/result 
wrapper uses 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security.The
 columnList and data use http://www.newatlanta.com/bluedragon; If you do as 
Tracy said, and set the default namespace to 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;,
you would need to use the other namespace technique to let e4x know you are
looking for nodes in a different namespace than the default as already defined.
Something like: default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;;
 var ns1:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon;);trace(xmlResult.loginResult.ns1::columnList.toXMLString());
 Even though the namespaces share the same base URL 
(http://www.newatlanta.com/bluedragon;),
the XML processing model is unaware and doesn't care - all it sees
is unique strings, each of which defines a separate namespace using the xmlns
attribute declaration. HTH,Ryan  From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: Tuesday, February 03, 2009 9:35 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help columnList
will need to be prefixed with the ns:: also.  As will all nodes. 
I'd advise setting the default namespace as I posted, to make the
expressions easier. 

Tracy
Spratt
Lariat Services

Flex
development bandwidth available

From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 10:23 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help 

Thanks for being patient and helping me. I really need to read more about
XML and Flex/AS3. I am so used to RemoteObjects.

Based on what was posted from Ryan:var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;);trace(xmlResult.ns::loginResult.toXMLString());

How can I step down to the columnList?

I tried var xlNames:XMLList = xmlResult.ns::loginResult.columnList;

but it came up blank too...

From: Tracy
Spratt tspr...@lariatinc.com
Sent: Tuesday, February 03, 2009 6:28 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown HelpGood, you
are on the way. You are only one step from your columnList. 

Tracy
Spratt
Lariat Services

Flex
development bandwidth available

From:flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 7:54 AM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help 

Ok, I tried both approaches and they gave me this.

loginResult 
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  columnList xmlns=http://www.newatlanta.com/bluedragon;

stringuniqname/string

stringrole/string

stringfirstName/string

stringlastName/string

  /columnList

  data xmlns=http://www.newatlanta.com/bluedragon;

ArrayOfAnyType

  anyType
xsi:type=xsd:stringwkolcz/anyType

  anyType
xsi:type=xsd:stringadmin/anyType

  anyType
xsi:type=xsd:stringWally/anyType

  anyType
xsi:type=xsd:stringKolcz/anyType

/ArrayOfAnyType

  /data

/loginResult

From: Tracy
Spratt tspr...@lariatinc.com
Sent: Monday, February 02, 2009 1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown HelpYes, darn
it,  missed that,  Ryan is correct, there will a namespace
problem.   You can
define a default namespace, and not have to use the prefix in all of the
expressions.default
xml namespace = 
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/security
;  But you
will still need to get the expression right.  Look close at your
expression and at your xml.

Tracy
Spratt
Lariat Services

Flex
development bandwidth available

From:flexcoders@yahoogroups.com

Re: [flexcoders] How to instantiate a weak reference

2009-02-03 Thread Greg Hess
Objects are all passed by reference, I want to pass a weak reference
back to callers who request items from the cache, much like the
internal implementation must do in some way when
addEventListener(...true) as a weak reference.

For example:

public function getItem( id:String ):Item
{
var item:Item = getItemFromCache(id);
return new WeakReference( item );
}

So that anyone who has obtained an item from cache will not prevent
the object from being garbage collected.

Thanks,

Greg


On Tue, Feb 3, 2009 at 12:33 PM, Alan K ultr...@gmail.com wrote:
 I don't understand. Event pointers can be instanciated as weak. Do you
 mean an object with a weak reference to another?

 e.g

 var foo:Object = 'First';
 var bar:Object = foo;

 // destroy object foo
 // foo still exists because of object bar

 Alan

However, I cant seem to find any way to instantiate a weak reference,
how can I do this in ActionScript?

 


[flexcoders] Re: Problems with Debug Version of ActiveX Flash Player in Internet Explorer 7

2009-02-03 Thread Todd
I finally stumbled upon this page:
http://therush.wordpress.com/2008/03/10/flex-builder-3-debugger-stopped-working/

While it didn't help me get Debugging working on IE, one of the many
comments people left in response to his suggestion eventually got it
working back on Firefox.  So, I'm good with that for now, or at least
I'm debugging again.





[flexcoders] Re: Need Details Creating Custom UIComponents with AS3

2009-02-03 Thread Jason
--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

 I'm using FP10 on Firefox, I couldn't get it to work on FP9 on IE6,
 though whether its IE or FP9 that's the issue, I couldn't tell...
 


That's close to what I'm using - Flash Player Debug 9 - IE7.  Maybe 
I'll look at it on Firefox when I get home from work tonight. Too bad - 
IE7 + FP9 is a pretty standard configuration.



[flexcoders] Can we freeze(Fix) Any Column / Row in DataGrid

2009-02-03 Thread Dharmendra Chauhan
Hi All,
 Is it possible to freeze any Column and Row in DataGrid while
keeping rest of the Row/Column moving.i e ,If my FG has got four
column named A,B,C,D ,E..Z.I want to freeze or fixed column B 
that means I scroll to right of the grid , B column should always be
visible.

In case of Row, If I select 10 th row,row from 1-10 should get
breezed(fixed) irrespective vertical scroll bar movement.

Please point me appropriate direction.

Regards,
Dharmendra Chouhan


 



  
 





RE: [flexcoders] XML walkdown Help

2009-02-03 Thread Tracy Spratt
Ryan, thanks for looking so closely, clearly I am not.

 

Wally, see Steve's suggetsion for using the wildcard namespace, that
might help.

 

Namespaces can be a PITA sometimes.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ryan Graham
Sent: Tuesday, February 03, 2009 12:03 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Yeah, notice the 2 distinct namespaces being used here:

 

The reponse/result wrapper uses
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity .

The columnList and data use http://www.newatlanta.com/bluedragon
http://www.newatlanta.com/bluedragon 

 

If you do as Tracy said, and set the default namespace to
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity , you would need to use the other namespace technique to let
e4x know you are looking for nodes in a different namespace than the
default as already defined. Something like:

 

default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity; 

 

var ns1:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon;);

trace(xmlResult.loginResult.ns1::columnList.toXMLString());

 

Even though the namespaces share the same base URL
(http://www.newatlanta.com/bluedragon
http://www.newatlanta.com/bluedragon ), the XML processing model is
unaware and doesn't care - all it sees is unique strings, each of which
defines a separate namespace using the xmlns attribute declaration.

 

HTH,

Ryan

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Tuesday, February 03, 2009 9:35 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

columnList will need to be prefixed with the ns:: also.  As will all
nodes.  I'd advise setting the default namespace as I posted, to make
the expressions easier.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 10:23 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Thanks for being patient and helping me. I really need to read more
about XML and Flex/AS3. I am so used to RemoteObjects.

Based on what was posted from Ryan:

var ns:Namespace = new
Namespace(http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/ed
u/umich/security);

trace(xmlResult.ns::loginResult.toXMLString());

How can I step down to the columnList?

I tried var xlNames:XMLList = xmlResult.ns::loginResult.columnList;

but it came up blank too...



From: Tracy Spratt tspr...@lariatinc.com
Sent: Tuesday, February 03, 2009 6:28 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

Good, you are on the way. You are only one step from your columnList.

 

Tracy Spratt
Lariat Services

Flex development bandwidth available



From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Tuesday, February 03, 2009 7:54 AM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

 

Ok, I tried both approaches and they gave me this.

loginResult
xmlns=http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/um
ich/security xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  columnList xmlns=http://www.newatlanta.com/bluedragon;
stringuniqname/string
stringrole/string
stringfirstName/string
stringlastName/string
  /columnList
  data xmlns=http://www.newatlanta.com/bluedragon;
ArrayOfAnyType
  anyType xsi:type=xsd:stringwkolcz/anyType
  anyType xsi:type=xsd:stringadmin/anyType
  anyType xsi:type=xsd:stringWally/anyType
  anyType xsi:type=xsd:stringKolcz/anyType
/ArrayOfAnyType
  /data
/loginResult



From: Tracy Spratt tspr...@lariatinc.com
Sent: Monday, February 02, 2009 1:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XML walkdown Help

Yes, darn it,  missed that,  Ryan is correct, there will a namespace
problem.  

 

You can define a default namespace, and not have to use the prefix in
all of the expressions.

default xml namespace =
http://www.newatlanta.com/bluedragon/cfc/prmc/PRMCProjects/edu/umich/se
curity ; 

 

But you will still need to get the expression right.  Look close at your
expression and at your xml.

Tracy Spratt
Lariat Services

Flex development bandwidth available


RE: [flexcoders] DataGridColumn dataTipFunction HELP

2009-02-03 Thread coder3

it works beautifully!

Thanks!!




Alex Harui wrote:
 
 Subclass DataGridColumn and add a dataTipFunction
 
 Class MyDataGridColumn extends DataGridColumn
 {
 Private function dtFunction(data:Objetct):String
 {
 Return data[dataField];
 }
 
 Public function MyDataGridColumn()
 {
 dataTipFunction = dtFunction;
 }
 }
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of coder3
 Sent: Monday, February 02, 2009 5:26 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] DataGridColumn dataTipFunction HELP
 
 
 Hi,
 
 I have a datagrid, the datagridColumns are dynamic, so i build the columns
 after i get the result.
 
 private function buildColumn(dataFieldName:String):DataGridColumn
 {
 var tempArr:Array = [];
 var dgc:DataGridColumn = new DataGridColumn();
 dgc.showDataTips = true;
 dgc.dataTipFunction = dgDataTipFunc;
 dgc.dataField = dataFieldName;
 tempArr.push(dgc);
 :::
 myDG.columns = tempArr;
 }
 
 My problem is, i also need to build a dataTip for each column i create.
 since i don't know the column names, and there might be plenty. how to
 write
 an easy dataTipFunction to show the column datafield, like the following?
 i
 think it needs to involve an eventlistener. but not sure how.
 
 private function dgDataTipFunc(item:Object):String
 {
 return item.[how to find out the mouse-over column.datafield];
 }
 
 ThankS!!!
 
 --
 View this message in context:
 http://www.nabble.com/DataGridColumn-dataTipFunction-HELP-tp21802284p21802284.html
 Sent from the FlexCoders mailing list archive at Nabble.com.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/DataGridColumn-dataTipFunction-HELP-tp21802284p21815589.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Is It possible to dynamically resize datagrid's Width

2009-02-03 Thread Dharmendra Chauhan
Hi All,
   I have designed a custom data which allows user to add column 
 dynamically.It allows user to resize Column.the functionality which I
am looking for is that if I hold mouse on the last column and take it
to the right to increase column's width  then datagrid should increase
its own width to accommodate new width of the column.ie datagrid
should expand its width in the right to accommodate/respect width of
the column.
 
  
Regards,
Dharmendra Chouhan


 



  
 





[flexcoders] PrintDataGrid- autofit to content

2009-02-03 Thread cyanneus
How to force printdatagrid to auto fit with its content ?

Bcos every time I try to put more than 5 lines in one grid cell

And maybe 2 or 3 lines on another cells 

The grid output is really disappointed.. the next row will automatically
jump out 

To another page even if it could still be fit in one page..

I'm not sure.. but maybe it has something to do with validateNow();

What do u think ?

Does anyone have the better idea to print datagrid..?

Thanx in advance. :D

 

import mx.core.*

// Declare and initialize the variables used in the component.

// The application sets the actual prodTotal value.

[Bindable]

public var pageNumber:Number = 1;

 

 

// Control the page contents by selectively hiding the header
and

// footer based on the page type.

public function showPage(pageType:String):void {

if(pageType == first || pageType == middle) {

// Hide the footer.

footer.includeInLayout=false;

footer.visible = false;



footer2.includeInLayout=false;

footer2.visible = false;



footer345.includeInLayout=false;

footer345.visible = false;

footer6.visible = false;

}

if(pageType == middle || pageType == last) {

// The header won't be used again; hide it.

header.includeInLayout=false;

header.visible = false;



header2.includeInLayout=false;

header2.visible = false;



header3.includeInLayout=false;

header3.visible = false;

}

if(pageType == last) {

// Show the footer.

footer.includeInLayout=true;

footer.visible = true;



footer2.includeInLayout=true;

footer2.visible = true;



footer345.includeInLayout=true;

footer345.visible = true;

footer6.visible = true;

}

//Update the DataGrid layout to reflect the results.

validateNow();



}

 

 

mx:PrintDataGrid  id=myDataGrid height=100% width=100% 

   fontSize=10 fontFamily=Arial wordWrap=true textAlign=left

!-- Specify the columns to ensure that their order is correct. --

mx:columns

mx:DataGridColumn headerText=CRITERIA  dataField=category/

mx:DataGridColumn fontSize=9
headerText=Max.Score dataField=maxscore width=76/

mx:DataGridColumn fontSize=9
headerText=RATING dataField=urscore width=75/

/mx:columns

/mx:PrintDataGrid

 

 

 

 

 

 

 

 

 

 



RE: [flexcoders] Re: Are flex events really thread safe?

2009-02-03 Thread Tracy Spratt
And in case anyone comes upon this later, besides enter_frame, there are
two additional ways to break up the processing, one is callLater(), and
one is to use Timer.  You will find lots of discussion on the merits of
each, but no definitive best solution.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Sam Lai
Sent: Tuesday, February 03, 2009 7:09 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Are flex events really thread safe?

 

Yep. I had a similar situation - in the end, I had to rewrite the
lengthy processing code to split the task up and process a couple of
items per frame, hooking into the ENTER_FRAME event. That kept the UI
responsive, which was my main concern.

2009/2/3 Shyam shyammohan.sugat...@devicedriven.com
mailto:shyammohan.sugathan%40devicedriven.com :
 so if i write a lengthy (time consuming) operation in my event handler
 i will delay flex from calling the listener even if the other network
 operations completehmmm

 Thanks Paul.



 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Paul Andrews p...@... wrote:

 - Original Message -
 From: Shyam shyammohan.sugat...@...
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

 Sent: Tuesday, February 03, 2009 10:29 AM
 Subject: [flexcoders] Are flex events really thread safe?


  Consider this scenario.
 
 
  i have issued some 5 network calls form the flex client and my
  complete event Handler is one and the same for all these http
calls.
 
  can i be 100% sure that two simultaneous controls will never
execute
  the code in my event Handler ?

 The flash player only has one thread of execution.

  Putting it another way: how does flex handles event
synchronization?
 
  i have read up Ted Patrics article on the Elastic Racetrack
 

(http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.p
hp
http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.p
hp )
  but couldnt figure out the answer for the above :(
 
  Regards
  Shyam




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
 Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
1e62079f6847
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf
-1e62079f6847 
 Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups
Links





 



[flexcoders] Are flex events really thread safe?

2009-02-03 Thread Shyam
Consider this scenario.


i have issued some 5 network calls form the flex client and my
complete event Handler is one and the same for all these http calls. 

can i be 100% sure that two simultaneous controls will never execute
the code in my event Handler ?

Putting it another way: how does flex handles event synchronization? 

i have read up Ted Patrics article on the Elastic Racetrack
(http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.php)
but couldnt figure out the answer for the above :(

Regards
Shyam



Re: [flexcoders] Can we freeze(Fix) Any Column / Row in DataGrid

2009-02-03 Thread Martín Ruiz
Hello Dharmendra,
As far as I know, it is not possible with the initial properties of the grid.
The best approach will be to inherit the DataGrid and override the scrolling 
methods,
I did it to do something similar, like for example making the two first 
columns fixed (not resizable and not draggable), but not for your specific 
problem.
Take in consideration that there is a lot of internal code that you can't 
modify directly,
so you will have to use the namespace mx_internal (you will be getting into a 
dark part of the framework).

Hope this help

--- El mar 3-feb-09, Dharmendra Chauhan chauhan_i...@yahoo.com escribió:
De: Dharmendra Chauhan chauhan_i...@yahoo.com
Asunto: [flexcoders] Can we freeze(Fix) Any Column / Row  in DataGrid
Para: flexcoders@yahoogroups.com
Fecha: martes, 3 de febrero de 2009, 2:58 pm











Hi All,

 Is it possible to freeze any Column and Row in DataGrid while

keeping rest of the Row/Column moving.i e ,If my FG has got four

column named A,B,C,D ,E..Z.I want to freeze or fixed column B 

that means I scroll to right of the grid , B column should always be

visible.



In case of Row, If I select 10 th row,row from 1-10 should get

breezed(fixed) irrespective vertical scroll bar movement.



Please point me appropriate direction.



Regards,

Dharmendra Chouhan




  




 

















  Yahoo! Cocina
Recetas prácticas y comida saludable
http://ar.mujer.yahoo.com/cocina/

RE: [flexcoders] Custom Event and bubbling phase

2009-02-03 Thread Tracy Spratt
That looks ok, does it work with a base Event?  (a side note, in the
handler, you can access any public property of the panel via the
event.target reference, os you do not have to use a custom event. )

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of thelordsince1984
Sent: Tuesday, February 03, 2009 11:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom Event and bubbling phase

 

Hi,

i have a main application and there i create a popup panel...

from the popup panel i dispacth a custom event like this

var e1:CustomLoadEvent = new CustomLoadEvent(loadModule, true);
dispatchEvent(e1);

where loadModule is the type and the value true stands for bubbles..

then at the creationcomplete event within the main application i
create an eventlisteners for the event

addEventListener(loadModule, loadThisModule);

the loadThisModule function simple trace a string..

but it doesn't work!!Why?

Thanks in advance

Regards Lorenzo

 



[flexcoders] RemoteObject dynamic destination?

2009-02-03 Thread maunger
I'm trying to save myself a few minutes and my brain... may be a waste of 
effort but I'm 
hoping someone can help.

My local test environment is not SSL - our dev and production environments are. 
We have 
the services-config and remote configs set up properly no problem... everything 
works. 
Except, when testing locally, we put

mx:RemoteObject id=RemoteUserService destination=ColdFusion 
showBusyCursor=true source=mbfnetperf.remote.RemoteUserService 

and when pushing out to dev/production, we have to change to:
mx:RemoteObject id=RemoteUserService destination=SecureColdFusion 
showBusyCursor=true source=mbfnetperf.remote.RemoteUserService 

so i thought i could simply do:
destination={servicesDestination}

debug shows a valid value of ColdFusion in the variable servicesDestination 
but the call 
fails
[MessagingError message=''null' is not a valid destination.']

I don't want to recode all of the MXML calls to AS (it probably wouldn't take 
forever) but i 
was just wondering if there's a simple answer instead of rewriting

Thanks for any ideas - haven't found a solution in the archives



RE: [flexcoders] Can we freeze(Fix) Any Column / Row in DataGrid

2009-02-03 Thread Tracy Spratt
ADG has some of this functionality

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Martín Ruiz
Sent: Tuesday, February 03, 2009 1:21 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Can we freeze(Fix) Any Column / Row in DataGrid

 

Hello Dharmendra,
As far as I know, it is not possible with the initial properties of the grid.
The best approach will be to inherit the DataGrid and override the scrolling 
methods,
I did it to do something similar, like for example making the two first 
columns fixed (not resizable and not draggable), but not for your specific 
problem.
Take in consideration that there is a lot of internal code that you can't 
modify directly,
so you will have to use the namespace mx_internal (you will be getting into a 
dark part of the framework).

Hope this help

--- El mar 3-feb-09, Dharmendra Chauhan chauhan_i...@yahoo.com escribió:

De: Dharmendra Chauhan chauhan_i...@yahoo.com
Asunto: [flexcoders] Can we freeze(Fix) Any Column / Row in DataGrid
Para: flexcoders@yahoogroups.com
Fecha: martes, 3 de febrero de 2009, 2:58 pm

Hi All,
Is it possible to freeze any Column and Row in DataGrid while
keeping rest of the Row/Column moving.i e ,If my FG has got four
column named A,B,C,D ,E..Z.I want to freeze or fixed column B 
that means I scroll to right of the grid , B column should always be
visible.

In case of Row, If I select 10 th row,row from 1-10 should get
breezed(fixed) irrespective vertical scroll bar movement.

Please point me appropriate direction.

Regards,
Dharmendra Chouhan

 




Yahoo! Cocina
Recetas prácticas y comida saludable
Visitá http://ar.mujer.yahoo.com/cocina/

 



[flexcoders] Re: Can we freeze(Fix) Any Column / Row in DataGrid

2009-02-03 Thread aceoohay
I am looking for the same thing.

I reviewed the ADG, and found that you can lock rows at the top of 
the grid usinf lockedrowcount, but I couldn't see an equivalent for 
the bottom.

Paul

--- In flexcoders@yahoogroups.com, Dharmendra Chauhan 
chauhan_i...@... wrote:

 Hi All,
  Is it possible to freeze any Column and Row in DataGrid while
 keeping rest of the Row/Column moving.i e ,If my FG has got four
 column named A,B,C,D ,E..Z.I want to freeze or fixed column B 
 that means I scroll to right of the grid , B column should always 
be
 visible.
 
 In case of Row, If I select 10 th row,row from 1-10 should get
 breezed(fixed) irrespective vertical scroll bar movement.
 
 Please point me appropriate direction.
 
 Regards,
 Dharmendra Chouhan





[flexcoders] Re: Adding custom request headers to soap

2009-02-03 Thread valdhor
I have been trying to do this for a while myself (Specifically I have
a requirement to send WS-Security headers for the Web Service I am
trying to use.

The only thing I have found so far is this blog post:

http://www.svendens.com/?p=20

I have not had a chance to try it yet but if you do, please let me
know your results.


HTH


Steve


--- In flexcoders@yahoogroups.com, guy.tomer guy.to...@... wrote:

 --- In flexcoders@yahoogroups.com, guy.tomer guy.tomer@ wrote:
 
  Hello,
  
  Does anyone know a way to add headers to a soap request when:
  1. The headers are not defined in the wsdl
  2. We obviously don't want to change the generated flex builder 
  classes.
  
  Thanks!
  Guy
 
 
 Did some more digging. Very annoying! it seems like it's possible when 
 working with WebService in the mxml. However, when generating proxies 
 they wrap an AbstractWebService and then although one can get access 
 by calling getWebService()and then addHeader() things doesn't work.
 
 Can't find any formal note about it from Adobe. I'll still be glad to 
 any assistance.





[flexcoders] Re: Simplest way to create a webservice and deploy

2009-02-03 Thread valdhor
http://java.sun.com/webservices/docs/1.6/tutorial/doc/  ?


--- In flexcoders@yahoogroups.com, Vik vik@... wrote:

 Hie
 I am very new to web services. My very simple requirement is to
 return the records from a db table as an xml when i invoke a ws from
my flex
 application.
 
 I have already code ready which is having a java method fetchRow() 
which
 returns a List of objects (rows).
 
 Any idea how to about creating and deploying it as a web service
 
 Thankx and Regards
 
 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com





[flexcoders] master - detail with dataGrid

2009-02-03 Thread markgoldin_2000
I am building a master - detail interface where Master is a dataGrid 
and detail is a form.
...
mx:FormItem width=110 direction=horizontal label=Badge 
required=true
mx:TextInput id=badgeid focusOut=formatBadge(badgeid) 
text={templist.selectedIndex==-1 ? templist.dataProvider
[0].bedge_id : templist.dataProvider
[templist.selectedIndex].bedge_id}
width=50 restrict=0-9 maxChars=5/
/mx:FormItem  
...

I am getting an error at:
text={templist.selectedIndex==-1 ? templist.dataProvider
[0].bedge_id : templist.dataProvider
[templist.selectedIndex].bedge_id}

The error:
Error: Unknown Property: '-1'.
at 
mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscr
ipt/flash/proxy::getProperty()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\collections\ListCollectionView.a
s:694]
at anonymous()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
4]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\Watcher.as:182]
at mx.binding::ArrayElementWatcher/updateParent()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
2]
at mx.binding::Watcher/updateChildren()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\Watcher.as:128]
at mx.binding::PropertyWatcher/updateProperty()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:302]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\Watcher.as:182]
at mx.binding::PropertyWatcher/eventHandler()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:325]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:9156]
at mx.controls.listClasses::ListBase/set dataProvider()
[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as
:1827]
at mx.controls::DataGrid/set dataProvider()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\controls\DataGrid.as:1334]

If I choose continue for a couple of times it will work perfectly.

Please help. Thanks



[flexcoders] problem in method call within the component

2009-02-03 Thread kollepara2004
Hi,
I am relatively new to flex.I have a small problem.i have main mxml
file called Layout.mxml where i am calling component called register
which is separate mxml file.
I am getting following error when click register button to process my
function
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at components::Register/handleClickEvent()
at components::Register/___Register_Button1_click()

This is my Register file.

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; color=#0B113C
alpha=1.0
mx:Script
![CDATA[
import model.Account;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import flash.events.Event;

[Bindable]
public var createflag:Boolean;
[Bindable]
public var userName:String;
[Bindable]
public var passWord:String;
[Bindable]
public var name1:String;
[Bindable]
public var companyName:String;
[Bindable]
public var address1:String;
[Bindable]
public var address2:String;
[Bindable]
public var city:String;
[Bindable]
public var state:String;
[Bindable]
public var country:String;
[Bindable]
public var accountType:String;
[Bindable]
public var promotionCode:String;
[Bindable]
public var phone:String;
private function validRegister(event:ResultEvent):void{
createflag = event.result as Boolean;
if(createflag){
Alert.show(Registration completed.Login with username and 
password);
}
else{
Alert.show(Problem During Registration);
}
}
[Bindable]
public var account:Account

private function  handleClickEvent(eventObj:Event):void{
account.userName=userName;
account.passWord=passWord;
account.address1=address1;
account.address2=address2;
account.city=city;
account.company=companyName;
account.country=country;
account.phoneNumber=phone;
account.accountEmail=;
srv.create(account);
}

]]
/mx:Script
mx:Form borderColor=#9CC1DA color=#215FEE
backgroundColor=#EDF6F7 borderStyle=solid cornerRadius=20
id=RegisterId alpha=1.0 borderThickness=20 label=Register
mx:FormHeading label=Register Here/
mx:FormItem label=UserName
mx:TextInput text={userName}/
/mx:FormItem
mx:FormItem label=Password
mx:TextInput text={passWord}/
/mx:FormItem
mx:FormItem label=Confirm Password
mx:TextInput/
/mx:FormItem
mx:FormItem label=Name
mx:TextInput text={name1}/
/mx:FormItem
mx:FormItem label=Company Name
mx:TextInput text={companyName}/
/mx:FormItem
mx:FormItem label=Address1
mx:TextInput text={address1}/
/mx:FormItem
mx:FormItem label=Address2
mx:TextInput text={address2}/
/mx:FormItem
mx:FormItem label=City
mx:TextInput text={city}/
/mx:FormItem
mx:FormItem label=State
mx:ComboBox/mx:ComboBox
/mx:FormItem
mx:FormItem label=Country
mx:ComboBox/mx:ComboBox
/mx:FormItem
mx:FormItem label=Phone
mx:TextInput text={phone}/
/mx:FormItem
mx:FormItem label=Account Type
mx:ComboBox/mx:ComboBox
/mx:FormItem
mx:FormItem label=Promotion Code
mx:TextInput text={promotionCode} /
mx:Button label=Register click = 
handleClickEvent(event);/
/mx:FormItem
/mx:Form
mx:RemoteObject id=srv destination=rec
mx:method name=create result=validRegister(event)/
/mx:RemoteObject
/mx:VBox


///This is my component instantiation code in main file.

[flexcoders] Hello

2009-02-03 Thread mihksoft
Hi!

I want to create an animation like in this site
http://www.studioavc.ro/ in flex 3.
I tried with MovieClip but didn't find any sample how to build the
animation.
Can anyone give me an idea?

thanks



[flexcoders] Making the row of a DataGrid bold

2009-02-03 Thread ozziegt
I have a 5 column DataGrid, and I need certain rows to be bold (kind
of like an e-mail client). Is there any easy way to do this in Flex?

Thanks in advance



RE: [flexcoders] Re: Custom Event and bubbling phase

2009-02-03 Thread Tracy Spratt
First, tell us what you mean by it doesn't work.

 

Then:  That looks ok, does it work with a base Event? (a side note, in
the handler, you can access any public property of the panel via the
event.target reference, so you do not *have* to use a custom event. )

 

What part of the above do I need to explain further?

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of thelordsince1984
Sent: Tuesday, February 03, 2009 3:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Event and bubbling phase

 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt tspr...@... wrote:

 That looks ok, does it work with a base Event? (a side note, in the
 handler, you can access any public property of the panel via the
 event.target reference, os you do not have to use a custom event. )
 
 
 
 Tracy Spratt 
 Lariat Services 
 
 Flex development bandwidth available 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of thelordsince1984
 Sent: Tuesday, February 03, 2009 11:38 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Custom Event and bubbling phase
 
 
 
 Hi,
 
 i have a main application and there i create a popup panel...
 
 from the popup panel i dispacth a custom event like this
 
 var e1:CustomLoadEvent = new CustomLoadEvent(loadModule, true);
 dispatchEvent(e1);
 
 where loadModule is the type and the value true stands for bubbles..
 
 then at the creationcomplete event within the main application i
 create an eventlisteners for the event
 
 addEventListener(loadModule, loadThisModule);
 
 the loadThisModule function simple trace a string..
 
 but it doesn't work!!Why?
 
 Thanks in advance
 
 Regards Lorenzo

thanks for the reply..

CustomLoadEvent is a custom event, it extends Event class...but
doesn't work..i don't know why...
in this class i also override the clone method...

the CustomLoadEvent class has a public properties...i omit it in
dispatchevent function for simplicity..

the function loadThisModule catchs the event in this manner

private function loadThisModule(event:CustomLoadEvent):void{
trace(event.identification);
}
where identification is the public property of customloadevent class.

thanks in advance

Regards Lorenzo

 



[flexcoders] Re: Detect exeptions - help!!

2009-02-03 Thread oneworld95
Found out a solution: The problem was in the BufferedImage object in
the Java code. Java's BufferedImage couldn't handle some of the JPG's
and was choking. Once I passed the InputStream directly to a method
that uses the Java Advanced Imaging API, the problem went away. 

Using WireShark, I noticed that Flex kept calling the server and
getting back a 404 error (therefore it seemed to be hanging, even
though it was working behind the scenes). That convinced me it was a
problem on the server with Java.

- Alex

--- In flexcoders@yahoogroups.com, oneworld95 oneworl...@... wrote:

 I've run into a very frustrating situation and need your help:
 
  - Flex uploads a file to the server
  - The server reads it into a Java BufferedImage object. 
  - However, Java sometimes takes 40 seconds or longer to reply
  - In some cases it has difficulty reading the file. 
 
 In the cases of problems, Flex just hangs. It doesn't reply with
 anything. Is it timing out? Any help appreciated.





[flexcoders] Mapping complex objects to custom components with data binding?

2009-02-03 Thread Keith Hughitt
Hello all,

I am trying configure a DataGrid so that whenever a row is selected, a
custom Details components will be updated to show some various
information relating to that row.  I am able to retrieve the row
information whenever a row is selected, but I have not been as
successful getting it to the custom component using data binding.

Here is a simpler example of what I'm trying to do:

main.xml:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns:custom=custom.*
 mx:Script
 ![CDATA[
 import mx.controls.Alert;

 [Bindable]
 private var dog:Object;

 public function updateObj(e:Event):void {
 var myDog:Object = {
 breed: e.target.label,
 age  : 5
 }

 dog = myDog;
 }
 ]]
 /mx:Script
 mx:Button label=Lab click=updateObj(event) /
 mx:Button label=Poodle click=updateObj(event) /
 mx:Label text=Details: /
 custom:Details dataProvider={dog} /

/mx:Application
custom/Details.mxml:

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
horizontalAlign=center verticalAlign=middle
 mx:Script
 ![CDATA[
 public var dataProvider:Object;
 ]]
 /mx:Script
 mx:Text text=Breed: {data.breed} /
 mx:Text text=Age: {data.age} /
/mx:VBox

There is an article in the livedocs that is pretty close:
http://livedocs.adobe.com/flex/3/html/help.html?content=ascomponents_4.h\
tml, but I was hoping to be able to keep things simpler than that.

Anyone know if this is possible using a similar approach to the above?
Any suggestions?


Any advice would be greatly appreciated.

Thanks!
Keith



RE: [flexcoders] master - detail with dataGrid

2009-02-03 Thread Tracy Spratt
Hmm, that looks ok.  Have you tried cleaning the project?

 

Is it the -1 the is in fact the problem(try something different).  Maybe
a parse issue?  Shouldn't matter, but try (templist.selectedIndex==-1) ?

 

Also, the array syntax, [0] is probably going to cause a binding
warning,

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Tuesday, February 03, 2009 2:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] master - detail with dataGrid

 

I am building a master - detail interface where Master is a dataGrid 
and detail is a form.
...
mx:FormItem width=110 direction=horizontal label=Badge 
required=true
mx:TextInput id=badgeid focusOut=formatBadge(badgeid) 
text={templist.selectedIndex==-1 ? templist.dataProvider
[0].bedge_id : templist.dataProvider
[templist.selectedIndex].bedge_id}
width=50 restrict=0-9 maxChars=5/ 
/mx:FormItem 
...

I am getting an error at:
text={templist.selectedIndex==-1 ? templist.dataProvider
[0].bedge_id : templist.dataProvider
[templist.selectedIndex].bedge_id}

The error:
Error: Unknown Property: '-1'.
at 
mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscr
http://www.adobe.com/2006/actionscr 
ipt/flash/proxy::getProperty()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\collections\ListCollectionView.a
s:694]
at anonymous()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
4]
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\Watcher.as:182]
at mx.binding::ArrayElementWatcher/updateParent()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
2]
at mx.binding::Watcher/updateChildren()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\Watcher.as:128]
at mx.binding::PropertyWatcher/updateProperty()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:302]
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\Watcher.as:182]
at mx.binding::PropertyWatcher/eventHandler()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:325]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:9156]
at mx.controls.listClasses::ListBase/set dataProvider()
[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as
:1827]
at mx.controls::DataGrid/set dataProvider()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\controls\DataGrid.as:1334]

If I choose continue for a couple of times it will work perfectly.

Please help. Thanks

 



Re: [flexcoders] How to instantiate a weak reference

2009-02-03 Thread Greg Hess
Very interesting. Not exactly what I wanted but I guess that's what I
will have to work with in AS.

I was hoping I could just return WeakReferences that would resolve to
the type it is referencing, but for that I guess we need support from
the VM. So seamless in Java.

So for me to implement a cache using WeakReferences I will need to
change my dataDescriptors, and everywhere I access my Objects to call
getObject().

I will have to read up more on managing object caches in AS, not sure
if this is the best strategy in AS.

Many thanks Manish!

-Greg




On Tue, Feb 3, 2009 at 3:33 PM, Manish Jethani manish.jeth...@gmail.com wrote:
 On Tue, Feb 3, 2009 at 11:11 PM, Greg Hess flexeff...@gmail.com wrote:

 Objects are all passed by reference, I want to pass a weak reference
 back to callers who request items from the cache, much like the
 internal implementation must do in some way when
 addEventListener(...true) as a weak reference.

 For example:

 public function getItem( id:String ):Item
 {
var item:Item = getItemFromCache(id);
return new WeakReference( item );
 }

 So that anyone who has obtained an item from cache will not prevent
 the object from being garbage collected.


 http://manishjethani.com/blog/2008/07/31/using-weak-references-in-actionscript-3/
 Manish
 


[flexcoders] Re: Making the row of a DataGrid bold

2009-02-03 Thread ozziegt
Thanks. It's working great...too bad it requires an AdvancedDataGrid
though.

--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 Advanced DataGrid and styleFunction
 
  
 
 Tracy Spratt 
 Lariat Services 
 
 Flex development bandwidth available 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of ozziegt
 Sent: Tuesday, February 03, 2009 3:10 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Making the row of a DataGrid bold
 
  
 
 I have a 5 column DataGrid, and I need certain rows to be bold (kind
 of like an e-mail client). Is there any easy way to do this in Flex?
 
 Thanks in advance





[flexcoders] Re: Adding custom request headers to soap

2009-02-03 Thread guy.tomer
--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I have been trying to do this for a while myself (Specifically I 
have
 a requirement to send WS-Security headers for the Web Service I am
 trying to use.
 
 The only thing I have found so far is this blog post:
 
 http://www.svendens.com/?p=20
 
 I have not had a chance to try it yet but if you do, please let me
 know your results.
 
 
 HTH
 
 
 Steve
 
 
 --- In flexcoders@yahoogroups.com, guy.tomer guy.tomer@ wrote:
 
  --- In flexcoders@yahoogroups.com, guy.tomer guy.tomer@ wrote:
  
   Hello,
   
   Does anyone know a way to add headers to a soap request when:
   1. The headers are not defined in the wsdl
   2. We obviously don't want to change the generated flex builder 
   classes.
   
   Thanks!
   Guy
  
  
  Did some more digging. Very annoying! it seems like it's possible 
when 
  working with WebService in the mxml. However, when generating 
proxies 
  they wrap an AbstractWebService and then although one can get 
access 
  by calling getWebService()and then addHeader() things doesn't 
work.
  
  Can't find any formal note about it from Adobe. I'll still be glad 
to 
  any assistance.
 


Thanks but this blog explains how to do it with WebService and he says  
it doesn't work with generated proxies. I know that is possible, but 
we rather work with generated proxies which is much more convenient.

Guy



[flexcoders] Re: master - detail with dataGrid

2009-02-03 Thread markgoldin_2000
I tried this:
text={templist.selectedIndex==-1 ? templist.dataProvider.getItemAt
(0).bedge_id : templist.dataProvider.getItemAt
(templist.selectedIndex).bedge_id}

and it is actually working. Thanks!

--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 Hmm, that looks ok.  Have you tried cleaning the project?
 
  
 
 Is it the -1 the is in fact the problem(try something different).  
Maybe
 a parse issue?  Shouldn't matter, but try (templist.selectedIndex==-
1) ?
 
  
 
 Also, the array syntax, [0] is probably going to cause a binding
 warning,
 
  
 
 Tracy Spratt 
 Lariat Services 
 
 Flex development bandwidth available 
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:flexcod...@yahoogroups.com] On
 Behalf Of markgoldin_2000
 Sent: Tuesday, February 03, 2009 2:32 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] master - detail with dataGrid
 
  
 
 I am building a master - detail interface where Master is a 
dataGrid 
 and detail is a form.
 ...
 mx:FormItem width=110 direction=horizontal label=Badge 
 required=true
 mx:TextInput id=badgeid focusOut=formatBadge(badgeid) 
 text={templist.selectedIndex==-1 ? templist.dataProvider
 [0].bedge_id : templist.dataProvider
 [templist.selectedIndex].bedge_id}
 width=50 restrict=0-9 maxChars=5/ 
 /mx:FormItem 
 ...
 
 I am getting an error at:
 text={templist.selectedIndex==-1 ? templist.dataProvider
 [0].bedge_id : templist.dataProvider
 [templist.selectedIndex].bedge_id}
 
 The error:
 Error: Unknown Property: '-1'.
 at 
 
mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscr
 http://www.adobe.com/2006/actionscr 
 ipt/flash/proxy::getProperty()[E:\dev\3.1.0
 
\frameworks\projects\framework\src\mx\collections\ListCollectionView.a
 s:694]
 at anonymous()[E:\dev\3.1.0
 
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
 4]
 at Function/http://adobe.com/AS3/2006/builtin::apply
 http://adobe.com/AS3/2006/builtin::apply ()
 at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\binding\Watcher.as:182]
 at mx.binding::ArrayElementWatcher/updateParent()[E:\dev\3.1.0
 
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
 2]
 at mx.binding::Watcher/updateChildren()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\binding\Watcher.as:128]
 at mx.binding::PropertyWatcher/updateProperty()[E:\dev\3.1.0
 
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:302]
 at Function/http://adobe.com/AS3/2006/builtin::apply
 http://adobe.com/AS3/2006/builtin::apply ()
 at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\binding\Watcher.as:182]
 at mx.binding::PropertyWatcher/eventHandler()[E:\dev\3.1.0
 
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:325]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\core\UIComponent.as:9156]
 at mx.controls.listClasses::ListBase/set dataProvider()
 [E:\dev\3.1.0
 
\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as
 :1827]
 at mx.controls::DataGrid/set dataProvider()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\controls\DataGrid.as:1334]
 
 If I choose continue for a couple of times it will work perfectly.
 
 Please help. Thanks





[flexcoders] Re: master - detail with dataGrid

2009-02-03 Thread markgoldin_2000
The only thing is that I am getting warnings like this:
warning: unable to bind to property 'bedge_id' on class 'XML' (class 
is not an IEventDispatcher)
Is it possible to get rid of it?

--- In flexcoders@yahoogroups.com, markgoldin_2000 
markgoldin_2...@... wrote:

 I tried this:
 text={templist.selectedIndex==-1 ? templist.dataProvider.getItemAt
 (0).bedge_id : templist.dataProvider.getItemAt
 (templist.selectedIndex).bedge_id}
 
 and it is actually working. Thanks!
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
 
  Hmm, that looks ok.  Have you tried cleaning the project?
  
   
  
  Is it the -1 the is in fact the problem(try something 
different).  
 Maybe
  a parse issue?  Shouldn't matter, but try 
(templist.selectedIndex==-
 1) ?
  
   
  
  Also, the array syntax, [0] is probably going to cause a binding
  warning,
  
   
  
  Tracy Spratt 
  Lariat Services 
  
  Flex development bandwidth available 
  
  
  
  From: flexcoders@yahoogroups.com 
 [mailto:flexcod...@yahoogroups.com] On
  Behalf Of markgoldin_2000
  Sent: Tuesday, February 03, 2009 2:32 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] master - detail with dataGrid
  
   
  
  I am building a master - detail interface where Master is a 
 dataGrid 
  and detail is a form.
  ...
  mx:FormItem width=110 direction=horizontal label=Badge 
  required=true
  mx:TextInput id=badgeid focusOut=formatBadge(badgeid) 
  text={templist.selectedIndex==-1 ? templist.dataProvider
  [0].bedge_id : templist.dataProvider
  [templist.selectedIndex].bedge_id}
  width=50 restrict=0-9 maxChars=5/ 
  /mx:FormItem 
  ...
  
  I am getting an error at:
  text={templist.selectedIndex==-1 ? templist.dataProvider
  [0].bedge_id : templist.dataProvider
  [templist.selectedIndex].bedge_id}
  
  The error:
  Error: Unknown Property: '-1'.
  at 
  
 
mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscr
  http://www.adobe.com/2006/actionscr 
  ipt/flash/proxy::getProperty()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\collections\ListCollectionView.a
  s:694]
  at anonymous()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
  4]
  at Function/http://adobe.com/AS3/2006/builtin::apply
  http://adobe.com/AS3/2006/builtin::apply ()
  at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\binding\Watcher.as:182]
  at mx.binding::ArrayElementWatcher/updateParent()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
  2]
  at mx.binding::Watcher/updateChildren()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\binding\Watcher.as:128]
  at mx.binding::PropertyWatcher/updateProperty()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:302]
  at Function/http://adobe.com/AS3/2006/builtin::apply
  http://adobe.com/AS3/2006/builtin::apply ()
  at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\binding\Watcher.as:182]
  at mx.binding::PropertyWatcher/eventHandler()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:325]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\core\UIComponent.as:9156]
  at mx.controls.listClasses::ListBase/set dataProvider()
  [E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as
  :1827]
  at mx.controls::DataGrid/set dataProvider()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\controls\DataGrid.as:1334]
  
  If I choose continue for a couple of times it will work perfectly.
  
  Please help. Thanks
 





[flexcoders] FW: [svn] 4815: Feature: Client side load balancing.

2009-02-03 Thread Gregor Kiddie
I noticed this commit today and it sounds pretty interesting. There is
no link giving some more information, anyone from Adobe willing to
share?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: Mete Atamel [mailto:mem...@adobeforums.com] 
Sent: 03 February 2009 18:47
To: flexsdk-comm...@adobeforums.com
Subject: [svn] 4815: Feature: Client side load balancing.

 

A new discussion was started by Mete Atamel in 

Commits --
  [svn] 4815: Feature: Client side load balancing.
http://www.adobeforums.com/webx?50@@.59b7c518!login=true 

To read this message or post to the discussion, please click on the
message-title link above. No further email notifications will be sent
for this discussion until you visit the conference and read this thread.

Use the unsubscribe
http://www.adobeforums.com/webx?280@@.59b7c518!folder=.3c061177  form
to cancel your email subscription.



[flexcoders] Re: AdvancedDatagrid static row for totals.

2009-02-03 Thread aceoohay
Hello???
--- In flexcoders@yahoogroups.com, aceoohay pa...@... wrote:

 I have finally switched to Flex 3, and one of the reasons I have 
done 
 this is to make use of the ADG.
 
 In a number of places throughout my apps I have used Alex's 
 FooterDataGrid and it works reasonably well. I was under the 
 impression that one of the features of the ADG was going to be 
static 
 rows for totals, or whatever you might need.
 
 I have not found that capability. Was it wishful thinking, or is 
the 
 feature there and I just can't find it?
 
 Anyone info about this would be greatly appreciated.
 
 Paul





[flexcoders] Re: Prevent ItemRenderer click from selecting row?

2009-02-03 Thread fourctv
have you tried datagrid.selectedItems=null?

--- In flexcoders@yahoogroups.com, Dennis Falling dfall...@... wrote:

 I have an ItemRenderer with buttons in it.  In the click listener functions
 for these buttons, I call event.stopImmediatePropagation (and
 preventDefault, though that doesn't seem relevant), but the row is still
 selected.  How can I prevent it from receiving the click and highlighting
 itself?
 Thanks.






[flexcoders] Another 1034 - events and event types

2009-02-03 Thread Richard Rodseth
I have a few MXML components that provide reusable pickers for things like
date ranges. I also nest these components.
Is it OK to reuse event types like change and activate, but associated
with different event classes?
For that matter must an event type always be associated with one class?

I dispatching non-bubbling events from these components, and set up the
meta-info as expected:

mx:Metadata

[Event(name=activate,type=com.companyname.appname.event.picker.DateRangePickerEvent)]
/mx:Metadata

and use them like this:

picker:DateRangePicker
activate=onActivateDateRangePicker(event)
/

I'm occasionally getting an error  like this:

TypeError: Error #1034: Type Coercion failed: cannot convert
flash.events::ev...@f4130d1 to
com.companyname.appname.event.picker.DateRangePickerEvent.

Who would be trying to cast an event to my type? Changing the event type to
activatePicker seems to be helping, but I'd rather not have a
proliferation.


[flexcoders] Prevent ItemRenderer click from selecting row?

2009-02-03 Thread Dennis Falling
I have an ItemRenderer with buttons in it.  In the click listener functions
for these buttons, I call event.stopImmediatePropagation (and
preventDefault, though that doesn't seem relevant), but the row is still
selected.  How can I prevent it from receiving the click and highlighting
itself?
Thanks.


RE: [flexcoders] Can you put a UIComponent in a Sprite

2009-02-03 Thread Ryan Graham

Sure it's possible... Sprite.addChild() takes a DisplayObject as a
parameter, and both Sprite and UIComponent are DisplayObjects:

 

UIComponent  FlexSprite
http://livedocs.adobe.com/flex/3/langref/mx/core/FlexSprite.html  
Sprite
http://livedocs.adobe.com/flex/3/langref/flash/display/Sprite.html  
DisplayObjectContainer
http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObjectCon
tainer.html  InteractiveObject
http://livedocs.adobe.com/flex/3/langref/flash/display/InteractiveObjec
t.html  DisplayObject
http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObject.ht
ml  EventDispatcher
http://livedocs.adobe.com/flex/3/langref/flash/events/EventDispatcher.h
tml  Object http://livedocs.adobe.com/flex/3/langref/Object.html 

 

Can't say flex will like it so much though. What are you trying to do?

 

HTH,

Ryan

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jason Ervin
Sent: Tuesday, February 03, 2009 4:26 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can you put a UIComponent in a Sprite

 

Is it possible to put a UIComponent in a Sprite? I assume not since
Sprite is lower on the chain and since it doesn't contain the timeline.

Yes? No?

 



This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.image001.gif

RE: [flexcoders] Another 1034 - events and event types

2009-02-03 Thread Tracy Spratt
I would not use the same type name.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Richard Rodseth
Sent: Tuesday, February 03, 2009 6:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Another 1034 - events and event types

 

I have a few MXML components that provide reusable pickers for things
like date ranges. I also nest these components.
Is it OK to reuse event types like change and activate, but
associated with different event classes?
For that matter must an event type always be associated with one class? 

I dispatching non-bubbling events from these components, and set up the
meta-info as expected:

mx:Metadata
 
[Event(name=activate,type=com.companyname.appname.event.picker.DateRa
ngePickerEvent)]
/mx:Metadata

and use them like this:

picker:DateRangePicker 
activate=onActivateDateRangePicker(event)
/

I'm occasionally getting an error  like this:

TypeError: Error #1034: Type Coercion failed: cannot convert
flash.events::ev...@f4130d1 to
com.companyname.appname.event.picker.DateRangePickerEvent.

Who would be trying to cast an event to my type? Changing the event type
to activatePicker seems to be helping, but I'd rather not have a
proliferation.





 



[flexcoders] Re: Custom Event and bubbling phase

2009-02-03 Thread thelordsince1984
--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 That looks ok, does it work with a base Event?  (a side note, in the
 handler, you can access any public property of the panel via the
 event.target reference, os you do not have to use a custom event. )
 
  
 
 Tracy Spratt 
 Lariat Services 
 
 Flex development bandwidth available 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of thelordsince1984
 Sent: Tuesday, February 03, 2009 11:38 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Custom Event and bubbling phase
 
  
 
 Hi,
 
 i have a main application and there i create a popup panel...
 
 from the popup panel i dispacth a custom event like this
 
 var e1:CustomLoadEvent = new CustomLoadEvent(loadModule, true);
 dispatchEvent(e1);
 
 where loadModule is the type and the value true stands for bubbles..
 
 then at the creationcomplete event within the main application i
 create an eventlisteners for the event
 
 addEventListener(loadModule, loadThisModule);
 
 the loadThisModule function simple trace a string..
 
 but it doesn't work!!Why?
 
 Thanks in advance
 
 Regards Lorenzo

thanks for the reply..

CustomLoadEvent is a custom event, it extends Event class...but
doesn't work..i don't know why...
in this class i also override the clone method...

the CustomLoadEvent class has a public properties...i omit it in
dispatchevent function for simplicity..

the function loadThisModule catchs the event in this manner

private function loadThisModule(event:CustomLoadEvent):void{
trace(event.identification);
}
where identification is the public property of customloadevent class.

thanks in advance

Regards Lorenzo



[flexcoders] Can you put a UIComponent in a Sprite

2009-02-03 Thread Jason Ervin
Is it possible to put a UIComponent in a Sprite?  I assume not since
Sprite is lower on the chain and since it doesn't contain the timeline.

Yes? No?



Re: [flexcoders] How to instantiate a weak reference

2009-02-03 Thread Manish Jethani
On Tue, Feb 3, 2009 at 11:11 PM, Greg Hess flexeff...@gmail.com wrote:

Objects are all passed by reference, I want to pass a weak reference
 back to callers who request items from the cache, much like the
 internal implementation must do in some way when
 addEventListener(...true) as a weak reference.

 For example:

 public function getItem( id:String ):Item
 {
var item:Item = getItemFromCache(id);
return new WeakReference( item );
 }

 So that anyone who has obtained an item from cache will not prevent
 the object from being garbage collected.



http://manishjethani.com/blog/2008/07/31/using-weak-references-in-actionscript-3/

Manish


[flexcoders] Re: Need Details Creating Custom UIComponents with AS3

2009-02-03 Thread valdhor
Works for me - Firefox 3.0.5/FP 9.0.124


--- In flexcoders@yahoogroups.com, Jason jason.merr...@... wrote:

 Hmmm - thanks - however, the video does not play.  Does it require 
 Flash player 10?
 
  Try Deepa's talk from MAX, it was really good on creating components 
 in
  Flex 3.
  
  http://tv.adobe.com/#vi+f15384v1002
  
  I think that's the right link...
  
   
  
  Gk.
  
  Gregor Kiddie





RE: [flexcoders] Making the row of a DataGrid bold

2009-02-03 Thread Tracy Spratt
Advanced DataGrid and styleFunction

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of ozziegt
Sent: Tuesday, February 03, 2009 3:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Making the row of a DataGrid bold

 

I have a 5 column DataGrid, and I need certain rows to be bold (kind
of like an e-mail client). Is there any easy way to do this in Flex?

Thanks in advance

 



RE: [flexcoders] Re: master - detail with dataGrid

2009-02-03 Thread Tracy Spratt
Wrap the expression in an XML function:

XML(templist.dataProvider.getItemAt (0)).bedge_id

 

getItemAt returns a dynamic object (containing your xml node), and you
can't bind to a dynamic object.

 

Do it for both expressions.

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Tuesday, February 03, 2009 4:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: master - detail with dataGrid

 

The only thing is that I am getting warnings like this:
warning: unable to bind to property 'bedge_id' on class 'XML' (class 
is not an IEventDispatcher)
Is it possible to get rid of it?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, markgoldin_2000 
markgoldin_2...@... wrote:

 I tried this:
 text={templist.selectedIndex==-1 ? templist.dataProvider.getItemAt
 (0).bedge_id : templist.dataProvider.getItemAt
 (templist.selectedIndex).bedge_id}
 
 and it is actually working. Thanks!
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote:
 
  Hmm, that looks ok. Have you tried cleaning the project?
  
  
  
  Is it the -1 the is in fact the problem(try something 
different). 
 Maybe
  a parse issue? Shouldn't matter, but try 
(templist.selectedIndex==-
 1) ?
  
  
  
  Also, the array syntax, [0] is probably going to cause a binding
  warning,
  
  
  
  Tracy Spratt 
  Lariat Services 
  
  Flex development bandwidth available 
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On
  Behalf Of markgoldin_2000
  Sent: Tuesday, February 03, 2009 2:32 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

  Subject: [flexcoders] master - detail with dataGrid
  
  
  
  I am building a master - detail interface where Master is a 
 dataGrid 
  and detail is a form.
  ...
  mx:FormItem width=110 direction=horizontal label=Badge 
  required=true
  mx:TextInput id=badgeid focusOut=formatBadge(badgeid) 
  text={templist.selectedIndex==-1 ? templist.dataProvider
  [0].bedge_id : templist.dataProvider
  [templist.selectedIndex].bedge_id}
  width=50 restrict=0-9 maxChars=5/ 
  /mx:FormItem 
  ...
  
  I am getting an error at:
  text={templist.selectedIndex==-1 ? templist.dataProvider
  [0].bedge_id : templist.dataProvider
  [templist.selectedIndex].bedge_id}
  
  The error:
  Error: Unknown Property: '-1'.
  at 
  
 
mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscr
http://www.adobe.com/2006/actionscr 
  http://www.adobe.com/2006/actionscr
http://www.adobe.com/2006/actionscr  
  ipt/flash/proxy::getProperty()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\collections\ListCollectionView.a
  s:694]
  at anonymous()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
  4]
  at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply 
  http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply  ()
  at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\binding\Watcher.as:182]
  at mx.binding::ArrayElementWatcher/updateParent()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\ArrayElementWatcher.as:8
  2]
  at mx.binding::Watcher/updateChildren()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\binding\Watcher.as:128]
  at mx.binding::PropertyWatcher/updateProperty()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:302]
  at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply 
  http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply  ()
  at mx.binding::Watcher/wrapUpdate()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\binding\Watcher.as:182]
  at mx.binding::PropertyWatcher/eventHandler()[E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:325]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\core\UIComponent.as:9156]
  at mx.controls.listClasses::ListBase/set dataProvider()
  [E:\dev\3.1.0
  
 
\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as
  :1827]
  at mx.controls::DataGrid/set dataProvider()[E:\dev\3.1.0
  \frameworks\projects\framework\src\mx\controls\DataGrid.as:1334]
  
  If I choose continue for a couple of times it will work perfectly.
  
  Please help. Thanks
 


 



Re: [flexcoders] Another 1034 - events and event types

2009-02-03 Thread Richard Rodseth
As Flex, or as any others within the app?

On Tue, Feb 3, 2009 at 4:25 PM, Tracy Spratt tspr...@lariatinc.com wrote:

I would not use the same type name.



 Tracy Spratt
 Lariat Services

 Flex development bandwidth available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Richard Rodseth
 *Sent:* Tuesday, February 03, 2009 6:11 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Another 1034 - events and event types



 I have a few MXML components that provide reusable pickers for things like
 date ranges. I also nest these components.
 Is it OK to reuse event types like change and activate, but associated
 with different event classes?
 For that matter must an event type always be associated with one class?

 I dispatching non-bubbling events from these components, and set up the
 meta-info as expected:

 mx:Metadata

 [Event(name=activate,type=com.companyname.appname.event.picker.DateRangePickerEvent)]
 /mx:Metadata

 and use them like this:

 picker:DateRangePicker
 activate=onActivateDateRangePicker(event)
 /

 I'm occasionally getting an error  like this:

 TypeError: Error #1034: Type Coercion failed: cannot convert
 flash.events::ev...@f4130d1 to
 com.companyname.appname.event.picker.DateRangePickerEvent.

 Who would be trying to cast an event to my type? Changing the event type to
 activatePicker seems to be helping, but I'd rather not have a
 proliferation.







RE: [flexcoders] problem in method call within the component

2009-02-03 Thread Tracy Spratt
Which line is throwing the error?  that will tell us what is null.  Oh,
never mind.  You declared the account variable but did not instantiate
it:

account = new Account();

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of kollepara2004
Sent: Tuesday, February 03, 2009 2:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] problem in method call within the component

 

Hi,
I am relatively new to flex.I have a small problem.i have main mxml
file called Layout.mxml where i am calling component called register
which is separate mxml file.
I am getting following error when click register button to process my
function
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at components::Register/handleClickEvent()
at components::Register/___Register_Button1_click()

This is my Register file.

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  color=#0B113C
alpha=1.0
mx:Script
![CDATA[
import model.Account;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import flash.events.Event;

[Bindable]
public var createflag:Boolean;
[Bindable]
public var userName:String;
[Bindable]
public var passWord:String;
[Bindable]
public var name1:String;
[Bindable]
public var companyName:String;
[Bindable]
public var address1:String;
[Bindable]
public var address2:String;
[Bindable]
public var city:String;
[Bindable]
public var state:String;
[Bindable]
public var country:String;
[Bindable]
public var accountType:String;
[Bindable]
public var promotionCode:String;
[Bindable]
public var phone:String;
private function validRegister(event:ResultEvent):void{
createflag = event.result as Boolean;
if(createflag){
Alert.show(Registration completed.Login with username and password);
}
else{
Alert.show(Problem During Registration);
}
}
[Bindable]
public var account:Account

private function handleClickEvent(eventObj:Event):void{
account.userName=userName;
account.passWord=passWord;
account.address1=address1;
account.address2=address2;
account.city=city;
account.company=companyName;
account.country=country;
account.phoneNumber=phone;
account.accountEmail=;
srv.create(account);
}

]]
/mx:Script
mx:Form borderColor=#9CC1DA color=#215FEE
backgroundColor=#EDF6F7 borderStyle=solid cornerRadius=20
id=RegisterId alpha=1.0 borderThickness=20 label=Register
mx:FormHeading label=Register Here/
mx:FormItem label=UserName
mx:TextInput text={userName}/
/mx:FormItem
mx:FormItem label=Password
mx:TextInput text={passWord}/
/mx:FormItem
mx:FormItem label=Confirm Password
mx:TextInput/
/mx:FormItem
mx:FormItem label=Name
mx:TextInput text={name1}/
/mx:FormItem
mx:FormItem label=Company Name
mx:TextInput text={companyName}/
/mx:FormItem
mx:FormItem label=Address1
mx:TextInput text={address1}/
/mx:FormItem
mx:FormItem label=Address2
mx:TextInput text={address2}/
/mx:FormItem
mx:FormItem label=City
mx:TextInput text={city}/
/mx:FormItem
mx:FormItem label=State
mx:ComboBox/mx:ComboBox
/mx:FormItem
mx:FormItem label=Country
mx:ComboBox/mx:ComboBox
/mx:FormItem
mx:FormItem label=Phone
mx:TextInput text={phone}/
/mx:FormItem
mx:FormItem label=Account Type
mx:ComboBox/mx:ComboBox
/mx:FormItem
mx:FormItem label=Promotion Code
mx:TextInput text={promotionCode} /
mx:Button label=Register click = handleClickEvent(event);/
/mx:FormItem
/mx:Form
mx:RemoteObject id=srv destination=rec
mx:method name=create result=validRegister(event)/
/mx:RemoteObject
/mx:VBox

///This is my component instantiation code in main file.
components:Register id=register x=250 y=600/

Thanks is advance.

 



Re: [flexcoders] Another 1034 - events and event types

2009-02-03 Thread Richard Rodseth
I see that Tree dispatches a change which is of type ListEvent, whereas
Button, Checkbox etc dispatch a change of type Event.

So if I can use changePicker in a variety of my components, rather than
changeDate, changeAddress etc., why not just change.

It's a little hard to debug, since there's no stack crawl on the 1034.

On Tue, Feb 3, 2009 at 4:39 PM, Richard Rodseth rrods...@gmail.com wrote:

 As Flex, or as any others within the app?


 On Tue, Feb 3, 2009 at 4:25 PM, Tracy Spratt tspr...@lariatinc.comwrote:

I would not use the same type name.



 Tracy Spratt
 Lariat Services

 Flex development bandwidth available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Richard Rodseth
 *Sent:* Tuesday, February 03, 2009 6:11 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Another 1034 - events and event types



 I have a few MXML components that provide reusable pickers for things like
 date ranges. I also nest these components.
 Is it OK to reuse event types like change and activate, but associated
 with different event classes?
 For that matter must an event type always be associated with one class?

 I dispatching non-bubbling events from these components, and set up the
 meta-info as expected:

 mx:Metadata

 [Event(name=activate,type=com.companyname.appname.event.picker.DateRangePickerEvent)]
 /mx:Metadata

 and use them like this:

 picker:DateRangePicker
 activate=onActivateDateRangePicker(event)
 /

 I'm occasionally getting an error  like this:

 TypeError: Error #1034: Type Coercion failed: cannot convert
 flash.events::ev...@f4130d1 to
 com.companyname.appname.event.picker.DateRangePickerEvent.

 Who would be trying to cast an event to my type? Changing the event type
 to activatePicker seems to be helping, but I'd rather not have a
 proliferation.









Re: [flexcoders] Another 1034 - events and event types

2009-02-03 Thread Jeffry Houser


A single event class being used for multiple events is common within 
the Flex Framework; why recommend not re-using the same type? 


Back to the problem:
Are you sure that your event class extends flash.events.Event ?  I 
might expect odd errors if not. 
Have you tried running the code in debug mode to see what is going on; 
maybe isolate the line which causing the error. 


Tracy Spratt wrote:


I would not use the same type name.

 


Tracy Spratt
Lariat Services

Flex development bandwidth available



*From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] 
*On Behalf Of *Richard Rodseth

*Sent:* Tuesday, February 03, 2009 6:11 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Another 1034 - events and event types

 

I have a few MXML components that provide reusable pickers for things 
like date ranges. I also nest these components.
Is it OK to reuse event types like change and activate, but 
associated with different event classes?

For that matter must an event type always be associated with one class?

I dispatching non-bubbling events from these components, and set up 
the meta-info as expected:


mx:Metadata
   
[Event(name=activate,type=com.companyname.appname.event.picker.DateRangePickerEvent)]

/mx:Metadata

and use them like this:

picker:DateRangePicker
activate=onActivateDateRangePicker(event)
/

I'm occasionally getting an error  like this:

TypeError: Error #1034: Type Coercion failed: cannot convert 
flash.events::ev...@f4130d1 to 
com.companyname.appname.event.picker.DateRangePickerEvent.


Who would be trying to cast an event to my type? Changing the event 
type to activatePicker seems to be helping, but I'd rather not have 
a proliferation.


--

Flexcoders Mailing List



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



RE: [flexcoders] Re: AdvancedDatagrid static row for totals.

2009-02-03 Thread Tracy Spratt
You got a few responses, including one very short one from me.

 

The short answer is no.

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of aceoohay
Sent: Tuesday, February 03, 2009 6:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AdvancedDatagrid static row for totals.

 

Hello???
--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, aceoohay pa...@... wrote:

 I have finally switched to Flex 3, and one of the reasons I have 
done 
 this is to make use of the ADG.
 
 In a number of places throughout my apps I have used Alex's 
 FooterDataGrid and it works reasonably well. I was under the 
 impression that one of the features of the ADG was going to be 
static 
 rows for totals, or whatever you might need.
 
 I have not found that capability. Was it wishful thinking, or is 
the 
 feature there and I just can't find it?
 
 Anyone info about this would be greatly appreciated.
 
 Paul


 



Re: [flexcoders] Another 1034 - events and event types

2009-02-03 Thread Richard Rodseth
Hi Jeff. Yes, my event classes do descend from Event. I've also run in debug
mode, but you don't get a
stack crawl on the 1034. It just says main thread.

On Tue, Feb 3, 2009 at 4:54 PM, Jeffry Houser j...@farcryfly.com wrote:


  A single event class being used for multiple events is common within the
 Flex Framework; why recommend not re-using the same type?

 Back to the problem:
  Are you sure that your event class extends flash.events.Event ?  I might
 expect odd errors if not.
  Have you tried running the code in debug mode to see what is going on;
 maybe isolate the line which causing the error.

 Tracy Spratt wrote:

  I would not use the same type name.



 Tracy Spratt
 Lariat Services

 Flex development bandwidth available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Richard Rodseth
 *Sent:* Tuesday, February 03, 2009 6:11 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Another 1034 - events and event types



 I have a few MXML components that provide reusable pickers for things like
 date ranges. I also nest these components.
 Is it OK to reuse event types like change and activate, but associated
 with different event classes?
 For that matter must an event type always be associated with one class?

 I dispatching non-bubbling events from these components, and set up the
 meta-info as expected:

 mx:Metadata

 [Event(name=activate,type=com.companyname.appname.event.picker.DateRangePickerEvent)]
 /mx:Metadata

 and use them like this:

 picker:DateRangePicker
 activate=onActivateDateRangePicker(event)
 /

 I'm occasionally getting an error  like this:

 TypeError: Error #1034: Type Coercion failed: cannot convert
 flash.events::ev...@f4130d1 to
 com.companyname.appname.event.picker.DateRangePickerEvent.

 Who would be trying to cast an event to my type? Changing the event type to
 activatePicker seems to be helping, but I'd rather not have a
 proliferation.

 --
  Flexcoders Mailing List



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

  



[flexcoders] Re: Adding styles to UIComponents

2009-02-03 Thread Amy
--- In flexcoders@yahoogroups.com, superbokbok superbok...@... 
wrote:

 Hi all...
 
 Was wondering if this was at all possible...
 I have a stylesheet that defines a number of settings. One of them
 being a background image to be used for a component.
 
 If I use any of the container classes and set the styleName 
= 'newStyle'
 and then in my css have 
 .newStyle
 {
  backgroundImage:Embed('../libs/bgAgree.png');
 }
 then I can see an image as the background.
 
 For most of my needs, the UIComponent is just fine and lightweight.
 Problem is, if I define styleName = 'newStyle' on a UIComponent, the
 background image never shows. I know there is no backgroundImage
 property of the UIComponent. I've tried implementing the 
IStyleClient
  ISimpleStyleClient but I still cannot set the backgroundImage of a
 UIComponent through CSS. 
 I've had to resort to using a Box container, adding that to the
 UIComponent and set the style on the Box. 
 Seems a bit overkill for just wanting to get a background image 
styled
 through CSSon a UIComponent.
 
 Is there such a way to define a backgroundImage on a UIComponent
 controlled through css???

http://livedocs.adobe.com/flex/3/html/skinstyle_3.html

There's no reason you can't call your style backgroundImage.  



Re: [flexcoders] Another 1034 - events and event types

2009-02-03 Thread Richard Rodseth
It's a little hard to be certain, since the error was not 100% reproducible,
but it appears that it occurred if I used activate for my pickers, meaning
focusIn. If I used focusIn I ran into a different coercion failure
(perhaps because the pickers derive from Box).

For the moment focusInPicker and change seem to be doing the trick.

On Tue, Feb 3, 2009 at 4:58 PM, Richard Rodseth rrods...@gmail.com wrote:

 Hi Jeff. Yes, my event classes do descend from Event. I've also run in
 debug mode, but you don't get a
 stack crawl on the 1034. It just says main thread.

 On Tue, Feb 3, 2009 at 4:54 PM, Jeffry Houser j...@farcryfly.com wrote:


  A single event class being used for multiple events is common within the
 Flex Framework; why recommend not re-using the same type?

 Back to the problem:
  Are you sure that your event class extends flash.events.Event ?  I might
 expect odd errors if not.
  Have you tried running the code in debug mode to see what is going on;
 maybe isolate the line which causing the error.

 Tracy Spratt wrote:

  I would not use the same type name.



 Tracy Spratt
 Lariat Services

 Flex development bandwidth available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Richard Rodseth
 *Sent:* Tuesday, February 03, 2009 6:11 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Another 1034 - events and event types



 I have a few MXML components that provide reusable pickers for things like
 date ranges. I also nest these components.
 Is it OK to reuse event types like change and activate, but associated
 with different event classes?
 For that matter must an event type always be associated with one class?

 I dispatching non-bubbling events from these components, and set up the
 meta-info as expected:

 mx:Metadata

 [Event(name=activate,type=com.companyname.appname.event.picker.DateRangePickerEvent)]
 /mx:Metadata

 and use them like this:

 picker:DateRangePicker
 activate=onActivateDateRangePicker(event)
 /

 I'm occasionally getting an error  like this:

 TypeError: Error #1034: Type Coercion failed: cannot convert
 flash.events::ev...@f4130d1 to
 com.companyname.appname.event.picker.DateRangePickerEvent.

 Who would be trying to cast an event to my type? Changing the event type
 to activatePicker seems to be helping, but I'd rather not have a
 proliferation.

 --
  Flexcoders Mailing List



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

  





Re: [flexcoders] Re: Prevent ItemRenderer click from selecting row?

2009-02-03 Thread Dennis Falling
That would work for invalidating my selection, but I simply want the
selection to never occur.  That way if something was previously selected, it
isn't altered.

On Tue, Feb 3, 2009 at 5:08 PM, fourctv four...@yahoo.com wrote:

   have you tried datagrid.selectedItems=null?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Dennis
 Falling dfall...@... wrote:
 
  I have an ItemRenderer with buttons in it. In the click listener
 functions
  for these buttons, I call event.stopImmediatePropagation (and
  preventDefault, though that doesn't seem relevant), but the row is still
  selected. How can I prevent it from receiving the click and highlighting
  itself?
  Thanks.
 

  



  1   2   >