[flexcoders] Preserving loaded applications styles

2008-02-04 Thread mydarkspoon
Hi,

I've built a flex 3 application, called application A, that uses
compiled css, in which I set Application type selector to set all text
default color to white.

Now I've got application B that uses type selector styles
(Application, Label, etc). Application B loads application A and I
want application A to be displayed the same way it renders when
running alone in the flash plyaer.

As far as I know the only way to achieve that, is that app B will load
application B into new partitioned ApplicationDomain.
This worked just fine when testing on demo project that only uses some
labels to indicate their styles.
However, when I load the real application A into application B with
new ApplicationDomain, I get all sort of obscure of runtime errors
from the flex framework:

Panel/showTitleBar()

Error: Error #1023: Stack overflow occurred.
at Object$/_hasOwnProperty()

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at mx.managers::PopUpManagerImpl/findPopupInfoByOwner()


Please help me with this if you've got any tips for preserving styles
on loaded apps or if you've ever been into that kind of errors.

Thanks in advance,

Almog Kurtser.



Re: [flexcoders] Re: Flex running in Flash Lite 3 Developer edition

2008-02-04 Thread Tom Chiverton
On Friday 01 Feb 2008, tomeuchre wrote:
 I thought I heard somewhere that the FlashLite3 can be coerced into
 it by having flash compile against Flex swcs 

I was under the impression FlashLite was only ActionScript 2, so can't use 
Flex 2 components.

-- 
Tom Chiverton
Helping to competently bully fifth-generation market-growth
on: http://thefalken.livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
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.com 
Yahoo! Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


[flexcoders] Re: Datagrid Counting row and total value

2008-02-04 Thread simonjpalmer
I haven't seen a really simple way and it is not natively supported by
the datagrid component.  You may want to check out the advanced data
grid, which I haven't used and I'm sure others can comment on.  

I ended up writing a custom component which has two data grids, one
containing the data and another which has one row which contains the
totals of the selected rows.  It was a reasonable amount of work to
get it going, especially as this method of implementation comes with
problems like the column widths having to be managed on the total grid.  

Other issues which I had and you may or may not want to consider are:
- is your total a straightforward sum of the values?  I was adding up
percentages in one column, so I needed some different rules for
summation, e.g. Average.
- do you have ratios and therefore the post-aggregation division
problem? Often the total for a ratio is sum(A)/sum(B) rather than
sum(A/B).  Sometimes A or B are not columns in the grid.  This gives
some complexity to calculating the totals.
- is there any formatting involved in any of your values, e.g. currencies?
- if there are multiple currencies in the table how do you sum their
values?

It did take me a couple of days to get the component working as I
wanted, but I now use it everywhere and it is a very valuable feature.  

I thought about asking Adobe for help, but the reality is that there
is enough which is specific to my application that I would be very
surprised if a generic solution was desirable.  

If enough people ask I will publish my TotalGrid.
Simon

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

 Yups, thanks, I have use arrayname.length, and its working.
  
 And my second problem, how to get a total value in a label from one
field ?
 I have seen some example, but's its need to build some function and
etc. I
 try to search a simple way.
  
 Thanks
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of shrikant.patil
 Sent: Monday, February 04, 2008 11:54 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Datagrid Counting row and total value
  
 
 hi
 i thik u r using some kind of data provider like array or what
ever...
 u can calculate the total number of records from that data provider
 structure, say for example the data provider may b the array, then u
can get
 total number of rows by using ;
 
 arrayname.length property...





Re: [flexcoders] Re: creating a new Livecycle DS project

2008-02-04 Thread Tom Chiverton
On Sunday 03 Feb 2008, williamxtreme24 wrote:
 Obviusly Tom likes to do everything in one computer, but thats not
 always the best practice.

We do this, because then if one of us mucks up, the other people can carry on 
developing.
Obviously we have separate live/stage servers too, but we just copy the 
compiled SWFs into the web root and leave Builder out of it.

-- 
Tom Chiverton
Helping to synergistically innovate cross-platform clusters
on: http://thefalken.livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
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.com 
Yahoo! Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


Re: [flexcoders] Re: Flex running in Flash Lite 3 Developer edition

2008-02-04 Thread Paul Andrews
- Original Message - 
From: Tom Chiverton [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 04, 2008 9:49 AM
Subject: Re: [flexcoders] Re: Flex running in Flash Lite 3 Developer edition


 On Friday 01 Feb 2008, tomeuchre wrote:
 I thought I heard somewhere that the FlashLite3 can be coerced into
 it by having flash compile against Flex swcs

 I was under the impression FlashLite was only ActionScript 2, so can't use
 Flex 2 components.

I'm sure you're impression is correct.

http://www.adobe.com/products/flashlite/architecture/

Paul

 -- 
 Tom Chiverton
 Helping to competently bully fifth-generation market-growth
 on: http://thefalken.livejournal.com

 

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

 Halliwells LLP is a limited liability partnership registered in England 
 and Wales under registered number OC307980 whose registered office address 
 is at 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.com
 Yahoo! Groups Links



 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


[flexcoders] AIR - including other files

2008-02-04 Thread Nils Millahn
Hi all,

does anybody have information on how to include further files in an AIR 
package? I'd like to include a few image resources and a database file 
with the published AIR install but can't figure out how to tell the AIR 
compiler to do so.

cheers - Nils.


[flexcoders] How to deep copy an ArrayCollection?

2008-02-04 Thread imjackson84
Hi,

In my application I am using ArrayCollections to store data for series
on a line chart. I need to be able to make a deep copy of these
ArrayCollections so that I can make changes to the data in the copies
without affecting the original data.

I've searched for a while but I can't seem to find any straightforward
way of doing this, all the solutions I've seen still ultimately
reference the same data objects. Is there any way to do this without
having to explicitly create new objects and copy values across for
each item?

Thanks,

Iain



[flexcoders] Re: creating a new Livecycle DS project

2008-02-04 Thread simonjpalmer
If you are using a J2EE server like JBoss rather than ColdFusion, then
you need to supply a full file path so that the compiler can upload
the flex-config.xml file and build in connections to your services at
compile time.

I understand that you may be sharing a server for deployment, but I
think I agree with Tom's comments that for your own compiling and
development you should probably install JBoss locally.  If you are
deploying your mxml files directly to the server and compiling them
there rather than producing an swf and deploying that, then you will
have a slightly more complex configuration which uses a server file
path for your source code folders.  I have never taken this route
because I consider it too risky in terms of code clashes, so I can't help.

If you are in a multi-developer (multi-site) environment, then I
strongly recommend that you install your own copy of JBoss and you
sync locally with your source code repository and then put your code
back there once you are sure it works.  I don't see how deployment of
swf's directly to a shared server would work in a multi-developer
environment.  Aren't you continually overwriting each other's last
deployed swf?  Test your changes locally on your own box before you
submit them, demo it from there if you have to, but keep the shared
server reflecting the state of the overall project, rather than the
last thing someone threw up there.  Isn't that total chaos?

In truth I think you should have a manufacturing process which is
separate to development and happens at agreed moments.  That should
produce your swf and jar fles and deploy it to your shared JBoss
instance.  If you have Java code on the back end than you can build
that at the same time and pack it all up into a WAR/EAR and deploy to
whatever server you use to have a common view of the current state of
the code, e.g. for testing/design review.  This is very clean, very
reliable and very simple.  You don't even need to drop your server,
you can just re-deploy the WAR/EAR.  This also ensures that you and
your fellow developers are all using the same code base and your code
will work together when the curtain goes up.  

If this sounds like too much process, then it needn't be, it is just a
moment at which you clean a machine and build the entire project from
the head of the code stream.  If you have a spare box that can do the
compile, then that's even better.  If you aren't doing this then I
wonder how you will ever know what code constitutes which released
swf.  If there are only two of you in development, then it is still
worth it and I bet you do something not dissimilar already informally
by shouting across the room.

If you are deploying code directly to a production server where live
users interact with your data and code, then you must be a) the
perfect coder and b) have b*lls of steel - in which case I salute you.



[flexcoders] Re: How to deep copy an ArrayCollection?

2008-02-04 Thread Stephen Allison
 In my application I am using ArrayCollections to store data for series
 on a line chart. I need to be able to make a deep copy of these
 ArrayCollections so that I can make changes to the data in the copies
 without affecting the original data.

IIRC you can write the whole lot into a ByteArray, which serialises it as 
AMF in memory, and then read it back out again.  Classes in your array need 
[RemoteClass] in order to get correctly typed objects back. 

ie.
var ba:ByteArray = new ByteArray();
ba.writeObject(yourData);
var newCopy = ba.readObject(); 

Stephen


Re: [flexcoders] Update External XML data in Flex

2008-02-04 Thread shrikant.patil

hi
please refer below links.. hope those are useful for u..

Reading external XML documents 
http://livedocs.adobe.com/labs/flex3/html/13_Working_with_XML_11.html

XML methods 
http://livedocs.adobe.com/labs/flex3/html/13_Working_with_XML_04.html


The E4X approach to XML processing 
http://livedocs.adobe.com/labs/flex3/html/13_Working_with_XML_03.html

cheers :)


sunilnairg wrote:
 
 Hi all,
 
 I am new to Flex. In my application I hav to edit/update data of a xml
 file in my flex application. How can I load external xml file into flex
 and how can I modify its data?
 Pls send me steps
 thanks,
 

-- 
View this message in context: 
http://www.nabble.com/Update-External-XML-data-in-Flex-tp15262384p15266983.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Adding you tube's flv

2008-02-04 Thread shrikant.patil

hi
refer below link, it may help u.

http://code.google.com/p/as3youtubelib/


Guillermo Villasana Cardoza wrote:
 
 Is it possible to load into a flex app, an flv from you tube? if so is 
 there an example or something I can see?
 Thanks
 Terius
 
 

-- 
View this message in context: 
http://www.nabble.com/Adding-you-tube%27s-flv-tp15232436p15267544.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread shrikant.patil

hi,

i have tested u r file i got a orange backgrounded, vardana, bold text
saying that : The quick brown Fox...

i hope it is working fine...


ndkamp wrote:
 
 I try to apply UITextFormat to an UITextField in a custom component
 but the new format won't show. what am i doing wrong?
 
 package tests.components
 {
   import flash.text.TextLineMetrics;
   import mx.core.UIComponent;
   import mx.core.UITextField;
   import mx.core.UITextFormat;
 
   public class TestCustomComponent extends UIComponent
   {
   private var txt:UITextField;
   
   public function TestCustomComponent()
   {
   super();
   }
   
   /*
* Create the TextField add some TextFormat and add it to
* the displayList.
*/
   override protected function createChildren():void {
   super.createChildren(); 
   
   //Use TextFormat and apply some formats
   var format:UITextFormat = new 
 UITextFormat(this.systemManager);
   format.font = Verdana;
   format.bold = true;
   format.color = 0x804020;
   format.size = 20;
   
   //The TextField that should be formated
   txt = new UITextField();
   
   //The documentation says TextFormat won't be applied
   //when a styleSheet is in use, naive approach to so set 
 this to null
   //is this enough?
   txt.styleSheet = null;
   txt.styleName = null;
   
   //Apply the TextFormat for defaults and all current Text
   txt.defaultTextFormat = format;
 txt.text = The quick brown Fox...;
   this.addChild(txt); 
   
   }
   
   /*
* Sets the measures to the width of the text plus some offset
*/
   override protected function measure():void {
   super.measure();
   var metrics:TextLineMetrics = txt.getLineMetrics(0);
   this.measuredWidth = this.measuredMinWidth = 
 metrics.width + 20;
   this.measuredHeight = this.measuredMinHeight = 
 metrics.height + 2;
   }
   
   /*
* Add a rounded Rectangle at the back of the TextField
*/
   override protected function 
 updateDisplayList(unscaledWidth:Number,
 unscaledHeight:Number):void {
   super.updateDisplayList(unscaledWidth, unscaledHeight);
   this.graphics.beginFill(0xff8800, 1);
   this.graphics.drawRoundRect(0, 0, unscaledWidth, 
 unscaledHeight, 10);
   this.graphics.endFill();
   txt.setActualSize(unscaledWidth, unscaledHeight);
   }
   }
 }
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Fail-to-apply-UITextFormat-to-UITextField-in-custom-Component-tp15266357p15267393.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Question regarding dynamic form

2008-02-04 Thread Tom Chiverton
On Monday 04 Feb 2008, hydcool02 wrote:
 For eg..if he select  '2' then the form should fields twice..

Use the steppers value as the dataProvider of a Reapeater ?

-- 
Tom Chiverton
Helping to interactively market open-source IPOs
on: http://thefalken.livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
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.com 
Yahoo! Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


RE: [flexcoders] PopUpButton not working in AIR Beta 3

2008-02-04 Thread Battershall, Jeff
I've been able to replicate this problem by loading a module that
contains a Panel which has a PopUpButton inside it.  If anyone is aware
of this issue and has a workaround, please let me know.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Sunday, February 03, 2008 12:40 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] PopUpButton not working in AIR Beta 3


I was able to get it to work if I took it out of a Panel container in
the module in question.  Totally fubar.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Sunday, February 03, 2008 10:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] PopUpButton not working in AIR Beta 3


I'm still trying to identify the exact steps to re-create but suffice to
say, in my AIR application (which uses modules), the PopUpButton
component refuses to work.  I'm doing things declaritively, with MXML
like this:

mx:PopUpButton x=500 y=10 label=Add Company width=220
openAlways=true
mx:popUp
mx:Canvas width=220 height=35 visible=true
backgroundColor=0xFF backgroundAlpha=1
horizontalScrollPolicy=off verticalScrollPolicy=off mx:TextInput
textAlign=left x=5 y=5 width=150 id=companyInput/ mx:Button
x=160 y=5 label=Add styleName=appButton/ 
/mx:Canvas
/mx:popUp 
/mx:PopUpButton

This is pretty vanilla code - of the type I have not seen issues with
elsewhere. So far its a complete mystery why this doesn't work - it
works fine in a test AIR app not using modules. Any input appreciated. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


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





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





Re: [flexcoders] RemoteObject call...No Result Handler: performance question

2008-02-04 Thread Tom Sammons
Thanks, Seth.  That's kind of what I figured and was hoping to hear, but 
it's nice to get a qualified response
instead of guessing.I was looking at recording in a little more 
detail that I think is justifiable, considering
that it would be a significant impact on the SQL Server as well as the 
client.

I have been looking/playing with using the CF event gateways, too, which 
might be an option if I decide to
go forward, and bundle data to reduce requests. 

Thanks again!

Tom

Seth Hodgson wrote:

 When you invoke a RemoteObject, it's going to send a request via HTTP to
 your server which will do some processing. Regardless of whether your
 server returns a result or not, an HTTP response must be returned to the
 browser/player. That'll be parsed by the browser networking stack,
 passed into the player, and from there will make its way back to your
 RemoteObject as a ResultEvent.

 As far as your Flex client is concerned, you're effectively turning your
 invocation into a fire-and-forget operation by not registering a result
 handler. There's practically no overhead in the player when you don't
 register a result handler. All your overhead will be spent in the
 network roundtrip and in the TCP and HTTP stacks on the client and
 server. The HTTP protocol requires that a response is returned for every
 request, so as you're looking to tune your app just keep that in mind.

 Best,
 Seth

 

 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com] On
 Behalf Of Tom Sammons
 Sent: Thursday, January 31, 2008 10:18 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 Subject: Re: [flexcoders] RemoteObject call...No Result Handler:
 performance question

 Does anyone know who or a team I could forward this question to at Adobe

 that might be
 able to answer this?

 Tom Sammons wrote:
 
  Hi everyone,
 
  I know I don't have to handle a remote object call results simply by
 not
  defining the method's result event.
 
  Why would I want to do this? Because I just want to record some action
  data in the database, and I don't need to do anything on completion of
  the call.
 
  My question is this, though:
 
  If I don't define the result event, does Flex look for it anyway? That
  is to say, do I incur any overhead even though I don't want to do
  anything with a result?
  Using ServiceCapture, I can see that if the RO method returns data to
  the caller, it is passed back in the response header. But did the Flex
  client actually receive it?
  And if it did, what did it do? Did deserialization (or anything else)
  occur? (The minimum I can return would be a null, and I've confirmed
  that.) It also seems to improve overall performance if I remove the
  busy cursor and fault event.
 
  Basically, I just want to do something like shipping off a thread for
  recording actions or whatever, but not have to worry about the impact.
  If these RO calls were frequent enough, what kind of impact would they
  incur (client side)? I thought about saving a number of records/items
  and shipping them off in a single shot, but the idea is to collect
  metrics, and I don't really care for the idea of losing data just
  because the user left the application without logging off (ie, a
  bookmark or something).
 
  Thanks for any and all input!
 
  Tom
  Software Engineering Institute/CMU
  Pittsburgh, PA
 
 

  


[flexcoders] File Downloading using Servlet as a endpoint

2008-02-04 Thread n_phaneesh17010
Hi,

I am trying to bring up a flex application which exports the DataGrid
data into a csv file or a Microsoft excel file depending on user
selection. I have a servlet as the endpoint which serves the content.
I tried using FileReference and URL connection. But I get IOError.
Please provide me an simple example on how to do this.

Regards
Phaneesh



RE: [flexcoders] How to get the reference of each element in a TileList ?

2008-02-04 Thread Battershall, Jeff
Yes, if the data passed to the renderer is bindable, you can create a
custom renderer that will intelligently respond to changes.  I've been
having good luck with TileList and custom ItemRenderers.

