[flexcoders] What data type is this? var service = __locator.getService(roService);
Warning: Id 3604: You should now use one of the strongly typed methods for returning a service. What to Type it as? I thought remoteObject, but the compiler complains with: Id 1118: Implicit coercion of a value with static type mx.rpc:AbstractService to a possibly unrelated type var service = __locator.getService(roService); roService refers to a RemoteObject. And __locator is a ServiceLocator And when i change it to: var service: AbstractService = __locator.getService(roService); I still get the same warning. The code works, but I just want to be sure t do it all right. d
Re: {Disarmed} Re: [flexcoders] Variable Typecasting
Interesting. Thanks for the clarification. I guess I have been thinking that if FlexBuilder doesn't show something as an option in the code completion menu that I should avoid using it, or should only use it with bracket syntax. This might just be me, but I would go a little further and say that I like using brackets to call out that I am using a dynamic property. On the other hand, if I am using a strongly typed object, then I like to cast, and use the dot notation. And if I cast first, then the code completion will in fact show the property as an option. So I would want to do something like this: var vo:VoClass = new VoClass; // some custom class var obj:Object = {strEMail: foo}; var acUser:ArrayCollection = new ArrayCollection(); acUser.addItem(obj); acUser.addItem(vo); var strEMail:String = acUser.getItemAt(0)[strEMail] as String; strEMail = (acUser.getItemAt(1) as OSData).comment; Admittedly, as you have made clear, this approach is not necessary. However, I do think it has some benefit, particularly since it allows one to both lean a little more on FlexBuilder, and give the compiler a little more information to work with. However, having said all that, you are nonetheless quite right that I misspoke about what can be done. - Original Message From: Gordon Smith [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, July 18, 2008 2:26:47 PM Subject: RE: {Disarmed} Re: [flexcoders] Variable Typecasting There is no reason why strEMail = acUser.getItemAt( 0).strEMail; shouldn't both compile and run if the 0th item in the ArrayCollection acUser has a property named strEMail of type String. And, in fact, I had no problem compiling and running var acUser:ArrayCollect ion = new ArrayCollection( [ { strEMail: foo } ]); var strEMail:String = acUser.getItemAt( 0).strEMail; trace(strEMail) ; It traced foo as one would expect. Since getItemAt()' s return type is Object, the compiler lets you access any property on it. (Of course, strong typing is better practice). And when you access a property on an Object, the compiler treats that property as having type *, which can be assigned to a String var without casting it to a String. Gordon Smith Adobe Flex SDK Team From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of Sid Maskit Sent: Friday, July 18, 2008 1:35 PM To: [EMAIL PROTECTED] ups.com Subject: Re: {Disarmed} Re: [flexcoders] Variable Typecasting As someone else explained, it is better to use strongly typed objects then generic ones. However, if you are going to use a generic one, something like the following should work: strEMail = GlobalVars.instance .acUser.getItemA t(0)[strEMail ] as String; Two things to note here. First, if you are using a generic object, you can access its properties using bracket offsets with the property name in quotes. You need to do this since what you actually have is an associative array, and the compiler cannot know what its keys are. Second, the preferred method of casting is not to use a constructor, a la String(whatIAmCasti ng), but to use the as operator, a la whatIAmCasting as String. - Original Message From: Scott [EMAIL PROTECTED] us To: [EMAIL PROTECTED] ups.com Sent: Friday, July 18, 2008 6:48:58 AM Subject: RE: {Disarmed} Re: [flexcoders] Variable Typecasting Wow. This was incredibly frustrating but after playing around (and rebooting my computer numerous times from the debugger crashing) I finally figured out how to reference the data in the arraycollection. I didn’t have to typecast it. However, I had to process it one function at a time. I tried strEMail = String(GlobalVars. instance. acUser.getItemAt (0).strEMail) ; and that didn’t work; it kept throwing an error that it didn’t know about strEMail. After playing around I discovered that if I broke out the functions it would work. This is what worked for me: private var objUser:Object; private function blah( acUser:arrayCollect ion): void { objUser = GlobalVars.instance .acUser.getItemA t(0); strEMail = String(objUser. strEMail) ; } After I got the results I wanted, I tried it again as one line and Flex threw an error that it again didn’t know about strEMail. Perhaps that’s a bug…? -sj From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Scott Sent: Friday, July 18, 2008 8:12 AM To: [EMAIL PROTECTED] ups.com Subject: {Disarmed} Re: [flexcoders] Variable Typecasting It seemed to have taken that but now it’s still not pulling the data in as I would expect it. The getItemAt(x) in reading looks like it would pull in the whole record at ‘x’. However, it won’t let me refer to the record as getItemAt(0) .strEMail since it doesn’t know strEMail exists in that collection. In structures (in C++/Coldfusion/ etc…) I had to define the variable names within the
Re: [flexcoders] Screen Refresh function??
Thanks for the insight into the problem, it helped a great deal. I came up with another solution which seems to work and conceptually at least seems a little simpler. I put the proceedure to fill in the text fields in a creation complete event in the Canvas, then called the view of the canvas in the double click event. This Seems to work, but being in my first year of Flex (20 years in Oracle, 4D et al),... more better insights always appreciated. Dan Pride --- On Fri, 7/18/08, shaun [EMAIL PROTECTED] wrote: From: shaun [EMAIL PROTECTED] Subject: Re: [flexcoders] Screen Refresh function?? To: flexcoders@yahoogroups.com Date: Friday, July 18, 2008, 10:32 AM Dan Pride wrote: I have a screen with datagrid lists which list the basics. Users double click list items to display and enter further data. The screen does not display the values on the first change of the selected child canvas. After the first attempt it always does, but the first impression bites. Is there a way to get this to display first and every time??? Basic function I am using on the doubleclick on the datagrid is: private function displayLoca():void{ applicationScreens.selectedChild = locaScreen; locaName.text = locaGrid.selectedItem.NameCol; locaField.text = locaGrid.selectedItem.FieldCol; locaSquare.text = locaGrid.selectedItem.SquareCol; } Maybe your TextInput objects have not been created at the time your setting your data. Try this instead: private function displayLoca():void{ applicationScreens.selectedChild = locaScreen; locaScreen.selectedItem = locaGrid.selectedItem; } And something like the following in your edit component: private var _selectedItem:Object; public function set selectedItem(o:Object):void{ _selectedItem = o; if (_selectedItem) callLater(updateInputs); } public function get selectedItem():Object{ return _selectedItem; } private function updateInputs():void{ locaName.text = _selectedItem.NameCol; locaField.text = _selectedItem.FieldCol; locaSquare.text = _selectedItem.SquareCol; } HTH. - shaun
Re: [flexcoders] Screen Refresh function??
Odd, actually I have to call it in both places in its entirety, then it works fine. If I call the display from the double click, then fill from the complete, it misses the selected. But if I call it from both it works fine. So if I do this am I always running it twice or just on the first go round then its Complete ?? private function displayLoca():void{ applicationScreens.selectedChild = locaScreen; locaName.text = locaGrid.selectedItem.NameCol; locaField.text = locaGrid.selectedItem.FieldCol; locaSquare.text = locaGrid.selectedItem.SquareCol; ...etc etc. Flex is Soo coool :) Dan Pride --- On Sat, 7/19/08, Dan Pride [EMAIL PROTECTED] wrote: From: Dan Pride [EMAIL PROTECTED] Subject: Re: [flexcoders] Screen Refresh function?? To: flexcoders@yahoogroups.com Date: Saturday, July 19, 2008, 5:08 AM Thanks for the insight into the problem, it helped a great deal. I came up with another solution which seems to work and conceptually at least seems a little simpler. I put the proceedure to fill in the text fields in a creation complete event in the Canvas, then called the view of the canvas in the double click event. This Seems to work, but being in my first year of Flex (20 years in Oracle, 4D et al),... more better insights always appreciated. Dan Pride --- On Fri, 7/18/08, shaun [EMAIL PROTECTED] wrote: From: shaun [EMAIL PROTECTED] Subject: Re: [flexcoders] Screen Refresh function?? To: flexcoders@yahoogroups.com Date: Friday, July 18, 2008, 10:32 AM Dan Pride wrote: I have a screen with datagrid lists which list the basics. Users double click list items to display and enter further data. The screen does not display the values on the first change of the selected child canvas. After the first attempt it always does, but the first impression bites. Is there a way to get this to display first and every time??? Basic function I am using on the doubleclick on the datagrid is: private function displayLoca():void{ applicationScreens.selectedChild = locaScreen; locaName.text = locaGrid.selectedItem.NameCol; locaField.text = locaGrid.selectedItem.FieldCol; locaSquare.text = locaGrid.selectedItem.SquareCol; } Maybe your TextInput objects have not been created at the time your setting your data. Try this instead: private function displayLoca():void{ applicationScreens.selectedChild = locaScreen; locaScreen.selectedItem = locaGrid.selectedItem; } And something like the following in your edit component: private var _selectedItem:Object; public function set selectedItem(o:Object):void{ _selectedItem = o; if (_selectedItem) callLater(updateInputs); } public function get selectedItem():Object{ return _selectedItem; } private function updateInputs():void{ locaName.text = _selectedItem.NameCol; locaField.text = _selectedItem.FieldCol; locaSquare.text = _selectedItem.SquareCol; } HTH. - shaun
[flexcoders] htmlText to Text
Hi guys, Does somebody have an idea to convert htmlText to text, it means remove the Angle Brackets. Example: FONT ...Lorem Ipsum/FONT to Lorem Ipsum I don't know, RegExp, some String Method ? :S Thanks, Core
[flexcoders] need help urgent - multiple images printing
Dear all need help how to printing multiple images (1000 images) I try using images loader to printing but cannot shown in printing result. when Using Reperter to call multiple images Good work but to heavy and make long time loading. I try Using mx:list and itemRenderer to Get images data source and how to accessing itemRenderer component Object from application This my printing function source : public function PrintAllbyGroups(): void { CursorManager.setBusyCursor(); var i:int; var DataRows:ArrayCollection = globalArrayData; var myPrintJob:FlexPrintJob = new FlexPrintJob(); myPrintJob.printAsBitmap = false; var pageLimit: int = 3; // limit data tiap halaman var counterData: int = 0; // counter data tiap halaman var counterPage: int = 0; // counter halaman tiap dokumen var lastGroupName: String = DataRows.getItemAt(0).Kelas; var printState:Boolean = false; if(myPrintJob.start()) { for( i = 0; i DataRows.length; i++) { // bila terjadi perubahan groupName if(lastGroupName !== DataRows.getItemAt(i).Kelas) { // tambahkan ke halaman pencetakan myPrintJob.addObject(mySheet,FlexPrintJobScaleType.NONE); // tambahkan counter halaman counterPage++; // kembalikan counterData ke normal counterData= 0; // ubah nama grup terakhir lastGroupName = DataRows.getItemAt(i).Kelas; } // iterasi counterData++; // normalkan system if(counterData === 1) { printRow1.visible = false; printRow2.visible = false; printRow3.visible = false; } printGroupName.text = Grup + lastGroupName; if(counterData === 1) { printRow1.visible = true; printName1.text = DataRows.getItemAt(i).Name; printClass1.text = DataRows.getItemAt(i).Class; printAuthorityCode1.text = DataRows.getItemAt(i).AuthorityCode; if(StringUtil.trim(DataRows.getItemAt(i).AreaCode)==0){ printKliringArea1.text = Kantor Pusat; }else{ printKliringArea1.text = Wilayah + DataRows.getItemAt(i).AreaCode + , + DataRows.getItemAt(i).KliringArea; } printSpecimen1.width = imageWidth; printSpecimen1.height = imageHeight; printSpecimen1.source = this place how to get object in mx:list itemRendere component } if(counterData === 2) { printRow2.visible = true; printName2.text = DataRows.getItemAt(i).Name; printClass2.text = DataRows.getItemAt(i).Class; printAuthorityCode2.text = DataRows.getItemAt(i).AuthorityCode; if(StringUtil.trim(DataRows.getItemAt(i).AreaCode)==0){ printKliringArea2.text = Kantor Pusat; }else{ printKliringArea2.text = Wilayah + DataRows.getItemAt(i).AreaCode + , + DataRows.getItemAt(i).KliringArea; } printSpecimen2.width = imageWidth; printSpecimen2.height = imageHeight; //printSpecimen2.source = newRepeat } if(counterData === 3) { printRow3.visible = true; printName3.text = DataRows.getItemAt(i).Name; printClass3.text = DataRows.getItemAt(i).Class;
[flexcoders] NEED HELP URGENT MULTIPLE IMAGES PRINTING MORE THAN 1000 IMAGES
Dear all need help how to printing multiple images (1000 images) I try using images loader to printing but cannot shown in printing result. when Using Reperter to call multiple images Good work but to heavy and make long time loading. I try Using mx:list and itemRenderer to Get images data source and how to accessing itemRenderer component Object from application This my printing function source : public function PrintAllbyGroups( ): void { CursorManager. setBusyCursor( ); var i:int; var DataRows:ArrayColle ction = globalArrayData; var myPrintJob:FlexPrin tJob = new FlexPrintJob( ); myPrintJob.printAsB itmap = false; var pageLimit: int = 3; // limit data tiap halaman var counterData: int = 0; // counter data tiap halaman var counterPage: int = 0; // counter halaman tiap dokumen var lastGroupName: String = DataRows.getItemAt( 0).Kelas; var printState:Boolean = false; if(myPrintJob. start()) { for( i = 0; i DataRows.length; i++) { // bila terjadi perubahan groupName if(lastGroupName !== DataRows.getItemAt( i).Kelas) { // tambahkan ke halaman pencetakan myPrintJob.addObjec t(mySheet, FlexPrintJobScal eType.NONE) ; // tambahkan counter halaman counterPage+ +; // kembalikan counterData ke normal counterData= 0; // ubah nama grup terakhir lastGroupName = DataRows.getItemAt( i).Kelas; } // iterasi counterData+ +; // normalkan system if(counterData === 1) { printRow1.visible = false; printRow2.visible = false; printRow3.visible = false; } printGroupName. text = Grup + lastGroupName; if(counterData === 1) { printRow1.visible = true; printName1.text = DataRows.getItemAt( i).Name; printClass1. text = DataRows.getItemAt( i).Class; printAuthorityCode1 .text = DataRows.getItemAt( i).AuthorityCode ; if(StringUtil. trim(DataRows. getItemAt( i).AreaCode) ==0){ printKliringArea1. text = Kantor Pusat; }else{ printKliringArea1. text = Wilayah + DataRows.getItemAt( i).AreaCode + , + DataRows.getItemAt( i).KliringArea; } printSpecimen1. width = imageWidth; printSpecimen1. height = imageHeight; printSpecimen1. source = this place how to get mx:Image object in mx:list itemRenderer component } if(counterData === 2) { printRow2.visible = true; printName2.text = DataRows.getItemAt( i).Name; printClass2. text = DataRows.getItemAt( i).Class; printAuthorityCode2 .text = DataRows.getItemAt( i).AuthorityCode ; if(StringUtil. trim(DataRows. getItemAt( i).AreaCode) ==0){ printKliringArea2. text = Kantor Pusat; }else{ printKliringArea2. text = Wilayah + DataRows.getItemAt( i).AreaCode + , + DataRows.getItemAt( i).KliringArea; } printSpecimen2. width = imageWidth; printSpecimen2. height = imageHeight; //printSpecimen2. source = newRepeat } if(counterData === 3) { printRow3.visible = true; printName3.text = DataRows.getItemAt( i).Name;
[flexcoders] NEED HELP URGENT MULTIPLE IMAGES PRINTING MORE THAN 1000 IMAGES
Dear all need help how to printing multiple images (1000 images) I try using images loader to printing but cannot shown in printing result. when Using Reperter to call multiple images Good work but to heavy and make long time loading. I try Using mx:list and itemRenderer to Get images data source and how to accessing itemRenderer component Object from application This my printing function source : public function PrintAllbyGroups( ): void { CursorManager. setBusyCursor( ); var i:int; var DataRows:ArrayColle ction = globalArrayData; var myPrintJob:FlexPrin tJob = new FlexPrintJob( ); myPrintJob.printAsB itmap = false; var pageLimit: int = 3; // limit data tiap halaman var counterData: int = 0; // counter data tiap halaman var counterPage: int = 0; // counter halaman tiap dokumen var lastGroupName: String = DataRows.getItemAt( 0).Kelas; var printState:Boolean = false; if(myPrintJob. start()) { for( i = 0; i DataRows.length; i++) { // bila terjadi perubahan groupName if(lastGroupName !== DataRows.getItemAt( i).Kelas) { // tambahkan ke halaman pencetakan myPrintJob.addObjec t(mySheet, FlexPrintJobScal eType.NONE) ; // tambahkan counter halaman counterPage+ +; // kembalikan counterData ke normal counterData= 0; // ubah nama grup terakhir lastGroupName = DataRows.getItemAt( i).Kelas; } // iterasi counterData+ +; // normalkan system if(counterData === 1) { printRow1.visible = false; printRow2.visible = false; printRow3.visible = false; } printGroupName. text = Grup + lastGroupName; if(counterData === 1) { printRow1.visible = true; printName1.text = DataRows.getItemAt( i).Name; printClass1. text = DataRows.getItemAt( i).Class; printAuthorityCode1 .text = DataRows.getItemAt( i).AuthorityCode ; if(StringUtil. trim(DataRows. getItemAt( i).AreaCode) ==0){ printKliringArea1. text = Kantor Pusat; }else{ printKliringArea1. text = Wilayah + DataRows.getItemAt( i).AreaCode + , + DataRows.getItemAt( i).KliringArea; } printSpecimen1. width = imageWidth; printSpecimen1. height = imageHeight; printSpecimen1. source = this place how to get mx:Image object in mx:list itemRenderer component } if(counterData === 2) { printRow2.visible = true; printName2.text = DataRows.getItemAt( i).Name; printClass2. text = DataRows.getItemAt( i).Class; printAuthorityCode2 .text = DataRows.getItemAt( i).AuthorityCode ; if(StringUtil. trim(DataRows. getItemAt( i).AreaCode) ==0){ printKliringArea2. text = Kantor Pusat; }else{ printKliringArea2. text = Wilayah + DataRows.getItemAt( i).AreaCode + , + DataRows.getItemAt( i).KliringArea; } printSpecimen2. width = imageWidth; printSpecimen2. height = imageHeight; //printSpecimen2. source = newRepeat } if(counterData === 3) { printRow3.visible = true; printName3.text = DataRows.getItemAt( i).Name;
[flexcoders] Re: htmlText to Text
Nevermind, i resolved it. Create a RichTextEditor pass the htmlText to it, then accessing to is Text proproety it's tag free :D Example: mx:RichTextEditor x=20 y=10 title=Title id=richText mx:htmlText ![CDATA[ TEXTFORMAT LEADING=2P ALIGN=LEFTFONT FACE=Verdana SIZE=10 COLOR=#0B333C LETTERSPACING=0 KERNING=0Ola tudo bem?/FONT/P/TEXTFORMAT ]] /mx:htmlText /mx:RichTextEditor mx:TextArea x=491 y=10 width=260 height=300 backgroundColor=#0E0E0E color=#FF text={richText.text}/ The text in the TextArea are not formated was i wanted :) Thanks, anyway --- In flexcoders@yahoogroups.com, hugocorept [EMAIL PROTECTED] wrote: Hi guys, Does somebody have an idea to convert htmlText to text, it means remove the Angle Brackets. Example: FONT ...Lorem Ipsum/FONT to Lorem Ipsum I don't know, RegExp, some String Method ? :S Thanks, Core
Re: [flexcoders] Screen Refresh function??
Hi, Dan Pride wrote: Odd, actually I have to call it in both places in its entirety, then it works fine. If I call the display from the double click, then fill from the complete, it misses the selected. But if I call it from both it works fine. So if I do this am I always running it twice or just on the first go round then its Complete ?? The creation complete will handle the case of the first time you edit. That is, it fixes the original problem. Creation complete will only run once. I'm guessing the applicationScreens component is actually a ViewStack. If so, this is what i think might be happening: . The first time you edit your data the edit component has not been created yet(it's lazily created by this line: applicationScreens.selectedChild = locaScreen), so setting the data doesn't work as expected(original problem of first edit not getting data) due to the fact that the input fields don't exist yet. . Then the edit component's creation complete event handler runs and sets the data(so editing works the first time now). . Next time you edit the data the creation complete does not run again as the component now exists. So you still need to set the data in the function that actually sets up the edit component(your original code). Now you have the same code in two places; which is not what you want obviously. You should be able to check whats going on by using the debugger; setting a breakpoint in the creation complete function and in your displayLoca function. There is another solution that might be suitable, but is probably not a good idea. The viewstack has a creationPolicy setting that allows the viewstack to create all of its children when it's created. Rather than using the default lazy creation. This is often /not/ a good idea for performance reasons, but it would mean that the original problem would not occur and you could remove the code from the creation complete event handler and go back to your original code. So, your left with at least 3 choices: a) Duplicate code and setting data externally on a component(current solution). b) Modifying the viewstack creation policy to create all children when its created(easy but a performance hit). c) The solution I outlined previously. private function displayLoca():void{ applicationScreens.selectedChild = locaScreen; locaScreen.selectedItem = locaGrid.selectedItem; } And something like the following in your edit component: private var _selectedItem:Object; public function set selectedItem(o:Object):void{ _selectedItem = o; if (_selectedItem) callLater(updateInputs); } public function get selectedItem():Object{ return _selectedItem; } private function updateInputs():void{ locaName.text = _selectedItem.NameCol; locaField.text = _selectedItem.FieldCol; locaSquare.text = _selectedItem.SquareCol; } HTH. - shaun
[flexcoders] Re: Passing data to AdvancedDataGridRendererProvider
--- In flexcoders@yahoogroups.com, frank_sommers [EMAIL PROTECTED] wrote: Hi, I'm trying to pass some custom data into the AdvancedDataGridItemRenderer. But as far as I can see, only the datafield can be passed to this component. Is there any way to specify to the class factory some other object references, too? In my case, I want the user to be able to affect the UI state from within an item renderer, and therefore I'd like to pass references to another UI component as well to the AdvancedDataGridItemRenderer. You could do something like this renderer:ClassFactory = new myRenderer(); renderer.properties{relatedComponent:yourComponent}; Then use renderer as your itemRenderer on the ADG. If you're going to do this, you should probably create an Interface so that any component you create with that interface will work with the renderer. However, I'd suggest that instead you have your itemRenderer broadcast an event (or pick up one of the events the ADG already broadcasts) and listen for that. Trying to poke a reference to one component into another component breaks encapsulation and will result in code that's more confusing to anyone coming behind you. HTH; Amy
[flexcoders] Re: Aligning images in TileList itemRenderer
--- In flexcoders@yahoogroups.com, lelander [EMAIL PROTECTED] wrote: Hello! I'm working on an app that allows users to drag variable height images from a List onto a shelf; think of it as something like variable height spines of books on a shelf. All the widths can be the same. Can I align the images to bottom in my custom mxml item renderer? When I set verticalAlign=bottom in the item renderer, the images cut off in the TileList. Try setting verticalAlign=bottom on the image control itself. HTH; Amy
[flexcoders] Re: Screen Refresh function??
--- In flexcoders@yahoogroups.com, Dan Pride [EMAIL PROTECTED] wrote: Thanks for the insight into the problem, it helped a great deal. I came up with another solution which seems to work and conceptually at least seems a little simpler. I put the proceedure to fill in the text fields in a creation complete event in the Canvas, then called the view of the canvas in the double click event. This Seems to work, but being in my first year of Flex (20 years in Oracle, 4D et al),... more better insights always appreciated. When you use creationComplete in an itemRenderer, you will find that it fails as soon as the user scrolls anything or if you change the dataProvider. http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1. html http://weblogs.macromedia.com/pent/archives/2008/03/itemrenderers_p.ht ml HTH; Amy
[flexcoders] Set attributes and methods of dynamically added controls
I'm trying to add a number of colorpickers and textareas to my app dynamically. Each item needs a separate id, and the colorpickers need to call an open() and change() method and pass the textarea id as a parameter along with the event. I'm a little baffled on how to set the methods, but my ids are setting successfully. Here's my code: public function addPicker():void { var i:int; for (i = 0; i 5; i++){ var ssPicker:ColorPicker = new ColorPicker(); var ssTextArea:TextArea = new TextArea(); var ssVBox:VBox = new VBox(); ssPicker.id = cp+i; //note: following two lines don't work. ssPicker.open = openEvt(event,descriptBox+i); ssPicker.change = changeColor(event,descriptBox+i); ssTextArea.id = descriptBox+i; ssTextArea.width = 125; ssTextArea.height = 22; ssTextArea.text = Select Color; myVBox.addChild(ssVBox); ssVBox.addChild(ssPicker); ssVBox.addChild(ssTextArea); } } Any thoughts on how I can accomplish this?
Re: [flexcoders] Set attributes and methods of dynamically added controls
daddyo_buckeye wrote: I'm trying to add a number of colorpickers and textareas to my app dynamically. Each item needs a separate id, and the colorpickers need to call an open() and change() method and pass the textarea id as a parameter along with the event. I'm a little baffled on how to set the methods, but my ids are setting successfully. Here's my code: public function addPicker():void { var i:int; for (i = 0; i 5; i++){ var ssPicker:ColorPicker = new ColorPicker(); var ssTextArea:TextArea = new TextArea(); var ssVBox:VBox = new VBox(); ssPicker.id = cp+i; //note: following two lines don't work. ssPicker.open = openEvt(event,descriptBox+i); ssPicker.change = changeColor(event,descriptBox+i); ssTextArea.id = descriptBox+i; ssTextArea.width = 125; ssTextArea.height = 22; ssTextArea.text = Select Color; myVBox.addChild(ssVBox); ssVBox.addChild(ssPicker); ssVBox.addChild(ssTextArea); } } Any thoughts on how I can accomplish this? As a guess.. ssPicker.open = openEvt; ssPicker.change = changeColor; lookup[ssPicker.id] = ssTextArea; //associate picker and text function openEvt(event:Event){ var colorPicker:ColorPicker = ColorPicker(event.target); var t:TextArea = lookup[colorPicker.id]; t.text = colorPicker.id; ... } HTH. - shaun
[flexcoders] Re: Set attributes and methods of dynamically added controls
--- In flexcoders@yahoogroups.com, daddyo_buckeye [EMAIL PROTECTED] wrote: I'm trying to add a number of colorpickers and textareas to my app dynamically. Each item needs a separate id, and the colorpickers need to call an open() and change() method and pass the textarea id as a parameter along with the event. I'm a little baffled on how to set the methods, but my ids are setting successfully. Here's my code: public function addPicker():void { var i:int; for (i = 0; i 5; i++){ var ssPicker:ColorPicker = new ColorPicker(); var ssTextArea:TextArea = new TextArea(); var ssVBox:VBox = new VBox(); ssPicker.id = cp+i; //note: following two lines don't work. ssPicker.open = openEvt(event,descriptBox+i); ssPicker.change = changeColor(event,descriptBox+i); ssTextArea.id = descriptBox+i; ssTextArea.width = 125; ssTextArea.height = 22; ssTextArea.text = Select Color; myVBox.addChild(ssVBox); ssVBox.addChild(ssPicker); ssVBox.addChild(ssTextArea); } } Setting the id like that won't let you reference it later by ID. Also, you're trying to use the MXML way of assigning event listeners in AS. Try something like this private var cp:Array=new Array(); for (i=0;i5;i++){ ssPicker = new ColorPicker(); cp.push(ssPicker); //you'll need to look at event.currentTarget to see which picker it is ssPicker.addEventListener(open, yourFunction); } You may find that you're better off using a data source that a List control is bound to for this. When the color pickers change the data source, the descriptBoxes, which would be itemRenderers for some other list based control, can automatically pick up the change. HTH; Amy
Re: [flexcoders] htmlText to Text
I've only tested this with the actual sample below, so it may need some refinement, but this should get you started: var myText:String = 'p class=myClassmy text/p'; myText = myText.replace(/\.*?\/g, ); trace(myText); Hope that helps, Sid - Original Message From: hugocorept [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, July 19, 2008 3:37:38 AM Subject: [flexcoders] htmlText to Text Hi guys, Does somebody have an idea to convert htmlText to text, it means remove the Angle Brackets. Example: FONT ...Lorem Ipsum/FONT to Lorem Ipsum I don't know, RegExp, some String Method ? :S Thanks, Core
Re: [flexcoders] Re: htmlText to Text
I don't know if this will be of interest to anyone, but I learned something trying to respond to this post. I thought that it would be cool to do this entire thing within ActionScript. I managed to get it working, but it took a little bit more than I thought it would. One can use the text input control to convert from HTML to plain text, but the control must be on the stage for at least one frame. Thus I end up with the following code (within a script tag): private var myControl:TextInput; private var done:Boolean; private function init():void { Singleton.getInstance().doSomething(); var myText:String = 'pmy text/p'; myControl = new TextInput(); this.addEventListener(Event.ENTER_FRAME, onFrame); myControl.htmlText = myText; this.addChild(myControl); trace(from init); trace(myControl.htmlText); trace(myControl.text); } private function onFrame(event:Event):void { if (done) {return;} done = true; trace(from onFrame); trace(myControl.htmlText); trace(myControl.text); this.removeChild(myControl); } To show the change that results from having the control on the stage for a frame, here's the trace result: from init null from onFrame TEXTFORMAT LEADING=2P ALIGN=LEFTFONT FACE=Verdana SIZE=10 COLOR=#0B333C LETTERSPACING=0 KERNING=0my text/FONT/P/TEXTFORMAT my text If somebody has a way to have the text input control do the conversion without having to put the control onto the stage, I would be interested to hear about that. Hope somebody finds that useful, Sid - Original Message From: hugocorept [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, July 19, 2008 5:55:24 AM Subject: [flexcoders] Re: htmlText to Text Nevermind, i resolved it. Create a RichTextEditor pass the htmlText to it, then accessing to is Text proproety it's tag free :D Example: mx:RichTextEditor x=20 y=10 title=Title id=richText mx:htmlText ![CDATA[ TEXTFORMAT LEADING=2 P ALIGN=LEFT FONT FACE=Verdana SIZE=10 COLOR=#0B333C LETTERSPACING= 0 KERNING=0 Ola tudo bem?/FONT /P/TEXTFORMAT ]] /mx:htmlText /mx:RichTextEditor mx:TextArea x=491 y=10 width=260 height=300 backgroundColor= #0E0E0E color=#FF text={richText. text}/ The text in the TextArea are not formated was i wanted :) Thanks, anyway --- In [EMAIL PROTECTED] ups.com, hugocorept core.nation@ ... wrote: Hi guys, Does somebody have an idea to convert htmlText to text, it means remove the Angle Brackets. Example: FONT ...Lorem Ipsum/FONT to Lorem Ipsum I don't know, RegExp, some String Method ? :S Thanks, Core
Re: [flexcoders] Set attributes and methods of dynamically added controls
shaun wrote: daddyo_buckeye wrote: [snip] Any thoughts on how I can accomplish this? As a guess.. ssPicker.open = openEvt; ssPicker.change = changeColor; Whoops. Scrap that. As Amy said, it should be using addEventListener.. Getting languages mixed up... :-/ lookup[ssPicker.id] = ssTextArea; //associate picker and text function openEvt(event:Event){ var colorPicker:ColorPicker = ColorPicker(event.target); And probably currentTarget rather than target. - shaun
Re: [flexcoders] Re: htmlText to Text
Oops, please ignore the Singleton line; it's old code in my testing file. Also, here's slightly revised to correctly remove listener instead of using boolean flag: private var myControl:TextInput; private function init():void { var myText:String = 'pmy text/p'; myControl = new TextInput(); this.addEventListener(Event.ENTER_FRAME, onFrame); myControl.htmlText = myText; this.addChild(myControl); trace(from init); trace(myControl.htmlText); trace(myControl.text); } private function onFrame(event:Event):void { this.removeEventListener(Event.ENTER_FRAME, onFrame); trace(from onFrame); trace(myControl.htmlText); trace(myControl.text); this.removeChild(myControl); } - Original Message From: Sid Maskit [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, July 19, 2008 9:49:01 AM Subject: Re: [flexcoders] Re: htmlText to Text I don't know if this will be of interest to anyone, but I learned something trying to respond to this post. I thought that it would be cool to do this entire thing within ActionScript. I managed to get it working, but it took a little bit more than I thought it would. One can use the text input control to convert from HTML to plain text, but the control must be on the stage for at least one frame. Thus I end up with the following code (within a script tag): private var myControl:TextInput ; private var done:Boolean; private function init():void { Singleton.getInstan ce().doSomething (); var myText:String = 'pmy text/p'; myControl = new TextInput(); this.addEventListen er(Event. ENTER_FRAME, onFrame); myControl.htmlText = myText; this.addChild( myControl) ; trace(from init); trace(myControl. htmlText) ; trace(myControl. text); } private function onFrame(event: Event):void { if (done) {return;} done = true; trace(from onFrame); trace(myControl. htmlText) ; trace(myControl. text); this.removeChild( myControl) ; } To show the change that results from having the control on the stage for a frame, here's the trace result: from init null from onFrame TEXTFORMAT LEADING=2P ALIGN=LEFTFONT FACE=Verdana SIZE=10 COLOR=#0B333C LETTERSPACING= 0 KERNING=0my text/FONT/P/TEXTFORMAT my text If somebody has a way to have the text input control do the conversion without having to put the control onto the stage, I would be interested to hear about that. Hope somebody finds that useful, Sid - Original Message From: hugocorept core.nation@ gmail.com To: [EMAIL PROTECTED] ups.com Sent: Saturday, July 19, 2008 5:55:24 AM Subject: [flexcoders] Re: htmlText to Text Nevermind, i resolved it. Create a RichTextEditor pass the htmlText to it, then accessing to is Text proproety it's tag free :D Example: mx:RichTextEditor x=20 y=10 title=Title id=richText mx:htmlText ![CDATA[ TEXTFORMAT LEADING=2 P ALIGN=LEFT FONT FACE=Verdana SIZE=10 COLOR=#0B333C LETTERSPACING= 0 KERNING=0 Ola tudo bem?/FONT /P/TEXTFORMAT ]] /mx:htmlText /mx:RichTextEditor mx:TextArea x=491 y=10 width=260 height=300 backgroundColor= #0E0E0E color=#FF text={richText. text}/ The text in the TextArea are not formated was i wanted :) Thanks, anyway --- In [EMAIL PROTECTED] ups.com, hugocorept core.nation@ ... wrote: Hi guys, Does somebody have an idea to convert htmlText to text, it means remove the Angle Brackets. Example: FONT ...Lorem Ipsum/FONT to Lorem Ipsum I don't know, RegExp, some String Method ? :S Thanks, Core
[flexcoders] Tortoise and Flex 4
I am using Tortoise to get Flex 4 from the trunk, I was wondering do i need to recompile everytime Tortoise does an update and downloads new files or update old ones? Is running ant -q main in cygwin a one time thing?
[flexcoders] Form question
Hi Experts, is there some advantage to putting the components in a form as opposed to just putting the components in the panel or canvas? thanks percy
Re: [flexcoders] Re: Performance profile strangeness
double check that you are using the debug player too http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19245 some updates have a mysterious way of switching to the release player I've noticed. DK On Fri, Jul 18, 2008 at 6:02 PM, Mike [EMAIL PROTECTED] wrote: 9,0,115,0 ... the one that came with my copy of Flex Builder 3. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Which version of the player are you using? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Sent: Friday, July 18, 2008 1:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Performance profile strangeness I went back to the default filters, no change. I see all of my methods as zero time... it would be nice if it were that fast :-) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike mike@ wrote: No, no filters. I've removed the flash.*.* mx.*.* filters as well... I'm pretty sure what I'm looking for is at that level. I'll try a new run re-enabling these... maybe I'm overwhelming the profiler. Does the profiler have an error log? I'm not finding anything that looks likely. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gaurav. Jain gauravj@ wrote: Do you have any filters applied? Thanks, Gaurav -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike Sent: Friday, July 18, 2008 2:58 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Performance profile strangeness Legitimate question... I just re-ran twice (once IE once FF) to make sure I had the box checked... yes, it's checked. What throws me is that memory profiling is fine, and I do get a Performance Profile that shows all of the called methods and the number times the methods are called... just no timing statistics and the Method Statistics drill-down is empty (no callers or callees. It's strange. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: You did check the box to actually profile performance when you started up the profiler right? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike Sent: Friday, July 18, 2008 4:47 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Performance profile strangeness I profiled my app and the only way I can see any method level activity in the Performance Profile is to select 'Show zero time methods'. It shows the number of times a method is called but all of the timing columns are zero. Memory profiling looks fine. Any ideas? Thanks-- Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups Links -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
Re: [flexcoders] Re: Performance profile strangeness
even better http://flashplayerversion.com/ nice! DK On Sat, Jul 19, 2008 at 4:02 PM, Douglas Knudsen [EMAIL PROTECTED] wrote: double check that you are using the debug player too http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19245 some updates have a mysterious way of switching to the release player I've noticed. DK On Fri, Jul 18, 2008 at 6:02 PM, Mike [EMAIL PROTECTED] wrote: 9,0,115,0 ... the one that came with my copy of Flex Builder 3. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Which version of the player are you using? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Sent: Friday, July 18, 2008 1:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Performance profile strangeness I went back to the default filters, no change. I see all of my methods as zero time... it would be nice if it were that fast :-) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike mike@ wrote: No, no filters. I've removed the flash.*.* mx.*.* filters as well... I'm pretty sure what I'm looking for is at that level. I'll try a new run re-enabling these... maybe I'm overwhelming the profiler. Does the profiler have an error log? I'm not finding anything that looks likely. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gaurav. Jain gauravj@ wrote: Do you have any filters applied? Thanks, Gaurav -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike Sent: Friday, July 18, 2008 2:58 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Performance profile strangeness Legitimate question... I just re-ran twice (once IE once FF) to make sure I had the box checked... yes, it's checked. What throws me is that memory profiling is fine, and I do get a Performance Profile that shows all of the called methods and the number times the methods are called... just no timing statistics and the Method Statistics drill-down is empty (no callers or callees. It's strange. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: You did check the box to actually profile performance when you started up the profiler right? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Mike Sent: Friday, July 18, 2008 4:47 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Performance profile strangeness I profiled my app and the only way I can see any method level activity in the Performance Profile is to select 'Show zero time methods'. It shows the number of times a method is called but all of the timing columns are zero. Memory profiling looks fine. Any ideas? Thanks-- Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups Links -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Re: Set attributes and methods of dynamically added controls
I was just experimenting with using the 'for' loop to add them dynamically just to see how it's done. I'm pulling the number of colorpickers needed from an XML file, and I need them to run a function to color specific items from that XML file. Sherm --- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: Setting the id like that won't let you reference it later by ID. Also, you're trying to use the MXML way of assigning event listeners in AS. Try something like this private var cp:Array=new Array(); for (i=0;i5;i++){ ssPicker = new ColorPicker(); cp.push(ssPicker); //you'll need to look at event.currentTarget to see which picker it is ssPicker.addEventListener(open, yourFunction); } You may find that you're better off using a data source that a List control is bound to for this. When the color pickers change the data source, the descriptBoxes, which would be itemRenderers for some other list based control, can automatically pick up the change. HTH; Amy
[flexcoders] Re: Aligning images in TileList itemRenderer
HI Amy, It did not fix it completely, but maybe we're getting closer. All the images are cut off at about the center, but I am seeing the varying heights of the images. I wish there was a way to move them all up about 200 pixels. Thanks for your comment just the same! JP --- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, lelander lelander@ wrote: Hello! I'm working on an app that allows users to drag variable height images from a List onto a shelf; think of it as something like variable height spines of books on a shelf. All the widths can be the same. Can I align the images to bottom in my custom mxml item renderer? When I set verticalAlign=bottom in the item renderer, the images cut off in the TileList. Try setting verticalAlign=bottom on the image control itself. HTH; Amy
Re: [flexcoders] TextArea popup editor in DataGrid
Yes, I don't want the TA to fit within a single Row. You're right - the case for TA at the bottom of a DG is a problem. Today, the TA gets clipped, so that's not good either. The PopupButton doesn't have either problem. How does the PopUpButton popup? On Fri, Jul 18, 2008 at 4:42 PM, Alex Harui [EMAIL PROTECTED] wrote: Well, you could popup a TextArea like PopUpButton does, but it sounds like your real goal is to have the TA extend across rows and not be below the lines. I assume you don't want the TA to fit within a single row? How will you handle the area at the bottom of the DG? If I click the last row, should the TA extend two rows below the DG? -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Glenn Jones *Sent:* Friday, July 18, 2008 11:17 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] TextArea popup editor in DataGrid I have a DataGrid where one of the columns is a TextArea control as the itemEditor. When I edit a cell in the column with the TextArea editor, the TextArea opens up to a height equivalent to three rows of data in the grid. The editor works fine; in fact it's been working this way for some time. But recently, we enabled horizontal and vertical grid lines on the grid. When the TextArea editor opens up, the datagrid horizontal grid lines are drawn across the top of the control. I've verified that the TextArea control is not inheriting the styles related to grid lines I've verified that the TextArea backgroundAlpha is 1; i.e. the text on the rows underneath the editor is not showing through. So as near as I can tell, the grid is drawing the gridlines on top of the editor. Curiously, I also have a PopUpButton editor type - it does not have grid lines drawn across when the dropdown area that appears when the button is activated. Is this a known issue? Is there a workaround? Thanks
Re: [flexcoders] Re: Flash USB-API :)
@Rick - That doesn't really help solve the problem. And because it doesn't exist or it would be difficult isn't a reason for not including it. People still have applications that need to be built that include this support. dorkie a little bit late to the conversation dork from dorktown On Tue, May 27, 2008 at 9:31 PM, Rick Winscot [EMAIL PROTECTED] wrote: Before we go too much further with this – it would be beneficial to recognize that there is no such thing as a Generic USB Protocol that will give everyone blanket communications with usb devices… every device has a specific implementation that would have to be 'handled' in Flex/AIR similar to what Adobe has done with web-cams. They could use HID (Human Interface Device) I suppose but that is what the mouse/keyboard is for! If you need something very specific like joystick control in your app – you have more than enough (a wealth of) tools at your disposal to make it happen. Have you considered joystick emulation? NTPAD http://www.ntpad.com.ar/index.php?page=downloadseng.phplang=eng JoyEmu (personal fav) http://members.tripod.com/~szanella/joyemueng.htmhttp://members.tripod.com/%7Eszanella/joyemueng.htm JoyToKey http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm Rick Winscot *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Cosma *Sent:* Tuesday, May 27, 2008 3:47 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Flash USB-API :) Why don't you use a signed java applet? You could simply load it in the wrapper html file (with size set to 0, if you don't want that java swing stuff in your UI), and then interact with it using the flex ExternalInterface and applet's NSObject. I use this solution to allow direct TWAIN image scanning in my Flex application. The only problem with it is that the ExternalInterface doesn't seem very reliable for exchanging more than small simple variables - very long strings and binary data seems to cause troubles. Here is an interesting blog post on this topic: http://tobiaspatton.wordpress.com/2007/08/29/using-a-signed-java-applet-as-a-flex-helper-part-1/ Bye Cosma --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Cato Paus [EMAIL PROTECTED] wrote: Hi I know abouth the MerApi http://www.merapiproject.net/index.php, but My use-case is: I'm developing a TV-FlexApplication for a cutsomer that wants to use a tv remote controller to change the channels that I'm stremaing form satelitte or cabel. The point of using Flex/flash is that I have all under my controll (The app) and the customer will allvays have the last build of the app. To day flash player have connection to several USB devises, USB Camare and microphone!! Why not extend this a litle more :) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Rick Winscot rick.winscot@ wrote: There is an obvious solution: Flex/AIR - Web Services (or similar) - USB ... but _direct_ communication with USB? I'm stumped as to why you would even need something like this. What is your use case? Rick Winscot From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Cato Paus Sent: Friday, May 23, 2008 9:35 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Flash USB-API :) Hehe Totaly Agree with you on Joe Random, but I put my trust on Adobe to find a solution :) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders% flexcoders%25 40yahoogroups.com , Tom Chiverton tom.chiverton@ wrote: On Thursday 22 May 2008, Cato Paus wrote: I realy hope we can have USB communication in AIR and Flash Player :) USB communication from a web site ? I think not... unless you want Joe Random reading all your data. For AIR this makes more sense. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the
[flexcoders] Re: Aligning images in TileList itemRenderer
HI Alex, I'm using TileList. Can the image be contolled within the renderer so that it appears that the images work with different heights, even though the renderer (vbox in my case) is the same size? --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: A tileLists renderers must all be the same width/height. Are you using List or TileList? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lelander Sent: Friday, July 18, 2008 6:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Aligning images in TileList itemRenderer Hello! I'm working on an app that allows users to drag variable height images from a List onto a shelf; think of it as something like variable height spines of books on a shelf. All the widths can be the same. Can I align the images to bottom in my custom mxml item renderer? When I set verticalAlign=bottom in the item renderer, the images cut off in the TileList. Thanks in advance for any insights you can give. JP
[flexcoders] Re: Aligning images in TileList itemRenderer
--- In flexcoders@yahoogroups.com, lelander [EMAIL PROTECTED] wrote: HI Amy, It did not fix it completely, but maybe we're getting closer. All the images are cut off at about the center, but I am seeing the varying heights of the images. I wish there was a way to move them all up about 200 pixels. Thanks for your comment just the same! What is the code of your itemRenderer?
[flexcoders] controls not not loading..
Hello Good People, I've Extended TitleWindow and also created a corresponding mxml component. When I create it using mxml in my application it's created with all of the controls i laid out in the design view no problem, but when i try to create it dynamically (new operator) none of the controls are loaded...can any one point me in the right direction...i know there must be a way to do this...thanks percy
[flexcoders] Re: Set attributes and methods of dynamically added controls
--- In flexcoders@yahoogroups.com, daddyo_buckeye [EMAIL PROTECTED] wrote: I was just experimenting with using the 'for' loop to add them dynamically just to see how it's done. I'm pulling the number of colorpickers needed from an XML file, and I need them to run a function to color specific items from that XML file. Then you're definitely better off using either a Repeater or a List Based control. HTH; Amy
[flexcoders] Re: Form question
--- In flexcoders@yahoogroups.com, [p e r c e p t i c o n] [EMAIL PROTECTED] wrote: Hi Experts, is there some advantage to putting the components in a form as opposed to just putting the components in the panel or canvas? thanks Built-in labels and default button. That's about as many as I can think of.
Re: [flexcoders] Re: Form question
wow...i've really been making life hard for myself by using spacers and v/h boxes to lay them out... thanks... On Sat, Jul 19, 2008 at 4:51 PM, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, [p e r c e p t i c o n] [EMAIL PROTECTED] wrote: Hi Experts, is there some advantage to putting the components in a form as opposed to just putting the components in the panel or canvas? thanks Built-in labels and default button. That's about as many as I can think of.
[flexcoders] Drawing on Canvas using Graphics API with backgroundColor
I'm trying to draw a line on a Canvas using the Graphic API as follows: myCanvas.graphics.clear(); myCanvas.graphics.lineStyle(2); myCanvas.graphics.moveTo(0,0); myCanvas.graphics.lineTo(100,100); This works fine as long as the Canvas does not have a backgroundColor style property set. Once the backgroundColor property is set, my drawn line is behind the background color. If I change the backroundAlpha to a value closer to 0, I can see my drawn line through the background. How can I draw my line on top of the background? I tried using a Shape object to draw into and add the Shape object as a child to the Canvas but get an exception: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent. I guess children of Canvas have to be IUIComponentS. What is the best strategy for drawing on a Canvas with a backgroundColor? Thanks Vijay
RE: [flexcoders] Re: Flash USB-API :)
Then use Merapi - if it is important to you. but just because it is important to you doesn't mean that the development cost is justifiable. If this isn't the 'solution' that you hope for. make a case - submit it as a feature request to Adobe and try to garner some support for the feature. R From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Saturday, July 19, 2008 7:10 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Flash USB-API :) @Rick - That doesn't really help solve the problem. And because it doesn't exist or it would be difficult isn't a reason for not including it. People still have applications that need to be built that include this support. dorkie a little bit late to the conversation dork from dorktown On Tue, May 27, 2008 at 9:31 PM, Rick Winscot [EMAIL PROTECTED] wrote: Before we go too much further with this - it would be beneficial to recognize that there is no such thing as a Generic USB Protocol that will give everyone blanket communications with usb devices. every device has a specific implementation that would have to be 'handled' in Flex/AIR similar to what Adobe has done with web-cams. They could use HID (Human Interface Device) I suppose but that is what the mouse/keyboard is for! If you need something very specific like joystick control in your app - you have more than enough (a wealth of) tools at your disposal to make it happen. Have you considered joystick emulation? NTPAD http://www.ntpad.com.ar/index.php?page=downloadseng.php http://www.ntpad.com.ar/index.php?page=downloadseng.phplang=eng lang=eng JoyEmu (personal fav) http://members.tripod.com/~szanella/joyemueng.htm http://members.tripod.com/%7Eszanella/joyemueng.htm JoyToKey http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cosma Sent: Tuesday, May 27, 2008 3:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flash USB-API :) Why don't you use a signed java applet? You could simply load it in the wrapper html file (with size set to 0, if you don't want that java swing stuff in your UI), and then interact with it using the flex ExternalInterface and applet's NSObject. I use this solution to allow direct TWAIN image scanning in my Flex application. The only problem with it is that the ExternalInterface doesn't seem very reliable for exchanging more than small simple variables - very long strings and binary data seems to cause troubles. Here is an interesting blog post on this topic: http://tobiaspatton.wordpress.com/2007/08/29/using-a-signed-java-applet-as-a -flex-helper-part-1/ Bye Cosma --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Cato Paus [EMAIL PROTECTED] wrote: Hi I know abouth the MerApi http://www.merapiproject.net/index.php, but My use-case is: I'm developing a TV-FlexApplication for a cutsomer that wants to use a tv remote controller to change the channels that I'm stremaing form satelitte or cabel. The point of using Flex/flash is that I have all under my controll (The app) and the customer will allvays have the last build of the app. To day flash player have connection to several USB devises, USB Camare and microphone!! Why not extend this a litle more :) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Rick Winscot rick.winscot@ wrote: There is an obvious solution: Flex/AIR - Web Services (or similar) - USB ... but _direct_ communication with USB? I'm stumped as to why you would even need something like this. What is your use case? Rick Winscot From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Cato Paus Sent: Friday, May 23, 2008 9:35 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Flash USB-API :) Hehe Totaly Agree with you on Joe Random, but I put my trust on Adobe to find a solution :) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% mailto:flexcoders%25 40yahoogroups.com , Tom Chiverton tom.chiverton@ wrote: On Thursday 22 May 2008, Cato Paus wrote: I realy hope we can have USB communication in AIR and Flash Player :) USB communication from a web site ? I think not... unless you want Joe Random reading all your data. For AIR this makes more sense. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square,
Re: [flexcoders] Tortoise and Flex 4
Sherif Abdou wrote: I am using Tortoise to get Flex 4 from the trunk, I was wondering do i need to recompile everytime Tortoise does an update and downloads new files or update old ones? Yes. Is running ant -q main in cygwin a one time thing? No. Depending on the files that have changed you might be able to build using a different target. eg) ant -q frameworks Which would be quicker. But for now you might want to rebuild everything just to be sure. cheers, - shaun
[flexcoders] Re: Drawing on Canvas using Graphics API with backgroundColor
Hi Vijay, If you want to draw a line on top of the background of a canvas, you can draw it in a BorderSkin. Or, something like this works, usually by overriding createChildren(): var myComponent:UIComponent = new UIComponent(); var myShape:Shape = new Shape(); myShape.graphics.lineStyle(2); myShape.graphics.moveTo(0, 0); myShape.graphics.lineTo(100, 100); myComponent.addChild(myShape); myCanvas.addChild(myComponent); One of the component gurus will have to explain why you need to add a UIComponent for this to work. -TH --- In flexcoders@yahoogroups.com, Vijay Ganesan [EMAIL PROTECTED] wrote: I'm trying to draw a line on a Canvas using the Graphic API as follows: myCanvas.graphics.clear(); myCanvas.graphics.lineStyle(2); myCanvas.graphics.moveTo(0,0); myCanvas.graphics.lineTo(100,100); This works fine as long as the Canvas does not have a backgroundColor style property set. Once the backgroundColor property is set, my drawn line is behind the background color. If I change the backroundAlpha to a value closer to 0, I can see my drawn line through the background. How can I draw my line on top of the background? I tried using a Shape object to draw into and add the Shape object as a child to the Canvas but get an exception: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent. I guess children of Canvas have to be IUIComponentS. What is the best strategy for drawing on a Canvas with a backgroundColor? Thanks Vijay