[flexcoders] Dynamic Array Object Keys

2007-09-16 Thread Jeremy Rottman
I finally figured out my issue with my dynamic datagrid columns, and
what not. However, I have run into a new problem with this little project.

In previous versions of Actionscript, I have been able to create
dynamic array object keys. However in AS3, I am not able to figure out
how to do so. In previous versions of AS the creation of my array
would look something like this. 
for(var i:Number = 0; isomething.length;i++){
thisArray.push({key + i:something[i].thisValue});
}

Anyone know if it is still possible to create dynamic object keys?



[flexcoders] Re: Currently selected tab in TabNavigator?

2007-09-16 Thread candysmate
--- In flexcoders@yahoogroups.com, Michael Schmalle
[EMAIL PROTECTED] wrote:

 Hi,
 
 use selectedIndex or selectedChild.
 
 When using selectedChild you can use;
 
 selectedChild.label to get the label of the tab that is selected.
 
 When using selectedIndex you can use;
 
 var tab:Tab = Tab(tabNavigator.getTabAt(tabNavigator.selectedIndex));
 tab.label
 tab.icon
 tab.data
 
 
 Peace, Mike
 

Got it.  Thanks Mike.



[flexcoders] Re: Problem with repeater and image ???

2007-09-16 Thread danielvlopes
Thanks again Alex, you always help...
This fix my problem, event.currentTarget.getRepeaterItem();

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

 Target is the dispatcher, which is the loader of the image.  Try
 currentTarget, or use rptFoto.getRepeaterItem
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of danielvlopes
 Sent: Saturday, September 15, 2007 8:57 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problem with repeater and image ???
 
  
 
 Helo everybody...
 
 I having problems to try get repearter item when user click on image.
 
 This is my code for repeater:
 mx:Repeater id=rptFoto dataProvider={objSelectedEquip.thumbs}
 mx:HBox
 mx:Image 
 source={rptFoto.currentItem} 
 buttonMode=true
 useHandCursor=true
 toolTip=Vizualizar
 click=exibirImagem(event)/
 mx:Button label=Alterar click=exibirImagem(event) / 
 /mx:HBox 
 /mx:Repeater
 
 When user click on button or image this function is called:
 
 private function exibirImagem(event:MouseEvent):void{
 
 var image:String = event.target.getRepearterItem();
 var imgUrl:URLRequest = new
 URLRequest(Funcoes.getImageFromThumb(image));
 navigateToURL(imgUrl,_blank);
 }
 
 When user click on button everything work, but whe click image this
 error is dispatched Property getRepeaterItem not found on
 mx.core.FlexLoader and there is no default value. , anyone know some
 way to fix this?
 
 Thanks.





[flexcoders] Re: Dynamic Array Object Keys

2007-09-16 Thread Jeremy Rottman
I got this part figured out, however I have run into another issue with
getting this fixed. Why I finally populate the datagrid with data, the
data comes out with all the data for column 1 in the first 4 rows, all
the data for column 2, in the next two rows, and all teh data for column
3 in the last 4 rows.

This is an example of what it looks like


NAME 1  NAME 2  NAME 3arrayData1  arrayData2
arrayData3  arrayData4 arrayData5 
arrayData6
Here is the code that I am using to create this data.

 private function createProvider():void{
 columnArr = new Array();
 thisArr= new Array();
 dailyData = new Array();
 // iterate through result array and add new items to the arrays
 for(var i:Number = 0; i  resultArr.length; i++){

 // add new item to the array
 columnArr.push({column:resultArr[i].colName,
dataField:adcl + i});

 // set temp array to resultArr.child
 dailyData = resultArr[i].children;

 // iterate through child array
 for(var n:Number = 0; n  dailyData.length; n++){
 var dataObj:Object = new Object();
 var identifier:String = adcl + i;
 dataObj[identifier] = dailyData[n].adcl;
 //trace(dataObj[identifier]);
 thisArr.push(dataObj);
 }
 }



This is the function I am using to create my datagrid.

 private function buildGrid():void {
 var dgc:DataGridColumn;
 var aColumnsNew:Array = dg.columns;
 for(var i:int = 0; i  columnArr.length; i++){
 dgc = new DataGridColumn();
 dgc.width = 30;
 dgc.headerText = columnArr[i].column;
 dgc.dataField = columnArr[i].dataField;
 aColumnsNew.push(dgc);
 }
 dg.columns = aColumnsNew;
 dg.dataProvider = thisArr;



[flexcoders] Re: CB dataProvider - can it be filenames in a folder (maybe with CF7.0.2)?

2007-09-16 Thread shawn.gibson
No, you understand it, that's what I'm aiming for - a text rep. of a
part of the filesystem, in this case all the titles of all files in
one particular folder somewhere under the webroot passed into Flex as
data of some sort. Thanks Tracy. 

I'm guessing my other response (thinking I need to use the
cfdirectory tag) was probably at least close enough to try something
out, and come back with what I have from there...methinks.

Shawn



Re: [flexcoders] XMLList

2007-09-16 Thread Ben Marchbanks
Interest to know if anyone has been able to make this work.

I struggled with trying to use variables in filtering XMLList without success.

Alex Harui wrote:
 
 
 ([variable] == “Y”)
 
  
 
 
 
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *figo2324
 *Sent:* Friday, September 14, 2007 2:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] XMLList
 
  
 
 Hi people, i need your help, i have a xmllist object so i need to
 query this xmllist, im doing it in this way
 
 var jo:XMLList=myDataProvider.data.item.(koala==Y);
 
 where myDataProvider.data =
 data
 item
 pruebaccct/prueba
 koalaX/koala
 /item
 item
 pruebasambil/prueba
 koalaY/koala
 /item
 /data
 then the structure of this xmllist can be changes it means that when
 i wanna to query it using this sentences var
 jo:XMLList=myDataProvider.data.item.(koala==Y);
 The param koala have been changed, then i need that this param be a
 variable so i dont know how to do that...
 
 for example
 
 var variable:String=koala;//
 var jo:XMLList=myDataProvider.data.item.(variable==Y);
 but it doesnt works, i dont know how to pass a variable in this
 sentence, some suggestion please...
 
 thanks so much coders
 
 

-- 
Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918


--
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: Best Method for Dynamic Custom Components

2007-09-16 Thread donvoltz
Hi Ben or anyone else who would like to help,

I tried to incorporate your suggestions, but I think I still am
missing the whole idea about an array collection. 

in one part of my code, I have done the following

for each (var item:XML in locationData){
var ff:formField = new formField();
ff.labelText = item..callLocation_DisplayName;
ff.callLocationId = item..callLocation_id;
ff.allowableDataFlag = item..deptCategory;
ff.callSelectedDate = mysqlDate.format(calendarSelector.selectedDate);
callLabelCollection.addItem(ff);
addChild(ff);
}

