[flexcoders] Setting unique ID with repeater and custom component

2008-06-27 Thread sdl1326
I am using the Tile Component along with a repeater and then a custom
component (image control). Is it possible to give the custom component
a unique id/name? I have tried to use a variable associated with the
current repeater item ({repeater.currentItem.name}), however, it does
not seem that this is possible as I am getting an error that the ID is
not a valid identifier.

Thanks for any and all replies.




[flexcoders] FlexUnit error while using stage

2008-06-27 Thread Vinoth Babu
Hi,

FlexUnit is showing error in my test class for 
stage.showDefaultContextMenu = false;

Please let me know, if you experienced this kind of error

Thanks in advance,
Vinoth



RE: [flexcoders] AS3 interface question

2008-06-27 Thread Rick Winscot
Can't sleep again. blogged a solution to implementing covariant return
types. 

 

http://www.quilix.com/node/17

 

Rick Winscot

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ralf Bokelberg
Sent: Thursday, June 26, 2008 9:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3 interface question

 

Yep, it's a language feature, which is not there. I think it is called
covariant return types.
Afaik, all you can do is check the type and cast.
Cheers
Ralf.

On Thu, Jun 26, 2008 at 3:14 PM, diehlryan [EMAIL PROTECTED]
mailto:rdiehl%40docfinity.com  wrote:
 I'm running into a wall when trying to use extension with interfaces.
 The example I'm about to provide works using Java, so I believe the
 OOP practices behind it are valid. But I can't figure out how to
 accomplish the same thing in Flex, I keep running into compiler
 issues. The example is a condensed version of something I'm working
 on, for simplicity sake.

 Let's say you have a bunch of events that all have some common
 functionality, like the ability to have a nextEvent. Also, a subset
 of those events also have additional functionality, they can be
 filtered by a type of criteria. We'll call them search events.

 Now, there are some parts of the application that can work with any
 type of search event, and any type of criteria. But when the
 individual searches are executed, that implementation expects a
 specific type of search event and search criteria. That's my end goal
 here.

 Here are the interfaces I'm using:

 public interface ICriteria
 {
 // just a marker
 }

 public interface ICustomCriteria extends ICriteria
 {
 function get name():String;
 function set name(name:String):void;
 }

 public interface IEvent
 {
 function get nextEvent():IEvent;
 function set nextEvent(event:IEvent):void;
 }

 public interface ISearchEvent
 {
 function get criteria():ICriteria;
 function set criteria(criteria:ICriteria):void;
 }

 So far, so good. And now the implementing classes:

 // would like to make this an abstract class, but not supported in AS
 public class BaseEvent implements IEvent
 {
 private var _nextEvent:IEvent;

 public function set nextEvent(event:IEvent):void
 {
 this._nextEvent = event;
 }

 public function get nextEvent():IEvent
 {
 return this._nextEvent;
 }
 }

 // would like to make this an abstract class, but not supported in AS
 public class BaseSearchEvent extends BaseEvent implements ISearchEvent
 {
 private var _criteria:ICriteria;

 public function set criteria(criteria:ICriteria):void
 {
 this._criteria = criteria;
 }

 public function get criteria():ICriteria
 {
 return this._criteria;
 }
 }

 Those base classes are fine and compile correctly. Now if you
 remember from the requirements, there are some places that can work
 with any type of ISearchEvent, and some places that can only work with
 an individual subclass. Here is where the compiler errors come in.
 Doing what I am about to do works in Java, and I'm wondering if there
 is a way to accomplish it in AS3.

 public class CustomSearchEvent extends BaseSearchEvent
 {
 private var _criteria:ICustomCriteria;

 public override function get criteria():ICustomCriteria
 {
 return this._criteria;
 }

 public override function set criteria(criteria:ICustomCriteria):void
 {
 this._criteria = criteria;
 }
 }

 The above class does not compile because the method signatures for
 get/set criteria are different than those specified in the interface.
 But from an OO perspective, I think this is a valid thing to want to
 do. If you're working with an ISearchEvent instance, you should be
 able to subclass the base class and provide custom behavior. The
 ICustomCriteria is a subclass of ICriteria, so you should be able to
 substitute them in this context. Is there another way to accomplish
 this? Or is this just a language feature that's not there?

 

 



[flexcoders] Report Formatting

2008-06-27 Thread Dan Pride
Hi
 I want to print out a report. The data goes beyond the scope of a datagrid. I 
suppose I could use php but is there a way to do a long multi page report in 
Flex?

Dan


  


Re: [flexcoders] Report Formatting

2008-06-27 Thread Richard Rodseth
I haven't used it, but take a look at AlivePDF.

On Fri, Jun 27, 2008 at 12:32 AM, Dan Pride [EMAIL PROTECTED] wrote:
 Hi
 I want to print out a report. The data goes beyond the scope of a datagrid.
 I suppose I could use php but is there a way to do a long multi page report
 in Flex?

 Dan

 


RE: [flexcoders] Report Formatting

2008-06-27 Thread Rick Winscot
Oh! Oh! 

 

http://www.alivepdf.org/ 

 

Rick Winscot

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dan Pride
Sent: Friday, June 27, 2008 3:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Report Formatting

 

Hi
I want to print out a report. The data goes beyond the scope of a datagrid.
I suppose I could use php but is there a way to do a long multi page report
in Flex?

Dan

 



Re: [flexcoders] Re: how to make coldfusion working with LCDS?

2008-06-27 Thread Tom Chiverton
On Friday 27 Jun 2008, markflex2007 wrote:
 I did the selection but I do not know how to make it work 

You don't do anything else.
That's it.

LCDS standalone will not run CFML - that's not what it does.

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Proper syntax for sending an array of value objects from ColdFusion to Flex

2008-06-27 Thread Tom Chiverton
On Thursday 26 Jun 2008, holmgren.eric wrote:
 When I try to cast the result of the remote object to an
 ArrayCollection, I get the following:
 TypeError: Error #1034: Type Coercion failed: cannot convert
 [EMAIL PROTECTED] to mx.collections.ArrayCollection.
 The response in Service Capture looks like an array of typed value

Array != ArrayCollection.
You need to do something like 
var a:Array=event.result.where.your.data.is // as Array
var ac:ArrayCollection=new ArrayCollection(a);

Sorry, the pastebin URL you gave doesn't work.

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Regarding Alert Box

2008-06-27 Thread Tandon, Rishi
Hi,
How to show a Alert box, when there is no data in result event.

Thanks,
Rishi


- Original Message 
From: markflex2007 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, June 26, 2008 8:47:04 PM
Subject: [flexcoders] how to make coldfusion working with LCDS?


Hi 

I install LCDS 251.and I see the web root is 
C:\lcds\jrun4\ servers\default\ ,

May I change the web root path (like c:\sites\)?

I put *.jsp file in the web root,it works?

but I put *.cfm,it doesn't work. How to make coldfusion file working
in LCDS web root.

Thanks.

Mark

 


  

[flexcoders] Charting - setting yField property for a PlotSeries when dataProvider is XML

2008-06-27 Thread wreedijk
I am trying to create a PlotChart with series (y is constant) from an
XML object that is defined as follows:

series yVal='Weight'
  dataPoint date='12/01/2004'/ 
  dataPoint date='12/25/2004'/
  dataPoint date='1/1/2005'/
  dataPoint date='1/22/2005'/
/series

I want the xField to be derived from the date attribute in the
dataPoint - no problem. I want the yField to be based on the yVal
attribute in the series (parent of the dataPoints) element. How can I
do this?

mx:PlotSeries 
  dataProvider={weightSeries.dataPoint} 
  xField=@date 
  yField=   ?? What do I put here ?? 
/
There must be a way. Please help! Thanks

THE FOLLOWING WORKS but I don't want to have to repeat the y value in
every data point.

series
  dataPoint date='12/01/2004' yVal='Weight'/ 
  dataPoint date='12/25/2004' yVal='Weight'/
  dataPoint date='1/1/2005' yVal='Weight'/
  dataPoint date='1/22/2005' yVal='Weight'/
/series

mx:PlotSeries 
  dataProvider={weightSeries.dataPoint} 
  xField=@date 
  yField=@yVal
/




[flexcoders] Priting to Zebra Label printer?

2008-06-27 Thread edward.syrett
Is there any proper, crossplatform way of printing to LPT1 directly
from an AIR App?

We need to send ZPL directly to a Zebra Label printer from a local AIR
app. ZPL is a simple text-based language specifically for the Zebra
range of printers.  

We cannot use the method of printing offered by AIR where you add a
display object to the print job because print data is rendered as a
bitmap. The Zebra printers aren't very good with bitmaps, and we would
certainly never be able to use barcodes with this printing method 

One approach would be to mandate that the user has the Zebra connected
directly to their machine on LPT1, but I can't find any api in AIR
that allows me to write text to a port like that.

We have connected the Zebra printer to a little Print Server thing
that has an ethernet port and a parallel port, and I should therefore
be able to use the Socket class to send the ZPL directly to the port.
 But that throws an error, and I've asked about that in a separate
question entitled #2031: Socket Error.

Thanks,

Ed.



However, AIR only allows



[flexcoders] #2031: Socket Error

2008-06-27 Thread edward.syrett
I'm trying to send a simple string to a Printer Server on our network.
The text is a language called ZPL which is going to our little print
server box that has a Zebra Label printer on its parallel port.

Here's my test app:


?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute

 mx:Script
 ![CDATA[
 import mx.controls.Alert;


 private function onPrintZpl():void
 {
 var sData:String = ^XA^FWR^CI13 +
 ^LHLabelTop,LabelLeft +
 ^FWB^FO512,899^XGPPI_LAN,1,1^FS^FWR +
 ^FO708,045^A0,40,40^FDUnit 7^FS +
 ^FO659,042^A0,40,40^FDKuehne + Nagel Logistics^FS
+
 ^FO611,042^A0,40,40^FDAppletree Road^FS +
 ^FO562,042^A0,40,40^FDChipping Warden^FS +
 ^FO522,042^A0,40,40^FDBanbury^FS +
 ^FO476,042^A0,40,40^FDOxfordshire^FS +
 ^FO430,043^A0,40,40^FDOX17 1LL^FS +
 ^FO381,042^A0,40,40^FDUnited Kingdom^FS +
 ^BY3,3,10 +
 ^FO141,043^B3R,N,100,Y,N^FD9^FS +
 ^XZ

 try
 {
 var socket:Socket = new Socket();

 //socket.addEventListener(IOErrorEvent.IO_ERROR,
onIOError);

 socket.connect(10.44.180.120, 9100);
 socket.writeUTF(sData);
 socket.flush();

 socket.close();
 }
 catch(error:Error)
 {
 Alert.show(error.message);
 }
 }

 private function onIOError(event:IOErrorEvent):void
 {
 }

 ]]
 /mx:Script

 mx:VBox width=100% label=Printing
 mx:Button label=ZPL Print click=onPrintZpl()/
 /mx:VBox

/mx:WindowedApplication

With the app as it stands, I can hit the ZPL Print button, the label
is printed, but then the app throws this error:

[SWF] SocketTest.swf - 902,761 bytes after decompression
Error #2044: Unhandled IOErrorEvent:. text=Error #2031: Socket Error.
 at
SocketTest/onPrintZpl()[C:\Development\Monarch\Test\SocketTest\src\Socke\
tTest.mxml:28]
 at
SocketTest/___SocketTest_Button1_click()[C:\Development\Monarch\Test\Soc\
ketTest\src\SocketTest.mxml:58]

If I uncomment the call to addEventListener() for IOErrorEvent.IO_ERROR,
the app runs without any errors, but the label isn't printed.

Any comments/help gratefully received.

Thanks,

Ed.




[flexcoders] Re: How to Position a Popup relative to the control that invoked the popup?

2008-06-27 Thread pbrendanc
Thx a bunch - this looks like what I need - however for some reason
I'm seeing -ve numbers for my x + y coordinates and my popup is
partway off my form/window - any further suggestions.

Since my grid is dynamically created are there any other
issues/gotcha's I need to consider here?

TIA

--- In flexcoders@yahoogroups.com, Dimitrios Gianninas
[EMAIL PROTECTED] wrote:

 I think what you what is this:
 
 1)from the click event get the ref to the button:
 
 var btn:Button = event.target as Button;
 
 2) then get its coordinates:
 
 var point:Point = new Point(0, 0);
 point = btn.globalToLocal( point );
 
 3) now use it to position your pop up
 
 mypop.x = point.x;
 mypop.y = point.y + 10;
 
 Dimitrios Gianninas
 Optimal Payments Inc.
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com on behalf of pbrendanc
 Sent: Thu 26/06/2008 7:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to Position a Popup relative to the
control that invoked the popup?
  
 I have a grid with an array of buttons that when clicked, will display
 a popup window that collects user info. 
 What I'd like to do is position the popup relative (immediately below)
 the button that the user clicked within the grid - not necessarily
 centered on the current window. 
 
 How can I get access the position/coordinates of the calling button -
 is this data somehow available via the createComplete event of the
 popup. I imagine this data is buried somewhere in the
 event/eventtarget object, but I'm not quite sure how to access it. 
 
 (Please don't tell me that I need to assign a listener to every button
 in the grid from within the Popup window as I'm creating the grid
 dynamically and it varies in size).
 
 Can anyone help with this,
 
 TIA,
 Patrick
 
 
 
 
 
 
 
 -- 
 WARNING
 ---
 This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient.  No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message.  If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system.  The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful.  If you have received this e-mail
in error, please notify the sender.
 
 AVIS IMPORTANT
 --
 Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé.  L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation.  Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système.  La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux.  Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.





[flexcoders] currentstate in custom component

2008-06-27 Thread Ingo Stoecker
hello,

I put some custom components in view states. The components have functions to 
change the currentstate to base view. But it doesnt work. Hhow can I switch 
views (from the main.mxml) in these functions?

greets,

Kobe



  __
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com

[flexcoders] Re: How to Position a Popup relative to the control that invoked the popup?

2008-06-27 Thread pbrendanc
No that is not part of the question  - 
I have all the components working and the popup opens and closes
correctly - what I'm trying to do is (re)position the popup relative
to the location of the grid button that caused it to open - this
should be simple but I can't find an example how to do this. 

Any ideas - TIA

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 How far have you actually gotten?
 
  
 
 Do you have your buttons invoking the pop-up yet?  Or is that part of
 your question?
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of pbrendanc
 Sent: Thursday, June 26, 2008 9:00 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: How to Position a Popup relative to the
 control that invoked the popup?
 
  
 
 Sorry, while I don't mean to be obtuse - however I need some
 clarification on how/where to get a reference to that event object -
 that's really what I having a problem with.
 
 In my scenario please note:
 
 1) The controls are dynamic, so how to addEventListener to run time
 controls is unclear to me. (DO I even need to do this?)
 
 2)The popup form is created by the popUp manager and the form handles
 createComplete event - however I don't see a ref here to an event
 object - what am I missing? 
 
 An explicit code sample would be helpful.
 
 TIA
 
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Josh McDonald dznuts@ wrote:
 
  You should be able to get the button which triggered the click event
 from
  event.target
  
  -Josh
  
  On Fri, Jun 27, 2008 at 9:55 AM, pbrendanc pbrendanc@ wrote:
  
   I have a grid with an array of buttons that when clicked, will
 display
   a popup window that collects user info.
   What I'd like to do is position the popup relative (immediately
 below)
   the button that the user clicked within the grid - not necessarily
   centered on the current window.
  
   How can I get access the position/coordinates of the calling button
 -
   is this data somehow available via the createComplete event of the
   popup. I imagine this data is buried somewhere in the
   event/eventtarget object, but I'm not quite sure how to access it.
  
   (Please don't tell me that I need to assign a listener to every
 button
   in the grid from within the Popup window as I'm creating the grid
   dynamically and it varies in size).
  
   Can anyone help with this,
  
   TIA,
   Patrick
  
  
  
  
  
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups
   Links
  
  
  
  
  
  
  -- 
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 





[flexcoders] Olapdatagrid : Only rows or columns

2008-06-27 Thread Vickus van Zyl
Hi Guys / Girls

Do you know if it is at all possible to display a Olapdatagrid with only
rows or only columns?

Many Thanks


[flexcoders] Datagrid Weirdness - Lose arrow key functionality

2008-06-27 Thread Barry
Hi,
Can anyone help me out here?
I have a datagrid which when using the up and down arrow keys changed
the selected index of the grid. All normal there.
However, when I add an itemRenderer to one of the dataGrid Columns, I
lose that functionality.

mx:DataGrid x=0 y=40 width=100% height=100% id=lisDG
dataProvider={model.contactObjects}  change=dataGridClick(event)
mx:columns
mx:DataGridColumn width=20 
itemRenderer=com.pbsmedia.ccAdmin.comps.StatusRenderer 
editable=false/
mx:DataGridColumn width=40 sortDescending=true 
sortable=true
sortCompareFunction=Sorts.compareRegDate headerText=Reg Date
labelFunction=Sorts.doRegDateLabel/
mx:DataGridColumn width=40 sortable=true
headerText=Associate dataField=ContactAssociate/
mx:DataGridColumn width=100 sortable=true 
headerText=Name
dataField=ContactName /
mx:DataGridColumn width=100 sortable=true 
headerText=Company
dataField=ContactCompanyName /
mx:DataGridColumn width=40 sortable=true
sortCompareFunction=Sorts.compareNextCall headerText=Next Call
labelFunction=doNextCallLabel/
/mx:columns
/mx:DataGrid


Any help much appreciated,
Barry



Re: [flexcoders] Keyboard macros or bindings for Eclipse?

2008-06-27 Thread Tom Chiverton
On Wednesday 25 Jun 2008, crazyluck55 wrote:
 Any help?