-Original Message-
From: Alex Harui [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 04, 2008 12:35 AM
To: flexcoders@yahoogroups.com
Cc: Battershall, Jeff
Subject: RE: [flexcoders] How to get the reference of each
element in a TileList ?



Try indexToItemRenderer().  Keep in mind that if you are
scrolling, not all renderers exist.  It is usually better to work from
with in the renderer than from outside the list.

 





From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of bhaskar M
Sent: Sunday, February 03, 2008 11:14 AM
To: flexcoders@yahoogroups.com
Cc: [EMAIL PROTECTED]
Subject: RE: [flexcoders] How to get the reference of each
element in a TileList ?

 

 

Thanks for the reply.

 

I tried using getChildAt method. But I had errors coming up when
I typecasted the returning element of getChildAt method into the
ItemRendered class which is in my case ServiceSelectorItem.

 

I actually want to get the reference of each of the items of
TileList so that I can do some manipulations on them.

 

Could you give me some sample code if you do not mind.

 

 

Bhaskar.

 



Battershall, Jeff [EMAIL PROTECTED] wrote:

How about myTileList.getChildAt(index)?  TileList
shouldn't offer more performanc! e, as such, over Repeater, as the
TileList itself uses a repeater to layout it's children.  But it does
offer layout capabilities that you'd have to roll on your own with a
repeater and that could get messy.

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of bhaskar M
Sent: Sunday, February 03, 2008 10:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to get the reference
of each element in a TileList ?

Hi

 

I am replacing Repeater with TileList in my
Application as performance concerns..

I got struck in getting the reference of each
element in TileList.

 

How to get the reference of each element  in a
TileList ?

 

Thanks in Advance.

Bhaskar





Looking for last minute shopping deals? Find
them fast with Yahoo! Search.
http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearc
h/category.php?category=shopping  

 

  





Never miss a thing. Make Yahoo your homepage.
http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs  

 



[flexcoders] Creating a slider like msnbc

2008-02-04 Thread flex_dba
Hello,

I am trying to create a slider like what is available from msnbc, 
I'm wondering if I can use a Horizontal Scrollbar but when I try to 
assign an array of images to it, I get back the image names and not 
the images themselves. 

http://www.msnbc.msn.com/id/21134540/vp/22977407#22977679

mx:HorizontalList x=19 y=121 width=411
mx:Image source=../Assets/GreenLogo.png 
id=tree1 width=120  height=100/  
mx:Image source=../Assets/GreenText.png 
width=120  height=100 /
mx:Image source=../Assets/GreenLogo.png 
id=tree2 width=120  height=100/  
mx:Image source=../Assets/GreenText.png 
width=120  height=100 /
mx:Image source=../Assets/GreenLogo.png 
id=tree3 width=120  height=100/  
mx:Image source=../Assets/GreenText.png 
width=120  height=100 /

/mx:HorizontalList




[flexcoders] Problem loading newly uploaded module (browser cached old version)

2008-02-04 Thread zvjerka24
Hello!
I'm working on very big project using Flex (and modules). When I'm
uploading new version of modules, browsers (IE, Mozilla...) cached old
version, because of that new version is not loaded. This thing
occurres sometimes, but not always!
Does anyone know the solution for this problem?
Thanks in advance!

Vladimir



[flexcoders] RSL realtive path is relative to the page path, not the swf path

2008-02-04 Thread mydarkspoon
Hello,

I'm trying to load RSL from a relative path:
MainApp.swf - my main app
MyRsl.swf - my rsl


Now, it happens to be that the main application is being loaded from
url like this:
http://www.myDomain.com/swf/MainApp.swf
which loads--
http://www.myDomain.com/swf/MyRsl.swf

However, the swf is embedded in another path:
http://www.myDomain.com/swf/index.php/index.html

The MainApp.swf however tries to load the rsl from
http://www.myDomain.com/swf/index.php/MyRsl.swf

This is obviously a wrong path and since the path is given at tcompile
time I can't seem to be able to point it to the swf relative path.

Any ideas of how to use the swf path instead of the page path without
specifying an absolute location ?

Thanks in advance,
Almog Kurtser.
Almog Kurtser.



Re: [flexcoders] SQLite - Importing file

2008-02-04 Thread Johannes Nel
i could not find an a way apart from parsing myself to do this. remember to
use transactions for the insert. all this said, we build the sqlite db on
the server and pump that down the wire.

On Feb 4, 2008 11:22 AM, Rick Root [EMAIL PROTECTED] wrote:

   Is it possible for a Flex app to import a CSV file into the SQLite
 database?

 I know I could read the file with AS3, parse it as a CSV and insert
 the data ... but I see the sqlite3 has an import command and I just
 wondered if there was any other way for Flex to handle the importing
 of large text files on the client.

 --
 Rick Root
 New Brian Vander Ark Album, songs in the music player and cool behind
 the scenes video at www.myspace.com/brianvanderark
  




-- 
j:pn
\\no comment


RE: [flexcoders] Flex training classes in the east coast, USA

2008-02-04 Thread Merrill, Jason
Figleaf software is in D.C. and they are Adobe certified trainers.  I
took a ColdFusion course from them and it was good.  They offer several
Flex courses.
 
http://training.figleaf.com/Courses/Flex_Training.cfm
 
 
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 



 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Sharat Gajulapalli
Sent: Sunday, February 03, 2008 9:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex training classes in the east coast,
USA



Hi all,

I'm looking for a 2-3 day Flex course anywhere in the east coast
and
preferably in the Washington DC metro area. Any recommendations
would
be appreciated. I am currently a Java developer and will be
doing some
Flex now so any advice on which course will suit me best will
also be
appreciated.

Thanks,
Sharat



 



[flexcoders] Question regarding dynamic form

2008-02-04 Thread hydcool02

Hi,

I recently started working on flex..i am stuck where a user is shown a
form containing numeric stepper.Based on the selection the form input
labels are populated.

For eg..if he select  '2' then the form should fields twice..

if any one knows it..please post it..

Thanks,





[flexcoders] Re: Need IF Logic for Chart Data Provider

2008-02-04 Thread Abyss Knight
I think you just need to change the  to '' like so:

dataProvider={chartXML.lastResult.month.(@month_name=='01').day}

However, you might be better off doing:

dataProvider={chartXML.lastResult..month.(@month_name=='01').day}

Here's a good quick reference too: 
http://www.sephiroth.it/tutorials/flashPHP/E4X/page002.php


As a disclaimer, I have very little e4x experience but I presume that
it will get you where you need to go.

-- William


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

 Ok, I have Sas Jacobs' book,  Foundation Flex for Developers: Data
 Driven Applications with PHP, ASP.NET, ColdFusion, and LCDS.  She has a
 chapter on working with XML using E4X.
  
 What works, for me in this case, is this:
  
 dataProvider={chartXML.lastResult.month[0].day}
  
 In fact just to see if it would work I declared 
  
 public const JANUARY:int = 0;
  
 and then did 
  
 dataProvider={chartXML.lastResult.month[JANUARY].day}
  
 This worked too.
  
   HOWEVER, I have been told that using brackets is too hard to debug.
 and that I should use a result handler to wrap the xmllist in an
 XMLListCollection instance variable and bind to that. Sas also covers
 that.  I'll read up on that and let you know.  OK, read it. I'm using
 the mx:HTTPService and, as far as I can tell from Sas' book, the
 HTTPService tag apparently takes care of creating an XMLListCollection
 for you.or maybe it just creats an XMLList.  Can anybody shed some
 light on this?
  
 I also learned (from the book) that the following should work:
  
 dataProvider={chartXML.lastResult.month.(@month_name==01).day}
  
 However, it doesnt as I get the following error:
  
 Element Type mx:LineChart must be followed by either attribute
 specifications,  or /.
  
  
 brad
  
 brad
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Abyss Knight
 Sent: Friday, February 01, 2008 3:11 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Need IF Logic for Chart Data Provider
 
 
 
 One option would be to change the chart's viewable area, as in modify
 the start of the axes to only show the data you want to show. This
 would obviously put a strain on the client if there was far too much
 data loaded into an ArrayCollection though.
 
 The other option is to query the XML using e4x and use the result as
 the data provider:
 http://www.onflex. http://www.onflex.org/ted/2006/12/xmle4x-vs-amf.php
 org/ted/2006/12/xmle4x-vs-amf.php
 
 Hope that helps,
 -- William
 
 --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com, Brad Bueche brad@ wrote:
 
  The problem (in short):
  I need to be able to hook up my charts to dataproviders where
  month_name equals January. And only pull that. I dont need it to
  read every month in the hierarchy. Or month_name is January and
 day_name
  is '14'. In order to do this I need to do IF logic with the
 dataprovider
  it seems to me. My other post occurred because in leiu of being able
  to do IF month_name='January'. I have just gone in and changed the
  xml so that instead of month /month [...] it now says january
  /januaryfebruary/february etc. That sort of defeats the data
  description aspect of XML (it seems to me). 
  
  
  The background (if you are interested):
  This problem has to do with me NOT wanting to write 100+ reports to
  generate 100+ separate xml files to access.
  
  I need to track the metrics of several internal groups over the year
 via
  charting. I want to drill down into individual months (by day) and --
  maybe, days by hour. I also want to track into the sub groups per
  month and per day-in-month for each of these groups as well.
  
  The data is network event traffic and doing the queries live will just
  not work. Users wont use the slicing and dicing visualization affords
 if
  they have to wait every time the click an item.
  
  So, I know I can save myself a lot of reports by putting all the data
  into about 10 - 20 reports or so by using the XML as its supposed to
 be
  used (i.e. describing the data). I need to be able to hook the data
  provider to only a sub-node in the xml hierarchy and not have it read
  everything at that level. I need it to read only has long as
  month_name=January or month_name=January AND day_name='15'.
 





RE: [flexcoders] Re: Need IF Logic for Chart Data Provider

2008-02-04 Thread Brad Bueche
Thanks your reply/time.
 
The issue with the @attribute==blah  syntax was that I have month_name
as an element instead of an attribute.
 
Just learned about attributes.  I'm creating the xml myself in php
(which is querying oracle).  So I can put the attribute in there.  It
looks like it gives you much more powerful search capabilities (as well
as more readable code).  
 
 
brad
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Abyss Knight
Sent: Monday, February 04, 2008 9:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Need IF Logic for Chart Data Provider



I think you just need to change the  to '' like so:

dataProvider={chartXML.lastResult.month.(@month_name=='01').day}

However, you might be better off doing:

dataProvider={chartXML.lastResult..month.(@month_name=='01').day}

Here's a good quick reference too: 
http://www.sephirot
http://www.sephiroth.it/tutorials/flashPHP/E4X/page002.php
h.it/tutorials/flashPHP/E4X/page002.php

As a disclaimer, I have very little e4x experience but I presume that
it will get you where you need to go.

-- William

--- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
ups.com, Brad Bueche [EMAIL PROTECTED] wrote:

 Ok, I have Sas Jacobs' book, Foundation Flex for Developers: Data
 Driven Applications with PHP, ASP.NET, ColdFusion, and LCDS. She has
a
 chapter on working with XML using E4X.
 
 What works, for me in this case, is this:
 
 dataProvider={chartXML.lastResult.month[0].day}
 
 In fact just to see if it would work I declared 
 
 public const JANUARY:int = 0;
 
 and then did 
 
 dataProvider={chartXML.lastResult.month[JANUARY].day}
 
 This worked too.
 
 HOWEVER, I have been told that using brackets is too hard to debug.
 and that I should use a result handler to wrap the xmllist in an
 XMLListCollection instance variable and bind to that. Sas also covers
 that. I'll read up on that and let you know. OK, read it. I'm using
 the mx:HTTPService and, as far as I can tell from Sas' book, the
 HTTPService tag apparently takes care of creating an XMLListCollection
 for you.or maybe it just creats an XMLList. Can anybody shed some
 light on this?
 
 I also learned (from the book) that the following should work:
 
 dataProvider={chartXML.lastResult.month.(@month_name==01).day}
 
 However, it doesnt as I get the following error:
 
 Element Type mx:LineChart must be followed by either attribute
 specifications,  or /.
 
 
 brad
 
 brad
 
 
 -Original Message-
 From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
ups.com [mailto:[EMAIL PROTECTED]
mailto:flexcoders%40yahoogroups.com ups.com] On
 Behalf Of Abyss Knight
 Sent: Friday, February 01, 2008 3:11 PM
 To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com
 Subject: [flexcoders] Re: Need IF Logic for Chart Data Provider
 
 
 
 One option would be to change the chart's viewable area, as in modify
 the start of the axes to only show the data you want to show. This
 would obviously put a strain on the client if there was far too much
 data loaded into an ArrayCollection though.
 
 The other option is to query the XML using e4x and use the result as
 the data provider:
 http://www.onflex. http://www.onflex.
http://www.onflex.org/ted/2006/12/xmle4x-vs-amf.php
org/ted/2006/12/xmle4x-vs-amf.php
 org/ted/2006/12/xmle4x-vs-amf.php
 
 Hope that helps,
 -- William
 
 --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com, Brad Bueche brad@ wrote:
 
  The problem (in short):
  I need to be able to hook up my charts to dataproviders where
  month_name equals January. And only pull that. I dont need it to
  read every month in the hierarchy. Or month_name is January and
 day_name
  is '14'. In order to do this I need to do IF logic with the
 dataprovider
  it seems to me. My other post occurred because in leiu of being able
  to do IF month_name='January'. I have just gone in and changed the
  xml so that instead of month /month [...] it now says january
  /januaryfebruary/february etc. That sort of defeats the data
  description aspect of XML (it seems to me). 
  
  
  The background (if you are interested):
  This problem has to do with me NOT wanting to write 100+ reports to
  generate 100+ separate xml files to access.
  
  I need to track the metrics of several internal groups over the year
 via
  charting. I want to drill down into individual months (by day) and
--
  maybe, days by hour. I also want to track into the sub groups per
  month and per day-in-month for each of these groups as well.
  
  The data is network event traffic and doing the queries live will
just
  not work. Users wont use the slicing and dicing visualization
affords
 if
  they have to wait every time the click an item.
  
  So, I know I can save myself a lot of reports by putting all the
data
  into about 10 - 20 reports or so by using the XML as its supposed to
 be
  used (i.e. describing the data). I need to be able to hook the 

[flexcoders] SQLite - Importing file

2008-02-04 Thread Rick Root
Is it possible for a Flex app to import a CSV file into the SQLite database?

I know I could read the file with AS3, parse it as a CSV and insert
the data ... but I see the sqlite3 has an import command and I just
wondered if there was any other way for Flex to handle the importing
of large text files on the client.

-- 
Rick Root
New Brian Vander Ark Album, songs in the music player and cool behind
the scenes video at www.myspace.com/brianvanderark


[flexcoders] Re: Flex training classes in the east coast, USA

2008-02-04 Thread Anthony DeBonis
I recommend
http://www.figleaf.com/training/flex.cfm 

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

 Hi all,
 
 I'm looking for a 2-3 day Flex course anywhere in the east coast and
 preferably in the Washington DC metro area. Any recommendations would
 be appreciated. I am currently a Java developer and will be doing some
 Flex now so any advice on which course will suit me best will also be
 appreciated.
 
 Thanks,
 Sharat





[flexcoders] Re: How to deep copy an ArrayCollection?

2008-02-04 Thread Stephen Allison
 this will work for just one level of depth.
 i mean, if your item has a reference to another object in the model, you 
 will just clone the item not the object so you will have two items 
 referencing the same object.

Are you sure?  The following works for me: 

 ---
// set up a data structure with a few levels in it
var data = {name:'steve',
address:{city:'london', country:'uk'},
preferences:{numbers:[3,5,7,9],
drink:{name:'beer',
temperature:'warm',
brewery:{name:'fullers',
location:'chiswick'}
}
}
}; 


var sd:ByteArray = new ByteArray();
var dat = [data,data]; // set up an array of the objects
sd.writeObject(dat); // serialise
sd.position = 0; // need to reset the pointer before deserialising 

var deser = sd.readObject(); // deserialise 


 ---
That is the object tree 'deser' read out of the byte array is completely 
distinct to the original 'data' object tree, i.e. none of the objects read 
from the byte array are just references to the older objects.  It's hard to 
see how it could be otherwise since the original objects could easily be out 
of scope by the time the deserialisation happens. 

Stephen


RE: [flexcoders] SQLite - Importing file

2008-02-04 Thread Samuel R. Neff

All of the . commands available in the sqlite3.exe command line app are
implemented by the command line application code itself, not core SQLite,
and as such are not available via AIR.  This includes things like .import,
.dump, .read, etc.

Sam 


---
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Root
Sent: Monday, February 04, 2008 11:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SQLite - Importing file

Is it possible for a Flex app to import a CSV file into the SQLite database?

I know I could read the file with AS3, parse it as a CSV and insert
the data ... but I see the sqlite3 has an import command and I just
wondered if there was any other way for Flex to handle the importing
of large text files on the client.

-- 
Rick Root



[flexcoders] Global Error Catching

2008-02-04 Thread Steve Mathews
What would be the best way to catch errors globally? I do a lot of
error catching as I track them down, but because my app is running
inside of a .NET windows form, I need to capture any errors so that I
can send the message up to the form for display. Is there any way to
capture errors at the Application level of the mxml?


Re: [flexcoders] Re: newbie: pushing data changes back to server

2008-02-04 Thread Andrew Sinning
Thanks William.  What a fantastic resource that site is.

Man, this Flex thing is making me mad!  Mad that I didn't start using it 
two years ago!  Mad about all the time I've wasted building php-HTML!

Abyss Knight wrote:
 Basically, to make any changes to the data in the datagrid you just
 need to make changes to the dataProvider you specified. Say, if it was
 an ArrayCollection, then you would just update the array collection.
 Then you would want to send the changes back to the server using an
 HTTPService, RemoteObject, or other call to the server and process the
 call with some server side scripting.

 Here's a few good tutorials:

 http://blog.paranoidferret.com/index.php/2007/08/24/flex-php-json-mysql-advanced-updating/

 http://blog.paranoidferret.com/index.php/2007/11/02/sending-flex-data-to-php-using-xml/

 http://blog.paranoidferret.com/index.php/2007/07/27/flex-friday-feature-datagrid-component/


 Hope that helps,
 -- William



[flexcoders] Re: RSL realtive path is relative to the page path, not the swf path

2008-02-04 Thread ben.clinkinbeard
Flash Player has always loaded assets (images, swfs, etc) relative to
the embedding file.

HTH,
Ben


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

 Are you saying that index.html loads ../MainApp.swf?  Please verify
 that.  Put a trace statement for the loaderInfo.url in the app.  Maybe
 there's a deployment problem.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of mydarkspoon
 Sent: Monday, February 04, 2008 6:52 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] RSL realtive path is relative to the page path,
 not the swf path
 
  
 
 Hello,
 
 I'm trying to load RSL from a relative path:
 MainApp.swf - my main app
 MyRsl.swf - my rsl
 
 Now, it happens to be that the main application is being loaded from
 url like this:
 http://www.myDomain.com/swf/MainApp.swf
 http://www.myDomain.com/swf/MainApp.swf 
 which loads--
 http://www.myDomain.com/swf/MyRsl.swf
 http://www.myDomain.com/swf/MyRsl.swf 
 
 However, the swf is embedded in another path:
 http://www.myDomain.com/swf/index.php/index.html
 http://www.myDomain.com/swf/index.php/index.html 
 
 The MainApp.swf however tries to load the rsl from
 http://www.myDomain.com/swf/index.php/MyRsl.swf
 http://www.myDomain.com/swf/index.php/MyRsl.swf 
 
 This is obviously a wrong path and since the path is given at tcompile
 time I can't seem to be able to point it to the swf relative path.
 
 Any ideas of how to use the swf path instead of the page path without
 specifying an absolute location ?
 
 Thanks in advance,
 Almog Kurtser.
 Almog Kurtser.