This runs through the loop a total of 16 times to build my array
collection.

Now in a custom event handler, when the user selects a given date, I
query a new table to determine who is scheduled in any of these 16
locations on the selected date.

What I need to do now is to set another parameter of the custom
component based on the callLocationId that I set in my array collection.

So for this I have 2 questions

1) how do I access the array at a given callLocationId from the array
collection above?

for this I have tried

var someFF:formField =
callLabelCollection.getItemIndex(item..callLocation_id) as formField;

but am not getting any results

and 

2) how do I now add additional fields to this array to the array
collection?


Thanks for any help 

Don



[flexcoders] Embedding Flash font

2007-09-16 Thread candysmate
I have created a Flash 8 swf as per: 
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=fonts_070_12.html
containing the Windings font.
In my external css files I have :

.myWingdingsStyle {
font-Family: Wingdings;
font-Size: 16;
font-Color: #FF;
}   

and in my MXML  script section I have:

[Embed(source='/assets/wingdings.swf', 
fontName='Wingdings'
)] 
private static var plainFont:Class;

Within my label component I have:

mx:Label x=324 y=129 htmlText=#251; textAlign=center
id=percentageProblem visible=true styleName=myWingdingsStyle/

This sgould give me the ballot box style cross, but I only get a
capital U witb a reflex accent over it. Where am I falling down?



Re: [flexcoders] Re: SWFLoader Issue

2007-09-16 Thread Steve Hueners
Can't we count on the compiler to toss an error when something that should
be imported isn't?

On 9/15/07, grimmwerks [EMAIL PROTECTED] wrote:

   Alex had pointed out something similar I was doing - that I needed to
 import mx.Application in the mx:Script area.




RE: [flexcoders] Problem with repeater and image ???

2007-09-16 Thread Tracy Spratt
Use a custom component for the repeated view, it simplifies things like
this.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Sunday, September 16, 2007 12:14 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Problem with repeater and image ???

 

Target is the dispatcher, which is the loader of the image.  Try
currentTarget, or use rptFoto.getRepeaterItem

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of danielvlopes
Sent: Saturday, September 15, 2007 8:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with repeater and image ???

 

Helo everybody...

I having problems to try get repearter item when user click on image.

This is my code for repeater:
mx:Repeater id=rptFoto dataProvider={objSelectedEquip.thumbs}
mx:HBox
mx:Image 
source={rptFoto.currentItem} 
buttonMode=true
useHandCursor=true
toolTip=Vizualizar
click=exibirImagem(event)/
mx:Button label=Alterar click=exibirImagem(event) / 
/mx:HBox 
/mx:Repeater

When user click on button or image this function is called:

private function exibirImagem(event:MouseEvent):void{

var image:String = event.target.getRepearterItem();
var imgUrl:URLRequest = new
URLRequest(Funcoes.getImageFromThumb(image));
navigateToURL(imgUrl,_blank);
}

When user click on button everything work, but whe click image this
error is dispatched Property getRepeaterItem not found on
mx.core.FlexLoader and there is no default value. , anyone know some
way to fix this?

Thanks.

 



RE: [flexcoders] XMLList

2007-09-16 Thread Tracy Spratt
Yes, this has worked for me, though I always apply e4x expressions to an
XML node, never to an XMLList.  The XMLList is always what I get back.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ben Marchbanks
Sent: Sunday, September 16, 2007 7:57 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] XMLList

Interest to know if anyone has been able to make this work.

I struggled with trying to use variables in filtering XMLList without
success.

Alex Harui wrote:
 
 
 ([variable] == Y)
 
  
 


 
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]

 *On Behalf Of *figo2324
 *Sent:* Friday, September 14, 2007 2:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] XMLList
 
  
 
 Hi people, i need your help, i have a xmllist object so i need to
 query this xmllist, im doing it in this way
 
 var jo:XMLList=myDataProvider.data.item.(koala==Y);
 
 where myDataProvider.data =
 data
 item
 pruebaccct/prueba
 koalaX/koala
 /item
 item
 pruebasambil/prueba
 koalaY/koala
 /item
 /data
 then the structure of this xmllist can be changes it means that when
 i wanna to query it using this sentences var
 jo:XMLList=myDataProvider.data.item.(koala==Y);
 The param koala have been changed, then i need that this param be a
 variable so i dont know how to do that...
 
 for example
 
 var variable:String=koala;//
 var jo:XMLList=myDataProvider.data.item.(variable==Y);
 but it doesnt works, i dont know how to pass a variable in this
 sentence, some suggestion please...
 
 thanks so much coders
 
 

-- 
Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918


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







[flexcoders] Re: Best Method for Dynamic Custom Components

2007-09-16 Thread ben.clinkinbeard
The code you're trying for issue #1 doesn't work because  your
collection is holding formField instances, not just IDs. To retrieve
an item with a specific id you could do this:

function getFieldByID(idToFind:Number):FormField
{
   for each(var ff:FormField in callLabelCollection)
   {
  if(ff.callLocation_id == idToFind)
 return ff;
   }
   return null;
}

Not sure I completely understand issue #2 but you can always use
addItem() to add items to an ArrayCollection.

HTH,
Ben


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

 Hi Ben or anyone else who would like to help,
 
 I tried to incorporate your suggestions, but I think I still am
 missing the whole idea about an array collection. 
 
 in one part of my code, I have done the following
 
 for each (var item:XML in locationData){
 var ff:formField = new formField();
 ff.labelText = item..callLocation_DisplayName;
 ff.callLocationId = item..callLocation_id;
 ff.allowableDataFlag = item..deptCategory;
 ff.callSelectedDate = mysqlDate.format(calendarSelector.selectedDate);
 callLabelCollection.addItem(ff);
 addChild(ff);
 }
 
 This runs through the loop a total of 16 times to build my array
 collection.
 
 Now in a custom event handler, when the user selects a given date, I
 query a new table to determine who is scheduled in any of these 16
 locations on the selected date.
 
 What I need to do now is to set another parameter of the custom
 component based on the callLocationId that I set in my array collection.
 
 So for this I have 2 questions
 
 1) how do I access the array at a given callLocationId from the array
 collection above?
 
 for this I have tried
 
 var someFF:formField =
 callLabelCollection.getItemIndex(item..callLocation_id) as formField;
 
 but am not getting any results
 
 and 
 
 2) how do I now add additional fields to this array to the array
 collection?
 
 
 Thanks for any help 
 
 Don





[flexcoders] Flex Chat

2007-09-16 Thread Ed Capistrano
Realy? A flex chat app! Is it possible? using as2/3


  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz


Re: [flexcoders] Flex Chat