Check out the Snippits view (and it's hot keys).

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



RE: [flexcoders] Re: How to Position a Popup relative to the control that invoked the popup?

2008-06-27 Thread Dimitrios Gianninas
maybe its related to what you are specifying as the parent of the PopUp? Make 
sure it is the same parent that the button is contained within.
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
pbrendanc
Sent: Friday, June 27, 2008 5:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to Position a Popup relative to the control that 
invoked the popup?



Thx a bunch - this looks like what I need - however for some reason
I'm seeing -ve numbers for my x + y coordinates and my popup is
partway off my form/window - any further suggestions.

Since my grid is dynamically created are there any other
issues/gotcha's I need to consider here?

TIA

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
Dimitrios Gianninas
[EMAIL PROTECTED] wrote:

 I think what you what is this:
 
 1)from the click event get the ref to the button:
 
 var btn:Button = event.target as Button;
 
 2) then get its coordinates:
 
 var point:Point = new Point(0, 0);
 point = btn.globalToLocal( point );
 
 3) now use it to position your pop up
 
 mypop.x = point.x;
 mypop.y = point.y + 10;
 
 Dimitrios Gianninas
 Optimal Payments Inc.
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  on 
 behalf of pbrendanc
 Sent: Thu 26/06/2008 7:55 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] How to Position a Popup relative to the
control that invoked the popup?
 
 I have a grid with an array of buttons that when clicked, will display
 a popup window that collects user info. 
 What I'd like to do is position the popup relative (immediately below)
 the button that the user clicked within the grid - not necessarily
 centered on the current window. 
 
 How can I get access the position/coordinates of the calling button -
 is this data somehow available via the createComplete event of the
 popup. I imagine this data is buried somewhere in the
 event/eventtarget object, but I'm not quite sure how to access it. 
 
 (Please don't tell me that I need to assign a listener to every button
 in the grid from within the Popup window as I'm creating the grid
 dynamically and it varies in size).
 
 Can anyone help with this,
 
 TIA,
 Patrick
 
 
 
 
 
 
 
 -- 
 WARNING
 ---
 This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient. No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message. If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system. The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful. If you have received this e-mail
in error, please notify the sender.
 
 AVIS IMPORTANT
 --
 Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé. L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation. Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système. La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux. Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.




 


RE: [flexcoders] Charting - setting yField property for a PlotSeries when dataProvider is XML

2008-06-27 Thread Battershall, Jeff
I'm not sure how you're going to stipulate a yField that doesn't exist
in the dataprovider.

If you have control over the XML format, add the additional attribute to
each datapoint item.

If you don't, then you'll need to take what you're given and add the
yVal attribute to each item.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of wreedijk
Sent: Friday, June 27, 2008 2:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Charting - setting yField property for a
PlotSeries when dataProvider is XML


I am trying to create a PlotChart with series (y is constant) from an
XML object that is defined as follows:

series yVal='Weight'
  dataPoint date='12/01/2004'/ 
  dataPoint date='12/25/2004'/
  dataPoint date='1/1/2005'/
  dataPoint date='1/22/2005'/
/series

I want the xField to be derived from the date attribute in the dataPoint
- no problem. I want the yField to be based on the yVal attribute in the
series (parent of the dataPoints) element. How can I do this?

mx:PlotSeries 
  dataProvider={weightSeries.dataPoint} 
  xField=@date 
  yField=   ?? What do I put here ?? 
/
There must be a way. Please help! Thanks

THE FOLLOWING WORKS but I don't want to have to repeat the y value in
every data point.

series
  dataPoint date='12/01/2004' yVal='Weight'/ 
  dataPoint date='12/25/2004' yVal='Weight'/
  dataPoint date='1/1/2005' yVal='Weight'/
  dataPoint date='1/22/2005' yVal='Weight'/
/series

mx:PlotSeries 
  dataProvider={weightSeries.dataPoint} 
  xField=@date 
  yField=@yVal
/





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





Re: [flexcoders] Regarding Alert Box

2008-06-27 Thread Tom Chiverton
On Friday 27 Jun 2008, Tandon, Rishi wrote:
 How to show a Alert box, when there is no data in result event.

Err... ?
if (!event.hasOwnProperty('data')){
Alert.show(this is nothing here);
}
-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Setting unique ID with repeater and custom component

2008-06-27 Thread Amy
--- In flexcoders@yahoogroups.com, sdl1326 [EMAIL PROTECTED] wrote:

 I am using the Tile Component along with a repeater and then a custom
 component (image control). Is it possible to give the custom component
 a unique id/name? I have tried to use a variable associated with the
 current repeater item ({repeater.currentItem.name}), however, it does
 not seem that this is possible as I am getting an error that the ID is
 not a valid identifier.
 
 Thanks for any and all replies.


If you have something like this:

mx:Repeater id=theRepeater dataProvider={yourAC}
   yourNS:YourComponent id=foo/
/mx:Repeater

then you can refer to any repeated component by its index within foo.  
i.e. foo[0] is the first component.  This is pretty thoroughly 
documented in the help for Repeater.

HTH;

Amy



Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Jonathan Branam
You should use svn diff. I usually do it from within Eclipse. It has a
command called Create a Patch or something. But I think just:

svn diff  patch.txt

will work.

On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   The problem's in RadioButtonGroup, I've posted the details to the bug.

 Alex,

 I've got Contrib permission, but the submit a patch document just talks
 about TortoiseSVN. Is the patch file I need to submit simply:

 diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

 Just using standard BSD Diff (OS X)? Or have I got the operands in the
 wrong order, or is it not standard diff at all?

 -Josh

 RadioButton.click simply calls out to group.selection

 On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote:

  It looks like it was done to prevent events for programmatic changes to
 .selected which would be correct, but the RBG programmatically unselects an
 RB and this code now prevents an event which probably should fire.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, June 26, 2008 3:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] RadioButton change event not firing in Flex 3
 when button in group is deselected



 It makes more sense to me to be for Radiobutton than Checkbox. Why on
 earth would you not want to get a change event when a checkbox is unchecked?

 -Josh

 On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
 wrote:

 Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,



 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
 in the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

 That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so file
 a bug.





 __._,_




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
  



Re: [flexcoders] Olapdatagrid : Only rows or columns

2008-06-27 Thread Tom Chiverton
On Friday 27 Jun 2008, Vickus van Zyl wrote:
 Do you know if it is at all possible to display a Olapdatagrid with only
 rows or only columns?

I'm not sure what you mean, can you provide an example and/or picture ?

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Setting unique ID with repeater and custom component

2008-06-27 Thread sdl1326
Thanks. I believe that's exactly what I need. I will also check out
the 'help' section for the repeater.

Thanks again.

--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I am using the Tile Component along with a repeater and then a custom
  component (image control). Is it possible to give the custom component
  a unique id/name? I have tried to use a variable associated with the
  current repeater item ({repeater.currentItem.name}), however, it does
  not seem that this is possible as I am getting an error that the ID is
  not a valid identifier.
  
  Thanks for any and all replies.
 
 
 If you have something like this:
 
 mx:Repeater id=theRepeater dataProvider={yourAC}
yourNS:YourComponent id=foo/
 /mx:Repeater
 
 then you can refer to any repeated component by its index within foo.  
 i.e. foo[0] is the first component.  This is pretty thoroughly 
 documented in the help for Repeater.
 
 HTH;
 
 Amy





Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Josh McDonald
Not using eclipse' SVN, I hate it :) I went with regular old diff. I can
always re-submit it again some time, but I'm not recompiling the whole
source since that'd take weeks (exaggerating only a little), Flex's compiler
ain't quick. I'm just monkey-patching changes into my test-project source
tree.

On Sat, Jun 28, 2008 at 12:07 AM, Jonathan Branam 
[EMAIL PROTECTED] wrote:

  You should use svn diff. I usually do it from within Eclipse. It has a
 command called Create a Patch or something. But I think just:

 svn diff  patch.txt

 will work.


 On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   The problem's in RadioButtonGroup, I've posted the details to the bug.

 Alex,

 I've got Contrib permission, but the submit a patch document just talks
 about TortoiseSVN. Is the patch file I need to submit simply:

 diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

 Just using standard BSD Diff (OS X)? Or have I got the operands in the
 wrong order, or is it not standard diff at all?

 -Josh

 RadioButton.click simply calls out to group.selection

 On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote:

  It looks like it was done to prevent events for programmatic changes to
 .selected which would be correct, but the RBG programmatically unselects an
 RB and this code now prevents an event which probably should fire.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, June 26, 2008 3:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] RadioButton change event not firing in Flex
 3 when button in group is deselected



 It makes more sense to me to be for Radiobutton than Checkbox. Why on
 earth would you not want to get a change event when a checkbox is unchecked?

 -Josh

 On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
 wrote:

 Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,



 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
 in the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

 That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so file
 a bug.





 __._,_




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]


 




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Auto include of compile date within SWF

2008-06-27 Thread bbloggs96
I want the ability of being able to display within a flex app the date
of compilation of the swf file from the Flex code.

Is this achievable?

I remember from using VB 6 many years ago that you could set your own
version number and have it increment every time the VB was compiled to
an exe. Ideally I want this but I think it is impossible, so I will
make do with date / time if possible.

Andrew



Re: [flexcoders] Auto include of compile date within SWF

2008-06-27 Thread Tom Chiverton
On Friday 27 Jun 2008, bbloggs96 wrote:
 I remember from using VB 6 many years ago that you could set your own
 version number and have it increment every time the VB was compiled to
 an exe. Ideally I want this but I think it is impossible, so I will
 make do with date / time if possible.

You can pass in variables to the compiler - a bit like #DEFINE in C, if you 
know that: 
http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Which event is dispatched when the view is shown by a stage change?

2008-06-27 Thread João
Hello,

I have a:

- Container with two states (  and editing)
- A view (LocaleEditor.mxml) that is shown when the container changes
to the state editing:

mx:states
mx:State name=editing 
mx:RemoveChild target={listaDeLocales}/
mx:AddChild relativeTo={gestorDeLinguas} 
position=lastChild
ns1:LocaleEditor id=localeEditor/
/mx:AddChild
/mx:State
/mx:states

I need my view to execute some code when it is shown
(myTextBox.setFocus() ). I have tried the creationComplete event, but
the view is only created on the first time the state changes, the next
times this event is not dispatched. I have tried the AddedToStage, but
it throws a runtime error with the myTextBox.setFocus() code . I have
tried the show event, but it simply doesn't work.

Which event should I rely on to execute the myTextBox.setFocus()
when the user sees the view?

Thanks,

João Saleiro



[flexcoders] flex and automation

2008-06-27 Thread netdeep
There are no flex user groups in my area and I've been trying for a long time 
to find a 
solution to this problem with no success.

I need to generate a series of charts every few minutes/hours/days on an 
automated basis.  I 
pull the data for the charts from the database and draw the chart, then save it 
as an image 
and potentially notify someone where they can find the image as a png or a pdf.

I am using java on the backend to communicate with the database and flex to 
draw the 
charts.  The same app which draws the chart can also be called by a user to get 
a live 
snapshot.  But the automation just isn't working.  It works fine on my local 
development 
machine, but this application is deployed on a headless server and the flex 
process never 
gets to launch since it needs to run on a browser.  I've looked at solutions 
for getting it to 
run headless but so far I can't get it to work.  

Does anyone know how to automate flex in this way?  I know flex is meant to be 
interactive, 
but is there anyway I can still use the flex charting for automated output?



Re: [flexcoders] DateTimeAxis hours AND date

2008-06-27 Thread Tom Chiverton
On Thursday 26 Jun 2008, Richard Rodseth wrote:
 Has anyone figured out a simple way to get a DateTimeAxis to display
 dates and hours when the number of hours shown spans more than one
 day?

Sounds like a job for a label function...

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Populating column chart with PHP MySQL

2008-06-27 Thread ghus32
Hello,

I have done this with many datagrids and had success but cant seem
to get it to work with the column charts.

I have several different queries in php where I get the data from but
I dont know the format. an example of the php code below

I would like to have $num_signage and $num_website as datagrid 
columns, plus I will be adding more queries later. 

I am thinking I would need to make the values of $num_signage and 
$num_website into some sort of an array so flex can read individaul 
results.. I have have been trying many things with no success.

Any suggestions?

Thanks

$query_website = SELECT form.question_id, form.answer_id, 
form.add_date, answer.answer_id, answer.answer FROM form
LEFT JOIN answer ON form.answer_id = answer.answer_id
WHERE form.question_id ='10' and answer.answer = 'Website' and 
form.add_date BETWEEN DATE '2008-06-01' AND DATE '2008-06-29';
$result_website = mysql_query ($query_website);
$num_rows_website = mysql_num_rows($result_website);
$num_website = website_num$num_rows_website/website_num;
print ($num_website);

$query_signage = SELECT form.question_id, form.answer_id, 
form.add_date, answer.answer_id, answer.answer FROM form
LEFT JOIN answer ON form.answer_id = answer.answer_id
WHERE form.question_id ='10' and answer.answer = 'Signage' and 
form.add_date BETWEEN DATE '2008-06-01' AND DATE '2008-06-29';
$result_signage = mysql_query ($query_signage);
$num_rows_signage = mysql_num_rows($result_signage);
$num_signage = signage$num_rows_signage/signage;
print ($num_signage); 




[flexcoders] Browser Container

2008-06-27 Thread emaxima
Hi,

Is there a good browser framework so I can embed my flex application
(deployed offline on desktop) not exactly by launching IE, but with
customization, such as how it handles exit. I want to warn user to
save their work before exiting, but the onbeforeunload() in javascript
is truly an eyesore and there's no way around it. There are also times
when Internet Explorer is displayed as much as I customize the logo
and title bar. 

Thanks



[flexcoders] One custom component referring to another

2008-06-27 Thread Merrill, Jason
I thought this would be simple - having one custom display object modify 
another through a reference:

mx:Application 
c:MyComponentA /
c:MyComponentB /
/mx:Application

I want to have MyComponentA refer to objects/methods inside of MyComponentB.  I 
tried passing a reference in:

mx:Application 
c:MyComponentA id=myComponentA /
c:MyComponentB componentToModify={myComponentA}/
/mx:Application

But I get an error saying, Access of possibly undefined property myComponentA 
through a reference with static type flash.display:DisplayObject.

I tried calling parent.myComponentA from actionscript inside of 
MyComponentB.MXML, but it couldn't find the instance of myComponentA.  

How do you handle this?  I know this probably isn't ideal architecture, but 
would there have to be scripts that listen for events in one component in the 
main app and then modify the other component?  I guess I could do that if it is 
best practice.  I need the two components to be separated because they are two 
different parts of the UI, but need to interact.  One has controls that change 
the view and data in the other.  Does it have to modify the other component 
from actionscript on the main app or can I just pass a reference into one 
component like I have tried?  

Thanks.


Jason Merrill 
Bank of America 
Global Technology  Operations  Global Risk LLD 
eTools  Multimedia 

Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx 

Are you a Bank of America associate interested in innovative learning ideas and 
technologies?
Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx  
 subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.aspx
 . 




[flexcoders] Re: One custom component referring to another

2008-06-27 Thread Michael Labriola
Jason,

In an ideal world, component A would throw events up. Those events 
would be caught in the application (in this case) and call 
corresponding methods in component B.

You really, really don't want to start coupling these components 
together by calling the internals of one from the other in this way. 
Especially when they really are peers in your application.

Just my 2 cents,
Mike

--- In flexcoders@yahoogroups.com, Merrill, Jason 
[EMAIL PROTECTED] wrote:

 I thought this would be simple - having one custom display object 
modify another through a reference:
 
 mx:Application 
   c:MyComponentA /
   c:MyComponentB /
 /mx:Application
 
 I want to have MyComponentA refer to objects/methods inside of 
MyComponentB.  I tried passing a reference in:
 
 mx:Application 
   c:MyComponentA id=myComponentA /
   c:MyComponentB componentToModify={myComponentA}/
 /mx:Application
 
 But I get an error saying, Access of possibly undefined property 
myComponentA through a reference with static type 
flash.display:DisplayObject.
 
 I tried calling parent.myComponentA from actionscript inside of 
MyComponentB.MXML, but it couldn't find the instance 
of myComponentA.  
 
 How do you handle this?  I know this probably isn't ideal 
architecture, but would there have to be scripts that listen for 
events in one component in the main app and then modify the other 
component?  I guess I could do that if it is best practice.  I need 
the two components to be separated because they are two different 
parts of the UI, but need to interact.  One has controls that change 
the view and data in the other.  Does it have to modify the other 
component from actionscript on the main app or can I just pass a 
reference into one component like I have tried?  
 
 Thanks.
 
 
 Jason Merrill 
 Bank of America 
 Global Technology  Operations  Global Risk LLD 
 eTools  Multimedia 
 
 Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default
.aspx 
 
 Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
 Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defau
lt.aspx   subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layo
uts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/P
osts/Archive.aspx .





Re: [flexcoders] Browser Container

2008-06-27 Thread Tom Chiverton
On Friday 27 Jun 2008, emaxima wrote:
 Is there a good browser framework so I can embed my flex application
 (deployed offline on desktop) not exactly by launching IE, but with
 customization, such as how it handles exit. I want to warn user to

Umm, AIR ?

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] No of Lines of Code

2008-06-27 Thread Christian Giordano
Maybe this can help you, or at least its source.

https://blogs.conchango.com/filthyria/archive/2008/05/19/code-stats-as-air-app.aspx


Cheers, chr