[flexcoders] Re: Mysterious Problem with Embed Directives in CSS

2008-02-04 Thread ben.clinkinbeard
Which version of the framework are you using? I know 2 and 3 treat the
leading slash a bit differently, though I can't recall the specifics
at the moment.

Ben


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

 Greetings -
 
 One day, out of nowhere, all of the Embed directives in my CSS
started failing with this kind 
 of message (for a zillion assets):
 
 Invalid Embed directive in stylesheet - can't resolve source
'Embed(source = 
 /assets/images/Arrow_Down.png)'.
 
 The referenced asset(s) exist, other developers working on the same
project, with the same 
 source tree (their local Perforce copy) don't get the errors, etc.
I've recreated the project from 
 scratch, reset Flex builder settings, etc. No luck.
 
 We are completely mystified. Any ideas?
 
 cheers, ethan





RE: [flexcoders] RSL realtive path is relative to the page path, not the swf path

2008-02-04 Thread Alex Harui
Are you saying that index.html loads ../MainApp.swf?  Please verify
that.  Put a trace statement for the loaderInfo.url in the app.  Maybe
there's a deployment problem.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mydarkspoon
Sent: Monday, February 04, 2008 6:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RSL realtive path is relative to the page path,
not the swf path

 

Hello,

I'm trying to load RSL from a relative path:
MainApp.swf - my main app
MyRsl.swf - my rsl

Now, it happens to be that the main application is being loaded from
url like this:
http://www.myDomain.com/swf/MainApp.swf
http://www.myDomain.com/swf/MainApp.swf 
which loads--
http://www.myDomain.com/swf/MyRsl.swf
http://www.myDomain.com/swf/MyRsl.swf 

However, the swf is embedded in another path:
http://www.myDomain.com/swf/index.php/index.html
http://www.myDomain.com/swf/index.php/index.html 

The MainApp.swf however tries to load the rsl from
http://www.myDomain.com/swf/index.php/MyRsl.swf
http://www.myDomain.com/swf/index.php/MyRsl.swf 

This is obviously a wrong path and since the path is given at tcompile
time I can't seem to be able to point it to the swf relative path.

Any ideas of how to use the swf path instead of the page path without
specifying an absolute location ?

Thanks in advance,
Almog Kurtser.
Almog Kurtser.

 



RE: [flexcoders] Re: container width parent container's width when vertical scrollbar present

2008-02-04 Thread Alex Harui
Yeah, you're caught in a no-win situation.  To get this right, we'd have
to visit the children twice, once to figure out we need scrollbars and
then again to give them final sizes.  We opted to go with the current
one-visit scheme for performance reasons.  There's probably some way you
can detect that the scrollbar is there, change the scrollpolicy and
force a relayout.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dfalling
Sent: Monday, February 04, 2008 7:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: container width  parent container's width
when vertical scrollbar present

 

Yes, I've found that as one fix, but am not fond of it either... The
application I'm working on will be run on a wide range of monitor
resolutions, and it's likely that many users will not need the
scrollbars in order to see the content. For them, I don't want to
chop a bit of their screen real estate away in order to display an
unnecessary scrollbar. At the same time, if a user doesn't have the
vertical space, I'd like for flex to show the scrollbar.

The hack I'm currently using is to add extra padding to the right side
and disable horizontal scrolling. If the vertical bars show up, they
crop that padding. This is less than ideal, as at one point (either
before the bar is displayed or after) the padding will not be
consistent around the content. This also steals screen space from
people who don't need the bars, so it isn't ideal.

I just wish there was a way to get containers to subtract the
scrollbar's width from the width that they allow their children to
use. They're percentage-based, so it's obvious that the intention was
for them to take up as much (but no more) space available to them.

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

 I spend a couple of minutes on this. The rules are that, when
 verticalScrollPolicy=auto (default), the verticalScrollBar is not
 factored into the measurements and overlaps content, otherwise it
would
 cause the scrollbar ripple. The simplest change to remove the
 horizontal scrollbar is to set verticalScrollPolicy=on on the outer
 Canvas. That way the verticalScrollBar is factored in. Because the
 widths are preset in this example, it is safe to do that since you
know
 the verticalScrolLBar has to be on.

 



Re: [flexcoders] Question regarding dynamic form

2008-02-04 Thread cool buddy
HI ,

Thanks for your reply..

I tried but but could not populate it..
If you have some piece of code of it..could you please send it .

Thanks,