2007-09-16 Thread grimmwerks
Why wouldn't it be?  Could work with Flash Media Server (it does  
already) or using any backendeven a socket server you create.

On Sep 16, 2007, at 11:45 AM, Ed Capistrano wrote:

 Realy? A flex chat app! Is it possible? using as2/3



 __ 
 __
 Luggage? GPS? Comic books?
 Check out fitting gifts for grads at Yahoo! Search
 http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz


 --
 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] Embedding Flash font

2007-09-16 Thread Jon Bradley
I'm guessing because it's not recognizing the embedded font - you're  
seeing the character from the default font, not the embedded font.


A few things I try to make sure of:

1. Don't name the embedded font in the Flash 8 swf file the same as  
the system font.


2. Open the Flash 8 SWF back up into Flash 8 IDE (or CS3 IDE). When  
you do that, do a list variables - Debug  List Variables. Make note  
of the 'exported' font name that Flash used for the font. That name  
is what you'll use in Flex.


For example, on using a pixel font (Kroeger 05_56), I exported the  
Flash 8 SWF file, the embedded symbol name ended up as kroeger  
05_56_8pt_st. And in Flex, I used this in the CSS as follows:


@font-face {
src: url(../fonts/Kroeger.swf) ;
fontFamily: kroeger 05_56_8pt_st;
font-weight: normal;
}

And defining the usage of that font, recognizing that in this case  
it's a pixel font and doesn't use the advanced anti aliasing


.assetInfoTitle
{
color:#66;
fontFamily: kroeger 05_56_8pt_st;
font-weight: normal;
fontSize: 8;
fontAntiAliasType: normal;
}

Hopefully that will get you on your way.

best,

Jon



On Sep 16, 2007, at 9:35 AM, candysmate wrote:


I have created a Flash 8 swf as per:
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/ 
wwhelp.htm?context=LiveDocs_Book_Partsfile=fonts_070_12.html

containing the Windings font.
In my external css files I have :




[flexcoders] Reduce size of my module! Really boring....

2007-09-16 Thread danielvlopes
Hello,

Now in Brasil is sunday, and i waste all my day trying reduce swf size
of my modules... 

I had project with 11 modules... each module had approximately 90kb,
because in my project i'm using framework caching teached in this
video (http://labs.adobe.com/technologies/flex/videos/flex3rsls/), all
modules are inside of my main project.

I try to put each module in separete project, in project properties in
my main project i put this on compile line,
link-report=D:/Daniel/Trabalho/bms/painel_adm/report.xml to generate
report.xml .

In each of my modules i put
load-externs=D:/Daniel/Trabalho/bms/painel_adm/report.xml to try
reduce swf size of my modules.

But the problem is now each module had approximately 250kb, bigger
than with modules inside a single project.

What can i do to fix this problems?



[flexcoders] Re: Embedding Flash font

2007-09-16 Thread candysmate
--- In flexcoders@yahoogroups.com, Jon Bradley [EMAIL PROTECTED] wrote:

 I'm guessing because it's not recognizing the embedded font - you're  
 seeing the character from the default font, not the embedded font.
 
 A few things I try to make sure of:
 
snipped

It sure did Jon!  Please accept my grateful thanks.



Re: [flexcoders] Re: Embedding Flash font

2007-09-16 Thread Jon Bradley

No prob! Happy I was able to help.

I banged my head against the wall on that one for a while. Took me a  
bit of research to find out that Flash exports symbols for embedded  
fonts with it's own formatting. Now, it would be nice if there were  
just an automated way to deal with this.


good luck,

jon

On Sep 16, 2007, at 3:46 PM, candysmate wrote:


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

 I'm guessing because it's not recognizing the embedded font - you're
 seeing the character from the default font, not the embedded font.

 A few things I try to make sure of:

snipped

It sure did Jon! Please accept my grateful thanks.




[flexcoders] Searching array for item

2007-09-16 Thread candysmate
I wish to search an ArrayCollection for a match to the text in a
textInput component and then set the selectedIndex of a dataGrid to
the result.

I tried:

invoiceApprovalGrid.selectedIndex =
adviceApprovalCollection.getItemIndex(approveAdviceNumber.text);

without success. Any pointers most welcomed.



Re: [flexcoders] Re: Rounded corners

2007-09-16 Thread dorkie dork from dorktown
Peter just posted an example that shows how to create a complex rectangle
using the graphics util class,
http://blog.flexexamples.com/2007/09/16/drawing-complex-rectangles-in-flex-using-the-graphicsutil-class/

On 9/14/07, scalenine [EMAIL PROTECTED] wrote:

   There's always the EnhancedButton Skin on FlexLib:


 http://www.wabysabi.com/blog/2007/04/13/flex-enhancedbuttonskin-component-released/

 http://code.google.com/p/flexlib/wiki/ComponentList

 With a nice explorer:


 http://flexlib.googlecode.com/svn/trunk/examples/EnhancedButtonSkin/EnhancedButton_Sample.swf/

 Hope that helps.

 Juan
 scalenine.com
 degrafa.com

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Roy Tang
 [EMAIL PROTECTED] wrote:
 
  Ok. I was just hoping there might be a built-in alternative hehe
 
  Thanks all :)
 
  Roman Protsiuk wrote:
  
   It should be custom skinned to do that. Programmatic skin I guess.
  
   R.
  
   On 9/14/07, *Roy Tang* [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] wrote:
  
   Thanks, but I seem to have been misunderstood. I know how to use
   rounded
   corners, but I want to round corners selectively, like
   focusRoundedCorners property, i.e. have only 3 corners
 rounded, etc.
  
   Any ideas? :)
  
   Maximilian Nyman wrote:
   
Note: If you use cornerRadius you need to have
 borderStyle=solid.
(It could be borderThickness=0, but it has to be existent)
   
/Max
   
On 9/14/07, Sheriff [EMAIL PROTECTED]
   mailto:sherif626% sherif626%2540yahoo.com
mailto:sherif626% sherif626%25 mailto:sherif626% sherif626%2525
 40yahoo.com
   http://40yahoo.com wrote:


 you can create your own skin and apply it otherwise you
 can use
   the
cornerRadius


 - Original Message 
 From: Roy Tang [EMAIL PROTECTED]
   mailto:roytang.sub%40gmail.com mailto: roytang
   mailto:roytang.sub%40gmail.com
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   mailto:flexcoders% flexcoders%2540yahoogroups.com mailto:
 flexcoders%
   mailto:flexcoders% flexcoders%252540yahoogroups.com
 http://40yahoogroups.com
 Sent: Thursday, September 13, 2007 11:33:23 PM
 Subject: [flexcoders] Rounded corners




 Hi,

 Is there a way to control which corners are rounded for a
   button or a
 canvas or whatever? Something like what focusRoundedCorners
   does, except
 for the actual control, not for the focus rectangle.

 Thanks,

 Roy

   
   
  
  
  
 

  