___
{ Christian Giordano's site and blog @ http://nuthinking.com }


On Wed, Jun 25, 2008 at 2:27 AM, Paramjit Jolly
[EMAIL PROTECTED] wrote:
 Hi all,

   Anyone have any idea, In any flex project we need to know ….no of lines of
 code..

 Any prebuild component or technique for this ?

 I need to publish some statics on basis of this .









 Thanks  Regards

 Jolly





 *

 IMPORTANT: This email message is for the sole use of the intended
 recipient(s) and may contain confidential and privileged information. Any
 unauthorized review, use, disclosure or distribution is prohibited. If you
 are not the intended recipient, please contact the sender by reply email and
 destroy all copies of the original message. Please advise immediately if you
 or your employer do not consent to Internet email for messages of this kind.
 Opinions, conclusions and other information contained in this e-mail message
 that do not relate to the official business of Life Fitness shall be
 understood as neither given nor endorsed by it.

 *

 Love to God, Everyone starts loving you.

 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Tracy Spratt
 Sent: Wednesday, June 25, 2008 9:34 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] httpservice and repetitive calls



 As I understand  from my reading, the W3C specs state that POST methods do
 not cache.  There are  posts on this list about it, and I am sure you could
 look into the specs themselves.  I have just always used POST, and never had
 any problems.  Aspx is nice because Request(myParm) handles both post and
 get parameters.



 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Cameron
 Sent: Tuesday, June 24, 2008 6:48 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] httpservice and repetitive calls



 I never saw my first post come through...hence the second post. That
 worked by the way, but I'm curious as to why?

 Cameron

 Tracy Spratt wrote:

 See my response to your first post.



 Use the POST method instead of get.



 Tracy



 --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 *On Behalf Of *Cameron
 *Sent:* Tuesday, June 24, 2008 1:18 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] httpservice and repetitive calls



 I'm using the httpservice to make a call to an aspx page which runs a
 query and returns the results. This is fine, but if I try to run the
 same call again, the service is not actually going out to make the call,
 but rather just returning the results from the previous call. I know
 this because the aspx page logs each call made to it. I always see the
 first call, but no subsequent calls come through if I post the same
 data. If I send a different set of data, the call works fine, but then
 will not post that data again. Any ideas on why it doesn't want to
 actually make the call? Below are the relevant pieces of code:
 script ... 
 public function lblClickHandler(event:Event):void{
 tgtdata = event.currentTarget.data.toString();
 customer_id = event.currentTarget.data;
 useHttpService();
 }

 public function useHttpService():void {
 userReq.url = dstURL; //set in another part of the code
 userReq.method = GET;

 var Obj:Object = new Object();
 Obj.w = wispid; //wispid is just a number that is set
 elsewhere
 Obj.i = tgtdata;
 userReq.send(Obj);
 }
 ...
 /script
 mx:HTTPService id=userReq result=gethttpResult(event)
 fault=handleFault(event) useProxy=false method=GET
 resultFormat=object /



 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



RE: [flexcoders] Re: One custom component referring to another

2008-06-27 Thread Alex Harui
My vote would be for changes in A to affect a central model.  B would
watch the model change and reflect those changes.  Everything B needs
from A would be reflected in the model.  That's pretty much what Mike
said, except I'm not a fan of throwing events up if that means
bubbling.  A should dispatch events that the app listens to in order
to change the central model.

 

However, I would think that there is some syntax that should have got
this past the compiler.  If you use the MXMLC -keep option you can see
what it generated and maybe figure out why it didn't work.  

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Labriola
Sent: Friday, June 27, 2008 8:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: One custom component referring to another

 

Jason,

In an ideal world, component A would throw events up. Those events 
would be caught in the application (in this case) and call 
corresponding methods in component B.

You really, really don't want to start coupling these components 
together by calling the internals of one from the other in this way. 
Especially when they really are peers in your application.

Just my 2 cents,
Mike

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Merrill, Jason 
[EMAIL PROTECTED] wrote:

 I thought this would be simple - having one custom display object 
modify another through a reference:
 
 mx:Application 
 c:MyComponentA /
 c:MyComponentB /
 /mx:Application
 
 I want to have MyComponentA refer to objects/methods inside of 
MyComponentB. I tried passing a reference in:
 
 mx:Application 
 c:MyComponentA id=myComponentA /
 c:MyComponentB componentToModify={myComponentA}/
 /mx:Application
 
 But I get an error saying, Access of possibly undefined property 
myComponentA through a reference with static type 
flash.display:DisplayObject.
 
 I tried calling parent.myComponentA from actionscript inside of 
MyComponentB.MXML, but it couldn't find the instance 
of myComponentA. 
 
 How do you handle this? I know this probably isn't ideal 
architecture, but would there have to be scripts that listen for 
events in one component in the main app and then modify the other 
component? I guess I could do that if it is best practice. I need 
the two components to be separated because they are two different 
parts of the UI, but need to interact. One has controls that change 
the view and data in the other. Does it have to modify the other 
component from actionscript on the main app or can I just pass a 
reference into one component like I have tried? 
 
 Thanks.
 
 
 Jason Merrill 
 Bank of America 
 Global Technology  Operations  Global Risk LLD 
 eTools  Multimedia 
 
 Join the Bank of America Flash Platform Developer Community 
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default
http://sharepoint.bankofamerica.com/sites/tlc/flash/default 
.aspx 
 
 Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
 Check out our internal GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defau
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defau 
lt.aspx  subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layo
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layo 
uts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/P
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/P 
osts/Archive.aspx .


 



[flexcoders] Re: Charting - setting yField property for a PlotSeries when dataProvider is XML

2008-06-27 Thread wreedijk
Thanks Jeff for responding.

Yes, the yField does not exist in the dataProvider itself but it does in
the parent of the dataProvider. Is there no way to reference this? or
can the dataProvider be specified in a different way? Is there a way to
set the value to a constant in the mx:PlotSeries tag?

What do you mean by: ...add theyVal attribute to each item. ?

One thing I CAN do is to convert the series into an ArrayCollection. I
was just hoping to find a more elegant solution to the problem.

--- In flexcoders@yahoogroups.com, Battershall, Jeff
[EMAIL PROTECTED] wrote:

 I'm not sure how you're going to stipulate a yField that doesn't exist
 in the dataprovider.

 If you have control over the XML format, add the additional attribute
to
 each datapoint item.

 If you don't, then you'll need to take what you're given and add the
 yVal attribute to each item.

 Jeff

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of wreedijk
 Sent: Friday, June 27, 2008 2:36 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Charting - setting yField property for a
 PlotSeries when dataProvider is XML


 I am trying to create a PlotChart with series (y is constant) from an
 XML object that is defined as follows:

 series yVal='Weight'
   dataPoint date='12/01/2004'/
   dataPoint date='12/25/2004'/
   dataPoint date='1/1/2005'/
   dataPoint date='1/22/2005'/
 /series

 I want the xField to be derived from the date attribute in the
dataPoint
 - no problem. I want the yField to be based on the yVal attribute in
the
 series (parent of the dataPoints) element. How can I do this?

 mx:PlotSeries
   dataProvider={weightSeries.dataPoint}
   xField=@date
   yField=   ?? What do I put here ??
 /
 There must be a way. Please help! Thanks

 THE FOLLOWING WORKS but I don't want to have to repeat the y value in
 every data point.

 series
   dataPoint date='12/01/2004' yVal='Weight'/
   dataPoint date='12/25/2004' yVal='Weight'/
   dataPoint date='1/1/2005' yVal='Weight'/
   dataPoint date='1/22/2005' yVal='Weight'/
 /series

 mx:PlotSeries
   dataProvider={weightSeries.dataPoint}
   xField=@date
   yField=@yVal
 /



 

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





RE: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Alex Harui
Yeah, we want SVN patches.  They're supposedly easier to manage.  I
assume there isn't much to this fix so we can probably work from the
diff.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Friday, June 27, 2008 7:16 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RadioButton change event not firing in Flex 3
when button in group is deselected

 

Not using eclipse' SVN, I hate it :) I went with regular old diff. I can
always re-submit it again some time, but I'm not recompiling the whole
source since that'd take weeks (exaggerating only a little), Flex's
compiler ain't quick. I'm just monkey-patching changes into my
test-project source tree.

On Sat, Jun 28, 2008 at 12:07 AM, Jonathan Branam
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

You should use svn diff. I usually do it from within Eclipse. It has a
command called Create a Patch or something. But I think just:

svn diff  patch.txt

will work.

 

On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

The problem's in RadioButtonGroup, I've posted the details to the bug. 

Alex, 

I've got Contrib permission, but the submit a patch document just
talks about TortoiseSVN. Is the patch file I need to submit simply:

diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

Just using standard BSD Diff (OS X)? Or have I got the operands in the
wrong order, or is it not standard diff at all?

-Josh

RadioButton.click simply calls out to group.selection 

 

On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

It looks like it was done to prevent events for programmatic changes to
.selected which would be correct, but the RBG programmatically unselects
an RB and this code now prevents an event which probably should fire.

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Josh McDonald
Sent: Thursday, June 26, 2008 3:44 PM


To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] RadioButton change event not firing in Flex 3
when button in group is deselected

 

It makes more sense to me to be for Radiobutton than Checkbox. Why on
earth would you not want to get a change event when a checkbox is
unchecked?

-Josh

On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Thanks for confirming.  Bug filed.

https://bugs.adobe.com/jira/browse/SDK-15918
https://bugs.adobe.com/jira/browse/SDK-15918 

Best regards,



Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
in the Washington D.C. Contact [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  

On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

That's what I figured, just wanted to confirm.  I still think the change
(which was for CheckBox) had unintended consequences in RadioButton, so
file a bug.

 

 

__._,_




-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  








-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



Re: [flexcoders] over pixelated scaled images

2008-06-27 Thread Tom Chiverton
On Thursday 26 Jun 2008, David Pariente wrote:
 Hello,

 I'm showing some pics in a gallery, and they are showing smaller than real
 size.

You mean you are explicitly setting the width/height to a different value to 
what the file really has for some reason ?

 The problem is that they appear OverPixelated. 

Flex's native image scaling isn't going to be as good as what an external tool 
can do, I suspect.

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



RE: [flexcoders] Datagrid Weirdness - Lose arrow key functionality

2008-06-27 Thread Alex Harui
If you renderer steals focus, DG arrows will stop working.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Barry
Sent: Friday, June 27, 2008 5:34 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid Weirdness - Lose arrow key functionality

 

Hi,
Can anyone help me out here?
I have a datagrid which when using the up and down arrow keys changed
the selected index of the grid. All normal there.
However, when I add an itemRenderer to one of the dataGrid Columns, I
lose that functionality.

mx:DataGrid x=0 y=40 width=100% height=100% id=lisDG
dataProvider={model.contactObjects} change=dataGridClick(event)
mx:columns
mx:DataGridColumn width=20 
itemRenderer=com.pbsmedia.ccAdmin.comps.StatusRenderer 
editable=false/
mx:DataGridColumn width=40 sortDescending=true sortable=true
sortCompareFunction=Sorts.compareRegDate headerText=Reg Date
labelFunction=Sorts.doRegDateLabel/
mx:DataGridColumn width=40 sortable=true
headerText=Associate dataField=ContactAssociate/
mx:DataGridColumn width=100 sortable=true headerText=Name
dataField=ContactName /
mx:DataGridColumn width=100 sortable=true headerText=Company
dataField=ContactCompanyName /
mx:DataGridColumn width=40 sortable=true
sortCompareFunction=Sorts.compareNextCall headerText=Next Call
labelFunction=doNextCallLabel/
/mx:columns
/mx:DataGrid

Any help much appreciated,
Barry

 



[flexcoders] Re: Setting unique ID with repeater and custom component

2008-06-27 Thread valdhor
I don't know about most people but I never need to know the id of a
repeated item.

All of the items I have in a repeater are instances of a specific
object. This object has class members and functions and can do
everything it needs to do on its own. If I need it to (Which is
infrequent) each object can get to its parent or even the Application
object itself.

So, I ask, Why would you need to refer to a repeated component?


--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I am using the Tile Component along with a repeater and then a custom
  component (image control). Is it possible to give the custom component
  a unique id/name? I have tried to use a variable associated with the
  current repeater item ({repeater.currentItem.name}), however, it does
  not seem that this is possible as I am getting an error that the ID is
  not a valid identifier.
  
  Thanks for any and all replies.
 
 
 If you have something like this:
 
 mx:Repeater id=theRepeater dataProvider={yourAC}
yourNS:YourComponent id=foo/
 /mx:Repeater
 
 then you can refer to any repeated component by its index within foo.  
 i.e. foo[0] is the first component.  This is pretty thoroughly 
 documented in the help for Repeater.
 
 HTH;
 
 Amy





[flexcoders] Re: over pixelated scaled images

2008-06-27 Thread kenny14390
I had this problem a couple days ago. See this site:
http://www.actionsnip.com/snippets/vixiom/how-to-get-smooth-image-scaling-in-flex

--- In flexcoders@yahoogroups.com, David Pariente [EMAIL PROTECTED] wrote:

 Hello,
 
 I'm showing some pics in a gallery, and they are showing smaller
than real size. The problem is that they appear OverPixelated.
 
 I've been searching on the properties of the image tag and couldn't
find something to take that annoying pixlation out.
 
 someone can help me?
 
 thnx a lot :)
 
 
 
   __ 
 Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.





[flexcoders] Acrobat 9 and Flex

2008-06-27 Thread Anatole Tartakovsky
I am considering the new Acrobat 9 embedding capabilities for Flex
applications. Are there any planned
1. integration libraries
2. changes to PrintJob specific to Acrobat hosting
3. serialization/deserialization package that would that would be used as a
replacement to Capture classes for client side SWF capturing?

Thank you,
Anatole


[flexcoders] Re: Report Formatting

2008-06-27 Thread bredwards358
There is also FlexReport which also looks just as promising

http://www.kemelyon.com/bts/

--- In flexcoders@yahoogroups.com, Rick Winscot [EMAIL PROTECTED]
wrote:

 Oh! Oh! 
 
  
 
 http://www.alivepdf.org/ 
 
  
 
 Rick Winscot
 
  
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Dan Pride
 Sent: Friday, June 27, 2008 3:33 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Report Formatting
 
  
 
 Hi
 I want to print out a report. The data goes beyond the scope of a
datagrid.
 I suppose I could use php but is there a way to do a long multi page
report
 in Flex?
 
 Dan





[flexcoders] Re: currentstate in custom component

2008-06-27 Thread Tim Hoff

Hi Kobe,

If you're asking how to change the current state of main.mxml from
inside a custom component, here are a few ways:

* The simplest way, is to use parentDocument.currentState =
myBaseStateName. For more deeply nested components, you can also chain
these like: parentDocument.parentDocument.parentDocument.currentState =
myBaseStateName.
* If main.mxml is the application class, you could also use
mx.core.Application.application.currentState = myBaseStateName.
* For a more loosely coupled approach, you could dispatch an event
from the component, that is listened for in main.mxml.  When the event
listener hears the event, change the currentState in the handler
function.
* Another way, is to bind a model variable to the currentState.  This
is most commonly done in an MVC application.

There are other ways to access a components parent, but these should
handle the mojority of use cases.

-TH



or, for itemRenderers use outerDocument.


--- In flexcoders@yahoogroups.com, Ingo Stoecker [EMAIL PROTECTED] wrote:

 hello,

 I put some custom components in view states. The components have
functions to change the currentstate to base view. But it doesnt work.
Hhow can I switch views (from the main.mxml) in these functions?

 greets,

 Kobe



 __
 Gesendet von Yahoo! Mail.
 Dem pfiffigeren Posteingang.
 http://de.overview.mail.yahoo.com





[flexcoders] Re: One custom component referring to another

2008-06-27 Thread Jason
Thanks Alex and Mike, I was kinda starting to suspect I needed to do 
it that way, even as I was writing the e-mail.  Makes perfect sense, 
I'll do that. Thanks!

Jason Merrill 
Bank of America 
Global Technology  Operations  Global Risk LLD 
eTools  Multimedia 

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning 
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe.

 

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 My vote would be for changes in A to affect a central model.  B 
would
 watch the model change and reflect those changes.  Everything B 
needs
 from A would be reflected in the model.  That's pretty much what 
Mike
 said, except I'm not a fan of throwing events up if that means
 bubbling.  A should dispatch events that the app listens to in 
order
 to change the central model.
 
  
 
 However, I would think that there is some syntax that should have 
got
 this past the compiler.  If you use the MXMLC -keep option you can 
see
 what it generated and maybe figure out why it didn't work.  
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of Michael Labriola
 Sent: Friday, June 27, 2008 8:20 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: One custom component referring to another
 
  
 
 Jason,
 
 In an ideal world, component A would throw events up. Those events 
 would be caught in the application (in this case) and call 
 corresponding methods in component B.
 
 You really, really don't want to start coupling these components 
 together by calling the internals of one from the other in this 
way. 
 Especially when they really are peers in your application.
 
 Just my 2 cents,
 Mike
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Merrill, Jason 
 jason.merrill@ wrote:
 
  I thought this would be simple - having one custom display object 
 modify another through a reference:
  
  mx:Application 
  c:MyComponentA /
  c:MyComponentB /
  /mx:Application
  
  I want to have MyComponentA refer to objects/methods inside of 
 MyComponentB. I tried passing a reference in:
  
  mx:Application 
  c:MyComponentA id=myComponentA /
  c:MyComponentB componentToModify={myComponentA}/
  /mx:Application
  
  But I get an error saying, Access of possibly undefined property 
 myComponentA through a reference with static type 
 flash.display:DisplayObject.
  
  I tried calling parent.myComponentA from actionscript inside of 
 MyComponentB.MXML, but it couldn't find the instance 
 of myComponentA. 
  
  How do you handle this? I know this probably isn't ideal 
 architecture, but would there have to be scripts that listen for 
 events in one component in the main app and then modify the other 
 component? I guess I could do that if it is best practice. I need 
 the two components to be separated because they are two different 
 parts of the UI, but need to interact. One has controls that change 
 the view and data in the other. Does it have to modify the other 
 component from actionscript on the main app or can I just pass a 
 reference into one component like I have tried? 
  
  Thanks.
  
  
  Jason Merrill 
  Bank of America 
  Global Technology  Operations  Global Risk LLD 
  eTools  Multimedia 
  
  Join the Bank of America Flash Platform Developer Community 
 
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default
 http://sharepoint.bankofamerica.com/sites/tlc/flash/default 
 .aspx 
  
  Are you a Bank of America associate interested in innovative 
 learning ideas and technologies?
  Check out our internal GTO Innovative Learning Blog 
 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defau
 http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defau 
 lt.aspx  subscribe 
 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layo
 http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layo 
 uts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
 
Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/P
 http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/P 
 osts/Archive.aspx .
 





