[flexcoders] Re: xml to e4x Help Please!!!

2007-05-05 Thread b_alen
The example that you pasted contains errors and there's no XML
provided. Please send a compilable simplified example. Btw, I'm using
E4X by just loading XML with URLLoader and then typing the result as
XML. It's brilliant. 

Alen


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

 Hello everyone, I am trying to select checkboxes in a datagrid where
 needed. In addition, when the user clicks on the name the checkbox on
 the side will be selected depending on the xml tag is set to true or
 false.  I am having trouble because I am not familiar with how to
 handle xml when converted to e4x format in my HTTPService on which I
 call the datagrid's data through an XMLListCollection.  Could someone
 please guide me in the right direction?  Below is what I've coded so
 far, not too difficult.
 
 Thank You
 Sal
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical creationComplete=init()
   
   mx:Script
   ![CDATA[
   public function init():void{
   catalog.send();
   }
   ]]
   /mx:Script
   
   mx:HTTPService id=catalog url=data/catalog.xml useProxy=false 
   result=(catalog.lastResult.catalog.product) 
 resultFormat=e4x/
   
   mx:XMLListCollection id=xlc source={catalog.lastResult.product}/
   
   mx:HBox
   mx:CheckBox selected={grid.selectedItem.brand} label=In 
 Stock/
   
   mx:Panel width=100% height=100% title=Part Numbers
   mx:DataGrid id=grid width=100% height=100% 
 showHeaders=false
   dataProvider={xlc} textAlign=center
   mx:columns
   mx:DataGridColumn
   mx:itemRenderer
   mx:Component
   mx:Canvas
   mx:LinkButton 
 label={data.name}/
   /mx:Canvas
   /mx:Component
   /mx:itemRenderer
   /mx:DataGridColumn
   mx:DataGridColumn
   mx:itemRenderer
   mx:Component
   mx:Canvas
   mx:CheckBox 
 selected={data.brand} label=On Sale/
   /mx:Canvas
   /mx:Component
   /mx:itemRenderer
   /mx:DataGridColumn
   /mx:columns
   /mx:DataGrid  
   /mx:Panel
   /mx:HBox
 /mx:Application





[flexcoders] Setting the styles to Text .htmlText at runtime

2007-05-05 Thread b_alen
I have a string that goes somthing like this:

var str:String = p class=\H1\section/p;
var str:String += p class=\TXT\main text/p;

and then I populate the Text component like this:

txtPage.htmlText = str;

Now, I want to add styles to this text through class attributes that I
provided in the HTML. In Flash 8 this is pretty straightforward but I
couldn't figure out how to do it in Flex. 

In Flash I would create a StyleSheet, then add some styles with
setStyle(), and finaly assign a StyleSheet to TextField.

In Flex, I tried something similar but it didn't work. I did this:

var style:StyleSheet = new StyleSheet();
style.setStyle(.H1,{fontWeight:bold});
style.setStyle(.TXT,{color:#FF});

txtPage.styleName = style;

It didn't work, then I tried:

var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration();
newStyleDeclaration.setStyle(.TXT, {color:#FF});
newStyleDeclaration.setStyle(.H1, {fontWeight:bold});
StyleManager.setStyleDeclaration(.style1, newStyleDeclaration, true);


txtBook.styleDeclaration = newStyleDeclaration; // didn't work
txtBook.styleDeclaration =
StyleManager.getStyleDeclaration(.style1); // didn't work

Then finally I tried this:

txtPage.setStyle(.H1,{fontWeight:bold, textAlign:center});
txtPage.setStyle(.TXT,{color:#FF});

For all the options I tried both the .H1 and the H1 style syntax
(with and without the dot). 

I think I'm missing the obvious here. I'm sure it can't be too
complicated.

Thanks.
Alen













[flexcoders] java and ArrayCollection

2007-05-05 Thread haiqing7
Could someone help me out on How to generate an ArrayCollection 
using java (will pass through RemoteObject) to Flex? the hard part 
for me is the AC contains multiple objects and each object has more 
than one elements. here is the AC look like:

public var dpac:ArrayCollection = new ArrayCollection ([
   { machine:m1, task1:make, starttime1:2007-04-19, 
endtime1:2007-04-20,state1:pass,task2:sell, starttime2:2007-
04-20, endtime2:2007-04-22, state2:pass},
   { machine:m2, task1:enu,starttime1:2007-04-22, 
endtime1:2007-04-24, state1:failed, task2:ins, 
starttime2:2007-04-25, endtime2:2007-04-26, state2:pass},
{ machine:m3, task1:ru,starttime1:2007-04-27, 
endtime1:2007-04-28, state1:pass, task2:'', starttime2:'', 
endtime2:'', state2:''},
{ machine:m4, task1:enu,starttime1:2007-04-29, 
endtime1:2007-04-30, state1:pass, task2:nst, starttime2:2007-
04-30, endtime2:2007-05-01, state2:pass,}
]);

thanks,
hq



Re: [flexcoders] youtube

2007-05-05 Thread Luis Eduardo


  OpenLaszlo has already an application that load FLVs directly from the 
server and plays it. (so its possible)
 heres the link for the demo:   http://www.openlaszlo.org/demos#YouTube

  perhaps here is a good start to do in the flex.
http://www.youtube.com/dev

  in time:  with a small google, here is a link to a apollo one (with 
source):  http://www.mojoflex.net/


-  Luís Eduardo.




André Rodrigues Pena escreveu:

 loading an external FLV wont be prevented by sandbox?

 On 5/4/07, *Mark Kornfilt* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 I don't think you can embed the Youtube player itself (SWF)
 directly because of security crossdomain issues, and because there
 is no way to control the behavior of the player, i.e stopping and
 closing the stream when you are done with it.

 Mark

 On 5/4/07, *André Rodrigues Pena*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 but loading from youtube server?

 On 5/4/07, *Manish Jethani*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 On 5/5/07, André Rodrigues Pena [EMAIL PROTECTED]
 mailto:andre.ufrj%40gmail.com wrote:
 is there a way to embed a youtube video inside a flex 2
 application?

 You could either embed the YouTube video player itself
 (SWF) using
 SWFLoader, or you could play the FLV directly using
 VideoDisplay.




 -- 
 André Rodrigues Pena

 LOCUS
 www.locus.com.br http://www.locus.com.br

 Blog
 www.techbreak.org http://www.techbreak.org





 -- 
 André Rodrigues Pena

 LOCUS
 www.locus.com.br http://www.locus.com.br

 Blog
 www.techbreak.org http://www.techbreak.org
  




Re: [flexcoders] youtube

2007-05-05 Thread Manish Jethani
On 5/5/07, André Rodrigues Pena [EMAIL PROTECTED] wrote:
  but loading from youtube server?

You can start here:

http://mannu.livejournal.com/326881.html

The demo doesn't work because of cross-domain issues. But you can
extract the code for fetching the FLV URL and use it in your app.

PS: Yes, you can play the FLV directly from YouTube. As long as you
get the URL right.


Re: [flexcoders] Setting the styles to Text .htmlText at runtime

2007-05-05 Thread Manish Jethani
On 5/5/07, b_alen [EMAIL PROTECTED] wrote:
 I have a string that goes somthing like this:

 var str:String = p class=\H1\section/p;
 var str:String += p class=\TXT\main text/p;

 and then I populate the Text component like this:

 txtPage.htmlText = str;

 Now, I want to add styles to this text through class attributes that I
 provided in the HTML. In Flash 8 this is pretty straightforward but I
 couldn't figure out how to do it in Flex.

In Flex too you can do it in the Flash way, i.e. by setting the
styleSheet property.

  import mx.core.mx_internal;

  myTextObject.mx_internal::styleSheet = myStyleSheetObject;

Note: The styleSheet property in Label and Text is in the mx_internal
namespace -- it's not public API. I guess this is due to the
inconsistency between Flash and Flex styling. If you don't want to use
mx_internal, you can do it by making a subclass of Text.

  public MyText extends Text {
public function setStyleSheet(styleSheet:StyleSheet):void {
  textField.styleSheet = styleSheet;
}
public function getStyleSheet():StyleSheet {
  return textField.styleSheet;
}
  }


Re: [flexcoders] How do I set the text color of a row in a datagrid (without memory problems)?

2007-05-05 Thread Manish Jethani
On 5/5/07, fidelityphil [EMAIL PROTECTED] wrote:
 I need to change the text color of a given row of a datagrid if one of
 the columns has a value.  I put in an instream itemRenderer on the
 datagrid (above the columns definition) which works fine.  However, if
 I then try to sort one of the columns by clicking on the header, the
 titles disappear from the column headers and the application locks up.
 How do I prevent the latter from happening on a column sort?

Hard to say without looking at your code! What are you doing in your
item renderer? i.e. how are you controlling the colour of the text?


Re: [flexcoders] flex 2 with vb6

2007-05-05 Thread Manish Jethani
On 5/5/07, b_rajesh_k [EMAIL PROTECTED] wrote:
 I want to use flex 2 charts in my VB6 app. Can someone please tell me
 how i can do it?

Just a wild guess: Can't you, like, embed the Flash Player ActiveX
control into your VB6 application?

Oh, wait, here's a quick search on Google:

http://www.google.com/search?q=embed+flash+in+vb


[flexcoders] Re: Setting the styles to Text .htmlText at runtime

2007-05-05 Thread b_alen
Thanks a lot Manish. I wasn't even aware of the mx_internal thing. It
 works great for what I need. However, I do have doubts that this is
the most elegant solution.

I don't know how your subclassed idea could work. Because in the
subclass itself you are setting the styleSheet to the Text object, I
don't know how is that different from what I tried to do. Also, if I
subclass the Text, then I have to use it only programatically or can I
use it in mxml, drag it visualy on stage, etc.?  

Cheers
Alen

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

 On 5/5/07, b_alen [EMAIL PROTECTED] wrote:
  I have a string that goes somthing like this:
 
  var str:String = p class=\H1\section/p;
  var str:String += p class=\TXT\main text/p;
 
  and then I populate the Text component like this:
 
  txtPage.htmlText = str;
 
  Now, I want to add styles to this text through class attributes that I
  provided in the HTML. In Flash 8 this is pretty straightforward but I
  couldn't figure out how to do it in Flex.
 
 In Flex too you can do it in the Flash way, i.e. by setting the
 styleSheet property.
 
   import mx.core.mx_internal;
 
   myTextObject.mx_internal::styleSheet = myStyleSheetObject;
 
 Note: The styleSheet property in Label and Text is in the mx_internal
 namespace -- it's not public API. I guess this is due to the
 inconsistency between Flash and Flex styling. If you don't want to use
 mx_internal, you can do it by making a subclass of Text.
 
   public MyText extends Text {
 public function setStyleSheet(styleSheet:StyleSheet):void {
   textField.styleSheet = styleSheet;
 }
 public function getStyleSheet():StyleSheet {
   return textField.styleSheet;
 }
   }





Re: [flexcoders] Re: Setting the styles to Text .htmlText at runtime

2007-05-05 Thread Manish Jethani
On 5/5/07, b_alen [EMAIL PROTECTED] wrote:
 Thanks a lot Manish. I wasn't even aware of the mx_internal thing. It
  works great for what I need. However, I do have doubts that this is
 the most elegant solution.

mx_internal is the namespace for internal stuff in the Flex framework.
You can access this stuff but it comes with no guarantee (and can/will
break in future versions).

 I don't know how your subclassed idea could work. Because in the
 subclass itself you are setting the styleSheet to the Text object, I

In the subclass, I'm providing a getter/setter for the styleSheet
property on the protected textField object.

  public function getStyleSheet():StyleSheet {
return textField.styleSheet;
  }
  // setStyleSheet()

This way you don't have to do any hacks, accessing mx_internal, etc.

 don't know how is that different from what I tried to do. Also, if I
 subclass the Text, then I have to use it only programatically or can I
 use it in mxml, drag it visualy on stage, etc.?

Well, you can generally subclass any of the framework components and
use them in MXML. See the tutorials for an example of how to do this.
I don't know how it works in Flex Builder/design view.


RE: [flexcoders] youtube

2007-05-05 Thread Benoit Hediard
Are you sure that it is allowed to play FLV directly without the official
YouTube player?

 

Benoit Hediard

#affinitiz.com

 

De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la
part de Manish Jethani
Envoyé : samedi 5 mai 2007 11:45
À : flexcoders@yahoogroups.com
Objet : Re: [flexcoders] youtube

 

On 5/5/07, André Rodrigues Pena [EMAIL PROTECTED]
mailto:andre.ufrj%40gmail.com  wrote:
 but loading from youtube server?

You can start here:

http://mannu.livejournal.com/326881.html

The demo doesn't work because of cross-domain issues. But you can
extract the code for fetching the FLV URL and use it in your app.

PS: Yes, you can play the FLV directly from YouTube. As long as you
get the URL right.

 

image001.jpgimage002.jpg

Re: [flexcoders] compc help

2007-05-05 Thread Roman Protsiuk

If you're setting configuration file like -load-config papervision.xml it
replaces default flex-config.xml, thus you should specify path to the
framework libraries. Something like
compiler
external-library-path
path-elementC:/Program Files/Adobe/Flex Builder 2 Plug-in/Flex SDK
2/frameworks/libs/path-element
/external-library-path
/compiler

But it seems to me that in general the best way is to use your configuration
file appended to default configuration, e.g. compc -load-config+=
papervision.xml. It should solve you problems without additional explicit
properties specification.

R.

On 5/5/07, Alisdair Mills [EMAIL PROTECTED] wrote:


  Hi,

I'm having difficulty getting compc to compile a swc. from the command
line I'm doing compc -load-config papervision.xml which uses the
following xml...

?xml version=1.0?
flex-config xmlns=http://www.adobe.com/2006/flex-config;
outputPapervision.swc/output
compiler
source-path
path-element./path-element
/source-path
/compiler
include-classes
classorg.papervision3d.Papervision3D/class
/include-classes
/flex-config

but when I run it i get the following error...

Papervision/org/papervision3d/Papervision3D.as(1): col: 1 Error: The
definition of base class Object was not found.

Any ideas as to where I'm going wrong? Thanks in advance for any help.

cheers, Al
 



[flexcoders] Re: form not filling parent Canvas

2007-05-05 Thread arieljake
Ah, yes, you were right. I was missing a percentHeight = 100 for my
viewStack. thank you.

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

 I have this code:
 
 var categoryCanvas:Canvas = new Canvas();
 categoryCanvas.label = [EMAIL PROTECTED];
 categoryCanvas.percentHeight = 100;
 categoryCanvas.percentWidth = 100;
   
 var categoryForm:Form = new Form();
 categoryForm.percentHeight = 100;
 
 var vbox:VBox = new VBox();
 vbox.percentWidth = 100;
 vbox.percentHeight = 100;
 
 categoryCanvas.addChild(categoryForm);
 vbox.addChild(categoryCanvas);
 this.addChild(vbox); // 'this' is a canvas that in MXML has a large
 height and width
 
 I do proceed to add formitems and fields to the form. When I view the
 app, the form does not expand to fill the canvas, and instead has
 scrollbars. Anyone understand why?





Re: [flexcoders] youtube

2007-05-05 Thread Manish Jethani
On 5/5/07, Benoit Hediard [EMAIL PROTECTED] wrote:

 Are you sure that it is allowed to play FLV directly without the official
 YouTube player?

Yes. But you have to get the FLV URL right. That's the tricky part.


Re: [flexcoders] Problem using getDefinitionByName in a ClassFactory

2007-05-05 Thread Manish Jethani
On 5/4/07, Tom Chiverton [EMAIL PROTECTED] wrote:
 I have a componet I want to pass a dynamic renderer into:
 coreView:MonthCalendar date={ thisMonth } dataProvider={foo}
 dayRenderer=com.halliwells.flex.bma.view.HearingDay/

 It's a TileList type control, so at some stage in the component I do:
 var c:ClassFactory=new ClassFactory( Class (
 flash.utils.getDefinitionByName(dayRenderer) ) );
 tileListName.itemRenderer=c;

Your dayRenderer property would be of type IFactory, right? In that
case you just assign the value to tileListName.itemRenderer as it is.

See the code for itemRenderer in ListBase.as


[flexcoders] Re: flex 2 with vb6

2007-05-05 Thread barry.beattie

how are you going to get the data from the vb6 app to drive the charts
in the swf? 




Re: [flexcoders] Masks, Filters, Soft Wipes

2007-05-05 Thread Manish Jethani
On 5/4/07, Lachlan Cotter [EMAIL PROTECTED] wrote:

 Can anybody help shed some light on an odd problem with filters? I
 want to create soft edge wipe effects. I've got a pretty good proof
 of concept that works like so:

target.cachePolicy = 'on'
mask.filters = [new BlurFilter(20,20)]

 Sure enough, that creates a nice feather on the mask. Trouble is that
 the mask now refuses to be rendered in negative space. Even though I
 can trace the mask co-ordinates and verify they are in negative
 space, the mask shape renders on screen as if it was set at 0, 0.

I've tried a few combinations of this, and I give up. Seems like the
mask just won't go into negative space if it has bitmap caching turned
on (either cacheAsBitmap=true or at least one filter applied).


[flexcoders] Re: Question about the 'includes' compiler option and SWC files.

2007-05-05 Thread gotgoose09
I'm giving this thread one more chance at the top.

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

 Is there a way to indicate 'includes' to include a folder of classes
 instead of listing each one separately?
 
 What I want: -includes 'source.classes.*' This gives me an error,
 which leads me to believe that the compiler doesn't allow the *
 operator as a wildcard.  This forces me to do this: -includes
 'source.classes.class1' 'source.classes.class2'
 'source.classes.class3'. (Is a mass include possible?)  This seems
 like it could be a pain to update so I looked into putting the classes
 I wanted into a SWC file.
 
 I then created a library project in Flex Builder, put my desired
 classes in there, and compiled them into a SWC.  I then included this
 into my project using the 'include-library' option, and my problem was
 solved.  However, the SWC I generated is 322,208KB and the SWF from my
 main project is 225,261KB.  A small number classes amounting to a few
 KB were included in the SWC but it is 322,208KB.  Is Flex 2 including
 all the dependencies from the Flex framework in this SWC?  Also, why
 is my project SWF file smaller than the SWC file?
 
 If anyone could share their knowledge about this I would greatly
 appreciate it.
 
 Thanks in advance! :-)





Re: [flexcoders] Re: Question about the 'includes' compiler option and SWC files.

2007-05-05 Thread Christian Gruber
When you compile a swf against a swc it only uses those parts of  
the .swc it needs, so you can have a very large .swc file and it will  
not include all things from the .swc.

Christian.

On May 5, 2007, at 11:39 AM, gotgoose09 wrote:

 I'm giving this thread one more chance at the top.

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

 I then created a library project in Flex Builder, put my desired
 classes in there, and compiled them into a SWC.  I then included this
 into my project using the 'include-library' option, and my problem  
 was
 solved.  However, the SWC I generated is 322,208KB and the SWF  
 from my
 main project is 225,261KB.  A small number classes amounting to a few
 KB were included in the SWC but it is 322,208KB.  Is Flex 2 including
 all the dependencies from the Flex framework in this SWC?  Also, why
 is my project SWF file smaller than the SWC file?

christian gruber + [EMAIL PROTECTED] + bus 905.640.1119 + mob  
416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES




Re: [flexcoders] Hoe to Extend the EmailValidator using the Model approach?

2007-05-05 Thread Manish Jethani
On 5/5/07, Amine Diab [EMAIL PROTECTED] wrote:
 Hello, I need to customize the EmailValidator class to perform post
 validation on multiple email fields on a flex form. I am using the
 mx:model to pass the mulitple email fields to the validator:

 mx:Model id=client
   registration
 email
emailInput{emailRegisterInput.text}/emailInput
emailCInput{emailRegisterCInput.text}/emailCInput
 /email
   /registration
 /mx:Model

 MyComp:EmailRegistrationValidator id=emVReg source={client}
 property=email required=false listener={emailRegisterInput}/

So in your custom validator you can override doValidation()

override protected function doValidation(value:Object):Array
{
var a:Array = super.doValidation(value);

if (a.length  0)
return a;

var a1:Object = EmailValidator.validateEmail(this, 
value.emailInput, null);
var a2:Object = EmailValidator.validateEmail(this, 
value.emailCInput, null);

return a1.concat(a2);
}


Re: [flexcoders] date localization

2007-05-05 Thread Manish Jethani
On 5/4/07, xho [EMAIL PROTECTED] wrote:

  Anyway, I cannot find usefull informations on how to create and build a
 working italian locale for flex or download a working one: in a default flex
 installation i can only find one locale in

  [...]\Flex SDK 2\frameworks\locale\

 where the only folder en_US, contains english US locale settings.

  I duplicated this folder naming it 'it_IT' and edited
 'formatters.properties' file in order to translate short names for days and
 months. Than I changed the project compile settings adding '-locale it_IT'.
 Well, nothing changed and, in particular, DateFormatter still returns
 english formatted strings (ie 'Sun 15 Jan' vs 'Dom 15 Gen').

You have to rebuild framework_rb.swc.

  ant -f build_framework.xml -Dflex.locale=it_IT build-framework-rb

This will place a new framework_rb.swc in your locale's directory. Now
if you specify locale=it_IT to mxmlc it'll pick up values from this
new locale SWC.

Hope this helps.


[flexcoders] Flash cache probem when flash is embedded in a asp.net page

2007-05-05 Thread wpding
I have embedded a flash into a asp.net page, and i want the flash to be
cached by browsers.

But  the the flash embedded in the aspx Page will not be cached.So the
flash will be reloaded everytime your revisit the page.And if i embed
the flash into a html file ,there is no such probems. it seems that when
the page are generated dynamically , the flash will not be cached.

Does anyone know the reason and a solution.

I also found that the page http://www.flex.org/blogs/
http://www.flex.org/blogs/  ,which is generated dynamically, has
embedded a flash. And the flash will be cached.
Then i digged out that the page will first embed a iframe ,which cotains
the flash.  Since the iframe is html file ,the flash will be cached.

I am not sure if this is the only solution for the cache problem.

Is there better solution?

Thanks.




RE: [flexcoders] LinearAxis - need help with value ordering! (Repost with sample code)

2007-05-05 Thread Ely Greenfield
 

 

 

The kludgey answer  is:

 

1)  Invert all your values (5 becomes -5)

2)  Add labelFunctions to your axis (and possibly dataTip functions)
to re-invert the values before they get displayed on screen.

 

There's no functionality in the charts right now to just tell an axis to
render top to bottom.

 

Ely.

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Demling
Sent: Friday, May 04, 2007 10:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LinearAxis - need help with value ordering!
(Repost with sample code)

 

Hi All,

Any suggestions on how to get a numerical y-axis to start at the
maximum value and descend on up? For example, the sample app below
starts the y-axis at zero and goes up to 5; I want it to start at 5
and go up to zero: VerticalAxis.reverseDefaultSortOrder() or
something. I've tried and failed with manipulating the baseAtZero,
autoAdjust, minimum and maximum properties.

Any ideas, kludgey or otherwise??

Many thanks!

-Peter Demling
Lexington, MA

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Script
![CDATA[ 
import mx.collections.ArrayCollection;

[Bindable]
private var sampleData:ArrayCollection =
new ArrayCollection([
{xValue:10, yValue:1 },
{xValue:20, yValue:2 },
{xValue:30, yValue:3 },
{xValue:40, yValue:4 },
{xValue:50, yValue:5 }
]); 
]]
/mx:Script

mx:LineChart width=100% height=100%
dataProvider={sampleData}
mx:verticalAxis
mx:LinearAxis id=yAxis/
/mx:verticalAxis
mx:series
mx:LineSeries id=primaryLine
xField=xValue
yField=yValue/
/mx:series
/mx:LineChart

/mx:Application

 

image001.jpgimage002.jpg

Re: [flexcoders] Re: 2nd transition not working

2007-05-05 Thread Manish Jethani
On 5/3/07, bill.fogarty17 [EMAIL PROTECTED] wrote:
 Thanks for your feedback, I tried my best to debug the code, but was
 unable to find out anything like that. I'm running the application in
 Debug mode, have set breakpoints and have my variables window open. But
 in the variables panel area, i get: This = layoutPanel, which is a
 big list of variables, events, settings, but none are proving usefull
 to me.

Okay. What's happening is that the DividedBox is trying to adjust the
widths of the two panels as if the user were dragging the divider.
Your code is triggering an automatic resize while the DividedBox is
also trying to handle the divider drag. You need to disable the
divider drag (which is happening as far as the DividedBox is
concerned) somehow.

You could extend the DividedBox class, override
startDividerDrag/stopDividerDrag to ensure there's no dragging
happening. Ultimately dragDelta needs to be 0.

Let me know how you solved it.


RE: [flexcoders] How do I set the text color of a row in a datagrid (without memory problems)?

2007-05-05 Thread Alex Harui
Check out the item renderer examples on my blog
http://blogs.adobe.com/aharui/item_renderers/



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Manish Jethani
Sent: Saturday, May 05, 2007 3:02 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How do I set the text color of a row in a
datagrid (without memory problems)?



On 5/5/07, fidelityphil [EMAIL PROTECTED]
mailto:philip.torgersen%40fmr.com  wrote:
 I need to change the text color of a given row of a datagrid if one of
 the columns has a value. I put in an instream itemRenderer on the
 datagrid (above the columns definition) which works fine. However, if
 I then try to sort one of the columns by clicking on the header, the
 titles disappear from the column headers and the application locks up.
 How do I prevent the latter from happening on a column sort?

Hard to say without looking at your code! What are you doing in your
item renderer? i.e. how are you controlling the colour of the text?


 


RE: [flexcoders] Where can we download the new Flex / Flash Integration?

2007-05-05 Thread Matt Chotin
http://labs.adobe.com/wiki/index.php/Flex_Component_Kit



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of helihobby
Sent: Friday, May 04, 2007 6:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Where can we download the new Flex / Flash
Integration?



Where can we download the new Flex / Flash Integration?

Any good links to read more about it ?

As always, Thank you for all the help and support.

Regards,

Sean - http://www.HeliHobby.com http://www.HeliHobby.com 

P.S.

You can read my solution for Flex Component communication here:

http://www.helihobby.com/html/alon_desingpattern.html
http://www.helihobby.com/html/alon_desingpattern.html 



 


RE: [flexcoders] mx.flash.UIMovieClip - Building in flex?

2007-05-05 Thread Matt Chotin
I believe it's a single class and we only included it in the extension
for now.  You can go find the actual source file in the CS3 folders and
copy it to your Flex installation if you want.  



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Austin Kottke
Sent: Friday, May 04, 2007 4:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx.flash.UIMovieClip - Building in flex?



Hi, I'm trying to find this class with the new flex/flash integration 
kit. Is this class available somewhere
or is the only way to use it to manually compile a new SWC from flash 9 
cs3 and then use this in flex?

What happens if we try and load in a SWC at runtime?

Best, Austin


 


[flexcoders] Re: Where can we download the new Flex / Flash Integration?

2007-05-05 Thread helihobby
Thank you for all the help,

Sean - HeliHobby.com

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

 http://labs.adobe.com/wiki/index.php/Flex_Component_Kit
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of helihobby
 Sent: Friday, May 04, 2007 6:14 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Where can we download the new Flex / Flash
 Integration?
 
 
 
 Where can we download the new Flex / Flash Integration?
 
 Any good links to read more about it ?
 
 As always, Thank you for all the help and support.
 
 Regards,
 
 Sean - http://www.HeliHobby.com http://www.HeliHobby.com 
 
 P.S.
 
 You can read my solution for Flex Component communication here:
 
 http://www.helihobby.com/html/alon_desingpattern.html
 http://www.helihobby.com/html/alon_desingpattern.html





[flexcoders] Newbie in need of help with graphics

2007-05-05 Thread williamkusumo
Please forgive this stupid question. I can't seem to figure out how to
draw a simple rectangle in a Flex app...:(

I know it involve the graphics object and I have to call drawRect at
some point. But where do I put this code, and how do I attach this
rectangle into one of the container?

Any help is much appreciated. I can't seem to find any tutorial that
is actually working either.

Thanks!



[flexcoders] Datagrid - case-insensitive sort

2007-05-05 Thread Paul Booth

Hi,
When I click on a column header to sort a datgrid column the sort is case
sensitive
e.g. the values aa, AA, bb, BB are displayed as

AA
BB
aa
bb

I can't find a way to tell the Datagrid (or DatagridColumn) to sort in a
case-insensitive manner. Can someone please enlighten me?

Thanks,

Paul.


Re: [flexcoders] Where can we download the new Flex / Flash Integration?

2007-05-05 Thread Stephen Downs
The Flex Component Kit for Flash CS3 is what you might be looking for:
http://labs.adobe.com/wiki/index.php/Flex_Component_Kit_for_Flash_CS3


On 2007-05-04, at 6:13 PM, helihobby wrote:

 Where can we download the new Flex / Flash Integration?

 Any good links to read more about it ?

 As always, Thank you for all the help and support.

 Regards,

 Sean - http://www.HeliHobby.com

 P.S.

 You can read my solution for Flex Component communication here:

 http://www.helihobby.com/html/alon_desingpattern.html




[flexcoders] Flash Component *.swc not working in Flex ... help ...

2007-05-05 Thread helihobby

I have installed the Extension for Flash CS3 and updated Flex to
latest 2.01 that supports the Flash Components.

I made a simple Flash CS3 a symbol and clicked the Commands - Make
Flex Components and got:

Command made the following changes to the FLA:
  Turned on Permit Debugging
  Turned on Export SWC
  Set frame rate to 24
  Imported UIMovieClip component to library
Component FlashComp is ready to be used in Flex.


So far so good...

I continued by clicking on the symbol and selected export to SWC

and saved to a folder.

Continued to go to Flex Builder and added swc under my project's
library path.

All seems ok.

when I do:

var a:FlashComp = new FlashComp();

Flex Builder finishes the word FlashComp for me so it does see the
component.

However, I do get an error of:

1046: Type was not found or was not a compile-time constant: 
1180: Call to a possibly undefined method FlashComp

I also tried saving the FlashComp.swc in the root dir of the project
and did:

local:FlashComp id=ABC/

with no luck.

Any Help would be great ...

Regards,

Sean - HeliHobby.com



[flexcoders] Re: Question about the 'includes' compiler option and SWC files.

2007-05-05 Thread gotgoose09
Thanks for that info!  Is there somewhere I can read more about SWCs
or is there only the Flex 2 Documentation?

I'm still wondering about matching multiple files instead of one at a
time; anyone know if this can be done?

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

 When you compile a swf against a swc it only uses those parts of  
 the .swc it needs, so you can have a very large .swc file and it will  
 not include all things from the .swc.
 
 Christian.
 
 On May 5, 2007, at 11:39 AM, gotgoose09 wrote:
 
  I'm giving this thread one more chance at the top.
 
  --- In flexcoders@yahoogroups.com, gotgoose09 thegoosmans@  
  wrote:
 
  I then created a library project in Flex Builder, put my desired
  classes in there, and compiled them into a SWC.  I then included this
  into my project using the 'include-library' option, and my problem  
  was
  solved.  However, the SWC I generated is 322,208KB and the SWF  
  from my
  main project is 225,261KB.  A small number classes amounting to a few
  KB were included in the SWC but it is 322,208KB.  Is Flex 2 including
  all the dependencies from the Flex framework in this SWC?  Also, why
  is my project SWF file smaller than the SWC file?
 
 christian gruber + [EMAIL PROTECTED] + bus 905.640.1119 + mob  
 416.998.6023
 process coach and architect + ISRÁFÍL CONSULTING SERVICES





Re: [flexcoders] Re: Question about the 'includes' compiler option and SWC files.

2007-05-05 Thread Christian Gruber
As to docs, I'm not sure.  I mostly looked up things from the flex  
docs or from the archives of lists like this.

As to multiple files, I'm not.  I know you can match a whole source  
folder with -include-sources, but not with wildcards.  If you're  
running the compiler from the shell, then you may be able to use  
wildcards with sources (because they're paths, not AS3 class  
definition names, but in that case it would be the shell resolving  
the wildcard, not the compiler.

Christian.

On May 5, 2007, at 3:14 PM, gotgoose09 wrote:

 Thanks for that info!  Is there somewhere I can read more about SWCs
 or is there only the Flex 2 Documentation?

 I'm still wondering about matching multiple files instead of one at a
 time; anyone know if this can be done?


christian gruber + [EMAIL PROTECTED] + bus 905.640.1119 + mob  
416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES




Re: [flexcoders] Newbie in need of help with graphics

2007-05-05 Thread Daniel Freiman

check out:

http://livedocs.adobe.com/flex/201/html/05_Display_Programming_162_07.html

Daniel Freiman
nondocs http://nondocs.blogspot.com

On 5/5/07, williamkusumo [EMAIL PROTECTED] wrote:


  Please forgive this stupid question. I can't seem to figure out how to
draw a simple rectangle in a Flex app...:(

I know it involve the graphics object and I have to call drawRect at
some point. But where do I put this code, and how do I attach this
rectangle into one of the container?

Any help is much appreciated. I can't seem to find any tutorial that
is actually working either.

Thanks!

 



Re: [flexcoders] Newbie in need of help with graphics

2007-05-05 Thread Manish Jethani
On 5/5/07, williamkusumo [EMAIL PROTECTED] wrote:
 Please forgive this stupid question. I can't seem to figure out how to
 draw a simple rectangle in a Flex app...:(

 I know it involve the graphics object and I have to call drawRect at
 some point. But where do I put this code, and how do I attach this
 rectangle into one of the container?

Here's a simple component that draws a 100x100 rectangle.

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

public class RectangleComponent extends UIComponent {
  override protected function updateDisplayList(w:Number, h:Number):void
  {
super.updateDisplayList();

var g:Graphics = this.graphics;
g.clear();
g.beginFill(0xFF);
g.drawRect(0, 0, w, h);
g.endFill();
  }
}
  }

In your application's MXML code:

 mx:VBox
   local:RectangleComponent xmlns:local=* width=100 height=100 /
 /mx:VBox

Note that in Flex components should ideally delegate any graphics work
to a skin class, and any colours, etc., should come from CSS styles
(as opposed to being hard-coded in the component's code).

http://livedocs.adobe.com/flex/2/langref/flash/display/Graphics.html


[flexcoders] binding and dataProvider.filterFunction

2007-05-05 Thread arieljake
I have a class that manages a var called
allAvailableCategories:ArrayCollection.

I have a list that would like to use that variable as the basis for
its output, but only output a subset, say those categories starting
with the letter 'A'.

Now, since the allAvailableCategories collection can be modified by
other controls, I would like to bind the data provider of the list to
the allAvailableCategories variable, and use a filterFunction to limit
the output in the list.

It seems that setting the filterFunction is affecting the
allAvailableCategories variable when I trace the length of the
allAvailableCategories variable after the listData is refreshed. 

Why?

here is the code:

model:CategoryData id=categoryData /
mx:ArrayCollection id=listData /
mx:Binding source={categoryData.allAvailableCategories}
destination=listData /
mx:List id=categoryList dataProvider={listData} /

mx:Script
![CDATA[
 this.listData.filterFunction = this.filterBySelectedLetter;
 ]]
/mx:Script



[flexcoders] Re: Html Text does NOT print in same format as rendered on scre

2007-05-05 Thread scott_flex

John,

I ended up going a different route.. i'll use this technique in the 
future.  It was a great expirement.  The print quality just wasn't 
good enough.

Anyway, I wrote a recursive routine to find all Text controls, then 
manually reset their heights for printing.  For reasons, unknown to 
me, when you add a couple pixels to the height of Text object, then 
print, ALL lines print.

Each time i found a Text control in my DisplayObject being added to 
the printJob, i determined line count (oddly, no built in lineCount 
property), went through each line and got the lineMetrics and 
calculated a new height, plus added a few pixels to be sure.  I did 
all this between calling my printJob.start() and printJob.send().

Oh, setting my printJob.printAsBitmap to false is also very good for 
quality and they suggest that in the docs if not printing images or 
non-vector stuff... the print quality is crystal clear!

I agree this is a hack... but when there's LITTLE documentation and 
it doesn't work as expected i was under the gun to get something out 
since i released my app... before testing all printing scenarios...

--Scott

Turning off printAsBitmap on the print job seems to condense the text 
a little so if you only have one word on the last line, it's possible 
that it's brought up to the previous line.  This may cause an extra 
blank space when printed, minor issue, but all text prints, the most 
important thing.

I went through several different fonts and sizes and now very rairly, 
a letter gets clipped on the right, i'll figure this out later.



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

 Scott -
 
 I didn't notice the loss of quality when I tested it (quickly)  
 yesterday, but I'm noticing it now that you mentioned it.
 
 I played with it a bit more but the only thing I found that helped 
at  
 all (though still not great) was to set smoothing = true for the  
 Bitmap. It looks better but is now a little fuzzy and on paper 
(cheap  
 inkjet) the text is not as dark as the one without smoothing. I'm  
 wondering if it's possible to overlay the no-smoothing bitmap with 
a  
 transparent background over the smoothed version?
 
 
 John
 
 
 
 On May 3, 2007, at 10:55 PM, scott_flex wrote:
 
 
  Thanks for the example John! However, when you printed your output
  to PDF did you lose a lot of text quality? Printing the 
image/bitmap
  i lose a lot of quality on the printout, font is real jagged.
 
  The bitmap image created from my source panel is very clear on. I
  assume this is because the flash player is not printing it
  intellegently as a font but rather an image.
 
  Even so though... the bitmap image is pretty darn close to the 
real
  dimensions of the printed page, based on 72pixel per inch.. Would
  think i would lose that much qualtily.
 
  --Scott
 
  --- In flexcoders@yahoogroups.com, John Robinson jrobinso@ 
wrote:
  
   Scott -
  
   I thought the same thing (use Bitmap/BitmapData). Quick example:
  
  
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   creationComplete=init() 
  
   mx:Script
   ![CDATA[
  
   import flash.display.*;
   import flash.printing.*;
   import flash.events.*;
  
   public function init():void {
   var i:Number = 100;
   while(i0) {
   my_text.htmlText += brBob is cool
  as hell. I love bob. font
   face=\Cochin\ color=\#33\byay!/b/fontbob! bob!;
   i--;
   }
   }
  
   public function onClick():void {
  
   var bd:BitmapData = new BitmapData
  (my_panel.width,
   my_panel.height, false);
   var b:Bitmap = new Bitmap(bd);
   my_image.source = b;
   bd.draw(my_text);
  
   var pj:PrintJob = new PrintJob();
   pj.start();
   pj.addPage(my_text as Sprite);// page 1,
  original text
   pj.addPage(my_image as Sprite);// page 2,
  bitmap
   pj.send();
   }
  
  
 
   ]]
   /mx:Script
  
   mx:Panel id=my_panel title=My Panel width=100%
  height=100%
   autoLayout=true click=onClick()
   mx:TextArea id=my_text width=500 height=400/
   /mx:Panel
   mx:Image id=my_image width={my_panel.width}
   height={my_panel.height}/
  
   /mx:Application
  
   I didn't try going to a printer but just saved as a pdf. Page 2
  looks
   just like it's displayed in the browser, while page 1 looks like
  the
   text has been shrunken horizontally a tad. Strange, but using
  bitmap
   should solve your issues for now.
  
   Note... I tried adding the Bitmap object and the BitmapData 
object
  to
   the printJob but it gave me errors so I'm not sure if the image 
is
   necessary or not.
  
   John
  
  
  
   On May 2, 2007, at 11:24 AM, scott_flex wrote:
  
I thought about that. I don't know how to make it a bitmap 
yet but
from what i've seen i should be able to fairly easily...and I
  assume
i can send a bitmap image to the printer.
   
In my real app i'm taking a few panels and adding them to a 
vbox
control so I can create pages to send to the printer. I
  calculate
the height 

Re: [flexcoders] Datagrid - case-insensitive sort

2007-05-05 Thread Manish Jethani
On 5/5/07, Paul Booth [EMAIL PROTECTED] wrote:

 I can't find a way to tell the Datagrid (or DatagridColumn) to sort in a
 case-insensitive manner. Can someone please enlighten me?

In your headerRelease event handler:

import mx.collections.*;

var col:ICollectionView = event.target.dataProvider;
var s:Sort = col.sort ? col.sort : new Sort();
var sf:SortField;
if (col.sort  col.sort.fields) {
for each (var f:SortField in col.sort.fields)
if (f.name == event.dataField) {
sf = f;
break;
}
}
if (!sf)
sf = new SortField(event.dataField);
sf.caseInsensitive = true;
s.fields = [sf];
col.sort = s;

Disclaimer: Might be buggy.


[flexcoders]

2007-05-05 Thread Tom Bray
Shouldn't the height of the VBox below end up being 300?  Shouldn't  
height=100% make it fill up the area allotted to it by it's  
parent?  Instead it ends up having a height of 612 and no scrollbar.   
Set a breakpoint in the debug() method below to check the values.


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute horizontalScrollPolicy=off  
verticalScrollPolicy=off
	mx:Canvas width=500 height=300 horizontalScrollPolicy=off  
verticalScrollPolicy=off

mx:VBox id=badVBox width=100% height=100%
mx:Canvas width=100% height=200 
backgroundColor=green/
mx:Canvas width=100% height=200 
backgroundColor=green/
mx:Canvas width=100% height=200 
backgroundColor=green/
/mx:VBox
/mx:Canvas

mx:Button y=400 label=debug click=debug()/

mx:Script
![CDATA[
public function debug():void
{
var v:VBox = badVBox;
}
]]
/mx:Script

/mx:Application

Re: [flexcoders] binding and dataProvider.filterFunction

2007-05-05 Thread Manish Jethani
On 5/6/07, arieljake [EMAIL PROTECTED] wrote:

[snip]
 It seems that setting the filterFunction is affecting the
 allAvailableCategories variable when I trace the length of the
 allAvailableCategories variable after the listData is refreshed.

 Why?

 here is the code:

 model:CategoryData id=categoryData /
 mx:ArrayCollection id=listData /
 mx:Binding source={categoryData.allAvailableCategories}
 destination=listData /
 mx:List id=categoryList dataProvider={listData} /

I think you want to do this instead:

  ArrayCollection id=listData
source={categoryData.allAvailableCategories} /

i.e. remove the binding and use the source property of the collection.


[flexcoders] Shouldn't this VBox have a scrollbar?

2007-05-05 Thread Tom Bray
Shouldn't the height of the VBox below end up being 300?  Shouldn't  
height=100% make it fill up the area allotted to it by it's  
parent?  Instead it ends up having a height of 612 and no scrollbar:


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute horizontalScrollPolicy=off  
verticalScrollPolicy=off
	mx:Canvas width=500 height=300 horizontalScrollPolicy=off  
verticalScrollPolicy=off

mx:VBox id=badVBox width=100% height=100%
mx:Canvas width=100% height=200 
backgroundColor=green/
mx:Canvas width=100% height=200 
backgroundColor=green/
mx:Canvas width=100% height=200 
backgroundColor=green/
/mx:VBox
/mx:Canvas

mx:Button y=400 label=debug click=debug()/

mx:Script
![CDATA[
public function debug():void
{
var v:VBox = badVBox;
}
]]
/mx:Script

/mx:Application

[flexcoders] Re: Help! Object integrity across DataService.commit()

2007-05-05 Thread simonjpalmer
Pete / Jeff.

I think I need to start from the basics here.  I have been poring
through endless logs but I have some unanswered questions at the
beginning which I think I need to sort out first.  

The basic unanswered issue for me is that when I lazily load a child
the parent reference is null.  I never do anything to address this in
code (i.e. I do not populate the parent object reference).  Should I?

Here is what my destinations look like (.'s for readability):

destination id=portfolio.spring
.adapter ref=java-dao /
.properties
..sourcebeanPortfolioAssembler/source
..factoryspring/factory
..metadata
...identity property=uid/
...one-to-many property=planpoints destination=planpoint.spring
lazy=true/
../metadata
./properties
/destination

destination id=planpoint.spring
.adapter ref=java-dao /
.properties
..sourcebeanPlanPointAssembler/source
..factoryspring/factory
..metadata
...identity property=uid/
...many-to-one property=parent destination=portfolio.spring
lazy=true/
../metadata
./properties
/destination

Notice there is a bi-directional one-to-many relationship, both ends
of which are defined as lazily loaded.  My flex application has
DataService object which is bound to portfolio.spring.  I call the
standard fill method supplying an ArrayCollection object to hold the
results and the ID of the currently connected user:

[Bindable] public var activePortfolios:ArrayCollection = new
ArrayCollection();

private var ds_po:DataService = new DataService(portfolio.spring);

private function getPortfolios(authenticatedUser:User):void
{
..ds_po.fill(activePortfolios, authenticatedUser.uid);
}

I have no client reference to planpoint.spring.  On fill I populate
and return a list of Portfolio objects.  Each Portfolio object has a
Set called planpoints which I populate with PlanPoint objects which
are empty except for their uid.  This means I do not send back a
populated parent reference in the initial fill from portfolio.spring.
 I'm not sure whether that is correct or not.  Can I rely on data
services to wire that up correctly or should I be sending back a stub
Portfolio object with its uid?

Here is what my value objects look like.  I am omitting most of the
pojo code for brevity, all members are accessed by standard getters
and setters.  I have an equivalent set of AS objects on the flex side:

public class Portfolio extends PojoBase implements IPojo
{
...
..private String uid = new String();
..private SetPlanPoint planpoints = new HashSetPlanPoint();
...
}

public class PlanPoint extends PojoBase implements Serializable, IPojo
{
...
..private transient Portfolio parent;
..private String uid = new String();
...
}

So on initial fill I have:
PortfolioObject
..uid=XXX
..planpoints
PlanPointObject
..uid=YYY
..parent=null
..everythingelse=null

I then get server side calls through planpoint.spring when the lazy
loading of the children kicks in.  The getItem calls contain the uids
of the partially populate objects that I returned on fill as expected.
 I then send back fully populated PlanPoint objects EXCEPT I never
populate the parent.  Not surprisingly when my PlanPoint arrives on
the client side it has a null parent.

PlanPointObject
..uid=YYY
..parent=null
..everythingelse=something

What should I be sending back?  The back reference to the parent is
lazily loaded accorinding to the definition of planpoint.spring above
and the PlanPoint is being returned in response to an itemPendingError
on the client side because a stub PlanPoint is being accessed in the
context of a Portfolio.  The Portfolios live in a managed collection.
 Should I reply to the planpoint.spring.getItem message with a
PlanPoint object containing a stub Portfolio object with its uid
populated?

I think that until I make sure I have this part correct it is useless
for me to look deeper into my issue.  

Am I doing the right thing here?

As ever I really appreciate your help.  This is currently standing
between me and production code.

Simon



[flexcoders] Re: Datagrid - case-insensitive sort

2007-05-05 Thread iko_knyphausen

You could also create a sortCompareFunction, similar to this one

private function sfSortFunction(ob1:Object, ob2:Object) : int
{
var s1 : String = ob1.dataField.toString().toLowerCase();
var s2 : String = ob2.dataField.toString().toLowerCase();
if (s1s2)
   return 1;
if (s1  s2)
   return -1;
return 0;
}


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

 On 5/5/07, Paul Booth [EMAIL PROTECTED] wrote:

  I can't find a way to tell the Datagrid (or DatagridColumn) to sort
in a
  case-insensitive manner. Can someone please enlighten me?

 In your headerRelease event handler:

 import mx.collections.*;

 var col:ICollectionView = event.target.dataProvider;
 var s:Sort = col.sort ? col.sort : new Sort();
 var sf:SortField;
 if (col.sort  col.sort.fields) {
 for each (var f:SortField in col.sort.fields)
 if (f.name == event.dataField) {
 sf = f;
 break;
 }
 }
 if (!sf)
 sf = new SortField(event.dataField);
 sf.caseInsensitive = true;
 s.fields = [sf];
 col.sort = s;

 Disclaimer: Might be buggy.






[flexcoders] Re: Shouldn't this VBox have a scrollbar?

2007-05-05 Thread scott_flex

You would think so... however, i have found that you have to set the 
height of a vBox to a pixel height, not percentage to get the 
scrollbars to act the way you want them to.

By default a vBox's height will autosize to the combined height, plus 
verticalGap... of all it's children, UNLESS you set it's pixel 
height, which then properly display's scrollbars.

In this case, I would bind the height of the vBox to it's parent 
canvas height, that should do it.

This is very weird to me as well, and if you contrain the layout of 
the vbox to be top=0 and bottom=0, as if you are wanting to anchor or 
dock it so it resizes when the parent resizes, it won't work either.

The height must be set to a pixel height.  To get around this i had 
to tie into the resize even of my parent container and convert the 
size of my vbox appropriately... annoying, not what i expected i 
would have to do.


hope that helps some

--Scott



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

 Shouldn't the height of the VBox below end up being 300?  
Shouldn't  
 height=100% make it fill up the area allotted to it by it's  
 parent?  Instead it ends up having a height of 612 and no scrollbar:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
 layout=absolute horizontalScrollPolicy=off  
 verticalScrollPolicy=off
   mx:Canvas width=500 height=300 
horizontalScrollPolicy=off  
 verticalScrollPolicy=off
   mx:VBox id=badVBox width=100% height=100%
   mx:Canvas width=100% height=200 
backgroundColor=green/
   mx:Canvas width=100% height=200 
backgroundColor=green/
   mx:Canvas width=100% height=200 
backgroundColor=green/
   /mx:VBox
   /mx:Canvas
   
   mx:Button y=400 label=debug click=debug()/
   
   mx:Script
   ![CDATA[
   public function debug():void
   {
   var v:VBox = badVBox;
   }
   ]]
   /mx:Script
 
 /mx:Application





[flexcoders] Re: Shouldn't this VBox have a scrollbar?

2007-05-05 Thread scott_flex

Oh, and one more thing, hopefully i don't butcher this.

As explain to me before, using constrained layout on objects does not 
actually resize them, just anchors them based on teh top, bottom, 
left and right properties.  That's why you can't anchor a vBox on all 
sides and expect the scrollbars to appear correctly.

Constrained layout is NOT equal to Docking as some other editors, 
such as in Visual Studio refer to it.

This is wierd if you anchor on all 4 sides, put a border on your vbox 
and it does appear to grow with the parent display object it's anchor 
against, but again, the vbox size, at least for calculating 
scrollbars is NOT aware of this.  I assume this is very similar to 
using 100% values for width and height.

Weird and certain not what i would expect.

--Scott



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

 Shouldn't the height of the VBox below end up being 300?  
Shouldn't  
 height=100% make it fill up the area allotted to it by it's  
 parent?  Instead it ends up having a height of 612 and no scrollbar:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
 layout=absolute horizontalScrollPolicy=off  
 verticalScrollPolicy=off
   mx:Canvas width=500 height=300 
horizontalScrollPolicy=off  
 verticalScrollPolicy=off
   mx:VBox id=badVBox width=100% height=100%
   mx:Canvas width=100% height=200 
backgroundColor=green/
   mx:Canvas width=100% height=200 
backgroundColor=green/
   mx:Canvas width=100% height=200 
backgroundColor=green/
   /mx:VBox
   /mx:Canvas
   
   mx:Button y=400 label=debug click=debug()/
   
   mx:Script
   ![CDATA[
   public function debug():void
   {
   var v:VBox = badVBox;
   }
   ]]
   /mx:Script
 
 /mx:Application





Re: [flexcoders] Shouldn't this VBox have a scrollbar?

2007-05-05 Thread Jas Kaur
The value of height=200 is making this happen

mx:Canvas width=100% height=200 backgroundColor= green/
mx:Canvas width=100% height=200 backgroundColor= green/


- Original Message 
From: Tom Bray [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Saturday, May 5, 2007 5:36:08 PM
Subject: [flexcoders] Shouldn't this VBox have a scrollbar?

Shouldn't the height of the VBox below end up being 300?  Shouldn't 
height=100%  make it fill up the area allotted to it by it's parent?  Instead 
it ends up having a height of 612 and no scrollbar:


?xml version=1.0 encoding=utf- 8?
mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute 
horizontalScrollPol icy=off verticalScrollPolic y=off
mx:Canvas width=500 height=300 horizontalScrollPol icy=off 
verticalScrollPolic y=off
mx:VBox id=badVBox width=100% height=100%
mx:Canvas width=100% height=200 backgroundColor= green/
mx:Canvas width=100% height=200 backgroundColor= green/
mx:Canvas width=100% height=200 backgroundColor= green/
/mx:VBox
/mx:Canvas


mx:Button y=400 label=debug click=debug( )/


mx:Script
![CDATA[
public function debug():void
{
var v:VBox = badVBox;
}
]]
/mx:Script


/mx:Application


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[flexcoders] TextEvent.LINK bug

2007-05-05 Thread Jobe Makar
Hi guys,

I found a bug when trying to capture the click event from an HTML field. If the 
field is selectable then all is fine. If it is not selectable, then you still 
get the hand icon but no event is fired. 

I blogged a little extra info on it here if interested:
http://jobemakar.blogspot.com/

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 252-627-8026
mobile: 919-609-0408
fax: 919-882-1121

Re: [flexcoders] Re: Shouldn't this VBox have a scrollbar?

2007-05-05 Thread Tom Bray
Thanks, Scott.  It's nice to know I'm not crazy in thinking that this  
is unexpected behavior.  Hopefully the Adobe guys will weigh in on this.


I'll bind the height of the vbox to it's parent's height, but I'll do  
so with a heavy heart.


Thanks,

Tom


On May 5, 2007, at 3:09 PM, scott_flex wrote:



Oh, and one more thing, hopefully i don't butcher this.

As explain to me before, using constrained layout on objects does not
actually resize them, just anchors them based on teh top, bottom,
left and right properties. That's why you can't anchor a vBox on all
sides and expect the scrollbars to appear correctly.

Constrained layout is NOT equal to Docking as some other editors,
such as in Visual Studio refer to it.

This is wierd if you anchor on all 4 sides, put a border on your vbox
and it does appear to grow with the parent display object it's anchor
against, but again, the vbox size, at least for calculating
scrollbars is NOT aware of this. I assume this is very similar to
using 100% values for width and height.

Weird and certain not what i would expect.

--Scott

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

 Shouldn't the height of the VBox below end up being 300?
Shouldn't
 height=100% make it fill up the area allotted to it by it's
 parent? Instead it ends up having a height of 612 and no scrollbar:

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute horizontalScrollPolicy=off
 verticalScrollPolicy=off
 mx:Canvas width=500 height=300
horizontalScrollPolicy=off
 verticalScrollPolicy=off
 mx:VBox id=badVBox width=100% height=100%
 mx:Canvas width=100% height=200
backgroundColor=green/
 mx:Canvas width=100% height=200
backgroundColor=green/
 mx:Canvas width=100% height=200
backgroundColor=green/
 /mx:VBox
 /mx:Canvas

 mx:Button y=400 label=debug click=debug()/

 mx:Script
 ![CDATA[
 public function debug():void
 {
 var v:VBox = badVBox;
 }
 ]]
 /mx:Script

 /mx:Application








[flexcoders] Re: Shouldn't this VBox have a scrollbar?

2007-05-05 Thread simonjpalmer
I suspect you may get closer to what you are looking for if you make
the height of each of your canvases in your vbox 33%, e.g.

mx:Canvas width=100% height=33% backgroundColor= green/
mx:Canvas width=100% height=33% backgroundColor= green/
mx:Canvas width=100% height=34% backgroundColor= green/

I presume you are deliberately switching the scrollbar off with
verticalScrollPolicy=off on the parent canvas.

The vbox is being told to occupy all of the available parent real
estate, but then being told to be 3 x 200 tall because of its
contents, and then not the scroll bar is disallowed.

Why not make your top level canvas the right size for your control?

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

 The value of height=200 is making this happen
 
 mx:Canvas width=100% height=200 backgroundColor= green/
 mx:Canvas width=100% height=200 backgroundColor= green/
 
 
 - Original Message 
 From: Tom Bray [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Saturday, May 5, 2007 5:36:08 PM
 Subject: [flexcoders] Shouldn't this VBox have a scrollbar?
 
 Shouldn't the height of the VBox below end up being 300?  Shouldn't
height=100%  make it fill up the area allotted to it by it's parent?
 Instead it ends up having a height of 612 and no scrollbar:
 
 
 ?xml version=1.0 encoding=utf- 8?
 mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml
layout=absolute horizontalScrollPol icy=off verticalScrollPolic
y=off
 mx:Canvas width=500 height=300 horizontalScrollPol icy=off
verticalScrollPolic y=off
 mx:VBox id=badVBox width=100% height=100%
 mx:Canvas width=100% height=200 backgroundColor= green/
 mx:Canvas width=100% height=200 backgroundColor= green/
 mx:Canvas width=100% height=200 backgroundColor= green/
 /mx:VBox
 /mx:Canvas
 
 
 mx:Button y=400 label=debug click=debug( )/
 
 
 mx:Script
 ![CDATA[
 public function debug():void
 {
 var v:VBox = badVBox;
 }
 ]]
 /mx:Script
 
 
 /mx:Application
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com





Re: [flexcoders] Shouldn't this VBox have a scrollbar?

2007-05-05 Thread Tom Bray

Hi Jas,

I expect the measuredHeight to be 612, which it is.  The problem is  
that I also expect the VBox to respect the height of its parent  
canvas (300) and thus display a vertical scrollbar.


Thanks,

Tom

On May 5, 2007, at 3:17 PM, Jas Kaur wrote:



The value of height=200 is making this happen

mx:Canvas width=100% height=200 backgroundColor= green/
mx:Canvas width=100% height=200 backgroundColor= green/

- Original Message 
From: Tom Bray [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Saturday, May 5, 2007 5:36:08 PM
Subject: [flexcoders] Shouldn't this VBox have a scrollbar?


Shouldn't the height of the VBox below end up being 300?  Shouldn't  
height=100%  make it fill up the area allotted to it by it's  
parent?  Instead it ends up having a height of 612 and no scrollbar:


?xml version=1.0 encoding=utf- 8?
mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml  
layout=absolute horizontalScrollPol icy=off verticalScrollPolic  
y=off
mx:Canvas width=500 height=300 horizontalScrollPol icy=off  
verticalScrollPolic y=off

mx:VBox id=badVBox width=100% height=100%
mx:Canvas width=100% height=200 backgroundColor= green/
mx:Canvas width=100% height=200 backgroundColor= green/
mx:Canvas width=100% height=200 backgroundColor= green/
/mx:VBox
/mx:Canvas


mx:Button y=400 label=debug click=debug( )/


mx:Script
![CDATA[
public function debug():void
{
var v:VBox = badVBox;
}
]]
/mx:Script

/mx:Application


The best gets better. See why everyone is raving about the All-new  
Yahoo! Mail.







[flexcoders] Re: Shouldn't this VBox have a scrollbar?

2007-05-05 Thread simonjpalmer
It will never show a scroll bar while you have
verticalScrollPolicy=off in the parent canvas...

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

 Hi Jas,
 
 I expect the measuredHeight to be 612, which it is.  The problem is  
 that I also expect the VBox to respect the height of its parent  
 canvas (300) and thus display a vertical scrollbar.
 
 Thanks,
 
 Tom
 
 On May 5, 2007, at 3:17 PM, Jas Kaur wrote:
 
 
  The value of height=200 is making this happen
 
  mx:Canvas width=100% height=200 backgroundColor= green/
  mx:Canvas width=100% height=200 backgroundColor= green/
 
  - Original Message 
  From: Tom Bray [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Saturday, May 5, 2007 5:36:08 PM
  Subject: [flexcoders] Shouldn't this VBox have a scrollbar?
 
 
  Shouldn't the height of the VBox below end up being 300?  Shouldn't  
  height=100%  make it fill up the area allotted to it by it's  
  parent?  Instead it ends up having a height of 612 and no scrollbar:
 
  ?xml version=1.0 encoding=utf- 8?
  mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml  
  layout=absolute horizontalScrollPol icy=off verticalScrollPolic  
  y=off
  mx:Canvas width=500 height=300 horizontalScrollPol icy=off  
  verticalScrollPolic y=off
  mx:VBox id=badVBox width=100% height=100%
  mx:Canvas width=100% height=200 backgroundColor= green/
  mx:Canvas width=100% height=200 backgroundColor= green/
  mx:Canvas width=100% height=200 backgroundColor= green/
  /mx:VBox
  /mx:Canvas
 
 
  mx:Button y=400 label=debug click=debug( )/
 
 
  mx:Script
  ![CDATA[
  public function debug():void
  {
  var v:VBox = badVBox;
  }
  ]]
  /mx:Script
 
  /mx:Application
 
 
  The best gets better. See why everyone is raving about the All-new  
  Yahoo! Mail.
 
 





Re: [flexcoders] Component release :: TaskPaneFX drawer component set

2007-05-05 Thread dorkie dork from dorktown

nicely done! :) i could use the single pane example for a project right now.

i also like the debug menu in the menu example.

On 5/4/07, Michael Schmalle [EMAIL PROTECTED] wrote:


  Hi,

I would just like to announce the TaskPaneFX, TaskListFX and
TitleBarControl set.

These components are jam packed with functionality.

Product page;
http://www.teotigraphix.com/components/containers/taskpanefx

SWF Explorer
http://www.teotigraphix.com/components/containers/taskpanefx/explorer

Online Help Book
http://www.teotigraphix.com/bookshelf/taskpanefx

ASDoc's
http://www.teotigraphix.com/asdoc/taskpanefx/index.html

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

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



Re: [flexcoders] youtube

2007-05-05 Thread Abdul Qabiz

I have been posting lots of details on YouTube...

You can search my blog: http://www.abdulqabiz.com/blog/ using this link

*http://tinyurl.com/2uoltz

*You can even find things like, getting FLV URL on client side without even
using server-side proxy, some sample apps playin YouTube Video etc.
*
-abdul
*


On 5/5/07, Manish Jethani [EMAIL PROTECTED] wrote:


  On 5/5/07, Benoit Hediard [EMAIL PROTECTED] ben%40benorama.com wrote:

 Are you sure that it is allowed to play FLV directly without the
official
 YouTube player?

Yes. But you have to get the FLV URL right. That's the tricky part.
 



Re: [flexcoders] Flash cache probem when flash is embedded in a asp.net page

2007-05-05 Thread Abdul Qabiz

You need to check if code in your ASPX page is setting HTTP requests headers
such that content expires?

Also check if the SWF path is static instead of a different or unique URL
everytime it loads... Make sure, you are not appending any random string to
SWF path...

-abdul

On 5/5/07, wpding [EMAIL PROTECTED] wrote:


  I have embedded a flash into a asp.net page, and i want the flash to be
cached by browsers.

But  the the flash embedded in the aspx Page will not be cached.So the
flash will be reloaded everytime your revisit the page.And if i embed the
flash into a html file ,there is no such probems. it seems that when the
page are generated dynamically , the flash will not be cached.

Does anyone know the reason and a solution.

I also found that the page http://www.flex.org/blogs/ ,which is generated
dynamically, has embedded a flash. And the flash will be cached.
Then i digged out that the page will first embed a iframe ,which cotains
the flash.  Since the iframe is html file ,the flash will be cached.

I am not sure if this is the only solution for the cache problem.

Is there better solution?

Thanks.

 



Re: [flexcoders] Re: Shouldn't this VBox have a scrollbar?

2007-05-05 Thread Tom Bray

Simon,

I don't want the parent canvas to own the scrollbar.  If I let the  
parent own the scrollbar, it obscures the right-most content of the  
VBox (or displays a horizontal scrollbar if I let it).  I want the  
vbox to respect the height=100% and thus have a height of 300 (in  
this example) and display a vertical scrollbar.


As Scott pointed out, binding the height of the VBox to the height of  
the parent achieves the result I'm looking for.  I just expected the  
VBox to behave this way already.


The code I sent is a test case to illustrate the problem I've run  
into in my app.  My app has a bunch of tabs and this particular tab  
contains a VBox that I'm using to display an arbitrary number of  
items that have varying heights.  (Let's say it's a list of 20 blog  
entries).  I'm using a VBox instead of a List control for several  
reasons, the two big ones being that I need smooth scrolling  
(itemRenderers in a List don't move as you scroll). and variable- 
height items.  I started out using a List with variableRowHeight, but  
it was a pain.  Since I didn't need any of the other List  
functionality and VBox provided everything I needed plus the smooth  
scrolling, here I am.


Thanks,

Tom


On May 5, 2007, at 3:35 PM, simonjpalmer wrote:


It will never show a scroll bar while you have
verticalScrollPolicy=off in the parent canvas...

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

 Hi Jas,

 I expect the measuredHeight to be 612, which it is. The problem is
 that I also expect the VBox to respect the height of its parent
 canvas (300) and thus display a vertical scrollbar.

 Thanks,

 Tom

 On May 5, 2007, at 3:17 PM, Jas Kaur wrote:

 
  The value of height=200 is making this happen
 
  mx:Canvas width=100% height=200 backgroundColor= green/
  mx:Canvas width=100% height=200 backgroundColor= green/
 
  - Original Message 
  From: Tom Bray [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Saturday, May 5, 2007 5:36:08 PM
  Subject: [flexcoders] Shouldn't this VBox have a scrollbar?
 
 
  Shouldn't the height of the VBox below end up being 300? Shouldn't
  height=100%  make it fill up the area allotted to it by it's
  parent? Instead it ends up having a height of 612 and no  
scrollbar:

 
  ?xml version=1.0 encoding=utf- 8?
  mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml
  layout=absolute horizontalScrollPol icy=off  
verticalScrollPolic

  y=off
  mx:Canvas width=500 height=300 horizontalScrollPol icy=off
  verticalScrollPolic y=off
  mx:VBox id=badVBox width=100% height=100%
  mx:Canvas width=100% height=200 backgroundColor= green/
  mx:Canvas width=100% height=200 backgroundColor= green/
  mx:Canvas width=100% height=200 backgroundColor= green/
  /mx:VBox
  /mx:Canvas
 
 
  mx:Button y=400 label=debug click=debug( )/
 
 
  mx:Script
  ![CDATA[
  public function debug():void
  {
  var v:VBox = badVBox;
  }
  ]]
  /mx:Script
 
  /mx:Application
 
 
  The best gets better. See why everyone is raving about the All-new
  Yahoo! Mail.
 
 








Re: [flexcoders] Stopping embedded flash in Flex

2007-05-05 Thread Abdul Qabiz

There is no interoperability between AS3 and AS2 apps that means you can't
control or invoke anything in loaded SWF8 ( or less) from a SWF9 or more..

There are workarounds which use LocalConnection or ExternalInterface to
achieve that. Infact, there are some projects around this problem.

http://www.flashextensions.com/blog/2006/12/11/swfadapter-%E2%80%93-proxy-to-communicating-to-flash-8-swfs-from-flash-9/

-abdul

On 5/3/07, Manish Jethani [EMAIL PROTECTED] wrote:


  On 5/2/07, John [EMAIL PROTECTED] wablam%40gmail.com wrote:
 I have a ViewStack that has a SWFLoader as one of the views.

 The problem is when I change views the flash on the first view(as well
 as the audio) is still running in the background. Anyway of
 stopping/pausing the flash when I switch Views?

You can either unload it by setting the source to  (or null). But I
found that that doesn't stop the movie playing. So try calling stop()
on the content.

loader.content.stop();

I'm assuming the content will be a MovieClip, etc. Didn't work for me
with an old Flash 7 SWF.
 



[flexcoders] Re: binding and dataProvider.filterFunction

2007-05-05 Thread arieljake
In response:

1) I apparently must use {categoryData.allAvailableCategories.source}
as the source attribute because FlexBuilder complains about cast of
ArrayCollection to Array.

2) If I make the change in #1, then I get the warning that Data
binding will not be able to detect assignments. How can I make that go
away?

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

 On 5/6/07, arieljake [EMAIL PROTECTED] wrote:
 
 [snip]
  It seems that setting the filterFunction is affecting the
  allAvailableCategories variable when I trace the length of the
  allAvailableCategories variable after the listData is refreshed.
 
  Why?
 
  here is the code:
 
  model:CategoryData id=categoryData /
  mx:ArrayCollection id=listData /
  mx:Binding source={categoryData.allAvailableCategories}
  destination=listData /
  mx:List id=categoryList dataProvider={listData} /
 
 I think you want to do this instead:
 
   ArrayCollection id=listData
 source={categoryData.allAvailableCategories} /
 
 i.e. remove the binding and use the source property of the collection.





[flexcoders] Re: Question about the 'includes' compiler option and SWC files.

2007-05-05 Thread gotgoose09
That -include-sources compiler option will work nicely because I
wanted to include a whole directory anyway.  Thanks!

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

 As to docs, I'm not sure.  I mostly looked up things from the flex  
 docs or from the archives of lists like this.
 
 As to multiple files, I'm not.  I know you can match a whole source  
 folder with -include-sources, but not with wildcards.  If you're  
 running the compiler from the shell, then you may be able to use  
 wildcards with sources (because they're paths, not AS3 class  
 definition names, but in that case it would be the shell resolving  
 the wildcard, not the compiler.
 
 Christian.
 
 On May 5, 2007, at 3:14 PM, gotgoose09 wrote:
 
  Thanks for that info!  Is there somewhere I can read more about SWCs
  or is there only the Flex 2 Documentation?
 
  I'm still wondering about matching multiple files instead of one at a
  time; anyone know if this can be done?
 
 
 christian gruber + [EMAIL PROTECTED] + bus 905.640.1119 + mob  
 416.998.6023
 process coach and architect + ISRÁFÍL CONSULTING SERVICES





Re: [flexcoders] Re: Disabling Selectable Text for a ComboBox

2007-05-05 Thread Brendan Meutzner

Another workaround is to nest the ComboBox in a Canvas container and then
enable/disable the Canvas... you can see a tiny bit of disabled coloring
bleeding over the radius of the ComboBox corners, but you've really gotta be
looking.

Brendan


On 20 Mar 2007 11:06:03 -0700, Paul Whitelock [EMAIL PROTECTED] wrote:


  I just discovered why the second ComboBox was not affected -- it's
because I was disabling the ** Form item ** that wraps the ComboBox
and not the ComboBox itself.

I changed my code so that I enable and disable both ComboBoxes by
setting the enabled property for the Form item rather than for the
ComboBox and now the problem with the selectable text is gone (you can
even set the enabled property for the Form item to false in the MXML
without causing a problem).

One possible drawback that I found in doing this is that the Form
item's label text is dimmed when the Form item is disabled (disabling
only the ComboBox left the Form item's label untouched). Still, it's
better than the alternative of selectable text in the ComboBox.

Paul


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

 Thanks Ben, that helped a bit.

 I have two ComboBoxes on the Form and each had an enabled=false in
 the MXML. However, when I removed the enabled=false from the MXML I
 was still getting the i-beam and selectable text.

 In my code I'm also programatically changing the enabled state of the
 ComboBoxes, so I tried removing the code where the ComboBoxes are
 disabled in response to other settings in the form. This time it
 worked: the i-beam cursor was gone and the text was no longer
 selectable. Of course the ComboBoxes are always enabled now, which
is bad.

 I did discover something else odd. With the enabled=false gone in
 the MXML I can programatically enable and disable the SECOND ComboBox
 without it becoming selectable (the first ComboBox still has the
 problem when it is programatically disabled and enabled).

 Anyone know of a way to disabling/enabling a ComboBox without running
 into this problem of the text becoming selectable?

 Paul

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, 
ben.clinkinbeard
 ben.clinkinbeard@ wrote:
 
  I actually discovered this same issue in my app a few days ago. I also
  have several other ComboBoxes (including one right next to the
  problematic one) that don't display the i-beam.
 
  After a bit of investigation, it seems that having enabled=false in
  the ComboBox's MXML tag (then enabling it at some point of course)
  causes the selectable text. Any idea on a workaround?
 
  Thanks,
  Ben
 
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Paul Whitelock news@ wrote:
  
   I've got a ComboBox in a Form and for some reason the text is
   selectable (i.e., the I-bar cursor is displayed when you move
over the
   ComboBox and you can drag-select the text displayed for the
currently
   selected list item). The editable property is not defined, and it
   doesn't make a difference if editable is explicitly set to false
   (note that it is not possible to type text into the ComboBox, just
   select the text that is there). There's no selectable property
for a
   ComboBox, so I can't use that to disable text selection.
  
   I have ComboBoxes in other Forms that don't have this problem and I
   don't see any differences between this ComboBox and the others in my
   code. Any ideas on what I can do to make the ComboBox text
   non-selectable? Thanks!
  
   Paul
  
 


 





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


Re: [flexcoders] Re: Actionscript - copy constructor/ assignment operator question

2007-05-05 Thread Troy Gilbert

Well, from a C++ background string concatenation would be done through
operator overloading.

Troy.


On 5/4/07, Manish Jethani [EMAIL PROTECTED] wrote:


  On 5/4/07, Troy Gilbert [EMAIL PROTECTED]troy.gilbert%40gmail.com
wrote:
 String is a primitive type, like int/uint/Number (which have operators)
and
 Boolean, which all have special casting rules and operator
overloading.

There's no special operator overloading in String. For example:

var n:int = hello.length;
trace(n + ); // prints 5

hello is a String object itself. So it can be assigned to any
variable of type String.

var s:String = hello;

No magic there.
 



[flexcoders] Scrubbing in a MP3-file

2007-05-05 Thread Sebastian Mohr

Hi guys,

is there anybody who can explain how to
give a mx:HSlider-component the ability to
scrub in a MP3-file?

Up to now I could find a scrubbing example
for the mx:VideoDisplay only, see:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=2postId=1921

Thank you,
masu