[flexcoders] Re: Problem with repeater and image ???

2007-09-16 Thread danielvlopes
What will be diferent when i repeat custom comps?

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

 Use a custom component for the repeated view, it simplifies things like
 this.
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Alex Harui
 Sent: Sunday, September 16, 2007 12:14 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Problem with repeater and image ???
 
  
 
 Target is the dispatcher, which is the loader of the image.  Try
 currentTarget, or use rptFoto.getRepeaterItem
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of danielvlopes
 Sent: Saturday, September 15, 2007 8:57 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problem with repeater and image ???
 
  
 
 Helo everybody...
 
 I having problems to try get repearter item when user click on image.
 
 This is my code for repeater:
 mx:Repeater id=rptFoto dataProvider={objSelectedEquip.thumbs}
 mx:HBox
 mx:Image 
 source={rptFoto.currentItem} 
 buttonMode=true
 useHandCursor=true
 toolTip=Vizualizar
 click=exibirImagem(event)/
 mx:Button label=Alterar click=exibirImagem(event) / 
 /mx:HBox 
 /mx:Repeater
 
 When user click on button or image this function is called:
 
 private function exibirImagem(event:MouseEvent):void{
 
 var image:String = event.target.getRepearterItem();
 var imgUrl:URLRequest = new
 URLRequest(Funcoes.getImageFromThumb(image));
 navigateToURL(imgUrl,_blank);
 }
 
 When user click on button everything work, but whe click image this
 error is dispatched Property getRepeaterItem not found on
 mx.core.FlexLoader and there is no default value. , anyone know some
 way to fix this?
 
 Thanks.





Re: [flexcoders] problem using a single clickevent for multiple datagrids (SOLVED)

2007-09-16 Thread Ben
Instead of using argument binding with a more verbose set of code in the
RemoteObject tag, I used Explicit argument passing in my pickRow() method
and used the currentTarget keyword to grab the item I clicked from.

Thanks
ben

public function pickRow(event:ListEvent):void {
if (event.rowIndex  0) {
WS.GetInstructorDetail2.send(
event.currentTarget.selectedItem.InstructorId);
WS.ListContractorRates.send(
event.currentTarget.selectedItem.InstructorId);
currentState='detailTabs';
}
 }




On 9/15/07, dorkbrain2000 [EMAIL PROTECTED] wrote:

   I have a tab navigator that has datagrids on each respective tab. The
 datagrids are populated with a RemoteObject call and all works fine.
 When the user clicks on a row (itemClick), the state changes and they
 are brought to the details screen (for editing the content in a form).
 The content grab is another RemoteObject call repective to the row
 they clicked in the base state. So, the problem is, how do I make my
 pickRow() function generic? It gathers the event goodies on the
 rowClick and passes them to the RO call and passes the argument. But,
 when I place the argument in the RemoteObject tag call, I need to
 specifically reference the datagrid id. So this only works for one
 data grid. How do I make it work for all the datagrids. I have wittled
 the code down and placed it below.

 TIA - Ben

 mx:Script
 ![CDATA[
 import mx.events.ListEvent;
 import mx.controls.Alert;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.ResultEvent;
 import mx.collections.ArrayCollection;


 [Bindable]
 private var myData:ArrayCollection;
 [Bindable]
 private var myRate:ArrayCollection;
 [Bindable]
 private var selected1:Number;

 private function queryHandler(event:ResultEvent):void
 {
 myData = event.result as ArrayCollection;
 }

 private function queryRateHandler(event:ResultEvent):void
 {
 myRate = event.result as ArrayCollection;
 }

 private function faultHandler(event:FaultEvent):void
 {
 Alert.show(event.fault.faultString, event.fault.faultCode);
 }

 public function pickRow(event:ListEvent):void {
 if (event.rowIndex  0) {
 WS.GetInstructorDetail2.send();
 WS.ListContractorRates.send();
 currentState='detailTabs';
 }
 }

 ]]
 /mx:Script

 mx:RemoteObject id=WS
 destination=ColdFusion
 source=Compass.cfc.lsd
 fault=faultHandler(event)
 mx:method name=GetInstructorDetail2 result=queryHandler(event)
 mx:arguments
 InstructorId{grid0.selectedItem.InstructorId}/InstructorId
 /mx:arguments
 /mx:method
 mx:method name=ListContractorRates result=queryRateHandler(event)
 mx:arguments
 InstructorId{grid0.selectedItem.InstructorId}/InstructorId
 /mx:arguments
 /mx:method
 /mx:RemoteObject

 mx:DataGrid id=grid0
 dataProvider={InstructorWS.ListActiveInstructors.lastResult}
 itemClick=pickRow(event)
 left=10 right=10 bottom=10 top=10
 editable=false
 enabled=true
 sortableColumns=true
 draggableColumns=false
 mx:columns
 mx:DataGridColumn headerText=First Name dataField=FirstName
 width=80/
 mx:DataGridColumn headerText=Last Name dataField=LastName
 width=80/
 mx:DataGridColumn headerText=Email dataField=Email/
 mx:DataGridColumn headerText=Mobile dataField=Mobile
 width=110/
 mx:DataGridColumn headerText=Phone dataField=Phone width=110/
 mx:DataGridColumn headerText=City dataField=City width=120/
 mx:DataGridColumn headerText=State dataField=State width=40/
 /mx:columns
 /mx:DataGrid
 /mx:Canvas
 mx:Canvas label=Inactive Instructors width=100% height=100%
 id=canvas2
 mx:DataGrid id=grid1
 dataProvider={InstructorWS.ListInactiveInstructors.lastResult}
 itemClick=pickRow(event)
 left=10 right=10 bottom=10 top=10
 editable=false
 enabled=true
 sortableColumns=true
 mx:columns
 mx:DataGridColumn headerText=First Name dataField=FirstName
 width=80/
 mx:DataGridColumn headerText=Last Name dataField=LastName
 width=80/
 mx:DataGridColumn headerText=Email dataField=Email/
 mx:DataGridColumn headerText=Mobile dataField=Mobile
 width=110/
 mx:DataGridColumn headerText=Phone dataField=Phone width=110/
 mx:DataGridColumn headerText=City dataField=City width=120/
 mx:DataGridColumn headerText=State dataField=State width=40/
 /mx:columns
 /mx:DataGrid

  




-- 
Benjamin Wilson
Logware.us
Logware is an online time tracking service for programmers, consultants,
designers or anyone who tracks time. Sign up for a free account today.


[flexcoders] MVP

2007-09-16 Thread samueljonasson
Hi,