[flexcoders] Re: Which event is dispatched when the view is shown by a stage change?

2008-06-27 Thread Tim Hoff

Hi João,

This is kind of a hack, but you could try:

mx:State name=editing  onEnter=localeEditor.myTextBox.setFocus() 

If you used this, you would want to execute the setFocus code on
creationComplete of the editor; for the first time that the editor is
shown.  Instead of useing states for something like this though, you
might want to consider using a ViewSTack instead.  For those the show
event, in conjunction with creationComplete, would work; when changing
the container's selectedIndex.

-TH

--- In flexcoders@yahoogroups.com, João [EMAIL PROTECTED] wrote:

 Hello,

 I have a:

 - Container with two states (  and editing)
 - A view (LocaleEditor.mxml) that is shown when the container changes
 to the state editing:

 mx:states
 mx:State name=editing 
 mx:RemoveChild target={listaDeLocales}/
 mx:AddChild relativeTo={gestorDeLinguas} position=lastChild
 ns1:LocaleEditor id=localeEditor/
 /mx:AddChild
 /mx:State
 /mx:states

 I need my view to execute some code when it is shown
 (myTextBox.setFocus() ). I have tried the creationComplete event, but
 the view is only created on the first time the state changes, the next
 times this event is not dispatched. I have tried the AddedToStage, but
 it throws a runtime error with the myTextBox.setFocus() code . I have
 tried the show event, but it simply doesn't work.

 Which event should I rely on to execute the myTextBox.setFocus()
 when the user sees the view?

 Thanks,

 João Saleiro





Re: [flexcoders] Re: internationalization @ switching runtime

2008-06-27 Thread Richard Rodseth
This is working out nicely for me (the eval trick, and the fact that
ResourceManager.getString can take arguments).
The one case where I can't push a direct ResourceManager call all the
way into a binding expression is when labelFunctions or
dataTipFunctions are required.
In that case, assuming I override ResourcesChanged, what's the best
way to re-trigger the functions?. Assign them to null, then back? Call
invalidateDisplayList ?

On Sat, Jun 21, 2008 at 9:21 PM, Richard Rodseth [EMAIL PROTECTED] wrote:
 That's very clever.

 Gordon's suggestion of adding [Bindable]  metadata to the buildTitle()
 method and overriding resourcesChanged() works nicely, and I could
 imagine caching some strings in the override, but adding the override
 in numerous components is a bit of a nuisance, so your idea is quite
 appealing.

 Thanks!

 On Fri, Jun 20, 2008 at 7:53 PM, brent80301 [EMAIL PROTECTED] wrote:
 A trick that I have used in this case (when overriding
 resourcesChanged is inconvenient) is to add a property to your
 whatever.properties file that has no value but accepts a parameter
 like the following.

 eval = {0}

 Then, in your mxml component, do something like the following.

 mx:Label
 text={resourceManager.getString('whatever','eval',[buildTitle(someParameter)])}/

 This will reevaluate when the locale is changed, and the eval property
 will simply pass through the new value. Voila!

 -Brent

 --- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] 
 wrote:

 No, no, I am definitely using the ResourceManager. But the expression
 is something like

 text={buildTitle(someParameter)}

 And buildTitle calls static function getUIString which calls
 getResourceManager followed by some string substitution.

 On Fri, Jun 20, 2008 at 2:59 PM, Gordon Smith [EMAIL PROTECTED] wrote:
  If you're not using MXML databinding to write code like
 
 
 
  Button id=b label={resourceManager.getString(...)}/
 
 
 
  then you can override the resourcesChanged() method and reassign
 the new
  string, as in
 
 
 
  b.label = resourceManager.getString(...);
 
 
 
  The ResourceManager works with resources in ResourceBundles, which
 normally
  get compiled from .properties files. Are you loading .properties
 files at
  runtime and parsing them yourself to get keys and values? In that
 case, you
  can create new instances of ResourceBundle at runtime, put your
 resources
  into them, and install them into the ResourceManager like this:
 
 
 
  var rb:ResourceBundle = new ResourceBundle(locale, bundleName);
 
  rb.content[key1] = value1;
 
  rb.content[key2] = value2;
 
  ...
 
  resourceManager.addResourceBundle(rb);
 
 
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
 
 
  
 
  From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
  Behalf Of Richard Rodseth
  Sent: Friday, June 20, 2008 2:37 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] internationalization @ switching runtime
 
 
 
  Gordon,
 
  Forgive me (or ignore this) if it's in the docs.
 
  Does this assume that the ResourceManager.getString call is in the
  binding expression?
  Currently I have some static utilities that load strings like Hello,
  {0} from properties files and then do parameter substitution. I've
  been wondering how that would work out in a runtime locale switching
  scenario.
 
  On Fri, Jun 20, 2008 at 2:14 PM, Gordon Smith [EMAIL PROTECTED] wrote:
  You want to learn about the ResourceManager class in Flex 3. It
 allows you
  to simply change its localeChain property at runtime and have the
 entire
  application redraw in a new language.
 
 
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
 
 
  
 
  From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
  Behalf Of artur_desig2dev
  Sent: Friday, June 20, 2008 6:12 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] internationalization @ switching runtime
 
 
 
  forgive my newbie question..
 
  just wanted to find out the best practice on this to date.
  on how to change all the components' language at runtime.
 
  i found 2 methods of doing this:
 
  http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/
 
  http://www.herrodius.com/blog/123
  http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/
 
  thanks
 
 
 
 


 



RE: [flexcoders] Server to client calls

2008-06-27 Thread Seth Hodgson
Hi Luciano,

You have two options for controlling/filtering which messages are pushed to 
subscribed Consumers.

1. Assign a selector expression to your Consumer before subscribing; this acts 
as a server-side filter that is evaluated against headers of messages sent to 
the destination. It's evaluated at the server, not at the client, and only 
messages that satisfy the expression are pushed to the Consumer.
2. Enabled subtopics for the destination and have each Consumer subscribe to a 
subtopic. You could have each Consumer subscribe to its own unique subtopic, or 
you can use subtopics to group sets of Consumers. When you generate messages on 
the server directly, you can target them to a specific destination's subtopic 
by adding a DSSubtopic header to the message you're sending.

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Luciano 
Manerich Junior
Sent: Thursday, June 26, 2008 9:56 AM
To: flexcoders@yahoogroups.com
Subject: RES: [flexcoders] Server to client calls

Hi Seth,
 
thank you, and all those answers that i've received. In that sample app, every 
client receive an event, there is an way that i may filter some clients in 
server code, instead of ignoring it on the cliente side?
 
Ive seen that there is a property on consumer class that i'ld put an expression 
for a validation, that kind of filter its done on client side?
 
Thank in advance,
Luciano.


De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome de Seth Hodgson
Enviada em: quinta-feira, 26 de junho de 2008 13:46
Para: flexcoders@yahoogroups.com
Assunto: RE: [flexcoders] Server to client calls
Hi Luciano,

Take a look through the sample apps. One of them is a stock ticker sample, and 
tick updates (messages) that are pushed/dispatched to subscribed Consumers are 
generated directly by Java code on the server.

You could follow the same approach, and generate messages on the server that 
your clients handle by invoking local methods. 
But there's nothing like client.call(...) on the server in BlazeDS and LCDS at 
this point.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Luciano 
Manerich Junior
Sent: Monday, June 23, 2008 12:16 PM
To: flexcoders@yahoogroups.com
Subject: RES: [flexcoders] Server to client calls

Hi,
 
i've just seen the way with Producer/Consumer, but, its just too much 
automated. Is there an way that i may dispatch a consumer event to flex 
within Java?
 
I need to dispatch an event, to some clients, without any user interaction.
 
In FMS, there is a collection of the current clients, and i may interact with 
that to call some methods.


De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome de Luciano 
Manerich Junior
Enviada em: segunda-feira, 23 de junho de 2008 15:32
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] Server to client calls
Hi there,
 
It is possible with LCDS, BlazeDS or some similar DS to call flex client 
methods from the server? If not, this is only possible with FMS?
 
Thanks in advance. 
 


[flexcoders] Getting parent information from AdvancedDataGrid

2008-06-27 Thread Amy
Hi, all;

I have been using AdvancedDataGrid to display information in a 
HierarchicalCollection.  The parent (container) items contain 
information on how the child items should be viewed.  So the same child 
might be in the tree three different types under different parents.  I 
left the view information in the container, since it has nothing to do 
with the actual data contained in the child object.

The problem I am having is that I don't seem to be able to find a way 
to get at that data from the parent data when a user clicks on a child.

Thanks :-)

-Amy



RE: [flexcoders] #2031: Socket Error

2008-06-27 Thread Seth Hodgson
When you hit a 2031 error, to troubleshoot further I'd recommend running 
Wireshark (formerly, Ethereal) to capture the TCP packets sent/received when 
you run your test.

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
edward.syrett
Sent: Friday, June 27, 2008 1:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] #2031: Socket Error

I'm trying to send a simple string to a Printer Server on our network.    The 
text is a language called ZPL which is going to our little print server box 
that has a Zebra Label printer on its parallel port.

Here's my test app:


?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
    
    mx:Script
        ![CDATA[
            import mx.controls.Alert;
            
            
            private function onPrintZpl():void 
            {
     nbs! p;          var sData:String = ^XA^FWR^CI13 +
                    ^LHLabelTop,LabelLeft +
                    ^FWB^FO512,899^XGPPI_LAN,1,1^FS^FWR +
                    ^FO708,045^A0,40,40^FDUnit 7^FS +
                    ^FO659,042^A0,40,40^FDKuehne + Nagel Logistics^FS +
                    ^FO611,042^A0,40,40^FDAppletree Road^FS +
                    ^FO562,042^A0,40,40^F! DChipping Warden^FS +
      ! nbsp; n bsp;           ^FO522,042^A0,40,40^FDBanbury^FS +
                    ^FO476,042^A0,40,40^FDOxfordshire^FS +
                    ^FO430,043^A0,40,40^FDOX17 1LL^FS +
                    ^FO381,042^A0,40,40^FDUnited Kingdom^FS +
                    ^BY3,3,10 +
                    ^FO141,043^B3R,N,100,Y,N^FD9^FS +
                    ^XZ
     ! nbsp;          
                try
                {
                    var socket:Socket = new Socket();
                    
                    //socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
                    
                    socket.connect(10.44.180.120, 9100);
                    socket.writeUTF(sData);            n! bsp;nbs p;      
socket.flush();
                    
                    socket.close();
                }
                catch(error:Error)
                {
                    Alert.show(error.message);
                }
            }
            
            private function onIOError(event:IOErrorEvent):void            {
            }
            
        ]]
    /mx:Script
    
    mx:VBox width=100% label=Printing
        mx:Button label=ZPL Print click=onPrintZpl()/
    /mx:VBox
        
/mx:WindowedApplication

With the app as it stands, I can hit the ZPL Print button, the label is 
printed, but then the app throws this error:

[SWF] SocketTest.swf - 902,761 bytes after decompression
Error #2044: Unhandled IOErrorEvent:. text=Error #2031: Socket Error.
    at SocketTest/onPrintZpl()[C:\Development\Monarch\Test\SocketT! 
est\src\SocketTest.mxml:28]
    at! SocketT 
est/___SocketTest_Button1_click()[C:\Development\Monarch\Test\SocketTest\src\SocketTest.mxml:58]

If I uncomment the call to addEventListener() for IOErrorEvent.IO_ERROR, the 
app runs without any errors, but the label isn't printed.

Any comments/help gratefully received.

Thanks,

Ed.
 


RE: [flexcoders] flex and automation

2008-06-27 Thread Seth Hodgson
If you're rendering the charts in the browser player and then pushing a bitmap 
back to the server, that needs to run in a browser (or in AIR, also not 
headless).

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of netdeep
Sent: Friday, June 27, 2008 7:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flex and automation

There are no flex user groups in my area and I've been trying for a long time 
to find a 
solution to this problem with no success.

I need to generate a series of charts every few minutes/hours/days on an 
automated basis. I 
pull the data for the charts from the database and draw the chart, then save it 
as an image 
and potentially notify someone where they can find the image as a png or a pdf.

I am using java on the backend to communicate with the database and flex to 
draw the 
charts. The same app which draws the chart can also be called by a user to get 
a live 
snapshot. But the automation just isn't working. It works fine on my local 
development 
machine, but this application is deployed on a headless server and the flex 
process never 
gets to launch since it needs to run on a browser. I've looked at solutions for 
getting it to 
run headless but so far I can't get it to work. 

Does anyone know how to automate flex in this way? I know flex is meant to be 
interactive, 
but is there anyway I can still use the flex charting for automated output?
 


RE: [flexcoders] Re: Managed Collections with null objects

2008-06-27 Thread Seth Hodgson
This sounds like an issue that's been fixed in the 2.5.1 hotfixes and in 2.6.

If either of you have support contracts, please request the latest 2.5.1 
hotfix. You may also want to give 2.6 Beta a try.

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
richcianci
Sent: Tuesday, June 24, 2008 1:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Managed Collections with null objects


LCDS 2.51. Collection managed by an application scoped custom
assembler with auto-sync-enabled and cache-items both set to true.
Paging enabled with a page size of 500.