- Original Message 
From: Tom Chiverton [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 7:54:47 AM
Subject: Re: [flexcoders] Question regarding dynamic form

On Monday 04 Feb 2008, hydcool02 wrote:
 For eg..if he select  '2' then the form should fields twice..

Use the steppers value as the dataProvider of a Reapeater ?

-- 
Tom Chiverton
Helping to interactively market open-source IPOs
on: http://thefalken.livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
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.com 
Yahoo! Groups Links




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: [flexcoders] Loading Image Sequence into Movie Programmatically/Dynamically Generate SWF

2008-02-04 Thread Troy Gilbert
  I saw some posts on this topic and didn't see any solution to this yet.

  Is there a way to use Actionscript 3.0 in Flex/AIR to generate .SWF at
  runtime? I guess I can't call the mxml/as compiler directly.

They were probably my posts on the topic... I was looking to
accomplish the same thing. There's no official way to do this, i.e.
you can't create MovieClip objects using any AS3 API. The only route
would be to generate the SWF byte code by hand in a ByteArray then
load from that (similar to what some of the mixing audio libraries
do). It'd be awesome if Adobe officially provided API for this...
ahem!

There's also no straightforward way to do this offline, i.e. generate
a SWF from a folder full of PNGs. You can do this manually in the
Flash IDE; and it appears as if there is some way to do this using the
MXML compiler by chaining loading frames, but I wasn't able to work
out how to do it.

My solution ended up being this: I created a PHP script that scanned a
folder for PNGs and generated an AS class containing all of the images
as embeds. The class implemented an interface that allowed the images
to be queried, listed, etc. I then compiled that class to a SWF I'd
load at runtime.

Nothing clever, just brute force code generation. I am kind of
disappointed that Adobe hasn't created any toolchain for assets to
go along with Flex, everyone seems to be rolling their own. It would
be dead simple for them (with their knowledge of SWF bytecode
internals) to create a command-line tool that transformed a directory
full of images and sounds into a SWF library. I get the vibe that
compc (the component compiler, SWC's) kinda does this, but I don't
quite understand if those SWC's can be used at runtime or if they're
like LIB files and only usable as compilation units.

I'd love to spend a few weeks building some of these tools as I don't
think they'd be any kind of rocket science. I'd love to see a SWF
bytecode API (in AS3) that can generate assets (code would be a
bonus), and an offline toolset that can do the same. Swfmill basically
did this (for offline), but it hasn't been updated to Flash9/AS2 (last
I checked).

Troy.


[flexcoders] Re: Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread ndkamp
ok, I found that if i wrap the textField in a sprite and add this in
createChildren, then formatting will be applied correctly:

var wrapper:Sprite = new Sprite();
wrapper.addChild(txt);
this.addChild(wrapper); 

Well, i'm not really comfortable with this but I think I need to look
closer at styles, since formats seem to get overriden when a TextField
is add directly to the component...?


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

 dan, thanks for your answer. I'm using device and/or embedded fonts,
 but right here I don't really care about the fonts. I'm just puzzled
 why the formatting doesn't seem to work for me. I'm using UITextFormat,
 because of the options it gives me with anti-aliasing and measuring. A
 I tried using TextFormat but that wont help. I did not look at styling
 and skinning, so I'm not sure if the formats get overriden by styles
 in a later stage by the framework.
 
 
 --- In flexcoders@yahoogroups.com, Daniel Freiman FreimanCQ@ wrote:
 
  Are you using embeded or device fonts?  Also, is there a reason
you are
  using UITextFormat instead of TextFormat?  Even when using with a
  UITextField, 99% of the time using UITextFormat instead of
TextFormat is
  unnecessary and makes thing more complicated.
  
  - Dan Freiman
  
  On Feb 4, 2008 9:22 AM, ndkamp ndkamp@ wrote:
  
 Thanks for your answer. I know the text and orange background
 are ok,
   but the formats won't show. Are you really getting bold text, what
   about the size and color? what if you add:
  
   format.italic = true,
   format.underline = true;
   format.font = Georgia;
  
   Do they show? can't get the formats to work. Im using flex beat
3 btw.
   thanks.
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, 
   shrikant.patil gt_shrikant@
  
   wrote:
   
   
hi,
   
i have tested u r file i got a orange backgrounded, vardana,
   bold text
saying that : The quick brown Fox...
   
i hope it is working fine...
   
   
ndkamp wrote:

 I try to apply UITextFormat to an UITextField in a custom
 component
 but the new format won't show. what am i doing wrong?

 package tests.components
 {
 import flash.text.TextLineMetrics;
 import mx.core.UIComponent;
 import mx.core.UITextField;
 import mx.core.UITextFormat;

 public class TestCustomComponent extends UIComponent
 {
 private var txt:UITextField;

 public function TestCustomComponent()
 {
 super();
 }

 /*
 * Create the TextField add some TextFormat and add it to
 * the displayList.
 */
 override protected function createChildren():void {
 super.createChildren();

 //Use TextFormat and apply some formats
 var format:UITextFormat = new UITextFormat(this.systemManager);
 format.font = Verdana;
 format.bold = true;
 format.color = 0x804020;
 format.size = 20;

 //The TextField that should be formated
 txt = new UITextField();

 //The documentation says TextFormat won't be applied
 //when a styleSheet is in use, naive approach to so set this to
   null
 //is this enough?
 txt.styleSheet = null;
 txt.styleName = null;

 //Apply the TextFormat for defaults and all current Text
 txt.defaultTextFormat = format;
 txt.text = The quick brown Fox...;
 this.addChild(txt);

 }

 /*
 * Sets the measures to the width of the text plus some offset
 */
 override protected function measure():void {
 super.measure();
 var metrics:TextLineMetrics = txt.getLineMetrics(0);
 this.measuredWidth = this.measuredMinWidth = metrics.width + 20;
 this.measuredHeight = this.measuredMinHeight =
metrics.height + 2;
 }

 /*
 * Add a rounded Rectangle at the back of the TextField
 */
 override protected function
 updateDisplayList(unscaledWidth:Number,
 unscaledHeight:Number):void {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 this.graphics.beginFill(0xff8800, 1);
 this.graphics.drawRoundRect(0, 0, unscaledWidth,
   unscaledHeight, 10);
 this.graphics.endFill();
 txt.setActualSize(unscaledWidth, unscaledHeight);
 }
 }
 }



   
--
View this message in context:
  
  

http://www.nabble.com/Fail-to-apply-UITextFormat-to-UITextField-in-custom-Component-tp15266357p15267393.html
Sent from the FlexCoders mailing list archive at Nabble.com.
   
  

  
 





Re: [flexcoders] Re: Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread Daniel Freiman
Styles can override text formating when the parent of a UITextField is
invalidated, but only having some formatting overridden is a little weird.
Functionality for setting format based on style is in the UITextField class,
I think the function is validateNow(), but I not 100% certain about that.
For future reference, I asked about font type because embeding fonts
incorrectly could account for the described behavior (as I originally
understood it), and the rendering engine for device fonts (in very few and
specific cases) also has its own quirks.

- Dan Freiman

On Feb 4, 2008 10:53 AM, ndkamp [EMAIL PROTECTED] wrote:

   ok, I found that if i wrap the textField in a sprite and add this in
 createChildren, then formatting will be applied correctly:

 var wrapper:Sprite = new Sprite();
 wrapper.addChild(txt);
 this.addChild(wrapper);

 Well, i'm not really comfortable with this but I think I need to look
 closer at styles, since formats seem to get overriden when a TextField
 is add directly to the component...?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, ndkamp
 [EMAIL PROTECTED] wrote:
 
  dan, thanks for your answer. I'm using device and/or embedded fonts,
  but right here I don't really care about the fonts. I'm just puzzled
  why the formatting doesn't seem to work for me. I'm using UITextFormat,
  because of the options it gives me with anti-aliasing and measuring. A
  I tried using TextFormat but that wont help. I did not look at styling
  and skinning, so I'm not sure if the formats get overriden by styles
  in a later stage by the framework.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Daniel Freiman FreimanCQ@ wrote:
  
   Are you using embeded or device fonts? Also, is there a reason
 you are
   using UITextFormat instead of TextFormat? Even when using with a
   UITextField, 99% of the time using UITextFormat instead of
 TextFormat is
   unnecessary and makes thing more complicated.
  
   - Dan Freiman
  
   On Feb 4, 2008 9:22 AM, ndkamp ndkamp@ wrote:
  
Thanks for your answer. I know the text and orange background
  are ok,
but the formats won't show. Are you really getting bold text, what
about the size and color? what if you add:
   
format.italic = true,
format.underline = true;
format.font = Georgia;
   
Do they show? can't get the formats to work. Im using flex beat
 3 btw.
thanks.
   
--- In flexcoders@yahoogroups.com 
flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com, 
shrikant.patil gt_shrikant@
   
wrote:


 hi,

 i have tested u r file i got a orange backgrounded, vardana,
bold text
 saying that : The quick brown Fox...

 i hope it is working fine...


 ndkamp wrote:
 
  I try to apply UITextFormat to an UITextField in a custom
  component
  but the new format won't show. what am i doing wrong?
 
  package tests.components
  {
  import flash.text.TextLineMetrics;
  import mx.core.UIComponent;
  import mx.core.UITextField;
  import mx.core.UITextFormat;
 
  public class TestCustomComponent extends UIComponent
  {
  private var txt:UITextField;
 
  public function TestCustomComponent()
  {
  super();
  }
 
  /*
  * Create the TextField add some TextFormat and add it to
  * the displayList.
  */
  override protected function createChildren():void {
  super.createChildren();
 
  //Use TextFormat and apply some formats
  var format:UITextFormat = new UITextFormat(this.systemManager);
  format.font = Verdana;
  format.bold = true;
  format.color = 0x804020;
  format.size = 20;
 
  //The TextField that should be formated
  txt = new UITextField();
 
  //The documentation says TextFormat won't be applied
  //when a styleSheet is in use, naive approach to so set this to
null
  //is this enough?
  txt.styleSheet = null;
  txt.styleName = null;
 
  //Apply the TextFormat for defaults and all current Text
  txt.defaultTextFormat = format;
  txt.text = The quick brown Fox...;
  this.addChild(txt);
 
  }
 
  /*
  * Sets the measures to the width of the text plus some offset
  */
  override protected function measure():void {
  super.measure();
  var metrics:TextLineMetrics = txt.getLineMetrics(0);
  this.measuredWidth = this.measuredMinWidth = metrics.width + 20;
  this.measuredHeight = this.measuredMinHeight =
 metrics.height + 2;
  }
 
  /*
  * Add a rounded Rectangle at the back of the TextField
  */
  override protected function
  updateDisplayList(unscaledWidth:Number,
  unscaledHeight:Number):void {
  super.updateDisplayList(unscaledWidth, unscaledHeight);
  this.graphics.beginFill(0xff8800, 1);
  this.graphics.drawRoundRect(0, 0, unscaledWidth,
unscaledHeight, 

[flexcoders] Re: container width parent container's width when vertical scrollbar present

2008-02-04 Thread dfalling
Yes, I've found that as one fix, but am not fond of it either...  The
application I'm working on will be run on a wide range of monitor
resolutions, and it's likely that many users will not need the
scrollbars in order to see the content.  For them, I don't want to
chop a bit of their screen real estate away in order to display an
unnecessary scrollbar.  At the same time, if a user doesn't have the
vertical space, I'd like for flex to show the scrollbar.

The hack I'm currently using is to add extra padding to the right side
and disable horizontal scrolling.  If the vertical bars show up, they
crop that padding.  This is less than ideal, as at one point (either
before the bar is displayed or after) the padding will not be
consistent around the content.  This also steals screen space from
people who don't need the bars, so it isn't ideal.

I just wish there was a way to get containers to subtract the
scrollbar's width from the width that they allow their children to
use.  They're percentage-based, so it's obvious that the intention was
for them to take up as much (but no more) space available to them.

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

 I spend a couple of minutes on this.  The rules are that, when
 verticalScrollPolicy=auto (default), the verticalScrollBar is not
 factored into the measurements and overlaps content, otherwise it would
 cause the scrollbar ripple.  The simplest change to remove the
 horizontal scrollbar is to set verticalScrollPolicy=on on the outer
 Canvas.  That way the verticalScrollBar is factored in.  Because the
 widths are preset in this example, it is safe to do that since you know
 the verticalScrolLBar has to be on.



[flexcoders] Flex training classes in the east coast, USA

2008-02-04 Thread Sharat Gajulapalli
Hi all,

I'm looking for a 2-3 day Flex course anywhere in the east coast and
preferably in the Washington DC metro area. Any recommendations would
be appreciated. I am currently a Java developer and will be doing some
Flex now so any advice on which course will suit me best will also be
appreciated.

Thanks,
Sharat



[flexcoders] Loading Image Sequence into Movie Programmatically/Dynamically Generate SWF

2008-02-04 Thread Xs][mage

I saw some posts on this topic and didn't see any solution to this yet.

Is there a way to use Actionscript 3.0 in Flex/AIR to generate .SWF at
runtime?  I guess I can't call the mxml/as compiler directly.

The problem I am having now is that I want to load an image sequence as a
movie programmatically.  At first, I got it working by loading each image
with URLLoader whenever I want to play the movie, but the initial load time
was just too much.  Then, I tried appending all the images into one big
bitmap and calling URLLoader once, but the 2880 bitmap pixel limit screwed
me up.  So now, I am trying to put each picture as a frame of the movieclip. 
My objective is to have a dead simple process for creating movie clips from
image sequence, and a fast playback of the movie.

I appreciate any suggestions or directions, thanks!
-- 
View this message in context: 
http://www.nabble.com/Loading-Image-Sequence-into-Movie-%3E%3E-Programmatically-Dynamically-Generate-SWF-tp15261040p15261040.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] CustomComponent property refresh problem

2008-02-04 Thread Christoph Guse

Hi List,

I'm developing an application with custom components and custom Value 
Objects in combination with the Cairngorm Framework.


It is a reporting application and the idea is to have a central TableVO 
which contains the report data and several UI elements like a Datagrid 
and several charts are attached to the TableVO. The TableVO object 
resides in a Cairngorm Model Locator object and is [Bindable].


A snippet of my TableVO object:
   public class TableVO extends EventDispatcher
   {
  
   public static var CHANGE_EVENT_NAME:String = tableVoChange;
  


   private var __columns:XAxisVO;
  
  
   private var __mapTableContent:ArrayCollection;
  
   private var __chartValues:ArrayCollection;
  
   public function TableVO(){

   super();
   }   
  
  
   [Bindable]   
   public function get columns():XAxisVO{

   return __columns;
   }
  
   public function set columns( arg:XAxisVO ):void{

   __chartValues = null;
   __columns = arg;
   dispatchEvent(new Event(Event.CHANGE));
   }
  
   public function set mapTableContent( arg:ArrayCollection ):void{

   __chartValues = null;
   __mapTableContent = arg;
   dispatchEvent(new Event(Event.CHANGE));
   }
  
   [Bindable]

   public function get mapTableContent():ArrayCollection{
   return __mapTableContent;
   }

}

The Datagrid and the charts are custom components which extend the Flex 
Datagrid and Chart components.


My application runs fine but I have problems with filter-functions. The 
filter function affect the property mapTableContent in TableVO and I'd 
like to see the filter effect directly in my custom components.


This works fine in the Datagrid component but the chart components seem 
to be not aware of changes in TableVO.mapTableContent, nothing changes.


I tried to find a hint in the documentation but I wasn't able to find 
the reason why my code doesn't work.


What I would like to have:

   * a filter function is applied to TableVO.mapTableContent
   * my custom chart component gets aware of changes in
 TableVO.mapTableContent and executes a method for redrawing the chart


Any hint is appreciated.

Regards,
Christoph


Re: [flexcoders] Re: How to deep copy an ArrayCollection?

2008-02-04 Thread yigit
this will work for just one level of depth.
i mean, if your item has a reference to another object in the model, you 
will just clone the item not the object so you will have two items 
referencing the same object.

i had this issue and developed a system for this. All my object can be 
serialized to xml and
deserialized from xml. by the way xml generation process is 
recursive.(when an item's toXML method is called it also calls it's 
children' toXML methods)
this give 100% copy.

it may be seemed a bit hard, you may start with learning XSD (xml schema 
definition)

by the way, i just realized that the same recursive approach can be 
applied using byteArrays.

Stephen Allison wrote On 02/04/2008 01:38 PM:

  In my application I am using ArrayCollections to store data for series
  on a line chart. I need to be able to make a deep copy of these
  ArrayCollections so that I can make changes to the data in the copies
  without affecting the original data.

 IIRC you can write the whole lot into a ByteArray, which serialises it as
 AMF in memory, and then read it back out again. Classes in your array 
 need
 [RemoteClass] in order to get correctly typed objects back.

 ie.
 var ba:ByteArray = new ByteArray();
 ba.writeObject(yourData);
 var newCopy = ba.readObject();

 Stephen

  



[flexcoders] Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread ndkamp
I try to apply UITextFormat to an UITextField in a custom component
but the new format won't show. what am i doing wrong?

package tests.components
{
import flash.text.TextLineMetrics;
import mx.core.UIComponent;
import mx.core.UITextField;
import mx.core.UITextFormat;

public class TestCustomComponent extends UIComponent
{
private var txt:UITextField;

public function TestCustomComponent()
{
super();
}

/*
 * Create the TextField add some TextFormat and add it to
 * the displayList.
 */
override protected function createChildren():void {
super.createChildren(); 

//Use TextFormat and apply some formats
var format:UITextFormat = new 
UITextFormat(this.systemManager);
format.font = Verdana;
format.bold = true;
format.color = 0x804020;
format.size = 20;

//The TextField that should be formated
txt = new UITextField();

//The documentation says TextFormat won't be applied
//when a styleSheet is in use, naive approach to so set 
this to null
//is this enough?
txt.styleSheet = null;
txt.styleName = null;

//Apply the TextFormat for defaults and all current Text
txt.defaultTextFormat = format;
txt.text = The quick brown Fox...;
this.addChild(txt); 

}

/*
 * Sets the measures to the width of the text plus some offset
 */
override protected function measure():void {
super.measure();
var metrics:TextLineMetrics = txt.getLineMetrics(0);
this.measuredWidth = this.measuredMinWidth = 
metrics.width + 20;
this.measuredHeight = this.measuredMinHeight = 
metrics.height + 2;
}

/*
 * Add a rounded Rectangle at the back of the TextField
 */
override protected function 
updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
this.graphics.beginFill(0xff8800, 1);
this.graphics.drawRoundRect(0, 0, unscaledWidth, 
unscaledHeight, 10);
this.graphics.endFill();
txt.setActualSize(unscaledWidth, unscaledHeight);
}
}
}



[flexcoders] Re: Mysterious Problem with Embed Directives in CSS

2008-02-04 Thread Ethan Miller
I'm using 3.0.190133.

Note that I've tried:

/assets/images/foo.png
assets/images/foo.png
./assets/images/foo.png

All produce theh same error. Note that the referencing css 
file is at the same level as the assets directory, eg:

assets
  images
 foo.png
bin
com
Index.mxml
styles.css

cheers, ethan



 Which version of the framework are you using? I know 2 and 3 treat the
 leading slash a bit differently, though I can't recall the specifics
 at the moment.
 
 Ben
 
 
 --- In flexcoders@yahoogroups.com, Ethan Miller flexcoders@ wrote:
 
  Greetings -
  
  One day, out of nowhere, all of the Embed directives in my CSS
 started failing with this kind 
  of message (for a zillion assets):
  
  Invalid Embed directive in stylesheet - can't resolve source
 'Embed(source = 
  /assets/images/Arrow_Down.png)'.
  
  The referenced asset(s) exist, other developers working on the same
 project, with the same 
  source tree (their local Perforce copy) don't get the errors, etc.
 I've recreated the project from 
  scratch, reset Flex builder settings, etc. No luck.
  
  We are completely mystified. Any ideas?
  
  cheers, ethan
 






[flexcoders] Occasionally Connected App w/ LiveCycle - Failing at 2 or more DataService's

2008-02-04 Thread mrkarlssone36
Been looking at the http://coenraets.org/blog/2007/10/offline-
synchronization-using-air-and-livecycle-data-services/ example for 
using LCDS as an OCA built in Flex 3.

Great example to get started; however, when we try to use multiple 
services in the same app we're getting some really weird results.

On disconnect the Managed Collections are emptied automatically [while 
when using just the one service the app automatically reads/writes to 
cache].

Does anyone have an example of an OCA approach with multiple services? 
Or, does anyone know if this just doesn't work right now?

Any help would be greatly appreciated!

Thanks / Martin



[flexcoders] Re: Event Propigation

2008-02-04 Thread brett.hitzel
Thanks for the reply and apologies for the late response.

Unfortunately, your second idea may not be practical in my application
as it will only be certain modules listening for these events (what
modules listen to what events would be determined at load time as an XML
configuration file is loaded).

I have tried your other idea, setting the event listener on the module
as it is being dynamically created and then dispatching the event from
the parent, unfortunately that did not seem to work. Code samples below:

RootApplicationFunctions.as(script included on root most application
file so this would be the parent application)
* NOTE: This function is a couple functions down the chain, originating
from a loop which is iterating over the XML configuration file. It tells
the applications what modules to load. *
private function moduleLoadComplete(event:ModuleEvent):void
{
   // The module itself as a Display Object.
   var visual:DisplayObject = event.module.factory.create() as
DisplayObject;
   // The module container.
   var modContainer:ModuleWrapper = new ModuleWrapper();
   modContainer.id = module_container + this._moduleIndex;
   // Add event listeners to the modContainer.
  
modContainer.addEventListener(profileDataUpdated,profileDataUpdatedHan\
dler);
   // Add module to the container.
   modContainer.addChild(visual);
   // Add module container to workspace canvas.
   root_canvas.workspace_canvas.addChild(modContainer);
   this._moduleIndex++;
}

private function sendEvent():void
{
 dispatchEvent(new Event(profileDataUpdated));
}

I did know if it would be looking for profileDataUpdatedHandler in the
parentApplication or in the moduleWrapper as file itself, so at present
this function exists in both spots:

public function profileDataUpdatedHandler(event:Event):void
{
 Alert.show(module container heard the event:  +
event.target.toString());
}

RootApplication.mxml (this is the file which includes
RootApplicationFunctions.as above)
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 xmlns:view=view.*
 layout=absolute
 width=100%
 height=100%
 creationComplete=rootApplicationInit()

 mx:Style source=asset/style/CommunityUI.css /

 mx:Script source=RootApplicationFunctions.as /

 mx:XML id=OEMConfiguration source=xml/oemConfiguration.xml /

 view:RootCanvas id=root_canvas /
 mx:Button click=sendEvent() /
/mx:Application


As of yet, I have not been able to get this to work. If I click on the
button on the root, it does fire sendEvent(), but module being loaded is
not responding (technically it is the ModuleWrapper listening, but the
ModuleWrapper passes instructions to the module contained within).

I have other options available to me I suppose, however this is the way
I would like to do it because it seems like the cleanest way.

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

 It's possible.

 Main.mxml
 //script
 private function init():void{
  child1.addEventListener(change,
callBackFunction);
  }

  private function dispatchEventsToChildren():void{
  //call this to dispatch an event
  dispatchEvent(new Event(change));
  }

 //or do it this way
  private function controlChildren(event:ItemClickEvent):void{
  child1.publicFunctionUpdateData(args);
  }


 //body
 com:child1 id=child1/
 mx:DateField change=controlChildren(event)/


 Child1.mxml
 Some component you have...


 --- In flexcoders@yahoogroups.com, brett.hitzel brett.hitzel@
 wrote:
 
  Hi Everyone,
 
  I have been charged to architect a fairly large scale Flex
application
  (first time doing so). I don't think that my issue warrants code
  samples however if needed I can provide.
 
  I have not worked with events too much, but I understand the default
  three phases it goes through (capture,target,bubble). The
application
  will be comprised of an application which load a custom MXML
component
  (basically an extended Canvas), which in turn loads modules based on
  user interaction. What I need to have happen, is when the root
  (parentApplication) has values that update, I would like for it to
  dispatch an event, which the Modules listen for, and then in
response
  poll the parent for that data to get the new information.
 
  Based on everything I have read, events don't propigate in that
  direction (it climbs down the chain from the top, hits the target,
and
  then climbs back up). However, is it possible to make it go the
other
  way? Can children hear events of the parent? If this is impossible,
  does anyone have any thoughts or suggestions for an alternative to
my
  particular problem?
 
  I appreciate any advice you can offer!
 




[flexcoders] Re: Keyboard navigation to objects within components

2008-02-04 Thread Dave
Try having your renderer for the cell implement IFocusManager.  Get
the focus event and set your desired component focus.

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

 Editable=true?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Monday, February 04, 2008 4:25 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Keyboard navigation to objects within
 components
 
  
 
 seems like you want to tab through the columns of the selected row, I
 have not seen any way of doing that
 
 an somewhat inelegant brute force method would be to define shortcuts
 to the buttons in your columns and trap those shortcuts as key presses
 in the component, check which row is selected, get the link and spoof
 a button press performing whatever action was under the original button.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , dannytab69 dannytab69@ wrote:
 
  I'm having a number of issues in my application regarding keyboard
  navigation and selection of objects within other components. For
  example, in a datagrid I have, two of the columns' are displayed as
  link buttosn, each of which is contained in a vbox within an item
  renderer. 
  
  The problem is that the application will allow me to tab to the data
  grid in question, and then use the up/down arrows to select particular
  rows, but there seems to be no way that I can think of that will allow
  me to select the individual link buttons within each row.
  
  Has anybody any ideas? Any help would be greatly appreciated.
  
  Thanks
  Danny
 





[flexcoders] Re: mx:Tile changing its height unfavorably

2008-02-04 Thread Tracy Spratt
Please don't hijack threads.  Start a new message instead of 
changing the subject. 
Tracy

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

 So I have an mx:Tile element whose width is 100% and height is 
unspecified.
 I want its height to grow as needed as I addChild(uicomponent). 
(after it
 fills up the first row it will make a second row and increase its 
height).
 
 However, It uses up about half the width and when I add another 
element, its
 height doubles for no apparent reason. 
 
  
 
 Quick ascii example:
 
 After two addChild()
 
 --
 00  00
 --
 
  
 
 After three
 
 --
 
 00  00  00
 
 --
 
 
 this leaves a large unused portion of my app right in the middle of 
the
 screen, and it annoying. Perhaps I am using the Tile component 
incorrectly?
 Should I be using some other component to accomplish this?
 
 Any help is appreciated.
 
  
 
  
 
 Seth





[flexcoders] Mysterious Problem with Embed Directives in CSS

2008-02-04 Thread Ethan Miller
Greetings -

One day, out of nowhere, all of the Embed directives in my CSS started failing 
with this kind 
of message (for a zillion assets):

Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = 
/assets/images/Arrow_Down.png)'.

The referenced asset(s) exist, other developers working on the same project, 
with the same 
source tree (their local Perforce copy) don't get the errors, etc. I've 
recreated the project from 
scratch, reset Flex builder settings, etc. No luck.

We are completely mystified. Any ideas?

cheers, ethan



[flexcoders] Strange behavior....

2008-02-04 Thread Marvin Froeder
I'm making some test with Boolean Flex cast.


See:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
initialize=main()

mx:Script
![CDATA[
private function main():void {
trace(Boolean:  + Boolean(true));
trace(Boolean:  + Boolean(false));
}
]]
/mx:Script
/mx:Application


I expect true and false on console.

But I got:
[SWF] C:\framework\workspace\CobaiaFlex\bin\BooleanTest.swf - 445.501 bytes
after decompression
Boolean: true
Boolean: true


What happened?


Marvin


[flexcoders] Re: Need IF Logic for Chart Data Provider

2008-02-04 Thread Abyss Knight
Glad to help. If you run into any other trouble, just let us know.

-- William

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

 Thanks your reply/time.
  
 The issue with the @attribute==blah  syntax was that I have month_name
 as an element instead of an attribute.
  
 Just learned about attributes.  I'm creating the xml myself in php
 (which is querying oracle).  So I can put the attribute in there.  It
 looks like it gives you much more powerful search capabilities (as well
 as more readable code).  
  
  
 brad
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Abyss Knight
 Sent: Monday, February 04, 2008 9:06 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Need IF Logic for Chart Data Provider
 
 
 
 I think you just need to change the  to '' like so:
 
 dataProvider={chartXML.lastResult.month.(@month_name=='01').day}
 
 However, you might be better off doing:
 
 dataProvider={chartXML.lastResult..month.(@month_name=='01').day}
 
 Here's a good quick reference too: 
 http://www.sephirot
 http://www.sephiroth.it/tutorials/flashPHP/E4X/page002.php
 h.it/tutorials/flashPHP/E4X/page002.php
 
 As a disclaimer, I have very little e4x experience but I presume that
 it will get you where you need to go.
 
 -- William
 
 --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com, Brad Bueche brad@ wrote:
 
  Ok, I have Sas Jacobs' book, Foundation Flex for Developers: Data
  Driven Applications with PHP, ASP.NET, ColdFusion, and LCDS. She has
 a
  chapter on working with XML using E4X.
  
  What works, for me in this case, is this:
  
  dataProvider={chartXML.lastResult.month[0].day}
  
  In fact just to see if it would work I declared 
  
  public const JANUARY:int = 0;
  
  and then did 
  
  dataProvider={chartXML.lastResult.month[JANUARY].day}
  
  This worked too.
  
  HOWEVER, I have been told that using brackets is too hard to debug.
  and that I should use a result handler to wrap the xmllist in an
  XMLListCollection instance variable and bind to that. Sas also covers
  that. I'll read up on that and let you know. OK, read it. I'm using
  the mx:HTTPService and, as far as I can tell from Sas' book, the
  HTTPService tag apparently takes care of creating an XMLListCollection
  for you.or maybe it just creats an XMLList. Can anybody shed some
  light on this?
  
  I also learned (from the book) that the following should work:
  
  dataProvider={chartXML.lastResult.month.(@month_name==01).day}
  
  However, it doesnt as I get the following error:
  
  Element Type mx:LineChart must be followed by either attribute
  specifications,  or /.
  
  
  brad
  
  brad
  
  
  -Original Message-
  From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com [mailto:[EMAIL PROTECTED]
 mailto:flexcoders%40yahoogroups.com ups.com] On
  Behalf Of Abyss Knight
  Sent: Friday, February 01, 2008 3:11 PM
  To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] Re: Need IF Logic for Chart Data Provider
  
  
  
  One option would be to change the chart's viewable area, as in modify
  the start of the axes to only show the data you want to show. This
  would obviously put a strain on the client if there was far too much
  data loaded into an ArrayCollection though.
  
  The other option is to query the XML using e4x and use the result as
  the data provider:
  http://www.onflex. http://www.onflex.
 http://www.onflex.org/ted/2006/12/xmle4x-vs-amf.php
 org/ted/2006/12/xmle4x-vs-amf.php
  org/ted/2006/12/xmle4x-vs-amf.php
  
  Hope that helps,
  -- William
  
  --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
  ups.com, Brad Bueche brad@ wrote:
  
   The problem (in short):
   I need to be able to hook up my charts to dataproviders where
   month_name equals January. And only pull that. I dont need it to
   read every month in the hierarchy. Or month_name is January and
  day_name
   is '14'. In order to do this I need to do IF logic with the
  dataprovider
   it seems to me. My other post occurred because in leiu of being able
   to do IF month_name='January'. I have just gone in and changed the
   xml so that instead of month /month [...] it now says january
   /januaryfebruary/february etc. That sort of defeats the data
   description aspect of XML (it seems to me). 
   
   
   The background (if you are interested):
   This problem has to do with me NOT wanting to write 100+ reports to
   generate 100+ separate xml files to access.
   
   I need to track the metrics of several internal groups over the year
  via
   charting. I want to drill down into individual months (by day) and
 --
   maybe, days by hour. I also want to track into the sub groups per
   month and per day-in-month for each of these groups as well.
   
   The data is network event traffic and doing the queries live will
 just
   not work. Users wont use the slicing and dicing 

[flexcoders] Re: Keyboard navigation to objects within components

2008-02-04 Thread dannytab69
--- In flexcoders@yahoogroups.com, dannytab69 [EMAIL PROTECTED] wrote:

 I'm having a number of issues in my application regarding keyboard
 navigation and selection of objects within other components.  For
 example, in a datagrid I have, two of the columns' are displayed as
 link buttosn, each of which is contained in a vbox within an item
 renderer.  
 
 The problem is that the application will allow me to tab to the data
 grid in question, and then use the up/down arrows to select particular
 rows, but there seems to be no way that I can think of that will allow
 me to select the individual link buttons within each row.
 
 Has anybody any ideas?  Any help would be greatly appreciated.
 
 Thanks
 Danny

Anyone???



[flexcoders] Re: Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread ndkamp
dan, thanks for your answer. I'm using device and/or embedded fonts,
but right here I don't really care about the fonts. I'm just puzzled
why the formatting doesn't seem to work for me. I'm using UITextFormat,
because of the options it gives me with anti-aliasing and measuring. A
I tried using TextFormat but that wont help. I did not look at styling
and skinning, so I'm not sure if the formats get overriden by styles
in a later stage by the framework.


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

 Are you using embeded or device fonts?  Also, is there a reason you are
 using UITextFormat instead of TextFormat?  Even when using with a
 UITextField, 99% of the time using UITextFormat instead of TextFormat is
 unnecessary and makes thing more complicated.
 
 - Dan Freiman
 
 On Feb 4, 2008 9:22 AM, ndkamp [EMAIL PROTECTED] wrote:
 
Thanks for your answer. I know the text and orange background
are ok,
  but the formats won't show. Are you really getting bold text, what
  about the size and color? what if you add:
 
  format.italic = true,
  format.underline = true;
  format.font = Georgia;
 
  Do they show? can't get the formats to work. Im using flex beat 3 btw.
  thanks.
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, 
  shrikant.patil gt_shrikant@
 
  wrote:
  
  
   hi,
  
   i have tested u r file i got a orange backgrounded, vardana,
  bold text
   saying that : The quick brown Fox...
  
   i hope it is working fine...
  
  
   ndkamp wrote:
   
I try to apply UITextFormat to an UITextField in a custom
component
but the new format won't show. what am i doing wrong?
   
package tests.components
{
import flash.text.TextLineMetrics;
import mx.core.UIComponent;
import mx.core.UITextField;
import mx.core.UITextFormat;
   
public class TestCustomComponent extends UIComponent
{
private var txt:UITextField;
   
public function TestCustomComponent()
{
super();
}
   
/*
* Create the TextField add some TextFormat and add it to
* the displayList.
*/
override protected function createChildren():void {
super.createChildren();
   
//Use TextFormat and apply some formats
var format:UITextFormat = new UITextFormat(this.systemManager);
format.font = Verdana;
format.bold = true;
format.color = 0x804020;
format.size = 20;
   
//The TextField that should be formated
txt = new UITextField();
   
//The documentation says TextFormat won't be applied
//when a styleSheet is in use, naive approach to so set this to
  null
//is this enough?
txt.styleSheet = null;
txt.styleName = null;
   
//Apply the TextFormat for defaults and all current Text
txt.defaultTextFormat = format;
txt.text = The quick brown Fox...;
this.addChild(txt);
   
}
   
/*
* Sets the measures to the width of the text plus some offset
*/
override protected function measure():void {
super.measure();
var metrics:TextLineMetrics = txt.getLineMetrics(0);
this.measuredWidth = this.measuredMinWidth = metrics.width + 20;
this.measuredHeight = this.measuredMinHeight = metrics.height + 2;
}
   
/*
* Add a rounded Rectangle at the back of the TextField
*/
override protected function
updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
this.graphics.beginFill(0xff8800, 1);
this.graphics.drawRoundRect(0, 0, unscaledWidth,
  unscaledHeight, 10);
this.graphics.endFill();
txt.setActualSize(unscaledWidth, unscaledHeight);
}
}
}
   
   
   
  
   --
   View this message in context:
 
 
http://www.nabble.com/Fail-to-apply-UITextFormat-to-UITextField-in-custom-Component-tp15266357p15267393.html
   Sent from the FlexCoders mailing list archive at Nabble.com.
  
 
   
 





[flexcoders] Re: newbie: pushing data changes back to server

2008-02-04 Thread Abyss Knight
Basically, to make any changes to the data in the datagrid you just
need to make changes to the dataProvider you specified. Say, if it was
an ArrayCollection, then you would just update the array collection.
Then you would want to send the changes back to the server using an
HTTPService, RemoteObject, or other call to the server and process the
call with some server side scripting.

Here's a few good tutorials:

http://blog.paranoidferret.com/index.php/2007/08/24/flex-php-json-mysql-advanced-updating/

http://blog.paranoidferret.com/index.php/2007/11/02/sending-flex-data-to-php-using-xml/

http://blog.paranoidferret.com/index.php/2007/07/27/flex-friday-feature-datagrid-component/


Hope that helps,
-- William


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

 I've been working with Flash in AS2 for quite a while, but so far I've
 only just worked through the tutorials in Flex.  The examples show how
 to display xml data.  Now I need to modify data, add records (nodes),
 and post changes back to the server.
 
 In one of the examples, the data in an rss feed is displayed in a
 DataGrid.  When you select a row in the DataGrid a detail about the
 selectedItem are displayed in a TextArea using data-binding.
 
 Let's assume that the data is something other than an RSS feed, e.g. a
 list of dogs at a kennel.
 
 So, how do I make changes to the text in the TextArea get bound back
 to the selectedItem in the DataGrid?
 
 How do I add a new item to the data in the DataGrid?
 
 How do I push these changes back to the server?
 
 I know I'm asking a lot, but I'm itching to get started and I'm just
 stuck.
 
 Thanks!





Re: [flexcoders] Trouble with WebService

2008-02-04 Thread shrikant.patil

hi,

put corssdomain.xml file at root directory of u r application directory
it must be like this: 

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
   allow-access-from domain=* secure=false/
/cross-domain-policy

and if possible send me the web service url so that i can test it
here..(dont forget to put crossdomain.xml)




pchris1977 wrote:
 
  
 
Hi,
 
  
 
I need some help for connecting flex 3 to a WebService.
 Right
 now I am confrunting with two problems:
 
 a.  Authentication - I want to connect to this webservice with basic
 authorization (the server support digest, kerberos, ntlm and Windows
 Integrated)
 
 b.  Compression - I want to set in the header of the request that I
 want
 to receive this message with gzip
 
  
 
 The application works fine with useProxy=false (default web service
 properties), and I don't know how to resolve this two problems.
 
 I also tryed to install BlazeDs, but I come from Windows world, and I need
 to install Appache, Tomcat and I am stuck in configuration options for
 blazeds. I need to mention that the sample application that came with
 BlazeDs is working fine (with sampledb started), but I don't know to add
 another application just for configuring proxy services for solving the
 two
 problems that I mentioned.
 
  
 
 Thanks in advance
 
Cristy
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Trouble-with-WebService-tp15263324p15266923.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Keyboard navigation to objects within components

2008-02-04 Thread simonjpalmer
seems like you want to tab through the columns of the selected row, I
have not seen any way of doing that

an somewhat inelegant brute force method would be to define shortcuts
to the buttons in your columns and trap those shortcuts as key presses
in the component, check which row is selected, get the link and spoof
a button press performing whatever action was under the original button.

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

 I'm having a number of issues in my application regarding keyboard
 navigation and selection of objects within other components.  For
 example, in a datagrid I have, two of the columns' are displayed as
 link buttosn, each of which is contained in a vbox within an item
 renderer.  
 
 The problem is that the application will allow me to tab to the data
 grid in question, and then use the up/down arrows to select particular
 rows, but there seems to be no way that I can think of that will allow
 me to select the individual link buttons within each row.
 
 Has anybody any ideas?  Any help would be greatly appreciated.
 
 Thanks
 Danny





Re: [flexcoders] Re: Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread Daniel Freiman
Are you using embeded or device fonts?  Also, is there a reason you are
using UITextFormat instead of TextFormat?  Even when using with a
UITextField, 99% of the time using UITextFormat instead of TextFormat is
unnecessary and makes thing more complicated.

- Dan Freiman

On Feb 4, 2008 9:22 AM, ndkamp [EMAIL PROTECTED] wrote:

   Thanks for your answer. I know the text and orange background are ok,
 but the formats won't show. Are you really getting bold text, what
 about the size and color? what if you add:

 format.italic = true,
 format.underline = true;
 format.font = Georgia;

 Do they show? can't get the formats to work. Im using flex beat 3 btw.
 thanks.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, 
 shrikant.patil [EMAIL PROTECTED]

 wrote:
 
 
  hi,
 
  i have tested u r file i got a orange backgrounded, vardana,
 bold text
  saying that : The quick brown Fox...
 
  i hope it is working fine...
 
 
  ndkamp wrote:
  
   I try to apply UITextFormat to an UITextField in a custom component
   but the new format won't show. what am i doing wrong?
  
   package tests.components
   {
   import flash.text.TextLineMetrics;
   import mx.core.UIComponent;
   import mx.core.UITextField;
   import mx.core.UITextFormat;
  
   public class TestCustomComponent extends UIComponent
   {
   private var txt:UITextField;
  
   public function TestCustomComponent()
   {
   super();
   }
  
   /*
   * Create the TextField add some TextFormat and add it to
   * the displayList.
   */
   override protected function createChildren():void {
   super.createChildren();
  
   //Use TextFormat and apply some formats
   var format:UITextFormat = new UITextFormat(this.systemManager);
   format.font = Verdana;
   format.bold = true;
   format.color = 0x804020;
   format.size = 20;
  
   //The TextField that should be formated
   txt = new UITextField();
  
   //The documentation says TextFormat won't be applied
   //when a styleSheet is in use, naive approach to so set this to
 null
   //is this enough?
   txt.styleSheet = null;
   txt.styleName = null;
  
   //Apply the TextFormat for defaults and all current Text
   txt.defaultTextFormat = format;
   txt.text = The quick brown Fox...;
   this.addChild(txt);
  
   }
  
   /*
   * Sets the measures to the width of the text plus some offset
   */
   override protected function measure():void {
   super.measure();
   var metrics:TextLineMetrics = txt.getLineMetrics(0);
   this.measuredWidth = this.measuredMinWidth = metrics.width + 20;
   this.measuredHeight = this.measuredMinHeight = metrics.height + 2;
   }
  
   /*
   * Add a rounded Rectangle at the back of the TextField
   */
   override protected function updateDisplayList(unscaledWidth:Number,
   unscaledHeight:Number):void {
   super.updateDisplayList(unscaledWidth, unscaledHeight);
   this.graphics.beginFill(0xff8800, 1);
   this.graphics.drawRoundRect(0, 0, unscaledWidth,
 unscaledHeight, 10);
   this.graphics.endFill();
   txt.setActualSize(unscaledWidth, unscaledHeight);
   }
   }
   }
  
  
  
 
  --
  View this message in context:

 http://www.nabble.com/Fail-to-apply-UITextFormat-to-UITextField-in-custom-Component-tp15266357p15267393.html
  Sent from the FlexCoders mailing list archive at Nabble.com.
 

  



Re: [flexcoders] AIR - including other files

2008-02-04 Thread Nick Collins
First, you need to have the files somewhere within your source directory
(well, it's easiest anyway). When you're building the release version, once
you've entered in your information for the digital signing, click next
instead of Finish. It will now give you a list of files and directories to
include/exclude. Now, not all files can be included, but images and db files
can. I tried including a swc, but it wouldn't let me, so I had to change the
extension, then use the file API to have the application rename it back when
I wanted to work with it.

On Feb 4, 2008 4:46 AM, Nils Millahn [EMAIL PROTECTED] wrote:

   Hi all,

 does anybody have information on how to include further files in an AIR
 package? I'd like to include a few image resources and a database file
 with the published AIR install but can't figure out how to tell the AIR
 compiler to do so.

 cheers - Nils.
  



Re: [flexcoders] SQLite - Importing file

2008-02-04 Thread Rick Root
Sadly that won't be an option in this case... I'm writing a desktop app that
will parse locally generated text files and shoot the changes up to the
server... since 80% or more of the data won't be changing on a daily basis.

I still haven't decided if this is the best way to do it... rather than just
shooting the whole data file up to the server and having the server do the
parsing and updating.

Rick


On 2/4/08, Johannes Nel [EMAIL PROTECTED] wrote:

   i could not find an a way apart from parsing myself to do this. remember
 to use transactions for the insert. all this said, we build the sqlite db on
 the server and pump that down the wire.

 On Feb 4, 2008 11:22 AM, Rick Root [EMAIL PROTECTED] wrote:

Is it possible for a Flex app to import a CSV file into the SQLite
  database?
 
  I know I could read the file with AS3, parse it as a CSV and insert
  the data ... but I see the sqlite3 has an import command and I just
  wondered if there was any other way for Flex to handle the importing
  of large text files on the client.
 
  --
  Rick Root
  New Brian Vander Ark Album, songs in the music player and cool behind
  the scenes video at www.myspace.com/brianvanderark
 



 --
 j:pn
 \\no comment

 




-- 
Rick Root
New Brian Vander Ark Album, songs in the music player and cool behind the
scenes video at www.myspace.com/brianvanderark


[flexcoders] Image distortion in move effect

2008-02-04 Thread aizmail
 I have a simple code down below that moves image from one corner of 
the screen to another. During the move image is getting some 
distortion.
Are there any suggestion how to improve the quality of the move?


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute width=842 height=242
mx:Script
![CDATA[
public function changeState():void{
if(currentState=='ImageOnTheRight') {
currentState='';
}else {

currentState='ImageOnTheRight';
}   }
]]
/mx:Script
mx:states
mx:State name=ImageOnTheRight
mx:SetProperty target={image1} 
name=x value=517/
/mx:State
/mx:states
mx:Image id=image1 x=10 y=10 
width=121  height=121
source=http://ecx.images-
amazon.com/images/I/51aTbk9EnLL._SS500_.jpg 
/
mx:Button x=10 y=153 label=Move Image 
click=changeState();/
mx:transitions
mx:Transition fromState=* toState=* 
mx:Move duration=700 
targets={[image1]}  /
/mx:Transition
/mx:transitions
/mx:Application



[flexcoders] RSS feed update

2008-02-04 Thread hworke

  Hello,

  I am populating a datagrid from a RSS link.
  My grid is updated only if I manually
  (with a button click event) resend the
  httpservice request. How can I update
  the datagrid as the RSS content changes 
  without sending the HttpService manually?

  Thanks



[flexcoders] Re: Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread ndkamp
Thanks for your answer. I know the text and orange background are ok,
but the formats won't show. Are you really getting bold text, what
about the size and color? what if you add:

format.italic = true,
format.underline = true;
format.font = Georgia;

Do they show? can't get the formats to work. Im using flex beat 3 btw.
thanks.


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

 
 hi,
 
 i have tested u r file i got a orange backgrounded, vardana,
bold text
 saying that : The quick brown Fox...
 
 i hope it is working fine...
 
 
 ndkamp wrote:
  
  I try to apply UITextFormat to an UITextField in a custom component
  but the new format won't show. what am i doing wrong?
  
  package tests.components
  {
  import flash.text.TextLineMetrics;
  import mx.core.UIComponent;
  import mx.core.UITextField;
  import mx.core.UITextFormat;
  
  public class TestCustomComponent extends UIComponent
  {
  private var txt:UITextField;
  
  public function TestCustomComponent()
  {
  super();
  }
  
  /*
   * Create the TextField add some TextFormat and add it to
   * the displayList.
   */
  override protected function createChildren():void {
  super.createChildren(); 
  
  //Use TextFormat and apply some formats
  var format:UITextFormat = new 
  UITextFormat(this.systemManager);
  format.font = Verdana;
  format.bold = true;
  format.color = 0x804020;
  format.size = 20;
  
  //The TextField that should be formated
  txt = new UITextField();
  
  //The documentation says TextFormat won't be applied
  //when a styleSheet is in use, naive approach to so set 
  this to
null
  //is this enough?
  txt.styleSheet = null;
  txt.styleName = null;
  
  //Apply the TextFormat for defaults and all current Text
  txt.defaultTextFormat = format;
  txt.text = The quick brown Fox...;
  this.addChild(txt); 
  
  }
  
  /*
   * Sets the measures to the width of the text plus some offset
   */
  override protected function measure():void {
  super.measure();
  var metrics:TextLineMetrics = txt.getLineMetrics(0);
  this.measuredWidth = this.measuredMinWidth = 
  metrics.width + 20;
  this.measuredHeight = this.measuredMinHeight = 
  metrics.height + 2;
  }
  
  /*
   * Add a rounded Rectangle at the back of the TextField
   */
  override protected function 
  updateDisplayList(unscaledWidth:Number,
  unscaledHeight:Number):void {
  super.updateDisplayList(unscaledWidth, unscaledHeight);
  this.graphics.beginFill(0xff8800, 1);
  this.graphics.drawRoundRect(0, 0, unscaledWidth,
unscaledHeight, 10);
  this.graphics.endFill();
  txt.setActualSize(unscaledWidth, unscaledHeight);
  }
  }
  }
  
  
  
 
 -- 
 View this message in context:
http://www.nabble.com/Fail-to-apply-UITextFormat-to-UITextField-in-custom-Component-tp15266357p15267393.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] JAXB POJO to Action Script VO

2008-02-04 Thread mailtoraman
I am trying to parse an XML file and generate java POJOs. I am using 
JAXB parser. It is generating custom code. While converting POJOs to 
Action Script VOs I am facing problem due to custom code. Please give 
your inputs for the best way to acheive this.



[flexcoders] Databinding in component

2008-02-04 Thread Merrill, Jason
Why does the button click below not trigger databinding in the component
(i.e. automatic call of set dataprovider)?  
 
Here is my test case:
 
//MXML:
?xml version=1.0 encoding=utf-8?
mx:Application 
 xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  xmlns:c=components.*
 layout=absolute 
 applicationComplete=init() 
 mx:Script
 ![CDATA[
  import mx.collections.ArrayCollection;
 
  [Bindable]
  public var fakeData:ArrayCollection;
 
  private function init():void
  {
   fakeData = setFakeData();
  }

  private function setFakeData():ArrayCollection
  {
   var fd:ArrayCollection = new ArrayCollection();
   fd.addItem({firstName:David, lastName:Branson});
   fd.addItem({firstName:Ned, lastName:Davidson});
   fd.addItem({firstName:Sally, lastName:Peterson});
   return fd;
  }
  
  private function changeData():void
  {
   fakeData.addItem({firstName:Jason, lastName:Merrill}); 
  }
  
 ]]
 /mx:Script
 c:BindableListText dataProvider={fakeData} /
 mx:Button x=100 label=change data click=changeData()/
/mx:Application

/*==*/
//Component:
 
package components
{
 import flash.events.Event;
 import mx.controls.TextArea;
 import mx.collections.ArrayCollection
 import mx.core.UIComponent;
 
 public class BindableListText extends UIComponent
 {
  [Bindable]
  private var _dataProvider:ArrayCollection;
  private var tf:TextArea;
  
  public function BindableListText()
  {
   tf = new TextArea();
   tf.height = 400;
   tf.width = 400;
   addChild(tf)
  }
  
  public function set dataProvider (_dp:ArrayCollection) :void 
  {
   _dataProvider = _dp;
   showData();
   trace(databinding triggered)
  }
  
  private function showData():void
  {
   var dpLen:int = _dataProvider.length;
   tf.text = ;
   for(var i:int = 0; idpLen; i++)
   {
tf.text += _dataProvider.getItemAt(i).firstName+\n;
   }
  }
 
 }
}

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 




[flexcoders] Re: RSS feed update

2008-02-04 Thread caffeinewabbit
If it's traditional RSS content, then you'll have to add some sort of
polling to the system that checks for changes in the feed over a
certain interval. RSS is not push technology, so your client has no
way of being notified when or if the feed updates.

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

 
   Hello,
 
   I am populating a datagrid from a RSS link.
   My grid is updated only if I manually
   (with a button click event) resend the
   httpservice request. How can I update
   the datagrid as the RSS content changes 
   without sending the HttpService manually?
 
   Thanks





[flexcoders] newbie: pushing data changes back to server

2008-02-04 Thread andrew_sinning
I've been working with Flash in AS2 for quite a while, but so far I've
only just worked through the tutorials in Flex.  The examples show how
to display xml data.  Now I need to modify data, add records (nodes),
and post changes back to the server.

In one of the examples, the data in an rss feed is displayed in a
DataGrid.  When you select a row in the DataGrid a detail about the
selectedItem are displayed in a TextArea using data-binding.

Let's assume that the data is something other than an RSS feed, e.g. a
list of dogs at a kennel.

So, how do I make changes to the text in the TextArea get bound back
to the selectedItem in the DataGrid?

How do I add a new item to the data in the DataGrid?

How do I push these changes back to the server?

I know I'm asking a lot, but I'm itching to get started and I'm just
stuck.

Thanks!





[flexcoders] Re: Getting the base parameter of the embed

2008-02-04 Thread Steve Mathews
I found what feels like a hack way of doing this. Still interested in
any other ideas.

The way I am doing it for now is by loading a swf and getting the path
from the url property of the contentLoaderInfo. Then I parse out the
part of the path that I need. This seems like it will be easily
broken, so I would like to find a better way.

On 1/31/08, Steve Mathews [EMAIL PROTECTED] wrote:
 Is there any way to get the base parameter of the object/embed code
 from within my flex app?

 So for example, if I set my base to http://www.example.com/test; and
 my swf is actually hosted at http://www.example.com/shared;. Is there
 any built-in or easy way of getting the base prop?



[flexcoders] default Image dimensions

2008-02-04 Thread Devin Holloway
Normally, when using the Image class, if you omit the dimensions, Flex 
will default the image to its real width/height. However, I'm running 
into a situation in that Flex is defaulting the dimensions to 0,0 (if 
omitting explicit dimensions). Has anyone else ever encounted this 
issue?

As for some general details of its useage, I'm instantiating a new 
instance of the Image() class (rather then using the mx:Image tag), 
and it's being used as private class variable in a custom container 
(based off the Container class).  The image is being defined as a class 
variable and then instantiated with its source in the createChildren() 
method.

Being as though this is a runtime image (and therefore won't know and 
won't be able to hardcode the dimensions), I'm having to listen for the 
image load complete event to detect what the dimensions should be, and 
then set them explicitly.  This works, but I'd like to find out why the 
default sizing behavior isn't working correctly.




[flexcoders] Re: Event Propigation

2008-02-04 Thread brett.hitzel
Update

I was thinking that maybe the reason the below did not work was because
I was adding the event listener before the object was added to the
display, so I moved the event handler addition after adding modContainer
to workspace_canvas. Unfortunately that did not help. Updated function
follows:

private function moduleLoadComplete(event:ModuleEvent):void
{
   // The module itself as a Display Object.
   var visual:DisplayObject = event.module.factory.create() as
DisplayObject;
   // The module container.
   var modContainer:ModuleWrapper = new ModuleWrapper();
   modContainer.id = module_container + this._moduleIndex;
   // Add module to the container.
   modContainer.addChild(visual);
   // Add module container to workspace canvas.
   root_canvas.workspace_canvas.addChild(modContainer);
   // Add event listeners to the modContainer.
  
modContainer.addEventListener(profileDataUpdated,profileDataUpdatedHan\
dler);
   this._moduleIndex++;
}

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

 Thanks for the reply and apologies for the late response.

 Unfortunately, your second idea may not be practical in my application
 as it will only be certain modules listening for these events (what
 modules listen to what events would be determined at load time as an
XML
 configuration file is loaded).

 I have tried your other idea, setting the event listener on the module
 as it is being dynamically created and then dispatching the event from
 the parent, unfortunately that did not seem to work. Code samples
below:

 RootApplicationFunctions.as(script included on root most application
 file so this would be the parent application)
 * NOTE: This function is a couple functions down the chain,
originating
 from a loop which is iterating over the XML configuration file. It
tells
 the applications what modules to load. *
 private function moduleLoadComplete(event:ModuleEvent):void
 {
// The module itself as a Display Object.
var visual:DisplayObject = event.module.factory.create() as
 DisplayObject;
// The module container.
var modContainer:ModuleWrapper = new ModuleWrapper();
modContainer.id = module_container + this._moduleIndex;
// Add event listeners to the modContainer.


modContainer.addEventListener(profileDataUpdated,profileDataUpdatedHan\
\
 dler);
// Add module to the container.
modContainer.addChild(visual);
// Add module container to workspace canvas.
root_canvas.workspace_canvas.addChild(modContainer);
this._moduleIndex++;
 }

 private function sendEvent():void
 {
  dispatchEvent(new Event(profileDataUpdated));
 }

 I did know if it would be looking for profileDataUpdatedHandler in the
 parentApplication or in the moduleWrapper as file itself, so at
present
 this function exists in both spots:

 public function profileDataUpdatedHandler(event:Event):void
 {
  Alert.show(module container heard the event:  +
 event.target.toString());
 }

 RootApplication.mxml (this is the file which includes
 RootApplicationFunctions.as above)
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  xmlns:view=view.*
  layout=absolute
  width=100%
  height=100%
  creationComplete=rootApplicationInit()

  mx:Style source=asset/style/CommunityUI.css /

  mx:Script source=RootApplicationFunctions.as /

  mx:XML id=OEMConfiguration source=xml/oemConfiguration.xml
/

  view:RootCanvas id=root_canvas /
  mx:Button click=sendEvent() /
 /mx:Application


 As of yet, I have not been able to get this to work. If I click on the
 button on the root, it does fire sendEvent(), but module being loaded
is
 not responding (technically it is the ModuleWrapper listening, but the
 ModuleWrapper passes instructions to the module contained within).

 I have other options available to me I suppose, however this is the
way
 I would like to do it because it seems like the cleanest way.

 --- In flexcoders@yahoogroups.com, phipzkillah phil@ wrote:
 
  It's possible.
 
  Main.mxml
  //script
  private function init():void{
   child1.addEventListener(change,
 callBackFunction);
   }
 
   private function dispatchEventsToChildren():void{
   //call this to dispatch an event
   dispatchEvent(new Event(change));
   }
 
  //or do it this way
   private function
controlChildren(event:ItemClickEvent):void{
   child1.publicFunctionUpdateData(args);
   }
 
 
  //body
  com:child1 id=child1/
  mx:DateField change=controlChildren(event)/
 
 
  Child1.mxml
  Some component you have...
 
 
  --- In flexcoders@yahoogroups.com, brett.hitzel brett.hitzel@
  wrote:
  
   Hi Everyone,
  
   I have been charged to architect a fairly large scale Flex
 

[flexcoders] mx:Tile changing its height unfavorably

2008-02-04 Thread Seth Caldwell
So I have an mx:Tile element whose width is 100% and height is unspecified.
I want its height to grow as needed as I addChild(uicomponent). (after it
fills up the first row it will make a second row and increase its height).

However, It uses up about half the width and when I add another element, its
height doubles for no apparent reason. 

 

Quick ascii example:

After two addChild()

--
00  00
--

 

After three

--

00  00  00

--


this leaves a large unused portion of my app right in the middle of the
screen, and it annoying. Perhaps I am using the Tile component incorrectly?
Should I be using some other component to accomplish this?

Any help is appreciated.

 

 

Seth



[flexcoders] mx:Tile changing its height unfavorably

2008-02-04 Thread Seth Caldwell
(sorry for previous 'hijacking' - I was unaware that replying to messages
somehow hijacked the thread, I thought it was based on subject of the
message)

So I have an mx:Tile element whose width is 100% and height is unspecified.
I want its height to grow as needed as I addChild(uicomponent). (after it
fills up the first row it will make a second row and increase its height).

However, It uses up about half the width and when I add another element, its
height doubles for no apparent reason. 

 

Quick ascii example:

After two addChild()

--
00  00
--

 

After three

--

00  00  00

--


this leaves a large unused portion of my app right in the middle of the
screen, and it annoying. Perhaps I am using the Tile component incorrectly?
Should I be using some other component to accomplish this?

Any help is appreciated.

 

 

Seth

 

 

 



[flexcoders] Re: Fail to apply UITextFormat to UITextField in custom Component

2008-02-04 Thread ndkamp
 Styles can override text formating when the parent of a UITextField is
 invalidated, but only having some formatting overridden is a little
weird.

no, all of the formatting is overridden.

 Functionality for setting format based on style is in the
UITextField class,
 I think the function is validateNow()

thanks dan, that pointed me to the right direction. I traced
validateNow() in UITextField where the format is set using styles -
overriding all of the formatting that might have been applied using
UITextFormat. I did toggle styleChangedFlag to false and voilà - all
the formatting using UITextFormat were applied. Now I have the choice
to extend UITextFormat and to override validateNow() or just use
Styles for all the formatting and forget about UITextFormat, which is
probably the recommended way - just getting started with flex you see.

thanks again, solved.

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

 Styles can override text formating when the parent of a UITextField is
 invalidated, but only having some formatting overridden is a little
weird.
 Functionality for setting format based on style is in the
UITextField class,
 I think the function is validateNow(), but I not 100% certain about
that.
 For future reference, I asked about font type because embeding fonts
 incorrectly could account for the described behavior (as I originally
 understood it), and the rendering engine for device fonts (in very
few and
 specific cases) also has its own quirks.
 
 - Dan Freiman
 
 On Feb 4, 2008 10:53 AM, ndkamp [EMAIL PROTECTED] wrote:
 
ok, I found that if i wrap the textField in a sprite and add this in
  createChildren, then formatting will be applied correctly:
 
  var wrapper:Sprite = new Sprite();
  wrapper.addChild(txt);
  this.addChild(wrapper);
 
  Well, i'm not really comfortable with this but I think I need to look
  closer at styles, since formats seem to get overriden when a TextField
  is add directly to the component...?
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
ndkamp
  ndkamp@ wrote:
  
   dan, thanks for your answer. I'm using device and/or embedded fonts,
   but right here I don't really care about the fonts. I'm just puzzled
   why the formatting doesn't seem to work for me. I'm using
UITextFormat,
   because of the options it gives me with anti-aliasing and
measuring. A
   I tried using TextFormat but that wont help. I did not look at
styling
   and skinning, so I'm not sure if the formats get overriden by styles
   in a later stage by the framework.
  
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  Daniel Freiman FreimanCQ@ wrote:
   
Are you using embeded or device fonts? Also, is there a reason
  you are
using UITextFormat instead of TextFormat? Even when using with a
UITextField, 99% of the time using UITextFormat instead of
  TextFormat is
unnecessary and makes thing more complicated.
   
- Dan Freiman
   
On Feb 4, 2008 9:22 AM, ndkamp ndkamp@ wrote:
   
 Thanks for your answer. I know the text and orange background
   are ok,
 but the formats won't show. Are you really getting bold
text, what
 about the size and color? what if you add:

 format.italic = true,
 format.underline = true;
 format.font = Georgia;

 Do they show? can't get the formats to work. Im using flex beat
  3 btw.
 thanks.

 --- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com, 
 shrikant.patil gt_shrikant@

 wrote:
 
 
  hi,
 
  i have tested u r file i got a orange backgrounded,
vardana,
 bold text
  saying that : The quick brown Fox...
 
  i hope it is working fine...
 
 
  ndkamp wrote:
  
   I try to apply UITextFormat to an UITextField in a custom
   component
   but the new format won't show. what am i doing wrong?
  
   package tests.components
   {
   import flash.text.TextLineMetrics;
   import mx.core.UIComponent;
   import mx.core.UITextField;
   import mx.core.UITextFormat;
  
   public class TestCustomComponent extends UIComponent
   {
   private var txt:UITextField;
  
   public function TestCustomComponent()
   {
   super();
   }
  
   /*
   * Create the TextField add some TextFormat and add it to
   * the displayList.
   */
   override protected function createChildren():void {
   super.createChildren();
  
   //Use TextFormat and apply some formats
   var format:UITextFormat = new
UITextFormat(this.systemManager);
   format.font = Verdana;
   format.bold = true;
   format.color = 0x804020;
   format.size = 20;
  
   //The TextField that should be formated
   txt = new UITextField();
  
   //The documentation says TextFormat won't be applied
   //when a styleSheet is in use, naive 

Re: [flexcoders] Creating a slider like msnbc

2008-02-04 Thread Sherif Abdou
never mind, i need to think before i type. use the ItemRenderer on the 
HorizontalList and it should work.


- Original Message 
From: Sherif Abdou [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 2:40:01 PM
Subject: Re: [flexcoders] Creating a slider like msnbc

try the TileList


- Original Message 
From: flex_dba bryanmurtha@ yahoo.com
To: [EMAIL PROTECTED] ups.com
Sent: Sunday, February 3, 2008 2:53:43 PM
Subject: [flexcoders] Creating a slider like msnbc


Hello,

I am trying to create a slider like what is available from msnbc, 
I'm wondering if I can use a Horizontal Scrollbar but when I try to 
assign an array of images to it, I get back the image names and not 
the images themselves. 

http://www.msnbc. msn.com/id/ 21134540/ vp/22977407# 22977679

mx:HorizontalList x=19 y=121 width=411
mx:Image source=../Assets/ GreenLogo. png 
id=tree1 width=120 height=100 / 
mx:Image source=../Assets/ GreenText. png 
width=120 height=100 /
mx:Image source=../Assets/ GreenLogo. png 
id=tree2 width=120 height=100 / 
mx:Image source=../Assets/ GreenText. png 
width=120 height=100 /
mx:Image source=../Assets/ GreenLogo. png 
id=tree3 width=120 height=100 / 
mx:Image source=../Assets/ GreenText. png 
width=120 height=100 /

/mx:HorizontalList 







Looking for last minute shopping deals? Find them fast with Yahoo! Search. 



  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: [flexcoders] Databinding in component

2008-02-04 Thread Scott Melby

Jason -

Clicking the button will generate a collection change event, but will 
not trigger data binding because the value of _dataProvider is not 
changing (no assignment is being made to the _dataProvider member).  If 
you want to know when items are added to/removed from the collection you 
will need to listen for events as follows.


public function set dataProvider (_dp:ArrayCollectio n) :void
 {
  _dataProvider = _dp;
  
  //listen for collection change events, use weak references so we 
don't cause a leak
  _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, 
handleCollectionChanged, false, 0, true);

  showData();
  trace(databinding triggered)
 }

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com



Sherif Abdou wrote:
you could always just do nameOfComponent.dataProvider = fakedata and 
that work but i dont know if that is what you are looking for.


- Original Message 
From: Merrill, Jason [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 1:50:32 PM
Subject: [flexcoders] Databinding in component

*Why does the button click below not trigger databinding in the 
component (i.e. automatic call of set dataprovider) ?* 
 
Here is my test case:
 
//MXML:

?xml version=1.0 encoding=utf- 8?
mx:Application
 xmlns:mx=http://www.adobe. com/2006/ mxml 
http://www.adobe.com/2006/mxml xmlns:c=components .*

 layout=absolute
 applicationComplete =init() 
 mx:Script
 ![CDATA[
  import mx.collections. ArrayCollection;

  [Bindable]

  public var fakeData:ArrayColle ction;

  private function init():void

  {
   fakeData = setFakeData( );
  }

  private function setFakeData( ):ArrayCollectio n
  {
   var fd:ArrayCollection = new ArrayCollection( );
   fd.addItem({ firstName: David, lastName:Branson });
   fd.addItem({ firstName: Ned, lastName:Davidson });
   fd.addItem({ firstName: Sally, lastName:Peterson });   
   return fd;

  }
  
  private function changeData() :void

  {
   fakeData.addItem( {firstName: Jason, lastName:Merrill }); 
  }
  
 ]]

 /mx:Script
 c:BindableListText dataProvider= {fakeData}  /
 mx:Button x=100 label=change data click=changeData( )/
/mx:Application
/*== = = = = * /
//Component:
 
package components

{
 import flash.events. Event;
 import mx.controls. TextArea;
 import mx.collections. ArrayCollection
 import mx.core.UIComponent ;
 
 public class BindableListText extends UIComponent

 {
  [Bindable]
  private var _dataProvider: ArrayCollection;
  private var tf:TextArea;
  
  public function BindableListText( )

  {
   tf = new TextArea();
   tf.height = 400;
   tf.width = 400;
   addChild(tf)
  }
  
  public function set dataProvider (_dp:ArrayCollectio n) :void

  {
   _dataProvider = _dp;
   showData();
   trace(databinding triggered)
  }
  
  private function showData():void

  {
   var dpLen:int = _dataProvider. length;
   tf.text = ;
   for(var i:int = 0; idpLen; i++)
   {
tf.text += _dataProvider. getItemAt( i).firstName+ \n;
   }
  }
 
 }

}

Jason Merrill
*Bank of America *
GTO LLD Solutions Design  Development
eTools  Multimedia

*Bank of America Flash Platform Developer Community*





Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
it now. 
http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20 

 


Re: [flexcoders] JAXB POJO to Action Script VO

2008-02-04 Thread Jhonny Everson
Just correcting myself. I DON'T think we can bind internal classes in
actionscript.

On Feb 4, 2008 5:36 PM, Jhonny Everson [EMAIL PROTECTED] wrote:

 Hi,

 I'm using JAXB to generate POJOs too, it's working fine. I have even
 written an Air application to automatically generate actionscript code from
 Java generated code. You must have a look at jaxb annotations to solve the
 problem of custom code.

 Some tips:

 Use the following annotation on root of your schema to make the xjc to
 generate ArrayList instead of vectors, and (optionally) define a java
 package.
 xs:annotation
 xs:appinfo
 jxb:serializable/
 jxb:globalBindings collectionType=java.util.ArrayList
 /jxb:globalBindings
 jxb:schemaBindings
 jxb:package name=br.al.gov.bou.modelo/
 /jxb:schemaBindings
 /xs:appinfo
 /xs:annotation

 As i'm using Red5, the data binding requires all pojos to have all gets
 and sets, so if it's your case use JAXB 2.1 Collection setter Injector
 Plugin (https://jaxb2-commons.dev.java.net/collection-setter-injector/)
 because xjc only generate getter methods on collections.

 Another important thing is the use of complexType in EVERYTHING, to avoid
 java internal classes generation. I think we can bind internal classes in
 actionscript.

 Hope i've helped. If you are interested in the application to generate
 actionscript from java code say so that i'll send to you.


 --
 Jhonny Everson




-- 
Jhonny Everson


Re: [flexcoders] JAXB POJO to Action Script VO

2008-02-04 Thread Jhonny Everson
Hi,

I'm using JAXB to generate POJOs too, it's working fine. I have even written
an Air application to automatically generate actionscript code from Java
generated code. You must have a look at jaxb annotations to solve the
problem of custom code.

Some tips:

Use the following annotation on root of your schema to make the xjc to
generate ArrayList instead of vectors, and (optionally) define a java
package.
xs:annotation
xs:appinfo
jxb:serializable/
jxb:globalBindings collectionType=java.util.ArrayList
/jxb:globalBindings
jxb:schemaBindings
jxb:package name=br.al.gov.bou.modelo/
/jxb:schemaBindings
/xs:appinfo
/xs:annotation

As i'm using Red5, the data binding requires all pojos to have all gets and
sets, so if it's your case use JAXB 2.1 Collection setter Injector Plugin
(https://jaxb2-commons.dev.java.net/collection-setter-injector/) because xjc
only generate getter methods on collections.

Another important thing is the use of complexType in EVERYTHING, to avoid
java internal classes generation. I think we can bind internal classes in
actionscript.

Hope i've helped. If you are interested in the application to generate
actionscript from java code say so that i'll send to you.


-- 
Jhonny Everson


[flexcoders] Re: Object is Null? How can it be if it's a component in main.mxml. No access

2008-02-04 Thread Tracy Spratt

ViewStack children are not instantiated(do not exist) until they are
explicitly navigated to.  Avoid creationPolicy=all whenever possible.

Tracy


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

 Actually now that I look the snippet I wrote was wrong. I have my
indices starting at 0 and go to 2.

 The block if index == 2 executes and I still can't access
application.com3mgetData() unless there is a delay involved.

 How would the creation policy effect this?


 Sent via BlackBerry from T-Mobile

 -Original Message-
 From: Dealy, Brian [EMAIL PROTECTED]

 Date: Sun, 3 Feb 2008 12:34:58
 To:flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: Object is Null? How can it be if it's a
component in main.mxml. No access


 Viewstack's children index is zero based, so you need to start at
zero and go to two

  if(indexHit == 0){
  Application.application.com1.getData();
  }else if(indexHit==1){
  Application.application.com2.getData();
  }else if(indexHit==2){
  //THIS FAILS
  Application.application.com3.getData();
  }else{
  //nothing
  }


 I hope this helps!
 regards,
 brian



 Brian Dealy
 Vice President - Technology
 SAIC Technical Fellow
 Science Application International Corp.
 San Diego, CA






 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Damien Legros
 Sent: Sunday, February 03, 2008 3:45 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Object is Null? How can it be if it's a
component in main.mxml. No access




 Check the viewstack creationPolicy property :)

 --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
ups.com, phipzkillah phil@ wrote:
 
  I have a toggle bar that's data provider is a viewstack.
  When I click on the toggle bar an event is dispatched that my
controller
  is listening for.
 
  My controller can access com1, com2, but always gives me a null
pointer
  exception on com3.
  All components are identical.
 
  I just wrote this off the top of my head. So syntax might be off a
bit
  and I only included the core functionality stripped down to
demonstrate
  my issue.
 
  Any thoughts?
 
 
  Main.mxml
  //script
  import CustomClass();
 
  protected var controller:CustomClass;
  private function init():void{
  controller = new CustomClass();
  }
 
  //body
  togglebar click=controller.doSomething(event)
dataprovider=vs1/
 
  viewstack id=vs1
  com1: id=com1/
  com2: id=com2/
  com3: id=com3/
  /viewstack
 
  CustomClass.as
  //Controller
 
  public function doSomething(event:ItemClickEvent):void{
  var indexHit:int = event.index;
  if(indexHit == 1){
  Application.application.com1.getData();
  }else if(indexHit==2){
  Application.application.com2.getData();
  }else if(indexHit==3){
  //THIS FAILS
  Application.application.com3.getData();
  }else{
  //nothing
  }
  }
 






RE: [flexcoders] Re: Keyboard navigation to objects within components

2008-02-04 Thread Alex Harui
Editable=true?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of simonjpalmer
Sent: Monday, February 04, 2008 4:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Keyboard navigation to objects within
components

 

seems like you want to tab through the columns of the selected row, I
have not seen any way of doing that

an somewhat inelegant brute force method would be to define shortcuts
to the buttons in your columns and trap those shortcuts as key presses
in the component, check which row is selected, get the link and spoof
a button press performing whatever action was under the original button.

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

 I'm having a number of issues in my application regarding keyboard
 navigation and selection of objects within other components. For
 example, in a datagrid I have, two of the columns' are displayed as
 link buttosn, each of which is contained in a vbox within an item
 renderer. 
 
 The problem is that the application will allow me to tab to the data
 grid in question, and then use the up/down arrows to select particular
 rows, but there seems to be no way that I can think of that will allow
 me to select the individual link buttons within each row.
 
 Has anybody any ideas? Any help would be greatly appreciated.
 
 Thanks
 Danny


 



[flexcoders] Resize flex app swf in browser

2008-02-04 Thread pitziilu
Hello.

I just wrote an app that layouts this size : 1200x800, with images and
components that have a fixed size.

What can I do so that when I can embed this swf in an html file, and
give the swf different size, let's say 800x600, but I will also be
able to view everything on the stage.. so the entire swf will scale to
the small dimensions?

PS: I tried so many things, but the only thing it does is that is
cropping my swf to the new dimensions.



[flexcoders] Re: Embedding String Variable in dataprovider name

2008-02-04 Thread jer_ela
you can use a method to get around that

dataProvider={getDp(chartXML2.lastResult, month)}

private function getDp(lastResult:Object, month:String):String
{ return lastResult[month].day;
}

The method will be called when ever one of it parameters is changed

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

 That worked!
  
 I still get the following warning:
  
 Data binding will not be able to detect changes when using square
 bracket operator. For Array, please use ArrraCollection.getItemAt()
 instead.
  
 But it still works. 
  
 brad
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jer_ela
 Sent: Friday, February 01, 2008 3:01 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Embedding String Variable in dataprovider name
 
 
 
 If you use the square brackets then you don't use the dot so it should
 be:
 
 dataProvider={chartXML2.lastResult[month].day}
 
 --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com, Maciek Sakrejda msakrejda@ wrote:
 
  I'm no e4xpert, but
  
  dataProvider={chartXML2.lastResult.[month].day}
  
  should do it.
  
  -- 
  Maciek Sakrejda
  Truviso, Inc.
  http://www.truviso. http://www.truviso.com com
  
  -Original Message-
  From: brad.bueche brad@
  Reply-To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com
  To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] Embedding String Variable in dataprovider name
  Date: Fri, 01 Feb 2008 15:40:25 -
  
  Really what I need to be able to do is insert the variable name in
 this:
  
  dataProvider={chartXML2.lastResult.month.day}
  
  I need to replace the month with a string variable name (i.e public
  var monthName = January;)
  
  I also need to do the same for the categoryfield as it will not let me
  do categoryfield=$String.
  
  In PHP this is incredibly easy to do. You just say blah=$string . In
  fact, in PHP you can embed variable names everywhere. Its very
  powerful. For instance, in php, for the dataprovider issue above, i'd
  just do
  
  dataProvider={chartXML2.lastResult.$StringName.day}
  
  and it'd work just fine. Whats the syntax for doing this in Flex?
 





RE: [flexcoders] Targeting from components

2008-02-04 Thread Merrill, Jason
I think you should instead have your custom component broadcast an
event, and have a listener in your main application listen for it and
respond, making the change to your app.
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 





[flexcoders] Targeting from components

2008-02-04 Thread so_osverg
Hi,
I'm having problems assigning an event handler (click) to a list item in a 
custom components 
nested inside the main application. Basically, I have my custom component which 
needs to 
call an event handler (written in AS3) which is located within the code of the 
main timeline. 
I'm a beginner so I'm not sure if it's a problem with the structure of my 
application or if I'm 
missed something which would enable me target the main application from a 
nested 
component or even a component nested inside another component nested in the 
main 
application. 
Breaking down the application into smaller pieces did make things more 
manageable, easier 
to code, and overall work with; until now. 
 Please help a newbie become less noob-like. 



Re: [flexcoders] Strange behavior....

2008-02-04 Thread Sherif Abdou
anything other than 0 is false and i think Boolean's use strict equalities === 
so false is not the same as false.toString()


- Original Message 
From: Marvin Froeder [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 2:00:48 PM
Subject: [flexcoders] Strange behavior

I'm making some test with Boolean Flex cast.


See:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute
initialize=main()

mx:Script
![CDATA[
private function main():void {
trace(Boolean:  + Boolean(true));
trace(Boolean:  + Boolean(false));
}
]]
/mx:Script
/mx:Application


I expect true and false on console.

But I got:
[SWF] C:\framework\ workspace\ CobaiaFlex\ bin\BooleanTest. swf - 445.501 bytes 
after decompression
Boolean: true
Boolean: true


What happened?


Marvin




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: [flexcoders] mx:Tile changing its height unfavorably

2008-02-04 Thread Sherif Abdou
um, no idea on this but maybe check the padding on the items


- Original Message 
From: Seth Caldwell [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 12:57:19 PM
Subject: [flexcoders] mx:Tile changing its height unfavorably

So I have an mx:Tile element whose width is 100% and height is unspecified. I 
want its height to grow as needed as I addChild(uicomponen t). (after it fills 
up the first row it will make a second row and increase its height).
However, It uses up about half the width and when I add another element, its 
height doubles for no apparent reason. 
 
Quick ascii example:
After two addChild()
 --
00  00
 --
 
After three
 --
00  00  00

 --

this leaves a large unused portion of my app right in the middle of the screen, 
and it annoying. Perhaps I am using the Tile component incorrectly? Should I be 
using some other component to accomplish this?
Any help is appreciated.
 
 
Seth



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: [flexcoders] Re: How to deep copy an ArrayCollection?

2008-02-04 Thread Sherif Abdou
use the ObjectUtil Class instead


- Original Message 
From: yigit [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 6:03:21 AM
Subject: Re: [flexcoders] Re: How to deep copy an ArrayCollection?

this will work for just one level of depth.
i mean, if your item has a reference to another object in the model, you 
will just clone the item not the object so you will have two items 
referencing the same object.

i had this issue and developed a system for this. All my object can be 
serialized to xml and
deserialized from xml. by the way xml generation process is 
recursive.(when an item's toXML method is called it also calls it's 
children' toXML methods)
this give 100% copy.

it may be seemed a bit hard, you may start with learning XSD (xml schema 
definition)

by the way, i just realized that the same recursive approach can be 
applied using byteArrays.

Stephen Allison wrote On 02/04/2008 01:38 PM:

  In my application I am using ArrayCollections to store data for series
  on a line chart. I need to be able to make a deep copy of these
  ArrayCollections so that I can make changes to the data in the copies
  without affecting the original data.

 IIRC you can write the whole lot into a ByteArray, which serialises it as
 AMF in memory, and then read it back out again. Classes in your array 
 need
 [RemoteClass] in order to get correctly typed objects back.

 ie.
 var ba:ByteArray = new ByteArray();
 ba.writeObject( yourData) ;
 var newCopy = ba.readObject( );

 Stephen

 





  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

RE: [flexcoders] Re: Event Propigation

2008-02-04 Thread Gordon Smith
You appear to be dispatching the event from the Application but
listening for it on a ModuleWrapper which is some descendant of the
Application. That's not how events work. Unless you use the capture or
bubble phases, you have to register on the object which is dispatching
the event. And if you do use the capture or bubble phases, you have to
listen on an ancestor of the object which is dispatching the event.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of brett.hitzel
Sent: Monday, February 04, 2008 11:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Event Propigation



Update

I was thinking that maybe the reason the below did not work was because
I was adding the event listener before the object was added to the
display, so I moved the event handler addition after adding modContainer
to workspace_canvas. Unfortunately that did not help. Updated function
follows:

private function moduleLoadComplete(event:ModuleEvent):void
{
  // The module itself as a Display Object.
  var visual:DisplayObject = event.module.factory.create() as
DisplayObject;
  // The module container.
  var modContainer:ModuleWrapper = new ModuleWrapper();
  modContainer.id = module_container + this._moduleIndex;
  // Add module to the container.
  modContainer.addChild(visual);
  n! bsp;   // Add module container to workspace canvas.
  root_canvas.workspace_canvas.addChild(modContainer);
  // Add event listeners to the modContainer.
 
modContainer.addEventListener(profileDataUpdated,profileDataUpdatedHan
dler);
  this._moduleIndex++;
}

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

 Thanks for the reply and apologies for the late response.
 
 Unfortunately, your second idea may not be practical in my application
 as it will only be certain modules listening for these events (what
 modules listen to what events would be determined at load time as an
XML
 configuration file is loaded).
 
 I have tried your other idea, setting the event listener on the mo!
dule
 as it is being dynamically created and then dispa! tching t he event
from
 the parent, unfortunately that did not seem to work. Code samples
below:
 
 RootApplicationFunctions.as(script included on root most application
 file so this would be the parent application)
 * NOTE: This function is a couple functions down the chain,
originating
 from a loop which is iterating over the XML configuration file. It
tells
 the applications what modules to load. *
 private function moduleLoadComplete(event:ModuleEvent):void
 {
 // The module itself as a Display Object.
 var visual:DisplayObject = event.module.factory.create() as
 DisplayObject;
 // The module container.
 var modContainer:ModuleWrapper = new ModuleWrapper();
 modContainer.id = module_container + this._moduleIndex;
 // Add event listeners to the modContainer.
 ! 

modContainer.addEventListener(profileDataUpdated,profileDataUpdatedHan
\
 dler);
 // Add module to the container.
 modContainer.addChild(visual);
 // Add module container to workspace canvas.
 root_canvas.workspace_canvas.addChild(modContainer);
 this._moduleIndex++;
 }
 
 private function sendEvent():void
 {
 dispatchEvent(new Event(profileDataUpdated));
 }
 
 I did know if it would be looking for profileDataUpdatedHandler in the
 parentApplication or in the moduleWrapper as file itself, so at
present
 this function exists in both spots:
 
 public function profileDataUpdatedHandler(event:Event):void
 {
 Alert.show(module container heard the event:  +
 event.target.toString());
 }
 
 RootApplication.! mxm l (this is the file which includes
 RootApplicationFunctions.as above)
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 xmlns:view=view.*
 layout=absolute
 width=100%
 height=100%
 creationComplete=rootApplicationInit()
 
 mx:Style source=asset/style/CommunityUI.css /
 
 mx:Script source=RootApplicationFunctions.as /
 
 mx:XML id=OEMConfiguration source=xml/oemConfiguration.xml /
 
 view:RootCanvas id=root_canvas /
 mx:Button click=sendEvent() /
 /mx:Application
 
 
 As of yet, I have not been able to get th! is to work. If I click on
the
 button on the root, it does fire sendEvent(), but module being loaded
is
 not responding (technically it is the ModuleWrapper listening, but the
 ModuleWrapper passes instructions to the module contained within).
 
 I have other options available to me I suppose, however this is the
way
 I would like to do it because it seems like the cleanest way.
 
 --- In flexcoders@yahoogroups.com, phipzkillah phil@ wrote:
 
  It's possible.
 
  Main.mxml
  //script
  private function init():void{
  child1.addEventListener(change,
 callBackFunction);
  }
 
  private function dispatchEventsToChildren():void{
  //call this to dispatch an event
  dispatchE! vent(new Event(change));
  }  gt;
  //or do it this way
  private function 

[flexcoders] the flex RTE and xhtml

2008-02-04 Thread Derrick Anderson
anybody out there have anything that will take the html generated by the
flex richtexteditor and have it output valid XHTML (and back again)?  i've
found a few things googling but i have not found a good implementation yet.

thanks,
d.


RE: [flexcoders] Databinding in component

2008-02-04 Thread Merrill, Jason
No, that's not what I'm looking for, but thanks anyway.
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 



 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Sherif Abdou
Sent: Monday, February 04, 2008 3:33 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Databinding in component




you could always just do nameOfComponent.dataProvider = fakedata
and that work but i dont know if that is what you are looking for.


- Original Message 
From: Merrill, Jason [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 1:50:32 PM
Subject: [flexcoders] Databinding in component




Why does the button click below not trigger databinding in the
component (i.e. automatic call of set dataprovider) ?  
 
Here is my test case:
 
//MXML:
?xml version=1.0 encoding=utf- 8?
mx:Application 
 xmlns:mx=http://www.adobe. com/2006/ mxml
http://www.adobe.com/2006/mxml  xmlns:c=components .*
 layout=absolute 
 applicationComplete =init() 
 mx:Script
 ![CDATA[
  import mx.collections. ArrayCollection;
 
  [Bindable]
  public var fakeData:ArrayColle ction;
 
  private function init():void
  {
   fakeData = setFakeData( );
  }

  private function setFakeData( ):ArrayCollectio n
  {
   var fd:ArrayCollection = new ArrayCollection( );
   fd.addItem({ firstName: David, lastName:Branson });
   fd.addItem({ firstName: Ned, lastName:Davidson });
   fd.addItem({ firstName: Sally, lastName:Peterson });

   return fd;
  }
  
  private function changeData() :void
  {
   fakeData.addItem( {firstName: Jason, lastName:Merrill });

  }
  
 ]]
 /mx:Script
 c:BindableListText dataProvider= {fakeData}  /
 mx:Button x=100 label=change data click=changeData( )/
/mx:Application

/*== = = = = * /
//Component:
 
package components
{
 import flash.events. Event;
 import mx.controls. TextArea;
 import mx.collections. ArrayCollection
 import mx.core.UIComponent ;
 
 public class BindableListText extends UIComponent
 {
  [Bindable]
  private var _dataProvider: ArrayCollection;
  private var tf:TextArea;
  
  public function BindableListText( )
  {
   tf = new TextArea();
   tf.height = 400;
   tf.width = 400;
   addChild(tf)
  }
  
  public function set dataProvider (_dp:ArrayCollectio n) :void 
  {
   _dataProvider = _dp;
   showData();
   trace(databinding triggered)
  }
  
  private function showData():void
  {
   var dpLen:int = _dataProvider. length;
   tf.text = ;
   for(var i:int = 0; idpLen; i++)
   {
tf.text += _dataProvider. getItemAt( i).firstName+ \n;
   }
  }
 
 }
}

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 






Be a better friend, newshound, and know-it-all with Yahoo!
Mobile. Try it now.
http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i6
2sR8HDtDypao8Wcj9tAcJ  



 



Re: [flexcoders] Strange behavior....

2008-02-04 Thread Daniel Freiman
You are seeing correct behavior.  See:
http://livedocs.adobe.com/flex/201/langref/package.html#Boolean()

If you want to do what your code intends to do you have to check for the
string true manually:

(variable == true ? true : false);

- Dan Freiman


On Feb 4, 2008 3:00 PM, Marvin Froeder [EMAIL PROTECTED] wrote:

   I'm making some test with Boolean Flex cast.


 See:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 initialize=main()
 
 mx:Script
 ![CDATA[
 private function main():void {
 trace(Boolean:  + Boolean(true));
 trace(Boolean:  + Boolean(false));
 }
 ]]
 /mx:Script
 /mx:Application


 I expect true and false on console.

 But I got:
 [SWF] C:\framework\workspace\CobaiaFlex\bin\BooleanTest.swf - 445.501bytes 
 after decompression
 Boolean: true
 Boolean: true


 What happened?


 Marvin
  



RE: [flexcoders] PopUpButton not working in AIR Beta 3

2008-02-04 Thread Joan Lafferty
Jeff,

 

This sounds like this bug: https://bugs.adobe.com/jira/browse/SDK-14470.
Unfortunately, this bug was deferred for this release because we are at
the end of the cycle, but, there is a workaround in the bug to reset the
PopUpButton. HTH.  Please vote on this bug and it will get a higher
priority for getting fixed in the future.

 

Joan

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Sunday, February 03, 2008 9:40 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] PopUpButton not working in AIR Beta 3

 

I was able to get it to work if I took it out of a Panel container in
the module in question. Totally fubar.

-Original Message-
From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
Behalf Of Battershall, Jeff
Sent: Sunday, February 03, 2008 10:28 AM
To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] PopUpButton not working in AIR Beta 3

I'm still trying to identify the exact steps to re-create but suffice to
say, in my AIR application (which uses modules), the PopUpButton
component refuses to work. I'm doing things declaritively, with MXML
like this:

mx:PopUpButton x=500 y=10 label=Add Company width=220
openAlways=true
mx:popUp
mx:Canvas width=220 height=35 visible=true
backgroundColor=0xFF backgroundAlpha=1
horizontalScrollPolicy=off verticalScrollPolicy=off mx:TextInput
textAlign=left x=5 y=5 width=150 id=companyInput/ mx:Button
x=160 y=5 label=Add styleName=appButton/ 
/mx:Canvas
/mx:popUp 
/mx:PopUpButton

This is pretty vanilla code - of the type I have not seen issues with
elsewhere. So far its a complete mystery why this doesn't work - it
works fine in a test AIR app not using modules. Any input appreciated. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED] mailto:jeff.battershall%40dowjones.com 
(609) 520-5637 (p)
(484) 477-9900 (c)

--
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.com
http://www.mail-archive.com/flexcoders%40yahoogroups.com  
Yahoo! Groups Links

 



[flexcoders] Re: Resize flex app swf in browser

2008-02-04 Thread pitziilu
--- In flexcoders@yahoogroups.com, pitziilu [EMAIL PROTECTED] wrote:

 when I use the small fixed size for the app (800x600) and in
 creationComplete handler write : stage.scaleMode =
 StageScaleMode.SHOW_ALL; - I just get the the swf cropped.
 
 when I use scaleX=50; scaleY=50; nothing is showing on stage.. just
 the background color.


my mistake : I should have set the scaleX and scaleY with values
between 0 and 1 to get a smaller size :). So this worked with
scaleX,Y, but not with stageScaleMode.



[flexcoders] ActionScript multidimensional Associative array question

2008-02-04 Thread hworke


  Hello,

  I need to create a 3D array, first two dimensions
  are associative arrays and the 3rd one is indexed.
  
  Here is what I am trying to do:

  myArray[1992][February] -- this will generate an
  array of objects which will be used as dataprovider
  for my chart.

  BTW the number of elements are unknown, the number
  of Associative string are also unknown, so I do have
  to create the array dynamically. Please suggest or
  point me to an example. The example in http://livedocs.adobe.com
  was not enough for my inquiry.

  Regards



[flexcoders] Re: Resize flex app swf in browser

2008-02-04 Thread pitziilu
when I use the small fixed size for the app (800x600) and in
creationComplete handler write : stage.scaleMode =
StageScaleMode.SHOW_ALL; - I just get the the swf cropped.

when I use scaleX=50; scaleY=50; nothing is showing on stage.. just
the background color.



Re: [flexcoders] Databinding in component

2008-02-04 Thread Sherif Abdou
you could always just do nameOfComponent.dataProvider = fakedata and that work 
but i dont know if that is what you are looking for.


- Original Message 
From: Merrill, Jason [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 1:50:32 PM
Subject: [flexcoders] Databinding in component

Why does the button click below not trigger databinding in the component (i.e. 
automatic call of set dataprovider) ?  
 
Here is my test case:
 
//MXML:
?xml version=1.0 encoding=utf- 8?
mx:Application 
 xmlns:mx=http://www.adobe. com/2006/ mxml xmlns:c=components .*
 layout=absolute 
 applicationComplete =init() 
 mx:Script
 ![CDATA[
  import mx.collections. ArrayCollection;
 
  [Bindable]
  public var fakeData:ArrayColle ction;
 
  private function init():void
  {
   fakeData = setFakeData( );
  }

  private function setFakeData( ):ArrayCollectio n
  {
   var fd:ArrayCollection = new ArrayCollection( );
   fd.addItem({ firstName: David, lastName:Branson });
   fd.addItem({ firstName: Ned, lastName:Davidson });
   fd.addItem({ firstName: Sally, lastName:Peterson });
   return fd;
  }
  
  private function changeData() :void
  {
   fakeData.addItem( {firstName: Jason, lastName:Merrill }); 
  }
  
 ]]
 /mx:Script
 c:BindableListText dataProvider= {fakeData}  /
 mx:Button x=100 label=change data click=changeData( )/
/mx:Application

/*== = = = = * /
//Component:
 
package components
{
 import flash.events. Event;
 import mx.controls. TextArea;
 import mx.collections. ArrayCollection
 import mx.core.UIComponent ;
 
 public class BindableListText extends UIComponent
 {
  [Bindable]
  private var _dataProvider: ArrayCollection;
  private var tf:TextArea;
  
  public function BindableListText( )
  {
   tf = new TextArea();
   tf.height = 400;
   tf.width = 400;
   addChild(tf)
  }
  
  public function set dataProvider (_dp:ArrayCollectio n) :void 
  {
   _dataProvider = _dp;
   showData();
   trace(databinding triggered)
  }
  
  private function showData():void
  {
   var dpLen:int = _dataProvider. length;
   tf.text = ;
   for(var i:int = 0; idpLen; i++)
   {
tf.text += _dataProvider. getItemAt( i).firstName+ \n;
   }
  }
 
 }
}
Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 
Bank of America Flash Platform Developer Community 





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: [flexcoders] Strange behavior....

2008-02-04 Thread Sherif Abdou
meant anything other than 0 and false is true but it cant be false


- Original Message 
From: Marvin Froeder [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, February 4, 2008 2:00:48 PM
Subject: [flexcoders] Strange behavior

I'm making some test with Boolean Flex cast.


See:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute
initialize=main()

mx:Script
![CDATA[
private function main():void {
trace(Boolean:  + Boolean(true));
trace(Boolean:  + Boolean(false));
}
]]
/mx:Script
/mx:Application


I expect true and false on console.

But I got:
[SWF] C:\framework\ workspace\ CobaiaFlex\ bin\BooleanTest. swf - 445.501 bytes 
after decompression
Boolean: true
Boolean: true


What happened?


Marvin




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


[flexcoders] generate unique colors for per-item fill

2008-02-04 Thread nasawebguy
How do I generate a list of unique colors dynamically in AS? similar
to how Flex does in default charts, except in a per-item fill scenario?

CONTEXT
I want to color code an Hlist of categories to match the dot colors in
a per-item filled Plot Series.

I have an arrayCollection dataProvider that is a list of categories
[categoryid,category]. (number of categories is unknown/unlimited).
I'd like to generate a unique color number corresponding to each
category in the array and update that arrayCollection with the
generated color numbers.[categoryid,category,color]

I'd like to use this resulting [categoryid,category,color]
arrayCollection as a dataProvider to a horizontalList (dynamic legend
list) and a PlotChart per-item fill (Ifill) to color code the dots for
each category. User clicks on a color/cat in Hlist, filters the dots
for the selected category. Colors in the Hlist match the corresponding
colors in the plotchart.

I know how to color code the horizontalList, build the fillFunction,
and do the filterFunction...

but I don't know how to generate the unique colors (much like Flex
does for the default colors in charts) in a per-item fill scenario.

I'm assuming I'd loop through the arrayCollection of categories and
update the color dynamically using some color generator? The colors
need to be as unique as possible.

It would be cool if I could somehow use Flex's built-in default unique
colors for chart series in the per-item fill case?

I could create a color column in the category table in the database,
and store colors there for each one, but seems to me that AS might be
a better approach.

Thanks!
Don







Re: [flexcoders] Creating a slider like msnbc

2008-02-04 Thread Sherif Abdou
try the TileList


- Original Message 
From: flex_dba [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, February 3, 2008 2:53:43 PM
Subject: [flexcoders] Creating a slider like msnbc

Hello,

I am trying to create a slider like what is available from msnbc, 
I'm wondering if I can use a Horizontal Scrollbar but when I try to 
assign an array of images to it, I get back the image names and not 
the images themselves. 

http://www.msnbc. msn.com/id/ 21134540/ vp/22977407# 22977679

mx:HorizontalList x=19 y=121 width=411
mx:Image source=../Assets/ GreenLogo. png 
id=tree1 width=120 height=100 / 
mx:Image source=../Assets/ GreenText. png 
width=120 height=100 /
mx:Image source=../Assets/ GreenLogo. png 
id=tree2 width=120 height=100 / 
mx:Image source=../Assets/ GreenText. png 
width=120 height=100 /
mx:Image source=../Assets/ GreenLogo. png 
id=tree3 width=120 height=100 / 
mx:Image source=../Assets/ GreenText. png 
width=120 height=100 /

/mx:HorizontalList 





  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

RE: [flexcoders] Databinding in component

2008-02-04 Thread Merrill, Jason
_dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE,
handleCollectionChanged, false, 0, true);
 
Thanks Scott, exactly what I was looking for!
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 




  1   2   >