Has anyone implemented the MVP design pattern - or maybe the Passive
view pattern, in a Flex application?

I find it very interesting and would like to hear from users that have
used to before I dive into it.

Best,
Sammi 



[flexcoders] Math.cos...?

2007-09-16 Thread Mike Krotscheck
Why does Math.cos(Math.PI/2) not return zero?

 

Michael Krotscheck

Senior Developer

 


RESOURCE INTERACTIVE

http://www.resource.com/ www.resource.com http://www.resource.com 

614 621 2888  main

 

  
614 410 3195  direct

412 726 8087  mobile

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

 



[flexcoders] Re: Identify Function Name

2007-09-16 Thread ilikeflex
Hi Alex

Thanks for the reply.

If you could just tell me how to get the function name that will 
solve my problem.

function A()
{
  trace(function execute + functionName);
}

If i execute the function it should print

function execute A

Thanks
Rajan



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

 Using a debugger player and debug swf (so it won't work in 
production
 mode), you can create an Error() instance and parse getStackTrace()
 
  
 
 function A()
 {
 log.debug(function execute + new Error().getStackTrace());
 }
 
 
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of ilikeflex
 Sent: Friday, September 14, 2007 4:16 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Identify Function Name
 
  
 
 Hi Team
 
 I am doing the logging of the application and now i want to know 
the 
 name of the function which is being executed.
 In the below i want the functionName to be A.
 
 function A()
 {
 log.debug(function execute + functionName);
 }
 
 Can we do it in flex???
 
 Thanks
 ilikeflex





[flexcoders] xml data and drag related questions

2007-09-16 Thread g07m5064
I have two questions. First, I have the following xml file:
?xml version=1.0 encoding=UTF-8 standalone=yes?
contenders xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
contender pos=1
nameLewis Hamilton/name
age22/age
nationalityEnglish/nationality
sportMotorsport/sport
commentsEverything seems to come easy for the F1 ace. Hamilton
Academical, you might say. Never mind. He's British, very good, and
steered his way round a spying row and team turmoil. And can you ever
tire (tyre?) of seeing him as a cheeky karting schoolboy...?/comments
/contender
contender pos=2
nameRicky Hatton/name
age29/age
nationalityEnglish/nationality
sportBoxing/sport
commentsTiming is crucial for the Manchester 'Hitman'. And his
super fight against Floyd Mayweather could not have been scheduled
better./comments
/contender

/contenders
I am buffled by the fact that the comments node is not accessible i.e.
I cannot display its contents in a grid though I have no problems with
other nodes. 
I am not sure of the reason. Any ideas?

My second question is assuming I wanted to drag a row from the grid
into an HBox container with intentions of adding items
to an arraycollection so that the dragged items can effectively be
diplayed in another grid found in another 'page'.

This is my code for the drop function:

private function doDragDrop(event:DragEvent):void
{
var data:Object = event.dragSource.dataForFormat(items) as
Sport; //Sport is class
draggedData.addItem(data); //draggedData is an instance of
ArrayCollection whose contents will be used as dataProvider for the
other grid
}   count++;// The HBox will display the count value of number
of dragged items



[flexcoders] Re: Best Method for Dynamic Custom Components

2007-09-16 Thread donvoltz
Hi Ben,

Thank you for your response on this question.

I am starting to think I am going about this all wrong. What I am
trying to do is dynamically add and remove a group of custom
components to my application.

I am sending 2 HttpRequests, one returns a list of locations that need
to be filled by people on a given date, the second returns a list of
people who are assigned to each of these locations on the same date
(if any are assigned at all).

With the first list, the locations, I want to add a custom component
for each location (this is what I am doing when I instantiate my
callLabel component. Then after I call the schedule HttpRequest, I
need to add a person for each location if there is a person scheduled.
If none is scheduled, an input field remains blank and would be filled
by adding in a person.

The reason I am building an arrayCollection of my custom component is
to be able to add the names of the people when my second database call
is made. I understand that each component should have a unique id so
that it can be referenced and modified at a later time. What is the
best way to do this when you are adding a number of components like I
am doing?  The only way I have to reference these is by a location_id
which I have in my database and is unique between tables.

I was attempting to build an array of components that uses this
location_id as the components unique identifier so that when I
received more information, I could update the component properties or
call its methods.

Things get a tad more complex, when a user chooses another date, I
need to destroy these components and add a new set of locations and
people for the newly selected day.

I am hoping this helps to clear up what I am doing and if you are
willing to help with this situation

Thanks

DOn



Re: [flexcoders] Math.cos...?

2007-09-16 Thread Troy Gilbert
 Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very close to
0 (1.7xe-17).

Troy.


Re: [flexcoders] Flex Chat

2007-09-16 Thread Rogerio Gonzalez
I like IRC a lot, for those kind of things :)


Regards,

Rogério



On 9/16/07, grimmwerks [EMAIL PROTECTED] wrote:

   Why wouldn't it be? Could work with Flash Media Server (it does
 already) or using any backendeven a socket server you create.

 On Sep 16, 2007, at 11:45 AM, Ed Capistrano wrote:

  Realy? A flex chat app! Is it possible? using as2/3
 
 
 
  __
  __
  Luggage? GPS? Comic books?
  Check out fitting gifts for grads at Yahoo! Search
  http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives: 
  http://www.mail-archive.com/flexcoders%http://www.mail-archive.com/flexcoders%25
  40yahoogroups.com
  Yahoo! Groups Links
 
 
 

  



Re: [flexcoders] Math.cos...?

2007-09-16 Thread Jon Bradley

That's pretty much it.

To a computer Math.cos(Math.PI/2) is not 0. It's really close to 0,  
because PI is an infinite sequence and a computer can only store it  
as a double precision floating point number (ie, a fixed value).


What you get back from this calculation is the error bound of the  
computer basically, which you can then use for  numerical  
calculations, ie, MathLib.ERROR_BOUND = Math.cos(Math.PI/2). Then you  
can feasibly use if you need numerical accuracy.


IE, if result == MathLib.ERROR_BOUND, result = 0.

Numerical accuracy in AS2 is not equivalent to that of AS3. I ran  
into this while porting the Mersenne Twister algorithm to AS2 - I  
couldn't even store 2^32 as a hex value in AS2 (0x1, which  
equals 4294967296).


At least we can be somewhat numerically accurate now...

good luck,

jon


On Sep 16, 2007, at 5:15 PM, Troy Gilbert wrote:


 Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very close to
0 (1.7xe-17).

Troy.




RE: [flexcoders] Math.cos...?

2007-09-16 Thread Mike Krotscheck
The documentation's actually fairly clear on this: The cosine of a 90
degree angle is zero, but because of the inherent inaccuracy of decimal
calculations using binary numbers, Flash Player will report a number
extremely close to, but not exactly equal to, zero.

 