--- In flexcoders@yahoogroups.com, richcianci [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@ wrote:
 
  Hi guys,
  
  What version of things are you running, and would you mind sharing
 your destination configuration?
  
  Thanks,
  Seth
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On Behalf Of richcianci
  Sent: Tuesday, June 17, 2008 3:45 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: Managed Collections with null objects
  
  --- In flexcoders@yahoogroups.com, João Fernandes 
  joaopedromartinsfernandes@ wrote:
  
   I'm having this weird issue that never happened before.
   Sometimes, totally randomly, after deleting a managed item in a 
   arraycollection, instead of getting the arrayCollection resized by -
  1, 
   my arraycollection keeps the same size and I get a null object 
  where the 
   managed item was previously.
   
   This happens using ds.deleteItem() or using 
   arrayCollection.removeItemAt( itemIndex )
   -- 
   
   João Fernandes
   
   http://www.onflexwithcf.org
   http://www.riapt.org
  
  
  I am having the same issue. Did you ever figure it out?
 
  


Re: [flexcoders] Repeater not repeating

2008-06-27 Thread Joseph Balderson
You could always extend ArrayCollection so that the extended-AC notifies its 
bound objects when its Array source changes. It depends whether you want the 
code change made to the 'source'  of the data (in which case you'd update the 
AC, not the Array, as Tom mentioned), or the 'destination' (change the source 
Array on extended-AC).

___

Joseph Balderson, Flash Platform Developer | http://joeflash.ca


Tom McNeer wrote:
 Jonathan,
 
 Thanks very much for your clear and thorough explanation.
 
 One of the major difficulties of discussing matters like this, of 
 course, is semantics. Many common words we might use to describe 
 apparent actions - like update or refresh -- have such specific 
 meanings within the context of Flex -- often naming specific methods, in 
 fact -- that someone like me, who is relatively new to Flex and 
 ActionScript, may misspeak (and mislead) by referring to things incorrectly.
 
 I understand that the key concept is whether an object knows that 
 something has happened. I mistakenly thought that the AC knew that its 
 source had changed, but the Repeater didn't know that the AC had changed.
 
 You've straightened me out: the AC didn't know its source had changed, 
 and therefore didn't communicate to any other object.
 
 The easiest solution is to use the AC directly to change the data.
 
 
 
 Thanks. I understand. I'll have to think about whether that's 
 appropriate in this case, since a change in the source array would 
 actually be generated by the addition of an object from a wholly 
 different area of the app.
 
 But you've given me more understanding, and a good rule of thumb: when 
 something doesn't appear to be updating, it probably hasn't been told to.
 
 -- 
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560 


Re: [flexcoders] Which event is dispatched when the view is shown by a stage change?

2008-06-27 Thread Jonathan Branam
Hey João,
Posted online with SWF and View Source:
http://jonathanbranam.net/node/56
http://jonathanbranam.net/solutions/detect-state-addchild

There are two solutions that I've found to work in this case. This first is
to add a new public method to the component called activate() and then call
it from a handler on the
enterStatehttp://jonathanbranam.net/flex3anatomy/event/enterStateEvent.
The second is to listen to the
addedToStage http://jonathanbranam.net/flashphysiology/event/addedToStageand
updateComplete 
http://jonathanbranam.net/flex3anatomy/event/updateCompleteevents,
set a flag in
addedToStage http://jonathanbranam.net/flashphysiology/event/addedToStagethat
you check in
updateComplete http://jonathanbranam.net/flex3anatomy/event/updateCompleteto
run your initialization.

Here is the code, example app, and more detailed explanation.

You can view the example on a separate
pagehttp://jonathanbranam.net/files/src/detect-state-addchild/DetectStateAddChild.htmland
view the source (View Source doesn't work in the embedded SWF below
due
to a bug in Flex Builder).

   Explanation:

The first solution is easy and should be solid. The
enterStatehttp://jonathanbranam.net/flex3anatomy/event/enterStateEvent
fires after the component has been added to the stage (not during the
operation), so it is safer to access subcomponents. The method, however,
does not guarantee that the component has been fully updated yet. The
downside to this is adding more coupling between the
Statehttp://jonathanbranam.net/flex3anatomy/class/Stateand the
component.

   1. mx:State name=solution1
   2.   mx:enterState
   3. sol1.activate();
   4.   /mx:enterState
   5.   mx:RemoveChild target={noState}/
   6.   mx:AddChild
   7. local:Solution1VBox id=sol1/
   8.   /mx:AddChild
   9. /mx:State

 The code in the component is equally obvious:

   1.   public function activate():void
   2.   {
   3. ti.setFocus();
   4.   }


   1.   mx:Label text=Solution 1/
   2.   mx:TextInput text=No focus here!/
   3.   mx:TextInput id=ti text=Focus here!/

 The second solution relies on the behavior of the
Statehttp://jonathanbranam.net/flex3anatomy/class/StateAddChild
operation. AddChild is true to its name, it will add and remove the
component from the display list. This means that the
addedhttp://jonathanbranam.net/flashphysiology/event/added,
addedToStage http://jonathanbranam.net/flashphysiology/event/addedToStage,
removed http://jonathanbranam.net/flashphysiology/event/removed, and
removedFromStagehttp://jonathanbranam.net/flashphysiology/event/removedFromStagemethods
will fire when the state is entered and exited. The trouble is that
the component has not been fully created when these events fire. The
solution I present here is to set a flag when the component has been added
to the stage so that the component knows that it needs to run its activation
code again:

   1.   protected var addedToStage:Boolean = false;
   2.   protected function addedToStageHandler(event:Event):void
   3.   {
   4. if (event.target == this) {
   5.   addedToStage = true;
   6. }
   7.   }

 The next part of the solution uses the
updateCompletehttp://jonathanbranam.net/flex3anatomy/event/updateCompleteevent
to trigger the activation code. If the
addedToStage code has run since the most recent update, then we run the
activation code.

   1.   protected var addedToStage:Boolean = false;
   2.   protected function addedToStageHandler(event:Event):void
   3.   {
   4. if (event.target == this) {
   5.   addedToStage = true;
   6. }
   7.   }

 Note that 
updateCompletehttp://jonathanbranam.net/flex3anatomy/event/updateCompletefires
every time the component is invalidated through something like
invalidateDisplayList(). I put a button in the component so you can trigger
updateComplete http://jonathanbranam.net/flex3anatomy/event/updateComplete.
If you remove the check for addedToStage, then invalidating the component
will run the activation code again, which is not the desired behavior. See
the article on 
updateCompletehttp://jonathanbranam.net/flex3anatomy/event/updateCompletefor
more information about this event.

   1.   mx:Label text=Solution 2/
   2.   mx:TextInput text=No focus here!/
   3.   mx:TextInput id=ti text=Focus here!/
   4.   mx:Button label=Invalidate Component click=
   invalidateDisplayList()/

 I'm not sure which solution I like better. The first is more direct and
should be more resistant to changes in implementation or functionality. If
you move from using AddChild to toggling visibility, then you can still call
the activate() method from the
enterStatehttp://jonathanbranam.net/flex3anatomy/event/enterStateEvent.
However, this type of change will break the second solution.

Ultimately, there isn't a single, reliable event that will tell your
component it has now become viewable so you have to code up 

Re: [flexcoders] Browser Container

2008-06-27 Thread Mike Chang
what if AIR is really not an option? I HAVE to deploy it through a browser
because of an existing framework.

On Fri, Jun 27, 2008 at 8:22 AM, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Friday 27 Jun 2008, emaxima wrote:
  Is there a good browser framework so I can embed my flex application
  (deployed offline on desktop) not exactly by launching IE, but with
  customization, such as how it handles exit. I want to warn user to

 Umm, AIR ?

 --
 Tom Chiverton

 

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

 Halliwells LLP is a limited liability partnership registered in England and
 Wales under registered number OC307980 whose registered office address is at
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A
 list of members is available for inspection at the registered office. Any
 reference to a partner in relation to Halliwells LLP means a member of
 Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

 CONFIDENTIALITY

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

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

 

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






[flexcoders] Re: Which event is dispatched when the view is shown by a stage change?

2008-06-27 Thread Tim Hoff

Yep, my bad.  As Jonathan points out, this should be enterState instead
of onEnter (grr).

mx:State name=editing  enterState=localeEditor.myTextBox.setFocus()


-TH

--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote:


 Hi João,

 This is kind of a hack, but you could try:

 mx:State name=editing onEnter=localeEditor.myTextBox.setFocus() 

 If you used this, you would want to execute the setFocus code on
 creationComplete of the editor; for the first time that the editor is
 shown. Instead of useing states for something like this though, you
 might want to consider using a ViewSTack instead. For those the show
 event, in conjunction with creationComplete, would work; when changing
 the container's selectedIndex.

 -TH

 --- In flexcoders@yahoogroups.com, João joao.saleiro@ wrote:
 
  Hello,
 
  I have a:
 
  - Container with two states (  and editing)
  - A view (LocaleEditor.mxml) that is shown when the container
changes
  to the state editing:
 
  mx:states
  mx:State name=editing 
  mx:RemoveChild target={listaDeLocales}/
  mx:AddChild relativeTo={gestorDeLinguas} position=lastChild
  ns1:LocaleEditor id=localeEditor/
  /mx:AddChild
  /mx:State
  /mx:states
 
  I need my view to execute some code when it is shown
  (myTextBox.setFocus() ). I have tried the creationComplete event,
but
  the view is only created on the first time the state changes, the
next
  times this event is not dispatched. I have tried the AddedToStage,
but
  it throws a runtime error with the myTextBox.setFocus() code . I
have
  tried the show event, but it simply doesn't work.
 
  Which event should I rely on to execute the myTextBox.setFocus()
  when the user sees the view?
 
  Thanks,
 
  João Saleiro
 





Re: [flexcoders] Repeater not repeating

2008-06-27 Thread Jonathan Branam
How would you do that, exactly? How could your extended ArrayCollection know
the Array had changed? It's just not possible.

On Fri, Jun 27, 2008 at 1:05 PM, Joseph Balderson [EMAIL PROTECTED] wrote:

 You could always extend ArrayCollection so that the extended-AC notifies
 its
 bound objects when its Array source changes. It depends whether you want
 the
 code change made to the 'source'  of the data (in which case you'd update
 the
 AC, not the Array, as Tom mentioned), or the 'destination' (change the
 source
 Array on extended-AC).

 ___

 Joseph Balderson, Flash Platform Developer | http://joeflash.ca


 Tom McNeer wrote:
  Jonathan,
 
  Thanks very much for your clear and thorough explanation.
 
  One of the major difficulties of discussing matters like this, of
  course, is semantics. Many common words we might use to describe
  apparent actions - like update or refresh -- have such specific
  meanings within the context of Flex -- often naming specific methods, in
  fact -- that someone like me, who is relatively new to Flex and
  ActionScript, may misspeak (and mislead) by referring to things
 incorrectly.
 
  I understand that the key concept is whether an object knows that
  something has happened. I mistakenly thought that the AC knew that its
  source had changed, but the Repeater didn't know that the AC had
 changed.
 
  You've straightened me out: the AC didn't know its source had changed,
  and therefore didn't communicate to any other object.
 
  The easiest solution is to use the AC directly to change the data.
 
 
 
  Thanks. I understand. I'll have to think about whether that's
  appropriate in this case, since a change in the source array would
  actually be generated by the addition of an object from a wholly
  different area of the app.
 
  But you've given me more understanding, and a good rule of thumb: when
  something doesn't appear to be updating, it probably hasn't been told to.
 
  --
  Thanks,
 
  Tom
 
  Tom McNeer
  MediumCool
  http://www.mediumcool.com
  1735 Johnson Road NE
  Atlanta, GA 30306
  404.589.0560

 

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






Re: [flexcoders] RadioButton change event not firing in Flex 3 when button in group is deselected

2008-06-27 Thread Jonathan Branam
I found the command line tools to compile the Flex SDK to be very speedy for
the amount of code it's working with. I just use eclipse for editing and
SVN. It really doesn't take much time at all. Its FB3 that's apparently so
slow. Either that or the framework code is easier to compile than my app,
because it certainly has more code in it. I would recommend getting familiar
with building the Flex SDK from source if you're planning to submit patches.

On Fri, Jun 27, 2008 at 10:15 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   Not using eclipse' SVN, I hate it :) I went with regular old diff. I can
 always re-submit it again some time, but I'm not recompiling the whole
 source since that'd take weeks (exaggerating only a little), Flex's compiler
 ain't quick. I'm just monkey-patching changes into my test-project source
 tree.


 On Sat, Jun 28, 2008 at 12:07 AM, Jonathan Branam 
 [EMAIL PROTECTED] wrote:

  You should use svn diff. I usually do it from within Eclipse. It has a
 command called Create a Patch or something. But I think just:

 svn diff  patch.txt

 will work.


 On Fri, Jun 27, 2008 at 1:22 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   The problem's in RadioButtonGroup, I've posted the details to the bug.


 Alex,

 I've got Contrib permission, but the submit a patch document just talks
 about TortoiseSVN. Is the patch file I need to submit simply:

 diff /path/to/checkout/foo.as /path/to/new/foo.as  mypatch.diff

 Just using standard BSD Diff (OS X)? Or have I got the operands in the
 wrong order, or is it not standard diff at all?

 -Josh

 RadioButton.click simply calls out to group.selection

 On Fri, Jun 27, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote:

  It looks like it was done to prevent events for programmatic changes
 to .selected which would be correct, but the RBG programmatically unselects
 an RB and this code now prevents an event which probably should fire.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 *On Behalf Of *Josh McDonald
 *Sent:* Thursday, June 26, 2008 3:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] RadioButton change event not firing in Flex
 3 when button in group is deselected



 It makes more sense to me to be for Radiobutton than Checkbox. Why on
 earth would you not want to get a change event when a checkbox is 
 unchecked?

 -Josh

 On Fri, Jun 27, 2008 at 2:48 AM, Samuel Neff [EMAIL PROTECTED]
 wrote:

 Thanks for confirming.  Bug filed.

 https://bugs.adobe.com/jira/browse/SDK-15918

 Best regards,



 Sam

 -
 We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer
 in the Washington D.C. Contact [EMAIL PROTECTED]

 On Thu, Jun 26, 2008 at 11:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

 That's what I figured, just wanted to confirm.  I still think the change
 (which was for CheckBox) had unintended consequences in RadioButton, so 
 file
 a bug.





 __._,_




 --
 Therefore, send not to know For whom the bell tolls. It tolls for
 thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
  



[flexcoders] Uploading binary file and RemoteObject call

2008-06-27 Thread lytvynyuk
I have situation that in addition to my RemoteObject call, which
invokes medthod on my server with object containing some fields, I
need to send content of some file as well. I thought I can some how
load it to the client the make it like one of the fields of RO. But I
don't think I can read local files.

What is the possible solution for this scenario? Thank you.




RE: [flexcoders] AIR/LCDS/EJB Authentication lost when a different RTMP worker thread is used

2008-06-27 Thread Seth Hodgson
For NIO-based connections to the server, authentication is handled in a 
container specific fashion (in your case using the TomcatLoginCommand) and the 
resulting Principal returned by the container is stored in either the 
FlexSession or FlexClient instance on the server corresponding to the remote 
Flex client. This stored Principal is used for all authorization constraint 
checks applied to LCDS destinations/etc., but because NIO endpoints don't use 
container threads I suspect that JBoss' EJB container doesn't see this 
Principal and can't use it for its own checks.

I'll log an enhancement request/bug for this issue.

As a workaround, you'd need to apply your security constraints at the LCDS 
destination level rather than on the EJB methods directly.

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
taze170171
Sent: Monday, June 23, 2008 3:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AIR/LCDS/EJB Authentication lost when a different RTMP 
worker thread is used

Hi!

I am setting up the security for Flex to work together with the EJB 3
Container security. The user should login within the AIR application
via a custom login screen and the authentication should be verified
against the configured JBoss login module. For all further ds
requests the authorization check should be done for every EJB method
by the EJB container. All EJB methods have a
@javax.annotation.security.RolesAllowed(...) anotation.

The EJBs are called within an assembler.

In principle the process works until the EJB is called by a new RTMP
worker thread. Within the new RTMP thread the principal is null and
the authorization fails.

I have setup the security as follows:
* The custom security and tomcat valve have been setup as described
in the lcds docu (copy jars, copy context.xml)
* The services-config.xml contains the following part:
...
security
login-command
class=flex.messaging.security.TomcatLoginCommand server=all /
security-constraint id=basic-read-access
auth-methodCustom/auth-method
roles
roleFLEX/role
/roles
/security-constraint
/security
...

* The data-management-config.xml contains the following part:
destination id=id
security
security-constraint ref=basic-read-access/
/security
adapter ref=java-dao /
...

* The login is performed within the mxml as follows:

var token:AsyncToken = ds.connect();
token.addResponder(
new AsyncResponder(
function():void
{
if (ds.connected)
{
var channelSet : ChannelSet = ds.channelSet;
var token : AsyncToken = channelSet.login(user, pwd);

token.addResponder(new AsyncResponder
(
function(event:ResultEvent, token:Object=null):void
{
switch(event.result)
{
case success:
Alert.show(Login success);
...

I get the success result and when the first ejb calls are performed
from the data service assembler the prinicipal is set and the
authorization works.

But if the EJB is called within another RTMP worker thread no
principal is set and the authorization fails.

How can I share the security login context over more than one worker
thread?

Thanks in advance,
taze
 


[flexcoders] How to enable the enter key for all buttons onFocus

2008-06-27 Thread dnk
Good day all,

How would one go about enabling the enter key for all buttons in your  
flex app?

I know you an do the defaultKey for a form, or add keyDown to your  
button (but that reacts to all keys then - not good).

As it stands now, the spacebar will react to every button onFocus.. .I  
was hoping to do that with the Enter key...

d




[flexcoders] Using Datagrid Data

2008-06-27 Thread ghus32
Hello everyone,

Is it possible to send data from a poulated datagrid??

For example, I want to send row1 and make it a var.. is this possible?

Thanks



RE: [flexcoders] Re: One custom component referring to another

2008-06-27 Thread Mike Nimer
Be careful here. There is a possible performance problem with a
application level central model. If you push all of your data through a
central model, then whenever you change ANY property in the model a
propertyChangeEvent is thrown from the model class. So  every UI element
in your application which is bound to any property in the central model
will invalidate their display and re-render itself..   even if it's not
on screen. 

 

I'm with mike on this, bubble the data you need up as needed, but, keep
things as local as possible. You might need to go to a global central
model for some data, every app has a little global data (logged in user,
etc). But in practice, most of the data I've ever referenced is usually
pretty specific to a component or two. So I let the child tell the
parent with an event and the parent can decide which other children need
to know. Children can't tell each other what to do. Or in other words,
let the parent component be the model for sub-components under it. 

 

Hope that helps,

---nimer

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Friday, June 27, 2008 10:38 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: One custom component referring to another

 

My vote would be for changes in A to affect a central model.  B would
watch the model change and reflect those changes.  Everything B needs
from A would be reflected in the model.  That's pretty much what Mike
said, except I'm not a fan of throwing events up if that means
bubbling.  A should dispatch events that the app listens to in order
to change the central model.

 

However, I would think that there is some syntax that should have got
this past the compiler.  If you use the MXMLC -keep option you can see
what it generated and maybe figure out why it didn't work.  

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Labriola
Sent: Friday, June 27, 2008 8:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: One custom component referring to another

 

Jason,

In an ideal world, component A would throw events up. Those events 
would be caught in the application (in this case) and call 
corresponding methods in component B.

You really, really don't want to start coupling these components 
together by calling the internals of one from the other in this way. 
Especially when they really are peers in your application.

Just my 2 cents,
Mike

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Merrill, Jason 
[EMAIL PROTECTED] wrote:

 I thought this would be simple - having one custom display object 
modify another through a reference:
 
 mx:Application 
 c:MyComponentA /
 c:MyComponentB /
 /mx:Application
 
 I want to have MyComponentA refer to objects/methods inside of 
MyComponentB. I tried passing a reference in:
 
 mx:Application 
 c:MyComponentA id=myComponentA /
 c:MyComponentB componentToModify={myComponentA}/
 /mx:Application
 
 But I get an error saying, Access of possibly undefined property 
myComponentA through a reference with static type 
flash.display:DisplayObject.
 
 I tried calling parent.myComponentA from actionscript inside of 
MyComponentB.MXML, but it couldn't find the instance 
of myComponentA. 
 
 How do you handle this? I know this probably isn't ideal 
architecture, but would there have to be scripts that listen for 
events in one component in the main app and then modify the other 
component? I guess I could do that if it is best practice. I need 
the two components to be separated because they are two different 
parts of the UI, but need to interact. One has controls that change 
the view and data in the other. Does it have to modify the other 
component from actionscript on the main app or can I just pass a 
reference into one component like I have tried? 
 
 Thanks.
 
 
 Jason Merrill 
 Bank of America 
 Global Technology  Operations  Global Risk LLD 
 eTools  Multimedia 
 
 Join the Bank of America Flash Platform Developer Community 
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default
.aspx 
 
 Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
 Check out our internal GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defau
lt.aspx  subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layo
uts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/P
osts/Archive.aspx .


 



[flexcoders] Re: flex and automation

2008-06-27 Thread netdeep

Seth, thanks for the reply.

What I'm wondering is how to trick the server into running the browser in a 
headless 
environment.  

Does anyone know how to get flex to run this way, in the background?

Thanks,

DJ

 

--- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote:

 If you're rendering the charts in the browser player and then pushing a 
 bitmap back to 
the server, that needs to run in a browser (or in AIR, also not headless).
 
 Seth
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
netdeep
 Sent: Friday, June 27, 2008 7:44 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] flex and automation
 
 There are no flex user groups in my area and I've been trying for a long time 
 to find a 
 solution to this problem with no success.
 
 I need to generate a series of charts every few minutes/hours/days on an 
 automated 
basis. I 
 pull the data for the charts from the database and draw the chart, then save 
 it as an 
image 
 and potentially notify someone where they can find the image as a png or a 
 pdf.
 
 I am using java on the backend to communicate with the database and flex to 
 draw the 
 charts. The same app which draws the chart can also be called by a user to 
 get a live 
 snapshot. But the automation just isn't working. It works fine on my local 
 development 
 machine, but this application is deployed on a headless server and the flex 
 process 
never 
 gets to launch since it needs to run on a browser. I've looked at solutions 
 for getting it 
to 
 run headless but so far I can't get it to work. 
 
 Does anyone know how to automate flex in this way? I know flex is meant to be 
interactive, 
 but is there anyway I can still use the flex charting for automated output?






[flexcoders] Re: One custom component referring to another

2008-06-27 Thread Amy
--- In flexcoders@yahoogroups.com, Jason [EMAIL PROTECTED] wrote:

 Thanks Alex and Mike, I was kinda starting to suspect I needed to 
do 
 it that way, even as I was writing the e-mail.  Makes perfect 
sense, 
 I'll do that. Thanks!

It's not best practice, but you absolutely can pass references to 
things outside an object's scope into the object.  I did this with a 
component I wanted to reparent, i.e. I had a series of components 
duplicated in a Repeater, and when you clicked on one of them, it 
would grab the component I'd passed a reference to and add it to 
itself.  I was doing this to make something that looked like an 
Accordion but could take a dataprovider and recycle the same object 
rather than having multiple copies.

Essentially, you just put a property on the component with type 
UIComponent and push it in through the ClassFactory if it is an 
itemRenderer or you can set it directly if it is not.

If you set up an interface that the component you are referring to 
has to adhere to, you can actually do this without requiring tight 
coupling.  I didn't need to worry about that, because the only thing 
I did was addChild().  However, you may want to consider just having 
the components bound to the same data and have the data push the 
changes.

HTH;

Amy





RE: [flexcoders] Re: One custom component referring to another

2008-06-27 Thread Alex Harui
I think that's if you actually use mx:Model  I generally write my own
model singletons and customize the change events.  IMHO, it also makes
it easier to reflect the model in the URL in BrowserMgr.  But the two
Mikes actually do this for money and I don't so maybe there's stuff they
know that makes a difference.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Nimer
Sent: Friday, June 27, 2008 10:36 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: One custom component referring to another

 

Be careful here. There is a possible performance problem with a
application level central model. If you push all of your data through a
central model, then whenever you change ANY property in the model a
propertyChangeEvent is thrown from the model class. So  every UI element
in your application which is bound to any property in the central model
will invalidate their display and re-render itself..   even if it's not
on screen. 

 

I'm with mike on this, bubble the data you need up as needed, but, keep
things as local as possible. You might need to go to a global central
model for some data, every app has a little global data (logged in user,
etc). But in practice, most of the data I've ever referenced is usually
pretty specific to a component or two. So I let the child tell the
parent with an event and the parent can decide which other children need
to know. Children can't tell each other what to do. Or in other words,
let the parent component be the model for sub-components under it. 

 

Hope that helps,

---nimer

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Friday, June 27, 2008 10:38 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: One custom component referring to another

 

My vote would be for changes in A to affect a central model.  B would
watch the model change and reflect those changes.  Everything B needs
from A would be reflected in the model.  That's pretty much what Mike
said, except I'm not a fan of throwing events up if that means
bubbling.  A should dispatch events that the app listens to in order
to change the central model.

 

However, I would think that there is some syntax that should have got
this past the compiler.  If you use the MXMLC -keep option you can see
what it generated and maybe figure out why it didn't work.  

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Labriola
Sent: Friday, June 27, 2008 8:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: One custom component referring to another

 

Jason,

In an ideal world, component A would throw events up. Those events 
would be caught in the application (in this case) and call 
corresponding methods in component B.

You really, really don't want to start coupling these components 
together by calling the internals of one from the other in this way. 
Especially when they really are peers in your application.

Just my 2 cents,
Mike

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Merrill, Jason 
[EMAIL PROTECTED] wrote:

 I thought this would be simple - having one custom display object 
modify another through a reference:
 
 mx:Application 
 c:MyComponentA /
 c:MyComponentB /
 /mx:Application
 
 I want to have MyComponentA refer to objects/methods inside of 
MyComponentB. I tried passing a reference in:
 
 mx:Application 
 c:MyComponentA id=myComponentA /
 c:MyComponentB componentToModify={myComponentA}/
 /mx:Application
 
 But I get an error saying, Access of possibly undefined property 
myComponentA through a reference with static type 
flash.display:DisplayObject.
 
 I tried calling parent.myComponentA from actionscript inside of 
MyComponentB.MXML, but it couldn't find the instance 
of myComponentA. 
 
 How do you handle this? I know this probably isn't ideal 
architecture, but would there have to be scripts that listen for 
events in one component in the main app and then modify the other 
component? I guess I could do that if it is best practice. I need 
the two components to be separated because they are two different 
parts of the UI, but need to interact. One has controls that change 
the view and data in the other. Does it have to modify the other 
component from actionscript on the main app or can I just pass a 
reference into one component like I have tried? 
 
 Thanks.
 
 
 Jason Merrill 
 Bank of America 
 Global Technology  Operations  Global Risk LLD 
 eTools  Multimedia 
 
 Join the Bank of America Flash Platform Developer Community 
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default
http://sharepoint.bankofamerica.com/sites/tlc/flash/default 
.aspx 
 
 Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
 Check out our internal GTO Innovative Learning Blog 

[flexcoders] Re: Repeater not repeating

2008-06-27 Thread Amy
--- In flexcoders@yahoogroups.com, Jonathan Branam 
[EMAIL PROTECTED] wrote:

 How would you do that, exactly? How could your extended 
ArrayCollection know
 the Array had changed? It's just not possible.

Extend Array as well...?



Re: [flexcoders] Re: flex and automation

2008-06-27 Thread Chris Hunter
If there is, I haven't found it. We've got a similar requirement for being
able to capture charting output on a scheduled basis and have determined
that we'll more than likely have to drop the requirement unless we can get a
browser and supporting libraries installed on the server.
--chris

On Fri, Jun 27, 2008 at 1:20 PM, netdeep [EMAIL PROTECTED] wrote:


 Seth, thanks for the reply.

 What I'm wondering is how to trick the server into running the browser in a
 headless
 environment.

 Does anyone know how to get flex to run this way, in the background?

 Thanks,

 DJ



 --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote:
 
  If you're rendering the charts in the browser player and then pushing a
 bitmap back to
 the server, that needs to run in a browser (or in AIR, also not headless).
 
  Seth
 
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of
 netdeep
  Sent: Friday, June 27, 2008 7:44 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] flex and automation
 
  There are no flex user groups in my area and I've been trying for a long
 time to find a
  solution to this problem with no success.
 
  I need to generate a series of charts every few minutes/hours/days on an
 automated
 basis. I
  pull the data for the charts from the database and draw the chart, then
 save it as an
 image
  and potentially notify someone where they can find the image as a png or
 a pdf.
 
  I am using java on the backend to communicate with the database and flex
 to draw the
  charts. The same app which draws the chart can also be called by a user
 to get a live
  snapshot. But the automation just isn't working. It works fine on my
 local development
  machine, but this application is deployed on a headless server and the
 flex process
 never
  gets to launch since it needs to run on a browser. I've looked at
 solutions for getting it
 to
  run headless but so far I can't get it to work.
 
  Does anyone know how to automate flex in this way? I know flex is meant
 to be
 interactive,
  but is there anyway I can still use the flex charting for automated
 output?
 




 

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






Re: [flexcoders] Re: flex and automation

2008-06-27 Thread Florian Sprenger

DJ,

Peter Martin has description how to run gflashplayer in a framebuffer  
here:


http://weblogs.macromedia.com/pmartin/archives/2007/01/ 
continous_integ.html


HTH
florian

Am 27.06.2008 um 20:20 schrieb netdeep:



Seth, thanks for the reply.

What I'm wondering is how to trick the server into running the  
browser in a headless

environment.

Does anyone know how to get flex to run this way, in the background?

Thanks,

DJ

--- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED]  
wrote:


 If you're rendering the charts in the browser player and then  
pushing a bitmap back to
the server, that needs to run in a browser (or in AIR, also not  
headless).


 Seth

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

netdeep
 Sent: Friday, June 27, 2008 7:44 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] flex and automation

 There are no flex user groups in my area and I've been trying for  
a long time to find a

 solution to this problem with no success.

 I need to generate a series of charts every few minutes/hours/ 
days on an automated

basis. I
 pull the data for the charts from the database and draw the  
chart, then save it as an

image
 and potentially notify someone where they can find the image as a  
png or a pdf.


 I am using java on the backend to communicate with the database  
and flex to draw the
 charts. The same app which draws the chart can also be called by  
a user to get a live
 snapshot. But the automation just isn't working. It works fine on  
my local development
 machine, but this application is deployed on a headless server  
and the flex process

never
 gets to launch since it needs to run on a browser. I've looked at  
solutions for getting it

to
 run headless but so far I can't get it to work.

 Does anyone know how to automate flex in this way? I know flex is  
meant to be

interactive,
 but is there anyway I can still use the flex charting for  
automated output?









[flexcoders] Re: How to Position a Popup relative to the control that invoked the popup?

2008-06-27 Thread valdhor
This should give you an idea:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
 creationComplete=onCreationComplete(event)
 mx:Script
 ![CDATA[
 import mx.controls.Button;
 import mx.containers.GridItem;
 import mx.containers.GridRow;
 import mx.containers.Grid;
 import mx.events.FlexEvent;
 import mx.controls.Alert;

 private var buttonsArray:Array = new Array(One, two,
Three, Four, Five, Six, Seven, Eight, Nine);
 private var myGridRow:GridRow;
 private var myButton:Button;
 private function onCreationComplete(event:FlexEvent):void
 {
 var myGrid:Grid = new Grid();
 for(var i:int = 0 ; i  buttonsArray.length ; i++)
 {
 var myGridItem:GridItem = new GridItem();
 myButton = new Button();
 myButton.label = buttonsArray[i];
 myButton.addEventListener(MouseEvent.CLICK,
buttonWasClicked);
 myGridItem.addChild(myButton);
 if((i % 3) == 0 || i == 0)
 {
 if(i != 0)
 {
 myGrid.addChild(myGridRow);
 }
 myGridRow = new GridRow();
 }
 myGridRow.addChild(myGridItem);
 }
 myGrid.addChild(myGridRow);
 this.addChild(myGrid);
 }

 private function buttonWasClicked(event:MouseEvent):void
 {
 var currentButton:Button = event.target as Button;
 var pt:Point = new Point(currentButton.x,
currentButton.y);
 pt = event.target.localToGlobal(pt);

 Alert.show(Clicked Button Left:  + pt.x + \n +
Clicked Button Bottom:  + (pt.y + currentButton.height).toString());
 }
 ]]
 /mx:Script
/mx:Application


  -Original Message-
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  on behalf of pbrendanc
  Sent: Thu 26/06/2008 7:55 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] How to Position a Popup relative to the
 control that invoked the popup?
 
  I have a grid with an array of buttons that when clicked, will
display
  a popup window that collects user info.
  What I'd like to do is position the popup relative (immediately
below)
  the button that the user clicked within the grid - not necessarily
  centered on the current window.
 
  How can I get access the position/coordinates of the calling button
-
  is this data somehow available via the createComplete event of the
  popup. I imagine this data is buried somewhere in the
  event/eventtarget object, but I'm not quite sure how to access it.
 
  (Please don't tell me that I need to assign a listener to every
button
  in the grid from within the Popup window as I'm creating the grid
  dynamically and it varies in size).
 
  Can anyone help with this,
 
  TIA,
  Patrick





Re: [flexcoders] Re: Repeater not repeating

2008-06-27 Thread Jonathan Branam
And what would be the point of that? You can use an ArrayCollection as a
substitute for Array in just about any situation and it will take care of
the problem. If he could swap the original Array for a different class, just
swap it for ArrayCollection and be done. That's what I would recommend
anyway.

If you extend Array to dispatch events on changes then you just wrote
ArrayCollection again. It would support the methods on Array that aren't on
ArrayCollection. This is assuming you can override the [] access using the
flash_proxy methods, but I'm not sure if that works Array isn't a
subclass of Proxy but it overrides their behavior. I'm not sure if you can
do this or if its just magic (ie Flash internals)?

On Fri, Jun 27, 2008 at 2:37 PM, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, Jonathan Branam
 [EMAIL PROTECTED] wrote:
 
  How would you do that, exactly? How could your extended
 ArrayCollection know
  the Array had changed? It's just not possible.

 Extend Array as well...?


 

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






Re: [flexcoders] Using Datagrid Data

2008-06-27 Thread Fidel Viegas
On Fri, Jun 27, 2008 at 6:35 PM, ghus32 [EMAIL PROTECTED] wrote:
 Hello everyone,

 Is it possible to send data from a poulated datagrid??

 For example, I want to send row1 and make it a var.. is this possible?

 Thanks

What exactly are you trying to achieve? Send data to a webservice,
remote object or http service? Is that what you mean?

Fidel.


[flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread securenetfreedom
Any thoughts?

In an DataModel class what is the best way to bind data.
 
1) Make the Setter Bindable, or
2) Make the Getter Bindable and dispatch an event on the Setter?
 
What are the advantages and disadvantages of each?


//   Binding #1
[Bindable]
public function set foo(val:String):void{
 _foo = val;
}
public function get foo():String{
 return _foo;
}

//   Binding #2
[Bindable(event=fooChanged)]
public function get foo():String{
 return _foo;
}
public function set foo(val:String):void{
 _foo = val;
 dispatchEvent(new Event(MyDataModel.FOO_CHANGED));
}




[flexcoders] Re: Using Datagrid Data

2008-06-27 Thread ghus32
Yah I am I want to send each row as a var to a webservice.

Thanks


--- In flexcoders@yahoogroups.com, Fidel Viegas [EMAIL PROTECTED] 
wrote:

 On Fri, Jun 27, 2008 at 6:35 PM, ghus32 [EMAIL PROTECTED] wrote:
  Hello everyone,
 
  Is it possible to send data from a poulated datagrid??
 
  For example, I want to send row1 and make it a var.. is this 
possible?
 
  Thanks
 
 What exactly are you trying to achieve? Send data to a webservice,
 remote object or http service? Is that what you mean?
 
 Fidel.





[flexcoders] swfLoader not working when in an mxml component?

2008-06-27 Thread grimmwerks
I've got a swfLoader and code that doesn't fire whenever in a  
subcomponent -- a button calls the swfLoader to load -- and although  
it seems to fire that it's done, there's nothing displayed.

I take this same code and put it on the application level, and it  
fires just fine.

Am I missing something?


[flexcoders] Re: Weird Validate Binding problem

2008-06-27 Thread valdhor
This may or may not help. It is a combination of the examples in the
help for DateValidator and Binding:

?xml version=1.0 encoding=utf-8?
!-- Simple example to demonstrate the DateValidator. --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;

 mx:Script
 import mx.controls.Alert;
 /mx:Script

 mx:DateValidator source={dob} property=text
allowedFormatChars=/
 trigger={myButton} triggerEvent=click
 valid=Alert.show('Validation Succeeded!');
 invalid=Alert.show('Thats not a date!!');
 required=true/

 mx:Binding source=Date.parse(dob.text).toString()
destination=myText.text/

 mx:Panel title=DateValidator Example width=75% height=75%
 paddingTop=10 paddingLeft=10 paddingRight=10
paddingBottom=10
 mx:Form
 mx:FormItem label=Enter date of birth (mm/dd/): 
 mx:TextInput id=dob width=100%/
 /mx:FormItem
 mx:FormItem 
 mx:Button id=myButton label=Validate /
 /mx:FormItem
 /mx:Form
 mx:Text id=myText/
 /mx:Panel
/mx:Application

--- In flexcoders@yahoogroups.com, hardaur55 [EMAIL PROTECTED] wrote:

 Hello all!

   I have a TextInput field that is to accept a date.  There is a date
validator attached to the
 field and the text property of the date field is bound to a property
in another field.  Here's
 the code:

 mxml:

 mx:DateValidator id=validateBirthdayTI
   source={birthdayTI}
   property=text
   required=true/


 mx:Binding source={Date.parse(birthdayTI.text)}
 destination=tideContext.user.birthday/

 Actionscript:

 formIsValid = formIsValid  validate(validateBirthdayTI);


 When the validator runs, I get the following error when doing a
try/catch, otherwise it fails
 silently.

 The source attribute must be specified when the property attribute is
specified.

 This seems to say that the source attribute for the validator isn't
correct, but I don't see
 anything wrong with it (and other fields/properties are fine).  It
also seems to somehow be
 tied in to the binding as if I comment out the binding it works (and
validates) just fine.  I
 have a feeling I'm running up against one of those very strange Flex
errors that don't mean
 what they say exactly ; )

 Any help is very much appreciated, I've been beating on this thing off
and on for a week
 and am getting pretty frustrated.

 Thanks!

 G




[flexcoders] Re: flex and automation

2008-06-27 Thread valdhor
Am I missing something. Can't you just set the headless server option?

From the Manual:
A headless server is one that is running UNIX or Linux and often does
not have a monitor, keyboard, mouse, or even a graphics card. Headless
servers are most commonly encountered in ISPs and ISVs, where
available space is at a premium and servers are often mounted in
racks. Enabling the headless mode reduces the graphics requirements of
the underlying system and can allow for a more efficient use of memory.

If you deploy a Flex application on a headless server, you must set
the headless-server option of the compiler to true. Setting this
option to true is required to support fonts and SVG images in a
nongraphical environment. 



--- In flexcoders@yahoogroups.com, Florian Sprenger
[EMAIL PROTECTED] wrote:

 DJ,
 
 Peter Martin has description how to run gflashplayer in a framebuffer  
 here:
 
 http://weblogs.macromedia.com/pmartin/archives/2007/01/ 
 continous_integ.html
 
 HTH
 florian
 
 Am 27.06.2008 um 20:20 schrieb netdeep:
 
 
  Seth, thanks for the reply.
 
  What I'm wondering is how to trick the server into running the  
  browser in a headless
  environment.
 
  Does anyone know how to get flex to run this way, in the background?
 
  Thanks,
 
  DJ
 
  --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@  
  wrote:
  
   If you're rendering the charts in the browser player and then  
  pushing a bitmap back to
  the server, that needs to run in a browser (or in AIR, also not  
  headless).
  
   Seth
  
   From: flexcoders@yahoogroups.com  
  [mailto:[EMAIL PROTECTED] On Behalf Of
  netdeep
   Sent: Friday, June 27, 2008 7:44 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] flex and automation
  
   There are no flex user groups in my area and I've been trying for  
  a long time to find a
   solution to this problem with no success.
  
   I need to generate a series of charts every few minutes/hours/ 
  days on an automated
  basis. I
   pull the data for the charts from the database and draw the  
  chart, then save it as an
  image
   and potentially notify someone where they can find the image as a  
  png or a pdf.
  
   I am using java on the backend to communicate with the database  
  and flex to draw the
   charts. The same app which draws the chart can also be called by  
  a user to get a live
   snapshot. But the automation just isn't working. It works fine on  
  my local development
   machine, but this application is deployed on a headless server  
  and the flex process
  never
   gets to launch since it needs to run on a browser. I've looked at  
  solutions for getting it
  to
   run headless but so far I can't get it to work.
  
   Does anyone know how to automate flex in this way? I know flex is  
  meant to be
  interactive,
   but is there anyway I can still use the flex charting for  
  automated output?
  
 
 
 