Nevertheless, it seems... sloppy to me.

 

Michael Krotscheck

Senior Developer

 


RESOURCE INTERACTIVE

http://www.resource.com/ www.resource.com http://www.resource.com 

614 621 2888  main

 

  
614 410 3195  direct

412 726 8087  mobile

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Sunday, September 16, 2007 5:15 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?

 

 Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very close to
0 (1.7xe-17).

Troy.

 



[flexcoders] Question about PieSeries style for insideWithCallout

2007-09-16 Thread generalxxaxx
I have a simple two wedge pie chart, typically the ratio of the wedges
is about 90 to 10.

This means that almost always one of the labels is inside and the
other label is callout.

Is there a way to use the style of the pieseries to have the font
color of the inside label be light and the font color of the callout
label be dark?

Regards,
Claude




RE: [flexcoders] xml data and drag related questions

2007-09-16 Thread Alex Harui
Is it really a tag called comments or did you use a comments tag !..?

 

What gets displayed in the DG for the comments tag?

 

If the grid items are XML, then the items you get in the drop will be
XML and not of type Sport.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of g07m5064
Sent: Sunday, September 16, 2007 1:45 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] xml data and drag related questions

 

I have two questions. First, I have the following xml file:
?xml version=1.0 encoding=UTF-8 standalone=yes?
contenders xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance 
contender pos=1
nameLewis Hamilton/name
age22/age
nationalityEnglish/nationality
sportMotorsport/sport
commentsEverything seems to come easy for the F1 ace. Hamilton
Academical, you might say. Never mind. He's British, very good, and
steered his way round a spying row and team turmoil. And can you ever
tire (tyre?) of seeing him as a cheeky karting schoolboy...?/comments
/contender
contender pos=2
nameRicky Hatton/name
age29/age
nationalityEnglish/nationality
sportBoxing/sport
commentsTiming is crucial for the Manchester 'Hitman'. And his
super fight against Floyd Mayweather could not have been scheduled
better./comments
/contender

/contenders
I am buffled by the fact that the comments node is not accessible i.e.
I cannot display its contents in a grid though I have no problems with
other nodes. 
I am not sure of the reason. Any ideas?

My second question is assuming I wanted to drag a row from the grid
into an HBox container with intentions of adding items
to an arraycollection so that the dragged items can effectively be
diplayed in another grid found in another 'page'.

This is my code for the drop function:

private function doDragDrop(event:DragEvent):void
{
var data:Object = event.dragSource.dataForFormat(items) as
Sport; //Sport is class
draggedData.addItem(data); //draggedData is an instance of
ArrayCollection whose contents will be used as dataProvider for the
other grid
} count++;// The HBox will display the count value of number
of dragged items

 



RE: [flexcoders] Reduce size of my module! Really boring....

2007-09-16 Thread Alex Harui
I haven't use FB to do this.  I use ANT or batch scripts.  Take a peek
at the .xml to see if it has everything it should.  

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of danielvlopes
Sent: Sunday, September 16, 2007 12:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Reduce size of my module! Really boring

 

Hello,

Now in Brasil is sunday, and i waste all my day trying reduce swf size
of my modules... 