RE: [flexcoders] swfLoader not working when in an mxml component?

2008-06-27 Thread Alex Harui
One possibilty is the layout rules when not in the app care about the
SWFLoader's measurements.  If they do, the SWFLoader will measure to 0,0
and so will not have any size to it.  That's because its content isn't
loaded yet.  If resizeToContent is false on its parent container, the
SWFLoader may not get resized when the bits do come in.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of grimmwerks
Sent: Friday, June 27, 2008 12:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] swfLoader not working when in an mxml component?

 

I've got a swfLoader and code that doesn't fire whenever in a 
subcomponent -- a button calls the swfLoader to load -- and although 
it seems to fire that it's done, there's nothing displayed.

I take this same code and put it on the application level, and it 
fires just fine.

Am I missing something?

 



RE: [flexcoders] AS3 interface question

2008-06-27 Thread Gordon Smith
As far as I know, Adobe plans to follow the emerging Ecmascript 4
standard. We're unlikely to support covariant return types in
ActionScript unless ES4 has them.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Winscot
Sent: Thursday, June 26, 2008 10:30 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS3 interface question

 

By the way... there is an open issue in the Adobe bug-base regarding
this. Vote for it! NOW!

 

http://bugs.adobe.com/jira/browse/ASC-3442
http://bugs.adobe.com/jira/browse/ASC-3442 

 

Rick Winscot

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ralf Bokelberg
Sent: Thursday, June 26, 2008 9:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3 interface question

 

Yep, it's a language feature, which is not there. I think it is called
covariant return types.
Afaik, all you can do is check the type and cast.
Cheers
Ralf.

On Thu, Jun 26, 2008 at 3:14 PM, diehlryan [EMAIL PROTECTED]
mailto:rdiehl%40docfinity.com  wrote:
 I'm running into a wall when trying to use extension with interfaces.
 The example I'm about to provide works using Java, so I believe the
 OOP practices behind it are valid. But I can't figure out how to
 accomplish the same thing in Flex, I keep running into compiler
 issues. The example is a condensed version of something I'm working
 on, for simplicity sake.

 Let's say you have a bunch of events that all have some common
 functionality, like the ability to have a nextEvent. Also, a subset
 of those events also have additional functionality, they can be
 filtered by a type of criteria. We'll call them search events.

 Now, there are some parts of the application that can work with any
 type of search event, and any type of criteria. But when the
 individual searches are executed, that implementation expects a
 specific type of search event and search criteria. That's my end goal
 here.

 Here are the interfaces I'm using:

 public interface ICriteria
 {
 // just a marker
 }

 public interface ICustomCriteria extends ICriteria
 {
 function get name():String;
 function set name(name:String):void;
 }

 public interface IEvent
 {
 function get nextEvent():IEvent;
 function set nextEvent(event:IEvent):void;
 }

 public interface ISearchEvent
 {
 function get criteria():ICriteria;
 function set criteria(criteria:ICriteria):void;
 }

 So far, so good. And now the implementing classes:

 // would like to make this an abstract class, but not supported in AS
 public class BaseEvent implements IEvent
 {
 private var _nextEvent:IEvent;

 public function set nextEvent(event:IEvent):void
 {
 this._nextEvent = event;
 }

 public function get nextEvent():IEvent
 {
 return this._nextEvent;
 }
 }

 // would like to make this an abstract class, but not supported in AS
 public class BaseSearchEvent extends BaseEvent implements ISearchEvent
 {
 private var _criteria:ICriteria;

 public function set criteria(criteria:ICriteria):void
 {
 this._criteria = criteria;
 }

 public function get criteria():ICriteria
 {
 return this._criteria;
 }
 }

 Those base classes are fine and compile correctly. Now if you
 remember from the requirements, there are some places that can work
 with any type of ISearchEvent, and some places that can only work with
 an individual subclass. Here is where the compiler errors come in.
 Doing what I am about to do works in Java, and I'm wondering if there
 is a way to accomplish it in AS3.

 public class CustomSearchEvent extends BaseSearchEvent
 {
 private var _criteria:ICustomCriteria;

 public override function get criteria():ICustomCriteria
 {
 return this._criteria;
 }

 public override function set criteria(criteria:ICustomCriteria):void
 {
 this._criteria = criteria;
 }
 }

 The above class does not compile because the method signatures for
 get/set criteria are different than those specified in the interface.
 But from an OO perspective, I think this is a valid thing to want to
 do. If you're working with an ISearchEvent instance, you should be
 able to subclass the base class and provide custom behavior. The
 ICustomCriteria is a subclass of ICriteria, so you should be able to
 substitute them in this context. Is there another way to accomplish
 this? Or is this just a language feature that's not there?

 

 



RE: [flexcoders] Re: internationalization @ switching runtime

2008-06-27 Thread Gordon Smith
Try calling invalidateList() on the list-based component that you want
to update with the new locale.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Friday, June 27, 2008 9:48 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: internationalization @ switching runtime

 

This is working out nicely for me (the eval trick, and the fact that
ResourceManager.getString can take arguments).
The one case where I can't push a direct ResourceManager call all the
way into a binding expression is when labelFunctions or
dataTipFunctions are required.
In that case, assuming I override ResourcesChanged, what's the best
way to re-trigger the functions?. Assign them to null, then back? Call
invalidateDisplayList ?

On Sat, Jun 21, 2008 at 9:21 PM, Richard Rodseth [EMAIL PROTECTED]
mailto:rrodseth%40gmail.com  wrote:
 That's very clever.

 Gordon's suggestion of adding [Bindable] metadata to the buildTitle()
 method and overriding resourcesChanged() works nicely, and I could
 imagine caching some strings in the override, but adding the override
 in numerous components is a bit of a nuisance, so your idea is quite
 appealing.

 Thanks!

 On Fri, Jun 20, 2008 at 7:53 PM, brent80301 [EMAIL PROTECTED]
mailto:brent80301%40yahoo.com  wrote:
 A trick that I have used in this case (when overriding
 resourcesChanged is inconvenient) is to add a property to your
 whatever.properties file that has no value but accepts a parameter
 like the following.

 eval = {0}

 Then, in your mxml component, do something like the following.

 mx:Label

text={resourceManager.getString('whatever','eval',[buildTitle(someParam
eter)])}/

 This will reevaluate when the locale is changed, and the eval
property
 will simply pass through the new value. Voila!

 -Brent

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Richard Rodseth [EMAIL PROTECTED]
wrote:

 No, no, I am definitely using the ResourceManager. But the
expression
 is something like

 text={buildTitle(someParameter)}

 And buildTitle calls static function getUIString which calls
 getResourceManager followed by some string substitution.

 On Fri, Jun 20, 2008 at 2:59 PM, Gordon Smith [EMAIL PROTECTED] wrote:
  If you're not using MXML databinding to write code like
 
 
 
  Button id=b label={resourceManager.getString(...)}/
 
 
 
  then you can override the resourcesChanged() method and reassign
 the new
  string, as in
 
 
 
  b.label = resourceManager.getString(...);
 
 
 
  The ResourceManager works with resources in ResourceBundles, which
 normally
  get compiled from .properties files. Are you loading .properties
 files at
  runtime and parsing them yourself to get keys and values? In that
 case, you
  can create new instances of ResourceBundle at runtime, put your
 resources
  into them, and install them into the ResourceManager like this:
 
 
 
  var rb:ResourceBundle = new ResourceBundle(locale, bundleName);
 
  rb.content[key1] = value1;
 
  rb.content[key2] = value2;
 
  ...
 
  resourceManager.addResourceBundle(rb);
 
 
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On
  Behalf Of Richard Rodseth
  Sent: Friday, June 20, 2008 2:37 PM
  To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: Re: [flexcoders] internationalization @ switching runtime
 
 
 
  Gordon,
 
  Forgive me (or ignore this) if it's in the docs.
 
  Does this assume that the ResourceManager.getString call is in the
  binding expression?
  Currently I have some static utilities that load strings like
Hello,
  {0} from properties files and then do parameter substitution.
I've
  been wondering how that would work out in a runtime locale
switching
  scenario.
 
  On Fri, Jun 20, 2008 at 2:14 PM, Gordon Smith [EMAIL PROTECTED] wrote:
  You want to learn about the ResourceManager class in Flex 3. It
 allows you
  to simply change its localeChain property at runtime and have the
 entire
  application redraw in a new language.
 
 
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On
  Behalf Of artur_desig2dev
  Sent: Friday, June 20, 2008 6:12 AM
  To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] internationalization @ switching runtime
 
 
 
  forgive my newbie question..
 
  just wanted to find out the best practice on this to date.
  on how to change all the components' language at runtime.
 
  i found 2 methods of doing this:
 
 
http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/

Re: [flexcoders] flex and automation

2008-06-27 Thread Pascal Robert
It might work with a command-line browser (curl, wget)?

 There are no flex user groups in my area and I've been trying for a  
 long time to find a
 solution to this problem with no success.

 I need to generate a series of charts every few minutes/hours/days  
 on an automated basis. I
 pull the data for the charts from the database and draw the chart,  
 then save it as an image
 and potentially notify someone where they can find the image as a  
 png or a pdf.

 I am using java on the backend to communicate with the database and  
 flex to draw the
 charts. The same app which draws the chart can also be called by a  
 user to get a live
 snapshot. But the automation just isn't working. It works fine on my  
 local development
 machine, but this application is deployed on a headless server and  
 the flex process never
 gets to launch since it needs to run on a browser. I've looked at  
 solutions for getting it to
 run headless but so far I can't get it to work.

 Does anyone know how to automate flex in this way? I know flex is  
 meant to be interactive,
 but is there anyway I can still use the flex charting for automated  
 output?


 


---
Pascal Robert

http://www.macti.ca
http://www.linkedin.com/in/macti

Skype: MacTICanada
AIM/iChat : MacTICanada




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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: One custom component referring to another

2008-06-27 Thread Merrill, Jason
Well, we're using Cairngorm on this project, so I think I'm going to use 
Cairngorm events and commands and centralize this, instead of trying to 
establish any tight coupling between components.  It's a control bar with 
checkboxes effecting the view of another visual componet in another part of the 
app.  Thanks everyone, great discussion.

Jason Merrill 
Bank of America 
Global Technology  Operations  Global Risk LLD 
eTools  Multimedia 

Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx 

Are you a Bank of America associate interested in innovative learning ideas and 
technologies?
Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx  
 subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.aspx
 . 




Re: [flexcoders] Re: internationalization @ switching runtime

2008-06-27 Thread Richard Rodseth
Actually, they're mostly charts.
And this is somewhat theoretical, since I'm just trying to be
runtime-switch-ready - it's not a requirement yet.
Thanks.

On Fri, Jun 27, 2008 at 12:40 PM, Gordon Smith [EMAIL PROTECTED] wrote:
 Try calling invalidateList() on the list-based component that you want to
 update with the new locale.



 Gordon Smith

 Adobe Flex SDK Team



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Richard Rodseth
 Sent: Friday, June 27, 2008 9:48 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Re: internationalization @ switching runtime



 This is working out nicely for me (the eval trick, and the fact that
 ResourceManager.getString can take arguments).
 The one case where I can't push a direct ResourceManager call all the
 way into a binding expression is when labelFunctions or
 dataTipFunctions are required.
 In that case, assuming I override ResourcesChanged, what's the best
 way to re-trigger the functions?. Assign them to null, then back? Call
 invalidateDisplayList ?

 On Sat, Jun 21, 2008 at 9:21 PM, Richard Rodseth [EMAIL PROTECTED] wrote:
 That's very clever.

 Gordon's suggestion of adding [Bindable] metadata to the buildTitle()
 method and overriding resourcesChanged() works nicely, and I could
 imagine caching some strings in the override, but adding the override
 in numerous components is a bit of a nuisance, so your idea is quite
 appealing.

 Thanks!

 On Fri, Jun 20, 2008 at 7:53 PM, brent80301 [EMAIL PROTECTED] wrote:
 A trick that I have used in this case (when overriding
 resourcesChanged is inconvenient) is to add a property to your
 whatever.properties file that has no value but accepts a parameter
 like the following.

 eval = {0}

 Then, in your mxml component, do something like the following.

 mx:Label

 text={resourceManager.getString('whatever','eval',[buildTitle(someParameter)])}/

 This will reevaluate when the locale is changed, and the eval property
 will simply pass through the new value. Voila!

 -Brent

 --- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED]
 wrote:

 No, no, I am definitely using the ResourceManager. But the expression
 is something like

 text={buildTitle(someParameter)}

 And buildTitle calls static function getUIString which calls
 getResourceManager followed by some string substitution.

 On Fri, Jun 20, 2008 at 2:59 PM, Gordon Smith [EMAIL PROTECTED] wrote:
  If you're not using MXML databinding to write code like
 
 
 
  Button id=b label={resourceManager.getString(...)}/
 
 
 
  then you can override the resourcesChanged() method and reassign
 the new
  string, as in
 
 
 
  b.label = resourceManager.getString(...);
 
 
 
  The ResourceManager works with resources in ResourceBundles, which
 normally
  get compiled from .properties files. Are you loading .properties
 files at
  runtime and parsing them yourself to get keys and values? In that
 case, you
  can create new instances of ResourceBundle at runtime, put your
 resources
  into them, and install them into the ResourceManager like this:
 
 
 
  var rb:ResourceBundle = new ResourceBundle(locale, bundleName);
 
  rb.content[key1] = value1;
 
  rb.content[key2] = value2;
 
  ...
 
  resourceManager.addResourceBundle(rb);
 
 
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
 
 
  
 
  From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
  Behalf Of Richard Rodseth
  Sent: Friday, June 20, 2008 2:37 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] internationalization @ switching runtime
 
 
 
  Gordon,
 
  Forgive me (or ignore this) if it's in the docs.
 
  Does this assume that the ResourceManager.getString call is in the
  binding expression?
  Currently I have some static utilities that load strings like Hello,
  {0} from properties files and then do parameter substitution. I've
  been wondering how that would work out in a runtime locale switching
  scenario.
 
  On Fri, Jun 20, 2008 at 2:14 PM, Gordon Smith [EMAIL PROTECTED] wrote:
  You want to learn about the ResourceManager class in Flex 3. It
 allows you
  to simply change its localeChain property at runtime and have the
 entire
  application redraw in a new language.
 
 
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
 
 
  
 
  From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
  Behalf Of artur_desig2dev
  Sent: Friday, June 20, 2008 6:12 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] internationalization @ switching runtime
 
 
 
  forgive my newbie question..
 
  just wanted to find out the best practice on this to date.
  on how to change all the components' language at runtime.
 
  i found 2 methods of doing this:
 
  http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/
 
  http://www.herrodius.com/blog/123
  http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/
 
  thanks
 
 
 
 





 

Re: [flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread Richard Rodseth
I do 2) all the time. Didn't know 1) was even an option.

On Fri, Jun 27, 2008 at 12:08 PM, securenetfreedom [EMAIL PROTECTED] wrote:
 Any thoughts?

 In an DataModel class what is the best way to bind data.

 1) Make the Setter Bindable, or
 2) Make the Getter Bindable and dispatch an event on the Setter?

 What are the advantages and disadvantages of each?

 // Binding #1
 [Bindable]
 public function set foo(val:String):void{
 _foo = val;
 }
 public function get foo():String{
 return _foo;
 }

 // Binding #2
 [Bindable(event=fooChanged)]
 public function get foo():String{
 return _foo;
 }
 public function set foo(val:String):void{
 _foo = val;
 dispatchEvent(new Event(MyDataModel.FOO_CHANGED));
 }

 


Re: [flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread Doug McCune
If you define a getter and a setter you can add the [Bindable] metadata to
either the getter or setter, it does the same thing either way. The only
time you have to use a custom event to trigger the binding is when you have
read-only properties (a getter but no setter).

Doug

On Fri, Jun 27, 2008 at 12:08 PM, securenetfreedom [EMAIL PROTECTED] wrote:

   Any thoughts?


 In an DataModel class what is the best way to bind data.

 1) Make the Setter Bindable, or
 2) Make the Getter Bindable and dispatch an event on the Setter?

 What are the advantages and disadvantages of each?

 // Binding #1
 [Bindable]
 public function set foo(val:String):void{
 _foo = val;
 }
 public function get foo():String{
 return _foo;
 }

 // Binding #2
 [Bindable(event=fooChanged)]
 public function get foo():String{
 return _foo;
 }
 public function set foo(val:String):void{
 _foo = val;
 dispatchEvent(new Event(MyDataModel.FOO_CHANGED));
 }

  



[flexcoders] Re: Setting unique ID with repeater and custom component

2008-06-27 Thread sdl1326
Adobe must have thought at least more than one person would need the
functionality otherwise I don't think they would have thoroughly 
documented it in the help section.

--- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote:

 I don't know about most people but I never need to know the id of a
 repeated item.
 
 All of the items I have in a repeater are instances of a specific
 object. This object has class members and functions and can do
 everything it needs to do on its own. If I need it to (Which is
 infrequent) each object can get to its parent or even the Application
 object itself.
 
 So, I ask, Why would you need to refer to a repeated component?
 
 
 --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:
 
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   I am using the Tile Component along with a repeater and then a
custom
   component (image control). Is it possible to give the custom
component
   a unique id/name? I have tried to use a variable associated with the
   current repeater item ({repeater.currentItem.name}), however, it
does
   not seem that this is possible as I am getting an error that the
ID is
   not a valid identifier.
   
   Thanks for any and all replies.
  
  
  If you have something like this:
  
  mx:Repeater id=theRepeater dataProvider={yourAC}
 yourNS:YourComponent id=foo/
  /mx:Repeater
  
  then you can refer to any repeated component by its index within
foo.  
  i.e. foo[0] is the first component.  This is pretty thoroughly 
  documented in the help for Repeater.
  
  HTH;
  
  Amy
 





RE: [flexcoders] Re: internationalization @ switching runtime

2008-06-27 Thread Gordon Smith
I'm not very familiar with the chart classes, but setting the
labelFunction to null and then back again will probably make them
display the new locale.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Friday, June 27, 2008 1:19 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: internationalization @ switching runtime

 

Actually, they're mostly charts.
And this is somewhat theoretical, since I'm just trying to be
runtime-switch-ready - it's not a requirement yet.
Thanks.

On Fri, Jun 27, 2008 at 12:40 PM, Gordon Smith [EMAIL PROTECTED]
mailto:gosmith%40adobe.com  wrote:
 Try calling invalidateList() on the list-based component that you want
to
 update with the new locale.



 Gordon Smith

 Adobe Flex SDK Team



 

 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Richard Rodseth
 Sent: Friday, June 27, 2008 9:48 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: Re: [flexcoders] Re: internationalization @ switching runtime



 This is working out nicely for me (the eval trick, and the fact that
 ResourceManager.getString can take arguments).
 The one case where I can't push a direct ResourceManager call all the
 way into a binding expression is when labelFunctions or
 dataTipFunctions are required.
 In that case, assuming I override ResourcesChanged, what's the best
 way to re-trigger the functions?. Assign them to null, then back? Call
 invalidateDisplayList ?

 On Sat, Jun 21, 2008 at 9:21 PM, Richard Rodseth [EMAIL PROTECTED]
mailto:rrodseth%40gmail.com  wrote:
 That's very clever.

 Gordon's suggestion of adding [Bindable] metadata to the buildTitle()
 method and overriding resourcesChanged() works nicely, and I could
 imagine caching some strings in the override, but adding the override
 in numerous components is a bit of a nuisance, so your idea is quite
 appealing.

 Thanks!

 On Fri, Jun 20, 2008 at 7:53 PM, brent80301 [EMAIL PROTECTED]
mailto:brent80301%40yahoo.com  wrote:
 A trick that I have used in this case (when overriding
 resourcesChanged is inconvenient) is to add a property to your
 whatever.properties file that has no value but accepts a parameter
 like the following.

 eval = {0}

 Then, in your mxml component, do something like the following.

 mx:Label


text={resourceManager.getString('whatever','eval',[buildTitle(someParam
eter)])}/

 This will reevaluate when the locale is changed, and the eval
property
 will simply pass through the new value. Voila!

 -Brent

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Richard Rodseth [EMAIL PROTECTED]
 wrote:

 No, no, I am definitely using the ResourceManager. But the
expression
 is something like

 text={buildTitle(someParameter)}

 And buildTitle calls static function getUIString which calls
 getResourceManager followed by some string substitution.

 On Fri, Jun 20, 2008 at 2:59 PM, Gordon Smith [EMAIL PROTECTED] wrote:
  If you're not using MXML databinding to write code like
 
 
 
  Button id=b label={resourceManager.getString(...)}/
 
 
 
  then you can override the resourcesChanged() method and reassign
 the new
  string, as in
 
 
 
  b.label = resourceManager.getString(...);
 
 
 
  The ResourceManager works with resources in ResourceBundles,
which
 normally
  get compiled from .properties files. Are you loading .properties
 files at
  runtime and parsing them yourself to get keys and values? In that
 case, you
  can create new instances of ResourceBundle at runtime, put your
 resources
  into them, and install them into the ResourceManager like this:
 
 
 
  var rb:ResourceBundle = new ResourceBundle(locale, bundleName);
 
  rb.content[key1] = value1;
 
  rb.content[key2] = value2;
 
  ...
 
  resourceManager.addResourceBundle(rb);
 
 
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On
  Behalf Of Richard Rodseth
  Sent: Friday, June 20, 2008 2:37 PM
  To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: Re: [flexcoders] internationalization @ switching
runtime
 
 
 
  Gordon,
 
  Forgive me (or ignore this) if it's in the docs.
 
  Does this assume that the ResourceManager.getString call is in
the
  binding expression?
  Currently I have some static utilities that load strings like
Hello,
  {0} from properties files and then do parameter substitution.
I've
  been wondering how that would work out in a runtime locale
switching
  scenario.
 
  On Fri, Jun 20, 2008 at 2:14 PM, Gordon Smith [EMAIL PROTECTED]
wrote:
  You want to learn about the ResourceManager class in Flex 3. It
 allows you
  to simply 

RE: [flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread Alex Harui
Last time I looked, #1 wrapped your getter setters in another pair of
function which is somewhat wasteful.  That's why you'll never see
pattern #1 in the framework code.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Doug McCune
Sent: Friday, June 27, 2008 1:21 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Best Practice Data Binding

 

If you define a getter and a setter you can add the [Bindable] metadata
to either the getter or setter, it does the same thing either way. The
only time you have to use a custom event to trigger the binding is when
you have read-only properties (a getter but no setter).

Doug

On Fri, Jun 27, 2008 at 12:08 PM, securenetfreedom [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Any thoughts?



In an DataModel class what is the best way to bind data.

1) Make the Setter Bindable, or
2) Make the Getter Bindable and dispatch an event on the Setter?

What are the advantages and disadvantages of each?

// Binding #1
[Bindable]
public function set foo(val:String):void{
_foo = val;
}
public function get foo():String{
return _foo;
}

// Binding #2
[Bindable(event=fooChanged)]
public function get foo():String{
return _foo;
}
public function set foo(val:String):void{
_foo = val;
dispatchEvent(new Event(MyDataModel.FOO_CHANGED));
}

 

 



[flexcoders] Re: Getting parent information from AdvancedDataGrid

2008-06-27 Thread Amy
--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote:

 Hi, all;
 
 I have been using AdvancedDataGrid to display information in a 
 HierarchicalCollection.  The parent (container) items contain 
 information on how the child items should be viewed.  So the same 
child 
 might be in the tree three different types under different parents.  
I 
 left the view information in the container, since it has nothing to 
do 
 with the actual data contained in the child object.
 
 The problem I am having is that I don't seem to be able to find a way 
 to get at that data from the parent data when a user clicks on a 
child.

OK, I got the bright idea that I would composite the existing class 
with a new class that has a uid.  The class looks like this:

package com.magnoliamultimedia.vo
{
import mx.core.IUID;
import mx.utils.UIDUtil;

public class TaskUID implements IUID
{
private var _task:Task;
private var _uid:String;

public function TaskUID(task:Task)
{
_task=task;
_uid:UIDUtil.createUID();
}

public function get uid():String
{
return _uid;
}

public function set uid(value:String):void
{
throw new Error(Can't directly set UID);
}
public function get task():Task{
return _task;
}
}
}

The problem is that as soon as the ADG loads, I get a ton of Can't 
directly set UID errors.  I thought Flex was _not supposed_ to set 
UID's on classes that implement IUID?  Note that this is not a visual 
clas, these are typed objects in an ArrayCollection of typed objects 
that have ArrayCollections in them named children 
(HierarchicalCollection).

If Flex is adding a UID to my objects, is there any way I can tease it 
out to use it to determine the parent?

Thanks;

Amy



RE: [flexcoders] Re: Using Datagrid Data

2008-06-27 Thread Tracy Spratt
We will need much more detail on what you want to do.

 

Use your words.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ghus32
Sent: Friday, June 27, 2008 3:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using Datagrid Data

 

Yah I am I want to send each row as a var to a webservice.

Thanks

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Fidel Viegas [EMAIL PROTECTED] 
wrote:

 On Fri, Jun 27, 2008 at 6:35 PM, ghus32 [EMAIL PROTECTED] wrote:
  Hello everyone,
 
  Is it possible to send data from a poulated datagrid??
 
  For example, I want to send row1 and make it a var.. is this 
possible?
 
  Thanks
 
 What exactly are you trying to achieve? Send data to a webservice,
 remote object or http service? Is that what you mean?
 
 Fidel.


 



RE: [flexcoders] Acrobat 9 and Flex

2008-06-27 Thread matt wicks
No, there are as I understand it two modes of integration 
(i) using a flex / flash widget which can communicate with the basic Acrobat
Javascript API via External Interface
 
(ii)using the new ACROBAT api which provides a series of interfaces
specifically for building PDF Portfolios
 
 
neither of them directly address your issues BUT it is possible to use
EXternal Interface to generate PDFs on the fly which would allow for some
imporovements to your point2
 
matt

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Anatole Tartakovsky
Sent: 27 June 2008 16:57
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Acrobat 9 and Flex




I am considering the new Acrobat 9 embedding capabilities for Flex
applications. Are there any planned 
1. integration libraries
2. changes to PrintJob specific to Acrobat hosting 
3. serialization/deserialization package that would that would be used as a
replacement to Capture classes for client side SWF capturing?
 
Thank you,
Anatole
 

 


[flexcoders] Create border for inner subgrids within a grid - How?

2008-06-27 Thread pbrendanc
Another noob question - I've created a dynamic (n*n) grid and need to
provide some visual delineation of the inner grids - e.g. a 4*4 grid
contains 4 inner 2*2 subgrids.

How can I create a border around each of these subgrids?  (This  will
also need to be done dynamically).

TIA,
Patrick

FWIW - The grid is built with the following function

private function buildGrid (nrows:uint,ncols:uint):void {

 for (var i:Number = 0; inrows; i++) {
 var myGridRow:GridRow =  new GridRow();
 // for each col add child controls
 for (var j:Number = 0; jncols; j++) {
 var myGridItem:GridItem =  new GridItem();
 myGridItem.addChild (myBtn);
 //Add cell to row
 myGridRow.addChild (myGridItem);
 }// end col loop

 // Add row to grid
 myGrid.addChild(myGridRow);
 }
 // Add grid to parent container (canvas/form/panel
etc??)
 mypanel.addChild(myGrid);
}





RE: [flexcoders] Re: Setting unique ID with repeater and custom component

2008-06-27 Thread Tracy Spratt
Repeater is much more flexible than many people think. It is often
thought of as a way to make a list, but is really more a dataProvider
driven wrapper for addChild and removeChild, with a few other cool
things built in.

 

I can imagine several use cases for needing to reference a repeated
item.  I have done it myself, though if I were to reproduce today the
particular functionality I am thinking of, I would use events instead.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Friday, June 27, 2008 11:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Setting unique ID with repeater and custom
component

 

I don't know about most people but I never need to know the id of a
repeated item.

All of the items I have in a repeater are instances of a specific
object. This object has class members and functions and can do
everything it needs to do on its own. If I need it to (Which is
infrequent) each object can get to its parent or even the Application
object itself.

So, I ask, Why would you need to refer to a repeated component?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , sdl1326 azsl1326-email@
wrote:
 
  I am using the Tile Component along with a repeater and then a
custom
  component (image control). Is it possible to give the custom
component
  a unique id/name? I have tried to use a variable associated with the
  current repeater item ({repeater.currentItem.name}), however, it
does
  not seem that this is possible as I am getting an error that the ID
is
  not a valid identifier.
  
  Thanks for any and all replies.
 
 
 If you have something like this:
 
 mx:Repeater id=theRepeater dataProvider={yourAC}
 yourNS:YourComponent id=foo/
 /mx:Repeater
 
 then you can refer to any repeated component by its index within foo. 
 i.e. foo[0] is the first component. This is pretty thoroughly 
 documented in the help for Repeater.
 
 HTH;
 
 Amy


 



RE: [flexcoders] Re: How to Position a Popup relative to the control that invoked the popup?

2008-06-27 Thread Tracy Spratt
You may need to use the local / global conversion functions, like 
localtoGlobal()

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
pbrendanc
Sent: Friday, June 27, 2008 5:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to Position a Popup relative to the control that 
invoked the popup?

 

Thx a bunch - this looks like what I need - however for some reason
I'm seeing -ve numbers for my x + y coordinates and my popup is
partway off my form/window - any further suggestions.

Since my grid is dynamically created are there any other
issues/gotcha's I need to consider here?

TIA

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
Dimitrios Gianninas
[EMAIL PROTECTED] wrote:

 I think what you what is this:
 
 1)from the click event get the ref to the button:
 
 var btn:Button = event.target as Button;
 
 2) then get its coordinates:
 
 var point:Point = new Point(0, 0);
 point = btn.globalToLocal( point );
 
 3) now use it to position your pop up
 
 mypop.x = point.x;
 mypop.y = point.y + 10;
 
 Dimitrios Gianninas
 Optimal Payments Inc.
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  on 
 behalf of pbrendanc
 Sent: Thu 26/06/2008 7:55 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] How to Position a Popup relative to the
control that invoked the popup?
 
 I have a grid with an array of buttons that when clicked, will display
 a popup window that collects user info. 
 What I'd like to do is position the popup relative (immediately below)
 the button that the user clicked within the grid - not necessarily
 centered on the current window. 
 
 How can I get access the position/coordinates of the calling button -
 is this data somehow available via the createComplete event of the
 popup. I imagine this data is buried somewhere in the
 event/eventtarget object, but I'm not quite sure how to access it. 
 
 (Please don't tell me that I need to assign a listener to every button
 in the grid from within the Popup window as I'm creating the grid
 dynamically and it varies in size).
 
 Can anyone help with this,
 
 TIA,
 Patrick
 
 
 
 
 
 
 
 -- 
 WARNING
 ---
 This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient. No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message. If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system. The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful. If you have received this e-mail
in error, please notify the sender.
 
 AVIS IMPORTANT
 --
 Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé. L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation. Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système. La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux. Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.


 



RE: [flexcoders] Re: Getting parent information from AdvancedDataGrid

2008-06-27 Thread Tracy Spratt
Amy, I have a request.  Please consider placing your response above the
history?  You have good stuff to say, but always having to scroll
through the history is aggravating, and provides no value.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Friday, June 27, 2008 5:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Getting parent information from
AdvancedDataGrid

 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Amy [EMAIL PROTECTED] wrote:

 Hi, all;
 
 I have been using AdvancedDataGrid to display information in a 
 HierarchicalCollection. The parent (container) items contain 
 information on how the child items should be viewed. So the same 
child 
 might be in the tree three different types under different parents. 
I 
 left the view information in the container, since it has nothing to 
do 
 with the actual data contained in the child object.
 
 The problem I am having is that I don't seem to be able to find a way 
 to get at that data from the parent data when a user clicks on a 
child.

OK, I got the bright idea that I would composite the existing class 
with a new class that has a uid. The class looks like this:

package com.magnoliamultimedia.vo
{
import mx.core.IUID;
import mx.utils.UIDUtil;

public class TaskUID implements IUID
{
private var _task:Task;
private var _uid:String;

public function TaskUID(task:Task)
{
_task=task;
_uid:UIDUtil.createUID();
}

public function get uid():String
{
return _uid;
}

public function set uid(value:String):void
{
throw new Error(Can't directly set UID);
}
public function get task():Task{
return _task;
}
}
}

The problem is that as soon as the ADG loads, I get a ton of Can't 
directly set UID errors. I thought Flex was _not supposed_ to set 
UID's on classes that implement IUID? Note that this is not a visual 
clas, these are typed objects in an ArrayCollection of typed objects 
that have ArrayCollections in them named children 
(HierarchicalCollection).

If Flex is adding a UID to my objects, is there any way I can tease it 
out to use it to determine the parent?

Thanks;

Amy

 



[flexcoders] Re: Getting parent information from AdvancedDataGrid

2008-06-27 Thread Amy
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Amy, I have a request.  Please consider placing your response above 
the
 history?  You have good stuff to say, but always having to scroll
 through the history is aggravating, and provides no value.

Funny, I find top posting aggravating, as the answer is before the 
question, and then I have to scroll down to find out what it was about, 
then back up to reread what was said in light of the question.

BTW, did you have any insight to my issue?

;-)

Thanks;

Amy



[flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread securenetfreedom
I found this page to be helpful but not authoritative (This is where I
found the use of binding the setter);
http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.ht\
ml
http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.h\
tml

// Binding #1
[Bindable]
public function set shortNames(val:Boolean):void {
 ...
}
public function get shortNames():Boolean {
 ...
}

I did glean a trick for read-only binding for static data by using:
public static const constString:String=A static const.;

However, I still need to clear up one thing. Is it true that you can
place [Bindable] meta data on either a setter of getter and have it
bound to a View component?





--- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote:

 If you define a getter and a setter you can add the [Bindable]
metadata to
 either the getter or setter, it does the same thing either way. The
only
 time you have to use a custom event to trigger the binding is when you
have
 read-only properties (a getter but no setter).

 Doug

 On Fri, Jun 27, 2008 at 12:08 PM, securenetfreedom [EMAIL PROTECTED] wrote:

Any thoughts?
 
 
  In an DataModel class what is the best way to bind data.
 
  1) Make the Setter Bindable, or
  2) Make the Getter Bindable and dispatch an event on the Setter?
 
  What are the advantages and disadvantages of each?
 
  // Binding #1
  [Bindable]
  public function set foo(val:String):void{
  _foo = val;
  }
  public function get foo():String{
  return _foo;
  }
 
  // Binding #2
  [Bindable(event=fooChanged)]
  public function get foo():String{
  return _foo;
  }
  public function set foo(val:String):void{
  _foo = val;
  dispatchEvent(new Event(MyDataModel.FOO_CHANGED));
  }
 
 
 




  1   2   >