I had project with 11 modules... each module had approximately 90kb,
because in my project i'm using framework caching teached in this
video (http://labs.adobe.com/technologies/flex/videos/flex3rsls/
http://labs.adobe.com/technologies/flex/videos/flex3rsls/ ), all
modules are inside of my main project.

I try to put each module in separete project, in project properties in
my main project i put this on compile line,
link-report=D:/Daniel/Trabalho/bms/painel_adm/report.xml to generate
report.xml .

In each of my modules i put
load-externs=D:/Daniel/Trabalho/bms/painel_adm/report.xml to try
reduce swf size of my modules.

But the problem is now each module had approximately 250kb, bigger
than with modules inside a single project.

What can i do to fix this problems?

 



RE: [flexcoders] Searching array for item

2007-09-16 Thread Alex Harui
getItemIndex takes an item, which you can find() in a getCursor() on the
collection.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of candysmate
Sent: Sunday, September 16, 2007 1:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Searching array for item

 

I wish to search an ArrayCollection for a match to the text in a
textInput component and then set the selectedIndex of a dataGrid to
the result.

I tried:

invoiceApprovalGrid.selectedIndex =
adviceApprovalCollection.getItemIndex(approveAdviceNumber.text);

without success. Any pointers most welcomed.

 



RE: [flexcoders] Re: Dynamic Array Object Keys

2007-09-16 Thread Alex Harui
Not sure what you mean by dynamic object keys, but look at
flash.utils.Dictionary.

 

I would dump out thisArr.  The DG looks fine, but the data is probably
messed up in its conversion from the results.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeremy Rottman
Sent: Sunday, September 16, 2007 4:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Dynamic Array Object Keys

 

I got this part figured out, however I have run into another issue with
getting this fixed. Why I finally populate the datagrid with data, the
data comes out with all the data for column 1 in the first 4 rows, all
the data for column 2, in the next two rows, and all teh data for column
3 in the last 4 rows. 

This is an example of what it looks like



NAME 1

NAME 2

NAME 3

arrayData1

 

 

arrayData2

 

 

 

arrayData3

 

 

arrayData4

 

 

 

arrayData5

 

 

arrayData6


Here is the code that I am using to create this data.

private fu! nction createProvider():void{
columnArr = new Array();   
thisArr= new Array();   
dailyData = new Array();   
// iterate through result array and add new items to the arrays
for(var i:Number = 0; i  resultArr.length; i++){

// add new item to the array
columnArr.push({column:resultArr[i].colName,
dataField:adcl + i});

// set temp array to resultArr.child
dailyData! = resultArr[i].children; 
 n! bsp;nbs p; 
// iterate through child array
for(var n:Number = 0; n  dailyData.length; n++){
var dataObj:Object = new Object();
var identifier:String = adcl + i; 
dataObj[identifier] = dailyData[n].adcl;
//trace(dataObj[identifier]);
thisArr.push(dataObj);
}}



This is the function I am using to create my datagrid.

private function buildGrid():void { 
var dgc:DataGridColumn; 
var aColumnsNew:Array = dg.columns;  
for(var i:int = 0; i  columnArr.length; i++){ 
dgc = new DataGridColumn();
dgc.width = 30;
dgc.headerText = columnArr[i].column;
dgc.dataField = columnArr[i].dataField;
aColumnsNew.push(dgc);
   ! ; }
dg.columns = aCol! umnsNew; 
dg.dataProvider = thisArr;

 



RE: [flexcoders] Re: Identify Function Name

2007-09-16 Thread Alex Harui
The function name will be in the stack trace.  You'll probably want to
write some code that parses it out.  Probably something like:

 

Var s:String = error.getStackTrace();

Var arr:Array = s.split('\n);

s = arr[0];  // or maybe it is 1

...

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ilikeflex
Sent: Saturday, September 15, 2007 2:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Identify Function Name

 

Hi Alex

Thanks for the reply.

If you could just tell me how to get the function name that will 
solve my problem.

function A()
{
trace(function execute + functionName);
}

If i execute the function it should print

function execute A

Thanks
Rajan

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

 Using a debugger player and debug swf (so it won't work in 
production
 mode), you can create an Error() instance and parse getStackTrace()
 
 
 
 function A()
 {
 log.debug(function execute + new Error().getStackTrace());
 }
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of ilikeflex
 Sent: Friday, September 14, 2007 4:16 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Identify Function Name
 
 
 
 Hi Team
 
 I am doing the logging of the application and now i want to know 
the 
 name of the function which is being executed.
 In the below i want the functionName to be A.
 
 function A()
 {
 log.debug(function execute + functionName);
 }
 
 Can we do it in flex???
 
 Thanks
 ilikeflex


 



RE: [flexcoders] Re: SWFLoader Issue

2007-09-16 Thread Alex Harui
Not any more than we can count on it to define local variables.
Compilers want you to be explicit about what you're talking about.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Hueners
Sent: Sunday, September 16, 2007 6:34 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: SWFLoader Issue

 

Can't we count on the compiler to toss an error when something that
should be imported isn't? 

On 9/15/07, grimmwerks  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Alex had pointed out something similar I was doing - that I needed to 
import mx.Application in the mx:Script area.

 

 



RE: [flexcoders] Re: Best Method for Dynamic Custom Components

2007-09-16 Thread Alex Harui
I'm jumping late here, but are you not using a List class and custom
item renderers?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of donvoltz
Sent: Sunday, September 16, 2007 1:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Best Method for Dynamic Custom Components

 

Hi Ben,

Thank you for your response on this question.

I am starting to think I am going about this all wrong. What I am
trying to do is dynamically add and remove a group of custom
components to my application.

I am sending 2 HttpRequests, one returns a list of locations that need
to be filled by people on a given date, the second returns a list of
people who are assigned to each of these locations on the same date
(if any are assigned at all).

With the first list, the locations, I want to add a custom component
for each location (this is what I am doing when I instantiate my
callLabel component. Then after I call the schedule HttpRequest, I
need to add a person for each location if there is a person scheduled.
If none is scheduled, an input field remains blank and would be filled
by adding in a person.

The reason I am building an arrayCollection of my custom component is
to be able to add the names of the people when my second database call
is made. I understand that each component should have a unique id so
that it can be referenced and modified at a later time. What is the
best way to do this when you are adding a number of components like I
am doing? The only way I have to reference these is by a location_id
which I have in my database and is unique between tables.

I was attempting to build an array of components that uses this
location_id as the components unique identifier so that when I
received more information, I could update the component properties or
call its methods.

Things get a tad more complex, when a user chooses another date, I
need to destroy these components and add a new set of locations and
people for the newly selected day.

I am hoping this helps to clear up what I am doing and if you are
willing to help with this situation

Thanks

DOn

 



[flexcoders] FABridge and Safari

2007-09-16 Thread Richard Rodseth
I'm taking baby steps with FABridge, and I'm not a JavaScript
developer, so bear with me please. The following works in Firefox, but
not in Safari (I don't see the second alert)

alert(hello); 

 var flexApp = FABridge.flash.root();

 var appWidth = flexApp.getWidth();

alert(hello again  + appWidth);   

Any ideas or comments about the viability of the bridge?


Re: [flexcoders] Searching array for item

2007-09-16 Thread Tony Alves
Is it createCursor(), Alex?

Alex Harui wrote:

 getItemIndex takes an item, which you can find() in a getCursor() on 
 the collection.

  

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *candysmate
 *Sent:* Sunday, September 16, 2007 1:28 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Searching array for item

  

 I wish to search an ArrayCollection for a match to the text in a
 textInput component and then set the selectedIndex of a dataGrid to
 the result.

 I tried:

 invoiceApprovalGrid.selectedIndex =
 adviceApprovalCollection.getItemIndex(approveAdviceNumber.text);

 without success. Any pointers most welcomed.

  


[flexcoders] ToggleButtonBar

2007-09-16 Thread superabe superabe
Is there any way to deselect all the buttons in a ToggleButtonBar?
Specifically, what I would like to do when I set the dataprovider for a
ToggleButtonBar, is to just display the buttons and not have the first one
selected?

TIA,
superabe


RE: [flexcoders] Searching array for item

2007-09-16 Thread Alex Harui
Yeah, sorry, createCursor(), and findAny, findFirst, or findLast, which
if they return true, leaves the cursor.current on the item found.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tony Alves
Sent: Sunday, September 16, 2007 6:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Searching array for item

 

Is it createCursor(), Alex?

Alex Harui wrote:

 getItemIndex takes an item, which you can find() in a getCursor() on 
 the collection.

 

 --

 *From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] 
 *On Behalf Of *candysmate
 *Sent:* Sunday, September 16, 2007 1:28 PM
 *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

 *Subject:* [flexcoders] Searching array for item

 

 I wish to search an ArrayCollection for a match to the text in a
 textInput component and then set the selectedIndex of a dataGrid to
 the result.

 I tried:

 invoiceApprovalGrid.selectedIndex =
 adviceApprovalCollection.getItemIndex(approveAdviceNumber.text);

 without success. Any pointers most welcomed.

 

 



RE: [flexcoders] Re: Problem with repeater and image ???

2007-09-16 Thread Tracy Spratt
One primary benefit is that you can forget about getRepeaterItem(). Pass
in a reference to the entire item,and implement a getter and setter, and
your event handlers have direct access to the whole item through the
event.target property.  Type the item specifically and avoid the Class
XML is not an IEventDispatcher warnings

 

Defining a click event is easier to do and to read.

 

It is generally cleaner and easier to write and maintain.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of danielvlopes
Sent: Sunday, September 16, 2007 4:36 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problem with repeater and image ???

 

What will be diferent when i repeat custom comps?

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

 Use a custom component for the repeated view, it simplifies things
like
 this.
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Alex Harui
 Sent: Sunday, September 16, 2007 12:14 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Problem with repeater and image ???
 
 
 
 Target is the dispatcher, which is the loader of the image. Try
 currentTarget, or use rptFoto.getRepeaterItem
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of danielvlopes
 Sent: Saturday, September 15, 2007 8:57 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Problem with repeater and image ???
 
 
 
 Helo everybody...
 
 I having problems to try get repearter item when user click on image.
 
 This is my code for repeater:
 mx:Repeater id=rptFoto dataProvider={objSelectedEquip.thumbs}
 mx:HBox
 mx:Image 
 source={rptFoto.currentItem} 
 buttonMode=true
 useHandCursor=true
 toolTip=Vizualizar
 click=exibirImagem(event)/
 mx:Button label=Alterar click=exibirImagem(event) / 
 /mx:HBox 
 /mx:Repeater
 
 When user click on button or image this function is called:
 
 private function exibirImagem(event:MouseEvent):void{
 
 var image:String = event.target.getRepearterItem();
 var imgUrl:URLRequest = new
 URLRequest(Funcoes.getImageFromThumb(image));
 navigateToURL(imgUrl,_blank);
 }
 
 When user click on button everything work, but whe click image this
 error is dispatched Property getRepeaterItem not found on
 mx.core.FlexLoader and there is no default value. , anyone know some
 way to fix this?
 
 Thanks.


 



[flexcoders] Re: Dynamic Array Object Keys

2007-09-16 Thread Jeremy Rottman
What I mean by array objects, is basically making dynamic identifiers
in an associative array. However, I got this worked out.

The issue at hand is. I am creating dynamic datagrid columns. The data
for these columns are in two arrays. The first array holds the data
for hte column headers. And the second holds the data for the rows
with in the datagrid.

I am trying to defy how a normal datagrid works. Instead of having the
data for each column be in the same array index. I am trying to do it
where Column 1, has an array of items, and it only these rows in
Column 1 are affected by these items. Column 2 has, has an array of
items, and it only these rows in Column 2 are affected by these items.
And so on.

Here is a link to what my current build looks and acts like. I do have
view source on. Any help with figuring this out would be greatly
appreciated.
http://demo.elguapodev.com/test4.html



RE: [flexcoders] Math.cos...?

2007-09-16 Thread Samuel R. Neff
 
It's not sloppy, it's just how floating point numbers work.  Try the same
thing in other programming languages and you still will not get zero (unless
they round the output).  For example, .NET reports the result as 
6.12303176911189E-17.  
 
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]
  

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Krotscheck
Sent: Sunday, September 16, 2007 5:19 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Math.cos...?



The documentation's actually fairly clear on this: The cosine of a 90
degree angle is zero, but because of the inherent inaccuracy of decimal
calculations using binary numbers, Flash Player will report a number
extremely close to, but not exactly equal to, zero.

 

Nevertheless, it seems. sloppy to me.

 

Michael Krotscheck

Senior Developer

 


  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Sunday, September 16, 2007 5:15 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?

 

 Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very close to
0 (1.7xe-17).

Troy.



Re: [flexcoders] Searching array for item

2007-09-16 Thread Tony Alves

Alex,
I have tried the method you suggest, but it did not act the way I 
wanted, because it forces me to create a sort on my ArrayCollection, 
which sorts my grid. 
I extended the datagrid to find the value I am looking for based on the 
value and the name of the value.  Let us know if you see a disadvantage 
to doing this.


http://example.3alves.com/superdatagrid/
right click to see the source:
http://example.3alves.com/superdatagrid/srcview/

Graham,
Wait for Alex to give the green light before you use this approach.  I 
have only used it with my ComboBox 's and am not sure if it is good 
practice.


Regards,
Tony

Alex Harui wrote:


Yeah, sorry, createCursor(), and findAny, findFirst, or findLast, 
which if they return true, leaves the cursor.current on the item found.


 



.

 


RE: [flexcoders] Searching array for item

2007-09-16 Thread Alex Harui
Ah yes, keep forgetting about that sort requirement.

 

So yes, your code is fine, or Graham can just write his own search loop.

 

FWIW, truly hard-core folks would not use [i] to access a dataprovider
as it may not implement IList and only ICollectionView, but nobody has
yet shown me such an implementation.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tony Alves
Sent: Sunday, September 16, 2007 8:41 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Searching array for item

 

Alex,
I have tried the method you suggest, but it did not act the way I
wanted, because it forces me to create a sort on my ArrayCollection,
which sorts my grid.  
I extended the datagrid to find the value I am looking for based on the
value and the name of the value.  Let us know if you see a disadvantage
to doing this.

http://example.3alves.com/superdatagrid/
http://example.3alves.com/superdatagrid/ 
right click to see the source:
http://example.3alves.com/superdatagrid/srcview/
http://example.3alves.com/superdatagrid/srcview/ 

Graham,
Wait for Alex to give the green light before you use this approach.  I
have only used it with my ComboBox 's and am not sure if it is good
practice.

Regards,
Tony

Alex Harui wrote: 

Yeah, sorry, createCursor(), and findAny, findFirst, or
findLast, which if they return true, leaves the cursor.current on the
item found.

 





.


http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=87361/stime=1189997114/nc1=4507179/nc2=3848641/nc3=4706133 



 



RE: [flexcoders] Re: Dynamic Array Object Keys

2007-09-16 Thread Alex Harui
I didn't look at your code, but FWIW, I would create a virtual
ICollectionView.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeremy Rottman
Sent: Sunday, September 16, 2007 8:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Dynamic Array Object Keys

 

What I mean by array objects, is basically making dynamic identifiers
in an associative array. However, I got this worked out.

The issue at hand is. I am creating dynamic datagrid columns. The data
for these columns are in two arrays. The first array holds the data
for hte column headers. And the second holds the data for the rows
with in the datagrid.

I am trying to defy how a normal datagrid works. Instead of having the
data for each column be in the same array index. I am trying to do it
where Column 1, has an array of items, and it only these rows in
Column 1 are affected by these items. Column 2 has, has an array of
items, and it only these rows in Column 2 are affected by these items.
And so on.

Here is a link to what my current build looks and acts like. I do have
view source on. Any help with figuring this out would be greatly
appreciated.
http://demo.elguapodev.com/test4.html
http://demo.elguapodev.com/test4.html 

 



[flexcoders] asdocs for as3 and ant files

2007-09-16 Thread learner
Hi All,
I am trying to access asdocs , but its not there in my flexbuilder's help.

I tried and search in the flex installation directory.I found a folder
asdocs
here  :
C:\Program Files\Adobe\Flex Builder 3\sdks\moxie\asdoc\

I found the index.hml in template folder inside asdoc directory..but .page
not found is displayed when I open the it.
I see one build.xml  in  asdoc directory ..after running this ant script
it gives me a build fail error.

I see one more ant file in the framework directory of installation (here
C:\Program Files\Adobe\Flex Builder 3\sdks\moxie\frameworks\)

Can some body please explain me for what these build.xmls' are there and
what is the use...and also where can I find the asdocs for the as3 clasess.

Thanks in advance.
Regards
PS