[flexcoders] Drop Down List Scroll Bar not working in DataGrid
Here is my code, every time I click on the drop down list scroll bars it closes rather than scrolls. I've not had any answers to this problem. So if you can figure it out their is a heap of kudos for you. Good luck! ** inbed.mxml ** ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx minWidth=955 minHeight=600 s:layout s:VerticalLayout horizontalAlign=center paddingTop=10 gap=10/ /s:layout fx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] protected var acPeople:ArrayCollection = new ArrayCollection( [ { people_id: 1, people_name: 'Stephen', people_family:1}, { people_id: 2, people_name: 'Sheila', people_family:1}, { people_id: 3, people_name: 'David', people_family:1}, { people_id: 4, people_name: 'Ross', people_family:2}, { people_id: 5, people_name: 'Gareth', people_family:2}, { people_id: 6, people_name: 'Joyce', people_family:2} ]); ]] /fx:Script fx:Declarations !-- Place non-visual elements (e.g., services, value objects) here -- /fx:Declarations s:Label text=People And Family Names fontWeight=bold/ mx:DataGrid dataProvider={acPeople} rowCount=3 editable=true mx:columns mx:DataGridColumn headerText=Index dataField=people_id editable=false/ mx:DataGridColumn headerText=First Name dataField=people_name editable=false/ mx:DataGridColumn headerText=Family Name dataField=people_family itemRenderer=render rendererIsEditor=true editorDataField=selection/ /mx:columns /mx:DataGrid /s:Application ** render.mxml ** ?xml version=1.0 encoding=utf-8? s:MXDataGridItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx focusEnabled=true fx:Script ![CDATA[ import mx.collections.ArrayCollection; import spark.events.IndexChangeEvent; public var selection:int; [Bindable] protected var acFamily:ArrayCollection = new ArrayCollection( [ { family_id: 1, family_name:Brown}, { family_id: 2, family_name:Owen}, { family_id: 3, family_name:Johnson}, { family_id: 4, family_name:Harding}, { family_id: 5, family_name:Manson}, { family_id: 6, family_name:Philips}, { family_id: 7, family_name:Hedge} ]); protected function dropdownlist1_changeHandler(event:IndexChangeEvent):void { selection = event.newIndex; } ]] /fx:Script s:DropDownList dataProvider={acFamily} labelField=family_name selectedIndex={int(dataGridListData.label)} change=dropdownlist1_changeHandler(event) width=100% top=2 bottom=2 left=2 right=2/ /s:MXDataGridItemRenderer
[flexcoders] Overriding Item Background In ItemRenderer Problem.
I can change the Label color but cant change the background color, its anying. Can anybody suggest a solution. s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true fx:Script ![CDATA[ override public function set data(value:Object):void { trace(value); if (value == Option 7) { labelDisplay.setStyle(color,#FF); //bgRect.left = 10; } else { labelDisplay.setStyle(color,#00); //bgRect.left = 0; } } ]] /fx:Script s:states s:State name=normal / s:State name=hovered / s:State name=selected / /s:states s:Rect id=bgRect includeIn=normal,hovered,selected left=0 right=0 top=0 bottom=0 s:fill s:SolidColor color = #8080FF color.selected=#404080 color.hovered=#5050A0/ /s:fill /s:Rect s:Label id=labelDisplay color=black color.hovered=red color.selected=white left=3 right=3 top=4 bottom=3/ /s:ItemRenderer
[flexcoders] Nested ItemRenderers Problem
I have placed a Label renderer inside of a Drop Down List inside of a Data Grid and I am having trouble makeing the Drop Down List scroll properly. I have included a link to the application which has the attached source code available if you need to look. When I click to drag the list closes for some reason. http://sbrown.myip.org/files/NestedRenders/NestedRenderers.html - Stephen
[flexcoders] Re: Nested ItemRenderers Problem
If I make the DataGrid editable I can select from the drop down and it updates the Data Grid which I can show by scrolling the Drop Down List off the panel and back on and it is still changed at the same time the Drop Down List scroll bars just close the drop down list when you click on them. If I make the Data Grid Un-editable the scroll bars begin to work but the editorDataField does not pass the update into the Data Grid and so it won't remember the changes. editable=true Scrolling fails, Update works editable=false Scrolling works, Update fails - Help!!
[flexcoders] Custom spark List drag indicators using dynamic MovieClips
Does anyone have a Flex 4.1 example of custom spark List component drag indicator that utilizes dynamically set runtime MovieClips? I've been trying to do this using the suggested customization routes from the Using Flex 4 documentation, and failing horribly. Here are the logical steps I've gone through, along with what works and what does not: ) Customize List component, with a style using a custom itemRenderer. Drag data is set to copy, not move (drag and drop items into other components). The itemRenderer contains an Image with the source dynamically set at runtime to loaded swf MovieClip content. WORKS ) Add a dragging state to the ItemRenderer that includes the Image. FAILS (Image does not display in the drag indicator although it displays fine in the normal itemRenderer states in their List positions) ) Create a custom List style that uses a custom dragIndicatorClass. WORKS … except: ) Try to dynamically set the source of the Image in the dragIndicatorClass. Perform this by trying to grab the Image source setting from the DragSource of the owner. This fails because the DragSource is null at the time the dragindicator is created. OK then, let's try to attach a listener to the owner for drag events, or listen to drag events directly. Hrm, none of this works. FAILS This was doable in mx / Flex 3 by overriding the ListBase dragImage, but this isn't the route to go with spark. Any suggestions? Thanks, Steve -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: flexcoders-dig...@yahoogroups.com flexcoders-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: flexcoders-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Handling XML
Managed to pop the XML into an XMLList var list:XMLList = XMLList(xml); And then recorsively count through items list = list.decendants(item); Then finaly recover what I was looking for trace(list.toXMLString()); So all good. - Criptopus --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: There is no eval in actionscript. To pass XMLLIst a string it would have to be a string that can be converted to XML, not something that references variables. On 8/17/10 1:40 PM, Stephen sd_br...@... wrote: var xml:XML = library shelf book chapterOnce Upon A Time/chapter /book /shelf /library ; var path1:XMLList = xml.shelf.book.chapter; trace(path1: + path1.text()); // output: path1: Once Upon A Time var string:String = xml.shelf.book.chapter; var path2:XMLList = XMLList(xml.shelf.book.chapter); trace(path2: + path2.text()); // output: path1: Why do I get no output with the second trace, it looks like the XMLList() dosn't work, any tips would be great. - Criptopus -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Handling XML
var xml:XML = library shelf book chapterOnce Upon A Time/chapter /book /shelf /library ; var path1:XMLList = xml.shelf.book.chapter; trace(path1: + path1.text()); // output: path1: Once Upon A Time var string:String = xml.shelf.book.chapter; var path2:XMLList = XMLList(xml.shelf.book.chapter); trace(path2: + path2.text()); // output: path1: Why do I get no output with the second trace, it looks like the XMLList() dosn't work, any tips would be great. - Criptopus
[flexcoders] Data Management
If I create two tables and wish to display attributes from both and I join these tables together and display the results everything is fine. If I then need to change some of this data by updating or deleting from one of the tables (as update and delete wont work for the joined tables) I get a conflict error... Local item has changes to properties that conflict with remote change. instructing that my local joined table (that I read in from the database) is now diffrent from the current state of the table (on the server). This Data Management is getting to be a pain, does anybody know how to get around this proble or simply turn it off. I was hoping maybe their was a way to tell Zend to drop all refrences to the joined table so that their wouldn't be any more errors when the data is re-displayed. - Stephen
[flexcoders] Re: Interface Over Public/Dispatch
Thanks for that, all sorted out now.
[flexcoders] Dynamic Validation
Take a dropDownList dynamically created and added to a dynamically created HGroup and placed in a static VGroup. See bellow.. -- protected var cohab_hgroup:Array = new Array(); protected var cohab_gender:Array = new Array(); cohab_gender.push(new DropDownList()); cohab_gender[cohab_hgroup.length-1].width = 100; cohab_gender[cohab_hgroup.length-1].prompt = Select; cohab_gender[cohab_hgroup.length-1].dataProvider = gender_list; cohab_hgroup[cohab_hgroup.length-1].addElement(cohab_gender[cohab_hgroup.length-1]); cohab_list.addElement(cohab_hgroup[cohab_hgroup.length-1]); s:VGroup id=cohab_list width=100% clipAndEnableScrolling=true/ --- But now I need to add a validator... protected var cohab_gender_validator:Array = new Array(); cohab_gender_validator.push(new NumberValidator()); cohab_gender_validator[cohab_hgroup.length-1].source = cohab_gender[cohab_hgroup.length-1]; cohab_gender_validator[cohab_hgroup.length-1].property = selectedIndex; cohab_gender_validator[cohab_hgroup.length-1].minValue = 0; cohab_gender_validator[cohab_hgroup.length-1].lowerThanMinError=A choice must be made.; --- I's just not working, anyone with an idea of whats missing? - Stephen
[flexcoders] Re: Interface Over Public/Dispatch
Can applications still listen for events triggered by their modules using this method, I am having trouble setting up a listner? - Stephen --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Interfaces create a level of abstraction and define a contract. If properly written they do not have major class dependencies. You always use then in components published from modules since the loading app can't talk directly to the class otherwise the class gets linked into the main app and the module is worthless. In other cases, you don't care what class implements the contract so that other folks can supply alternate implementations that don't require the same base classes. On 2/4/10 2:49 AM, criptopus sd_br...@... wrote: Why would you choose when making a component to create a interface for the component to pass variables to and from it over using say public variables to send data to the component and dispatch and listen events to return data back? I have been using the Lynda.com tutorials and they use public/dispatch and I noticed from the MobileTitleWindow you could use a class interface with get and set? - Stephen -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] PHP Data Services - Compound Keys
I have a table in my database that uses compound keys. Apparently Flash Builder 4 does not support compound keys. Does anybody have a work around for this problem?
[flexcoders] Re: Updating ValueObjects
--- In flexcoders@yahoogroups.com, Stephen sd_br...@... wrote: I have written a program where you select a record and it is displayed due to the form being bound to the value object, when I update the record it updates in the database okay, but when I re-query it it crashes with the following, cant seem to make head nor tail of it... mx.data::Conflict { cause = mx.data.messages::DataMessage { body = [[heating_name], { heating_id = 2 heating_name = Radient Heat x }, valueObjects::View_heating { heating_id = 2 heating_name = Radient Heat }] clientId = null correlationId = destination = view_heatingRPCDataManager headers = { newReferencedIds = null prevReferencedIds = null } identity = { heating_id = 2 } messageId = BEC62CE9-C4FA-4DB9-19A3-3459879B4269 operation = 3 timestamp = 0 timeToLive = 0 } causedByLocalCommit = false clientObject = valueObjects::View_heating { heating_id = 2 heating_name = Radient Heat } destination = view_heatingRPCDataManager errorID = 0 message = Local item has changes to properties that conflict with remote change. name = Error originalObject = { heating_id = 2 heating_name = Radient Heat x } propertyNames = [heating_name] resolved = false serverObject = heating_id=2 serverObjectDeleted = false serverObjectReferencedIds = { } } Apparently this is due to loss of data management and can be corrected by going to Data/ServicesDataTypeView_heating and enabling data management of the valueObject on each of the CRUD service operations. Took me 5 hours to figure out by a process of elimination hope it saves some one some time.
[flexcoders] Re: PHP Data Service
Data type was not set correctly in Data/Services Solved.
[flexcoders] ViewStack Event
What ViewStack Event Listener is activated when public variables within the view stack become available. I don't fancy using the CreationPolicy=All as it slows the web site down too much. - Stephen
[flexcoders] Updating ValueObjects
I have written a program where you select a record and it is displayed due to the form being bound to the value object, when I update the record it updates in the database okay, but when I re-query it it crashes with the following, cant seem to make head nor tail of it... mx.data::Conflict { cause = mx.data.messages::DataMessage { body = [[heating_name], { heating_id = 2 heating_name = Radient Heat x }, valueObjects::View_heating { heating_id = 2 heating_name = Radient Heat }] clientId = null correlationId = destination = view_heatingRPCDataManager headers = { newReferencedIds = null prevReferencedIds = null } identity = { heating_id = 2 } messageId = BEC62CE9-C4FA-4DB9-19A3-3459879B4269 operation = 3 timestamp = 0 timeToLive = 0 } causedByLocalCommit = false clientObject = valueObjects::View_heating { heating_id = 2 heating_name = Radient Heat } destination = view_heatingRPCDataManager errorID = 0 message = Local item has changes to properties that conflict with remote change. name = Error originalObject = { heating_id = 2 heating_name = Radient Heat x } propertyNames = [heating_name] resolved = false serverObject = heating_id=2 serverObjectDeleted = false serverObjectReferencedIds = { } }
[flexcoders] PHP Data Service
I have copied the getView_ByID function and recoded the copy to filter by a specific field rather than the ID by changing the following... public function getView_heatingByID($itemID) { -to- public function getView_heatingByName($itemID) { $stmt = mysqli_prepare($this-connection, SELECT * FROM $this-tablename where heating_id=?); -to- $stmt = mysqli_prepare($this-connection, SELECT * FROM $this-tablename where heating_name=?) mysqli_stmt_bind_param($stmt, 'i', $itemID); -to- mysqli_stmt_bind_param($stmt, 's', $itemID); ...and the service runs fine as far as the Test goes with in Flash Builder 4's Test Operation panel. -But- The callResponder does not return a ValueObject like it would if I had simply requested it by using service.getView_heatingByID? s:CallResponder id=getView_heatingByNameResult result=callResponder2();/ protected function callResponder2():void { var x:Object = getView_heatingByNameResult.lastResult; view_heating = x as View_heating; } What I should get is... valueObjects.View_heating (@113479e9) [inherited] _115792uid view_heatingRPCDataManager:#:1 _1464461640heating_name Forced Air _1471128022_model _View_heatingEntityMetadata (@11226fb1) not... mx.utils.ObjectProxy (@af3bf29) dispatcher flash.events.EventDispatcher (@af3bf71) listeners null heating_id 1 heating_nameForced Air _id null Can someone explaine how I can get the valueObject as this object can not be force to conform to a valueObject as I have tried with no luck. Thanks for any help recieved, this one is a puzzler! - Stephen
[flexcoders] Re: PHP Data Service
Further to my previous post I have noticed a slight diffrence in the returned data from the service. This object was returned by var_dump($o-getView_heatingByID(2)); and works. object(stdClass)#4 (2) { [heating_id]= int(2) [heating_name]= string(12) Radient Heat } While this object was returned by var_dump($o-getView_heatingByName('Radient Heat')); and does not work? object(stdClass)#3 (2) { [heating_id]= int(2) [heating_name]= string(12) Radient Heat } Whats going on here is my code... public function getView_heatingByName($itemID) { $stmt = mysqli_prepare($this-connection, SELECT * FROM $this-tablename where heating_name=?); $this-throwExceptionOnError(); mysqli_stmt_bind_param($stmt, 's', $itemID); $this-throwExceptionOnError(); mysqli_stmt_execute($stmt); $this-throwExceptionOnError(); mysqli_stmt_bind_result($stmt, $row-heating_id, $row-heating_name); if(mysqli_stmt_fetch($stmt)) { return $row; } else { return null; } }
[flexcoders] Can DataGrids multiply columns
I have a dataGrid as bellow and need to have the total of each row be calculated as the quantity and price are typed in. mx:DataGrid editable=true mx:DataGridColumn headerText=Quantity/ mx:DataGridColumn headerText=Price/ mx:DataGridColumn headerText=Total editable=false/ /mx:DataGrid How would I do this? - Stephen
[flexcoders] CallResponder
Is it possible to get feedback when a call reponder has updated a row in the database. I managed to get an addition to work probably because it had to return a key as a result. But update wont return a result so far as I have tried. All their seems to have is ACTIVE, DEACTIVE, FAULT RESULT none of which fires when updating. I can not bind to the datagrid for update as its a join, I can only update a table, when I do I need to know when it has been done so that I can call an update on the join to refresh the datagrid. - Any help? - Stephen
[flexcoders] Update Datagrid
I have two tables a contract table and a client table. I have one view of the contract joined to the client table. I display the view in a data grid and I provied a detail area for client I then try to update the table and and refresh the datagrid. Fields in the dataGrid from the client do not update. W H Y ? - Stephen
[flexcoders] DropDownList Data Services
I am populating a datagrid with data from database using Zend Data Services, I then select to amend a line of the datagrid using a master detail form. One of the fields is an index to another table and thus I need to use a DropDownList how do I set the drop down list to what the current setting is so I can then present the form for change. mx:FormItem label=Name: s:DropDownList width=200 id=dropDownList creationComplete=dropDownList_creationCompleteHandler(event) labelField=ProductName s:AsyncListView list={getAllDisp_product_nameResult.lastResult}/ /s:DropDownList /mx:FormItem This is how I believe I would read the data for the drop down list, how would I set it to default to a specific setting? - Cryptopus
[flexcoders] Dynamic DropDownList Default Setting Problem
This is a Flex 4 problem. I have dynamically filled a drop down box using PHP Data/Services and wish to set the initial display to the current Engineer. What I have is the value of the EngineerId. I have tried to access the values of the dropdown with no louk either, I feel like I'm getting no where, any help is much appreciated. CREATE VIEW view_engineer AS SELECT EngineerId, EngineerFullName FROM tblEngineer; mx:FormItem label=Name: s:DropDownList width=200 id=dropDownList creationComplete=dropDownList_creationCompleteHandler(event) labelField=EngineerFullName s:AsyncListView id=alvEngineer list={getAllDisp_engineer_fullnameResult.lastResult}/ /s:DropDownList /mx:FormItem
[flexcoders] Re: Dynamic DropDownList Default Setting Problem
There is no ArrayCollection, it is Dynamic? --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, Stephen sd_brown@ wrote: This is a Flex 4 problem. I have dynamically filled a drop down box using PHP Data/Services and wish to set the initial display to the current Engineer. What I have is the value of the EngineerId. I have tried to access the values of the dropdown with no louk either, I feel like I'm getting no where, any help is much appreciated. CREATE VIEW view_engineer AS SELECT EngineerId, EngineerFullName FROM tblEngineer; mx:FormItem label=Name: s:DropDownList width=200 id=dropDownList creationComplete=dropDownList_creationCompleteHandler(event) labelField=EngineerFullName s:AsyncListView id=alvEngineer list={getAllDisp_engineer_fullnameResult.lastResult}/ /s:DropDownList /mx:FormItem You'll need to look through the ArrayCollection and get either the index or the actual item with that id so that you can set the selected item/index.
[flexcoders] Channel Disconnected (Stumped!)
Channel Disconnected Before An Acknoledgement was recicved! at createView_clientsResult.token = ... Anyone advise notice something wrong? protected function manageClientData(event:ClientEvent):void { // build client view object to add or update. var obj:View_clients = new View_clients(); obj.ClientId = 0 as int; obj.ClientName = event.clientName as String; obj.ClientContacts = event.clientContacts as String; obj.ClientDate = event.clientDate as Date; obj.ClientAddress1 = event.clientAddress1 as String; obj.ClientAddress2 = event.clientAddress2 as String; obj.ClientCity = event.clientCity as String; obj.ClientCounty = event.clientCounty as String; obj.ClientPostCode = event.clientPostCode as String; obj.ClientPhone = event.clientPhone as String; obj.ClientMobile = event.clientMobile as String; obj.ClientFax = event.clientFax as String; obj.ClientEmail = event.clientEmail as String; createView_clientsResult.token = viewclientsService.createView_clients(obj); } fx:Declarations s:CallResponder id=getAllView_clientsResult/ viewclientsservice:ViewclientsService id=viewclientsService fault=Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail) showBusyCursor=true/ s:CallResponder id=createView_clientsResult/ valueObjects:View_clients id=view_clients/ s:CallResponder id=updateView_clientsResult/ !-- Place non-visual elements (e.g., services, value objects) here -- /fx:Declarations
[flexcoders] Update Insert via DataServices
If I have list a table in a datagrid using data services in flex 4 how do I update insert or delete in that datagrid/table. Usually I use HTTPServices so have a array collection to work with but there is no array collection this time. all i have is an obj:Object containing the insert or update data?
[flexcoders] Re: Update Insert via DataServices
So is this built into Flex Builder 4 or do I have to download something else? --- In flexcoders@yahoogroups.com, Evan Klein e...@... wrote: You would use the dataservice.addItem() and dataService.deleteItem() methods. Then, if autoCommit=true is not on you'll need to do a dataService.commit() to send these transactions to the server. You'll need this - LCDS Manual: http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/index.html http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/index.html On Wed, May 26, 2010 at 10:02 AM, Stephen sd_br...@... wrote: If I have list a table in a datagrid using data services in flex 4 how do I update insert or delete in that datagrid/table. Usually I use HTTPServices so have a array collection to work with but there is no array collection this time. all i have is an obj:Object containing the insert or update data? -- Evan Klein
RE: [flexcoders] init, creationcomplete and other events
You can find more info in the doc here: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf63825-7fff.html Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Angelo Anolin Sent: Wednesday, May 19, 2010 9:41 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] init, creationcomplete and other events Thanks Alex and Gordon. Is there some sort of documentation for this? Thanks. From: Alex Harui aha...@adobe.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Tue, 18 May, 2010 18:20:36 Subject: Re: [flexcoders] init, creationcomplete and other events Preinitialize, initialize, creationComplete, applicationComplete . Objects do not have a stage until applicationComplete . On 5/18/10 3:22 PM, Angelo Anolin angelo_anolin@ yahoo.com wrote: Hi FlexCoders, Does anyone have a link on which event fires up first? For example, in an application container, which event fires up and any other pointers which I have to be aware of. Thanks. Angelo -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs. adobe.com/ aharuihttp://blogs.adobe.com/aharui inline: image001.jpginline: image002.jpg
RE: [flexcoders] User manual
You can download all Flex 3 doc as HTML or PDF from here: http://www.adobe.com/support/documentation/en/flex/ If you are using the Flex 4 Beta, you can get the doc for the last public Beta release from: http://help.adobe.com/en_US/Flex/4.0/UsingFlashBuilder/index.html Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of John McCormack Sent: Friday, January 22, 2010 4:13 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] User manual Hi Christophe, The user manual exists in printed form (4 books, about 15cm thick) but it has no index in the back, which makes it hard to use. I have it, but the pdf format is better. John Christophe wrote: Hello, Does the user manual is still existing for a flex application ? Or did the FAQ is sufficient ? Thank you, Christophe, -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links inline: image001.jpginline: image002.jpg
RE: [flexcoders] ASDoc MXML
Hi Amy, Are you using Flex 3 or the Flex 4 Beta? For Flex 3, the asdoc compiler does not really support MXML files. For the Flex 4 Beta, we have added support for MXML files to asdoc. You can find the doc un using it here: http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WSd0ded3821e0d52fe1e63e3d11c2f44bb7b-7fe7.html Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Amy Sent: Thursday, November 19, 2009 4:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ASDoc MXML When you give a component defined in MXML an ID, you essentially make it a public property of your component, so I want to document all of these properties. Unfortunatley, I'm not sure how to inline ASDOC comments on them. Has anyone done this before? TIA; Amy inline: image001.jpginline: image002.jpg
Re: [flexcoders] Re: FB3 Debug: Launch Failed: Invalid argument
Wow total voodoo: the error just disappeared after I quit Flex Builder and launched yet again (I forgot to mention I tried doing this several times as well). The only thing different I can think of is that Safari launched first in this debug session. I will try Firefox if this rears it's head again. Error Log view was no help. It did not include any of these errors. Thanks for the help. Problem mysteriously solved for now. On 2009-11-04, at 12:48 AM, primo411 wrote: In Eclipse, try to open the 'Error log' view, and you will get more precise informations about the errors you encounter. 2009/11/4 polestar11 polesta...@yahoo.com Have you tried debugging your app with FireFox? I'm also on a mac but have never tried debugging using Safari Cheers Tracy --- In flexcoders@yahoogroups.com, Stephen Downs st...@... wrote: I've having an extremely agonizing time dealing with mysterious alert messages when trying to debug my Flex Builder 3 project. Debugging begins, the status bar reads Launching project: (91%), the application loads in the browser and displays, but back in Flex it hangs with an error message: Launch Failed Invalid argument This error message could be more informative. As is, no details, no line number given. Fixes I've tried, in combination and alone, to no avail: ) Clean Project. ) Strip mxml down to single bare Application tag. ) Delete build folder. Install details: Mac OS X 10.6.1 Safari 4.0.3 (6531.9) Flex Builder 3.0.2 Flash Player 10.0.32.18 content debugger Any insight would be terrific. Thanks, Steve -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:flexcoders-dig...@yahoogroups.com mailto:flexcoders-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: flexcoders-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] FB3 Debug: Launch Failed: Invalid argument
I've having an extremely agonizing time dealing with mysterious alert messages when trying to debug my Flex Builder 3 project. Debugging begins, the status bar reads Launching project: (91%), the application loads in the browser and displays, but back in Flex it hangs with an error message: Launch Failed Invalid argument This error message could be more informative. As is, no details, no line number given. Fixes I've tried, in combination and alone, to no avail: ) Clean Project. ) Strip mxml down to single bare Application tag. ) Delete build folder. Install details: Mac OS X 10.6.1 Safari 4.0.3 (6531.9) Flex Builder 3.0.2 Flash Player 10.0.32.18 content debugger Any insight would be terrific. Thanks, Steve
RE: [flexcoders] Flex Builder help system
Sure, in the FB menu, select: -Window Preferences to open the Preferences dialog box - In the dialog box, select Help - In the Help pane, select the Use external browser checkbox - Below the checkbox, select Web Browser to pick your browser - Hit OK Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nick Middleweek Sent: Monday, September 07, 2009 9:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Builder help system Hello, Is there a way to change Flex Builder 3 so that when I press F1 over a component, rather than the help page open within FB3, can it open up in a web browser? Thanks, Nick inline: image001.jpginline: image002.jpg
RE: [flexcoders] A simply question about img tag in ASDoc
Should it omit the leading slash? As in: img src = images/myimage.jpg / Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of flexawesome Sent: Tuesday, July 28, 2009 10:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] A simply question about img tag in ASDoc Hi there, I was trying to add an image by using the ASDoc, but it didn't show up in my doc, the path of the logo does exist. Any suggestion on this? /** * * img src = /images/myimage.jpg / * */ http://livedocs.adobe.com/flex/gumbo/html/WSd0ded3821e0d52fe1e63e3d11c2f44bc36-8000.html Thank you inline: image001.jpginline: image002.jpg
RE: [flexcoders] 3.3 API confusion
Hi, That was a mistake in the doc. The addAll() method should not have been documented, and the same is true for the addAllAt() method. They will be available in a future release. Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Brian Sterling Sent: Wednesday, July 08, 2009 8:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 3.3 API confusion I'm confused. The livedocs show a new addAll() method in ListCollectionView: http://livedocs.adobe.com/flex/3/langref/mx/collections/ListCollectionView.html#addAll() However, even after installing SDK 3.3 from http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk , I was unable to to use it. Also, the source in the 3.3 SDK does not show it. So I decided to download the latest documentation from the Complete Flex 3 documentation section on http://www.adobe.com/support/documentation/en/flex/ to compare. The language reference in the download does NOT have the addAll() method, and in addition, it is marked as version 3.2! Is there some place to find the documentation corresponding to the last stable release, which is 3.3? Or am I missing something? Thanks, Brian PS: To add to my list of problems, the Yahoo Group search is only showing results up through mid-March. inline: image001.jpginline: image002.jpg
RE: [flexcoders] asdoc and flexlib
Is the directory that contains PromptingTextInput included in the source-path when you run asdoc? Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of arisco97 Sent: Thursday, June 04, 2009 4:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] asdoc and flexlib During asdoc generation, I get: Error: Type was not found or was not a compile-time constant: PromptingTextInput. The code compiles fine. inline: image001.jpginline: image002.jpg
[flexcoders] How does one implement IBitmapDrawable
Given this code: var bitmapData:BitmapData; bitmapData.draw( IBitmapDrawable( target ) ); What method(s) does target need to implement so that bitmapData will have valid data in it ? Can anyone provide an example ? -Thanks
Re: [flexcoders] How does one implement IBitmapDrawable
The docs do not say much about IBitmapDrawable: http://livedocs.adobe.com/flex/3/langref/flash/display/IBitmapDrawable.html In your example lets say I create: MyUIComponet extends UIComponet What method do I need to write in MyUIComponet such that I can respond back with an embeded image instead of the rendering of the children of UIComponet when IBitmapDrawable is called ? On Mon, Jun 1, 2009 at 6:08 PM, Rick Winscot wrote: IBitmapDrawable is implementd by flash.display.DisplayObject... of which Flex mx.core.UIComponet extends. So... If you want to create something that you can groggle BitmapData with – that’s a pretty good place to start. http://livedocs.adobe.com/flex/3/langref/mx/core/UIComponent.html Cheers, Rick Winscot On 6/1/09 4:39 PM, Stephen More wrote: Given this code: var bitmapData:BitmapData; bitmapData.draw( IBitmapDrawable( target ) ); What method(s) does target need to implement so that bitmapData will have valid data in it ? Can anyone provide an example ? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:flexcoders-dig...@yahoogroups.com mailto:flexcoders-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: flexcoders-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] URLLoader + Binary != URLStream
I would think that I could load a swf using either URLLoader or URLStream. As it turns out only my URLStream is returning the correct data. Can anyone provide a fix to the following code that makes URLLoader work correctly ? import flash.net.URLLoader; import flash.net.URLLoaderDataFormat; import flash.net.URLRequest; import flash.net.URLStream; private var loader:URLLoader; private var stream:URLStream; private function init():void { loader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.BINARY; loader.addEventListener(Event.COMPLETE, loaderComplete); loader.load( new URLRequest( Slide1.swf ) ); stream = new URLStream(); stream.addEventListener(Event.COMPLETE, streamComplete); stream.load( new URLRequest( Slide1.swf ) ); } private function streamComplete(event:Event):void { var rawBytes:ByteArray = new ByteArray(); stream.readBytes( rawBytes, rawBytes.length ); trace( Length: + rawBytes.length ); dumpData( rawBytes ); } private function loaderComplete(event:Event):void { var rawBytes:ByteArray = new ByteArray(); rawBytes.writeObject( loader.data ); trace( Length: + rawBytes.length ); dumpData( rawBytes ); } private function dumpData( ba:ByteArray ) { ba.position = 0; var index:int = 0; var tracer:int; while( ba.position 5) { tracer = ba.readByte(); trace( index + : + tracer.toString(16)); index = index + 1; } }
[flexcoders] can one access mx.core.Container from within a SWFLoader
Lets say I have 2 compiled flex applications: main.swf - contains a View Stack components.swf - contains 2 mx.containers.Panel within main.swf can one use SWFLoader ( or something else ) to add 1 of the panels from components.swf as a child of the view stack within main.swf ? I know this can easily be done outside of flex by using flash.display.Loader on plain swf files. When you boil it down, I am really trying to compile a mx.containers.Panel into a reusable component. Can this be done ? -Thanks Steve More
RE: [flexcoders] ASDoc and .as includes?
We use include files in Flex in a lot of places with no ASDoc issues. Is the error because ASDoc is trying to process the include file as if it were a class definition? If so, you should exclude the file from the build. Or, are you getting a different error? Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aaron smith Sent: Sunday, March 08, 2009 1:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ASDoc and .as includes? Hey all, How can I get asdoc to play nice with includes? By includes, I don't mean the asdoc -includes command flag. that's for including swcs. I mean the preprocessor includes like: include some_as_file.as I have some classes that use the same logic, so I've put it in includes. But it breaks asdoc. any ideas? Thanks -Aaron inline: image001.jpginline: image002.jpg
RE: [flexcoders] how to change titlebar text when iam executing a flex application
Hi Poornima, Did you try Application.pageTitle? Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of kotha poornima Sent: Thursday, February 19, 2009 2:17 AM To: flexcoders Subject: [flexcoders] how to change titlebar text when iam executing a flex application Hi All, I want to change the text in the titlebar when iam executing the mxml file. If iam running file1.mxml file, in the title bar its showing file:\\documents and settings\\file1.html. But i want to show my custom message. But i dint find any clue regarding this. Can anyone help me out of this. Thanks in Advance, Poornima inline: image001.jpginline: image002.jpg
RE: [flexcoders] default skin in flex 3 component
The doc on skinning is located here: http://livedocs.adobe.com/flex/3/html/skinning_1.html Was that helpful? Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of gwangdesign Sent: Tuesday, February 17, 2009 12:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] default skin in flex 3 component Hi, I am trying to define the default skin (which is ProgrammaticSkin for now) for my custom UIComponent. I would like to provide my own programmaticSkin (hm.controls.myUICompClasses.BackdropSkin) as default; and I am doing it in my UIComponent's style metadata, like so: [Style(name=backdropSkin, type=hm.controls.myUICompClasses.BackdropSkin, inherit=yes)] ... protected var _backdrop:Class; ... Is this the right way? What type should my _backdrop be? Or do I need to provide a CSS anyhow? Or classConstruc()??? When I try to get the style using: var backdropSkin:Class = getStyle(backdropSkin); I get type of Object instead of Class. I appreciate any lead while still poking around the flex documentation/sdk code! Sorry everything looks a bit blurred right now8) Good night! inline: image001.jpginline: image002.jpg
[flexcoders] Displaying Extremely large fonts
Is there a way to display extremely large fonts in Flash ? I have tried: var format:TextFormat = new TextFormat(); format.font = Verdana; format.color = 0x00; format.size = 72; [TextLineMetrics ascent:72, descent:16, leading:0, width:40, height:88, x:2] format.size = 144; [TextLineMetrics ascent:127, descent:27, leading:0, width:71, height:154, x:77] format.size = 288; [TextLineMetrics ascent:127, descent:27, leading:0, width:71, height:154, x:77] But the height never gets larger than 154. textfield.width = stage.stageWidth; textfield.height = stage.stageHeight; I am looking to display text almost as large as the stage, do I need to use a different font or an embedded font ? -Thanks
RE: [flexcoders] [flexcomponents]Writing comments for properties on parent classes
Hi, Do you mean you don't know how to format the comment, or you want to copy the comment from the parent class to your class? The doc on ASDoc explains both of these. You can see it here: http://livedocs.adobe.com/flex/3/html/asdoc_1.html Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dorkie dork from dorktown Sent: Tuesday, February 17, 2009 5:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] [flexcomponents]Writing comments for properties on parent classes Good morning Class (programming joke) I'm trying to write asdoc comments for properties on a class that i'm extending but don't know how. Example, public class SetProperty extends mx.states.SetProperty { public function SetProperty(target:Object = null, name:String = null, value:Object = null) { super(target, name, value); } } So you see my SetProperty class is extending mx.states.SetProperty. I am repurposing it and have to update the asdocs comments target, value, etc. inline: image001.jpginline: image002.jpg
RE: [flexcoders] How do I use CellRenderer in my AdvancedDataGrid? please help
You can see a bunch of examples here: http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_10.html Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of yossi.baram Sent: Tuesday, February 17, 2009 1:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How do I use CellRenderer in my AdvancedDataGrid? please help Hi, I need to implement an ItemRenderer on a specific column, Inside the column I need to hane an HBox that includs several images, the data I can take from the DataProvider of the dataGrid. What is the best way of doing that? Can you give me small example of using the CellRenderer, because I think its the best way, Thanks a lot Jo inline: image001.jpginline: image002.jpg
RE: [flexcoders] asdoc
We use that technique with ASDoc builds all the time. What is the error that you are getting from ASDoc? Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Rich Tretola Sent: Monday, January 26, 2009 2:08 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] asdoc I have a bunch of classes that are extending from base flex components. They also all share 5 properties and a few methods. So, rather that adding the shared properties and methods to each file. I used the old include SharedInclude.as; statement within each class to include an ActionScript file (not a class). All is happy and all compiles nicely. However, asdoc doesn't like this approach and pukes on the included properties when trying to create documentation. Anyone else ever tried something like this? Rich inline: image001.jpginline: image002.jpg
RE: [flexcoders] asdoc
Are you using -doc-sources to reference your source code? Try compiling it with -doc-classes or doc-namespaces instead, along with setting your source path. Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Rich Tretola Sent: Monday, January 26, 2009 3:13 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] asdoc col: 1 Error: The public attribute can only be used inside a package. On Mon, Jan 26, 2009 at 3:06 PM, Stephen Gilson smgil...@adobe.commailto:smgil...@adobe.com wrote: We use that technique with ASDoc builds all the time. What is the error that you are getting from ASDoc? Stephen From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Rich Tretola Sent: Monday, January 26, 2009 2:08 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] asdoc I have a bunch of classes that are extending from base flex components. They also all share 5 properties and a few methods. So, rather that adding the shared properties and methods to each file. I used the old include SharedInclude.as; statement within each class to include an ActionScript file (not a class). All is happy and all compiles nicely. However, asdoc doesn't like this approach and pukes on the included properties when trying to create documentation. Anyone else ever tried something like this? Rich inline: image001.jpginline: image002.jpg
[flexcoders] Flash-created Flex skin: Container content is offset
I'm having extreme difficulty creating a Flex 3 container skin in Flash that behaves properly. The resulting container content appears misplaced and shifted, compared to the built-in component skin that behaves normally. Setup: OS: Mac OS X 10.5.6 Applications: Flash 10.0.0.544 Flex Component Kit 1.1.2 Flex Skinning Templates 1.0.0 Flex Builder 3.0.2 Flex SDK 3.2 Steps to reproduce: I'm following the basic steps from the Importing Skins into Flex Builder document ( http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex%5Fskins ). In Flash, create a new Flex skin Template (New Flex SkinsTemplatesflex_skins). Publish the document, creating a swc file with the default halo visual appearance. In Flex Builder, create a new Flex project. Import the skin (Import Skin Artwork). Drag a Panel component onto the stage. Drag a TextArea component into the Panel. Set the TextArea instance attributes to x=0, y=0, width=100%, height=100%. Problem: The TextArea now fills up the entire container component and is not restricted to the content area. Comments: This appears to be a bug with the Flex Skin Design Extensions Flex Component Kit for Flash CS3 package ( http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex%5Fskins ). The content area in the template is not respected, even though no changes were made to the template! I've tried performing these steps in Flash CS3 (Flash 9) instead, and many varied approaches (introducing a mask, setting border regions, etc.), but the same results occur.
Re: [flexcoders] Wrapping Text in Alert
On Tue, Dec 23, 2008 at 5:54 AM, Manish Jethani manish.jeth...@gmail.com wrote: Is there an easy way to get text inside of a mx.controls.Alert to wrap ? It already wraps. The text is wrapping in your example, but it does not wrap tight enough as it is overflowing the edges. How can the text wrap such that all text will fall within myAlert.width ? I just looked at the source, and I'm sorry to say that the algorithm for calculating the width of the text object is fixed and cannot be overridden. The width is calculated based on the length of the title text and the width of the buttons (both factors). Any width you set on the Alert object has no effect on the width of the text inside it. Your options are to either chop up the text programmatically into multiple lines, so it appears to be wrapped, or patch the framework's AlertForm component to respect the width assigned to it. I think I will go for option 3 Creating custom pop-up windows with the PopUpManager: http://blog.flexexamples.com/2008/03/20/creating-custom-pop-up-windows-with-the-popupmanager-class-redux/
[flexcoders] Wrapping Text in Alert
Is there an easy way to get text inside of a mx.controls.Alert to wrap ? -Thanks Steve More
Re: [flexcoders] Wrapping Text in Alert
On Mon, Dec 22, 2008 at 5:39 PM, Manish Jethani manish.jeth...@gmail.com wrote: Is there an easy way to get text inside of a mx.controls.Alert to wrap ? It already wraps. mx:Button click=Alert.show('The quick brown fox jumped over the wall. The quick brown fox jumped over the wall. ...') / Perhaps you want to reduce the width of the box? Here is a little background, my flex application is really small width 125 x height 300. I would like the Alert box to be slightly smaller than the flex application. import mx.controls.Alert; import mx.managers.PopUpManager; private function showAlert() : void { var myAlert:Alert = Alert.show('The quick brown fox jumped over the wall. The quick brown fox jumped over the wall. ...'); myAlert.width = Application.application.width - 20; PopUpManager.centerPopUp( myAlert ); } The text is wrapping in your example, but it does wrap tight enough as it is overflowing the edges. How can the text wrap such that all text will fall within myAlert.width ? I am attaching a screen shot. -Steve attachment: alert.png
RE: [flexcoders] Channel documentation errors?
Please log a bug for that issue. Thanks, Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Michael Slinn Sent: Tuesday, December 16, 2008 10:14 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Channel documentation errors? The documentation for Channel.applySettings() says: Subclasses should override this method to apply any settings that may be necessary for an individual channel. Make sure to call super.applySettings() to apply common settings for the channel. Parameters settings:XML - XML fragment of the services-config.xml file for this channel. The following fragement includes the channel tag with all of its configuration settings: channel id=my-amf type=mx.messaging.channels.AMFChannel endpoint uri=/dev/messagebroker/amf type=flex.messaging.endpoints.AmfEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel Ignoring the spelling error (fragement), the documentation appears to be quite incorrect, if I read the source code correctly. I'm looking at flex_sdk_3.0.0.477\frameworks\projects\rpc\src\mx\messaging\Channel.as, and I see code that references the following properties: connect-timeout-seconds record-message-times record-message-sizes serialization enable-small-messages The polling-enabled property is not mentioned in the Channel code. PollingChannel extends Channel, and it references the following config file properties: polling-enabled polling-interval-millis polling-interval-seconds piggybacking-enabled login-after-disconnect None of the above properties are mentioned in the PollingChannel docs. The polling-enabled property mentioned in the Channel docs is actually handled by the PollingChannel subclass. NetConnection extends PollingChannel, and does not reference any new properties. AMFChannel extends NetConnection. The AMFChannel docs say that the config file's property called polling-interval-seconds is read into the AMFChannel.pollingInterval property. Also, the docs say that the polling-enabled property in the config file sets the AMFChannel.pollingEnabled property. As I discovered, PollingChannel handles these properties, not AMFChannel. Should I log a bug? inline: image001.jpginline: image002.jpg
Re: [flexcoders] WebDAV and Flex - Any sample code or opensource widgets available . . ?
How exactly do you envision WebDAV being used with flash ? Couldn't one use flash.net.Socket to connect to port 80 and communicate using the WebDAV protocol ? On Tue, Dec 9, 2008 at 2:10 PM, Seth Hodgson shodg. wrote: Unfortunately, the Player currently limits the set of allowed HTTP methods to just GET and POST. This means that PUT, DELETE, HEAD, etc. as well as all the WebDAV extension methods are not allowed. Anyone who cares about this area should vote for this bug: https://bugs.adobe.com/jira/browse/SDK-12200 And perhaps add a new bug specifically regarding WebDAV, although support for that would definitely be lower priority. As a workaround for core HTTP methods, you could use the proxy service in BlazeDS or LCDS which does supports all the core methods (mod PUT apparently - not sure why that one's not included, possibly a doc error). We use HTTPClient internally in the proxy service, and this library doesn't support WebDAV extension methods so you'd still be out of luck with WebDAV integration there as well. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of marty_martian Sent: Tuesday, December 09, 2008 7:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] WebDAV and Flex - Any sample code or opensource widgets available . . ? I have searched through the archives for this user group but see very little discussion on WebDAV with Flex. It looks like some folks have been trying to do it as far back as 2006 but no samples or pointers to samples or open source widgets have been posted. Related to this, can anyone share: - samples - pointers to samples - open source widgets Most Grateful, Christopher
[flexcoders] clearing out mx:DateField
Within flex I have: mx:DateField id=effective / Once a user selects a date, I can not clear it out using actionscript. I have tried: effective.selectedDate = null; effective.selectedDate = undefined; neither one has worked. How can one clear out the mx:DateField ? -Thanks
Re: [flexcoders] clearing out mx:DateField
On Tue, Dec 9, 2008 at 2:44 PM, Ryan Graham Ryan. wrote: effective.selectedDate = null; This should clear it. Perhaps the actionscript function containing this code isn't getting called. Sort of. My flex also has a mx:List with a dataProvider. I try to clear the List with: myitems.selectedItems = null; This is actually clearing the List, but every line of code after this not executing. So I guess the real question is what is the right way to clear a mx:List ? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stephen More Sent: Tuesday, December 09, 2008 12:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] clearing out mx:DateField Within flex I have: mx:DateField id=effective / Once a user selects a date, I can not clear it out using actionscript. I have tried: effective.selectedDate = null; effective.selectedDate = undefined; neither one has worked. How can one clear out the mx:DateField ? -Thanks This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
[flexcoders] What is the command-line equivalent to Flex Builder's Build Project.. Command?
In my program, I have been receiving an error when I use a command-line compile command for mxmlc. The error is related to an embedded font name not being correctly identified by flex in the system fonts list. However, on a whim, I decided to copy the code to Flex Builder and compile it there. To my surprise, it worked, and it found the proper font using the same system name I had given (PMingLiU). I suspected my problem may be a locale one, and that my system cannot correctly identify the font name because of locale considerations. I've tried setting the locale of the compile code to en_US, to no avail. So I would like to ask if anyone here knows the exact command string that Flex tells Mxmlc whenever it compiles a project. My answer might lie there.
[flexcoders] DataGrid - how to show the editor for a particular cell?
Hi, Say I have a datagrid with editable cells. That is, the user can click the cell to make the itemEditor appear and input data. This datagrid also has a feature that if I click on an empty row, I add a new record to the dataProvider and the user can input a new record. I've implemented that click-to-create-a-new-record part; now I want to do something like, when I click to create a new record, I would immediately set focus to the editor of a particular column. I'm not sure how to do this - is it possible to programatically show the editor for a specific column in a specific row? Without this change, currently the user has to click twice - once to create the new record, then second time to edit the field. Is it possible? Or any other approach you guys can suggest? Thanks! Roy
Re: [flexcoders] hi guys
2008/9/4 sainathevuri [EMAIL PROTECTED] i'm new to using adobe flex. i need to create a dynamic charting window to be integrated in a web page. Can u help me in knowing what all softwares to be used and what all to learn before getting on with flex? Have you thought about looking at ColdFusion and CFChart?
RE: [flexcoders] help with flex 3 sdk (how could I....)
Hi, Have you tried the Flex Getting Started site here: http://learn.adobe.com/wiki/display/Flex/Getting+Started Or the quick starts under the Getting Started tab on the Flex Dev Center: http://www.adobe.com/devnet/flex/ Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 3:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] help with flex 3 sdk (how could I) Ok, once I've downloaded the flex3sdk, then ? I was wondering if anyone of you guys know a tutorial about how to start creating application with the flex sdk, and installing so forth, any given help would be appreciated. I've tryied the adobe help, but it seems so obscure for me, any other ideas? I'm very open. I know that you have maybe heard of this a million time, well this is the million one...help me out? would you? Regards, Gustavo Duenas
Re: [flexcoders] Re: [Flashcoders] as3 class libraries
some people might find our google code library useful i guess http://code.google.com/p/tink/ -- Stephen Downs Addict, Tink Ltd. e: [EMAIL PROTECTED] t: +44 (0) 7730 838 785 w: http://www.tink.ws -- On 16 Jul 2008, at 15:21, Paul Evans wrote: On 14 Jul 2008, at 21:41, Corban Baxter wrote: I am trying to put together a list of some of the best AS3 and Flex Libraries, Classes and Frameworks we have available If you decide to publish your list somewhere, perhaps add a column to highlight the licence type of each item, which read in conjunction with Grant Skinners article could be a real time saver! http://www.gskinner.com/blog/archives/2008/07/source_code_lic_1.html -- Paul Evans http://www.creative-cognition.co.uk/ http://blog.creacog.co.uk/
RE: [flexcoders] Launching Flex Builder Help
Not really - the help requires an internal web server that is part of Eclipse. However, all of the help content is available online on livedocs at: http://livedocs.adobe.com/flex/3/html/ Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Thursday, July 10, 2008 2:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Launching Flex Builder Help Is there any way to launch the Help for Flex Builder without opening Flex Builder itself? TIA; Amy
Re: [flexcoders] Inspecting data from HTTPService result to an ArrayCollection
I am now using e4x as you suggest. I wrote a custom dataTipFunction to display the correct information. I have tried many things, but I have not been able to get the X - axis labels working. How can I write a custom axis label rendering for the below code ? ?xml version=1.0? !-- charts/HTTPServiceToXMLListCollection.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=srv.send() mx:Script![CDATA[ import mx.utils.ArrayUtil; ]]/mx:Script mx:HTTPService id=srv url=data.xml resultFormat=e4x / mx:XMLListCollection id=myAC source={srv.lastResult.result} / mx:Panel title=Line Chart mx:LineChart id=chart dataProvider={myAC} showDataTips=true mx:horizontalAxis mx:CategoryAxis categoryField=month/ /mx:horizontalAxis mx:series mx:LineSeries yField=apple name=Apple/ mx:LineSeries yField=orange name=Orange/ mx:LineSeries yField=banana name=Banana/ /mx:series /mx:LineChart /mx:Panel /mx:Application On Thu, Jul 3, 2008 at 7:41 AM, Stephen More step.om wrote: On Wed, Jul 2, 2008 at 6:29 PM, Tracy Spratt tsp...com wrote: I advise using resultFormat=e4x, a result handler function, and an instance variable to hold the xmlResult. I started out using e4x until I ran into what I think is a bug: https://bugs.adobe.com/jira/browse/SDK-15976 DataTips in mx:LineChart does not like the e4x format. I guess I should go back to using e4x and write a custom dataTipFunction that actually works. -Steve The best performance, especially in a multi-renderer DataGrid, will be if you manually convert the XML node data ino an ArrayCollection of strongly typed value objects. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sean Clark Hess Sent: Wednesday, July 02, 2008 4:05 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Inspecting data from HTTPService result to an ArrayCollection Ah, got it. The mx:Model tag converts everything to a flat object. So the minute you use it, you no longer have xml. It's still easy enough to loop through though. var result:Object = myData.getItemAt(0); for (var name:String in result) { trace(name + :: + result[name]); } should output apple :: 81768 orange :: 60310 banana :: 43357 On Wed, Jul 2, 2008 at 1:46 PM, Stephen More [EMAIL PROTECTED] wrote: Here is my output: DEBUG: 2 null [object Object] CHECK : false CHECK : false Here is all the code: ?xml version=1.0? !-- charts/XMLFileToArrayCollectionDataProvider.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:Script import mx.utils.ArrayUtil; /mx:Script mx:Model id=results source=../assets/data.xml/ mx:ArrayCollection id=myData source={ArrayUtil.toArray(results.result)} / mx:Panel title=Line Chart mx:LineChart id=chart dataProvider={myData} showDataTips=true mx:horizontalAxis mx:CategoryAxis categoryField=month/ /mx:horizontalAxis mx:series mx:LineSeries yField=banana displayName=Banana/ mx:LineSeries yField=apple displayName=Apple/ mx:LineSeries yField=orange displayName=Orange/ /mx:series /mx:LineChart mx:Button id=iconButton label=Button with Icon labelPlacement=right color=#993300 click=printMessage(event);/ mx:Script ![CDATA[ import flash.events.Event; // Event handler function to print a message // describing the selected Button control. private function printMessage(event:Event):void { //message.text += event.target.label + pressed + \n; var myXML:XML; myXML = myData.getItemAt(0) as XML; trace( DEBUG: + myData.length + + myXML ); trace( myData.getItemAt(0) ); trace(CHECK : + (myData.getItemAt(0) is XML)); trace(CHECK : + (myData.getItemAt(0) is XMLList)); } ]] /mx:Script /mx:Panel /mx:Application On Wed, Jul 2, 2008 at 3:34 PM, Sean Clark Hess [EMAIL PROTECTED] wrote: What do you get when you trace myData.getItemAt(0)? That will return null if it isn't an XML. You can do this too: trace(CHECK : + (myData.getItemAt(0) is XML)); You can check to see if it is an XMLList too, but I thought looking at it, it seemed like a flat xml. On Wed, Jul 2, 2008 at 1:32 PM, Stephen More [EMAIL PROTECTED] wrote: Thats what I was thinking but when I try: var myXML:XML; myXML = myData.getItemAt(0) as XML; trace( DEBUG: + myXML ); I get DEBUG: null On Wed, Jul 2, 2008 at 2:30 PM, Sean Clark Hess [EMAIL PROTECTED] wrote: Each row is an xml object... So, (myData.getItemAt(i) as XML).children() Then you could loop through the children and ask them for their name. After the as XML step you can do anything you can normally do with the XML object On Wed, Jul 2, 2008 at 12:11 PM, Stephen More [EMAIL PROTECTED] wrote: ( Example code taken from: http://livedocs.adobe.com/flex/201/html/charts_intro_108_12.html ) Here is the dataset I am trying
Re: [flexcoders] Problem with selectedIndex on dynamically populated combobox (Cairngorm)
Small update, Looking at it further I've found how to get selectedItem set correctly using the following code: private function onPageMenuChange():void { this.recordSetVO.requestVO.cursorOffset = this.recordSetVO.requestVO.pageSize * this.pageMenu_cb.selectedIndex; this.raiseRequestEvent(); // fetch next page of data } private function onPageMenuValueCommit():void { pageMenu_cb.selectedIndex = this.recordSetVO.currentPage - 1; } mx:ComboBox width=57 id=pageMenu_cb dataProvider={getPageMenuOptions(this.recordSetVO)} change=onPageMenuChange() valueCommit=onPageMenuValueCommit() enabled={getPageMenuEnabled(this.recordSetVO)} / However, my change handler no longer has any effect. It doesn't seem to ever get called. Previously I could use my combobox to jump to a specific page of results from the server, but after putting in the valueCommit code nothing happens. : ( Has anyone experienced problems with using both valueCommit and change event handlers with a ComboBox. I can get either one working but not both. thanks Stephen
[flexcoders] Automatically granting local trust in Flex Builder 3
I thought Flex Builder 3 was supposed to automatically grant local trust to all swfs when debugging. That's what I'm trying to do, but I'm finding that all swfs are by default set to the local-with-network sandbox. System Setup: Mac OS X 10.5.4 Flex Builder 3 Safari 3.1.2 with Flash Player 9.0.124 debug Project/Local info: ) FB debugging is set to use an html wrapper as target. ) There are no use-network compile options in place in this project. ) The flexbuilder.cfg file shows that the output swf in question was added to the local trust ( ~/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust/flexbuilder.cfg ). Apparently Flash Player is not respecting this preference. I've manually targeted my project bin folder to add to the local trusted sandbox by using the Global Security Settings panel as a workaround, and checking flash.system.Security.sandboxType indicates that the sandbox has indeed changed from localWithNetwork to localTrusted. This is a pain of a workaround though. Understanding the Flash security model is a painful enough exercise (and I don't claim to be in shape on this issue), compounded with the scattered controls afforded to developers. Any enlightenment appreciated. Steve
Re: [flexcoders] Inspecting data from HTTPService result to an ArrayCollection
On Wed, Jul 2, 2008 at 6:29 PM, Tracy Spratt tsp...com wrote: I advise using resultFormat=e4x, a result handler function, and an instance variable to hold the xmlResult. I started out using e4x until I ran into what I think is a bug: https://bugs.adobe.com/jira/browse/SDK-15976 DataTips in mx:LineChart does not like the e4x format. I guess I should go back to using e4x and write a custom dataTipFunction that actually works. -Steve The best performance, especially in a multi-renderer DataGrid, will be if you manually convert the XML node data ino an ArrayCollection of strongly typed value objects. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sean Clark Hess Sent: Wednesday, July 02, 2008 4:05 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Inspecting data from HTTPService result to an ArrayCollection Ah, got it. The mx:Model tag converts everything to a flat object. So the minute you use it, you no longer have xml. It's still easy enough to loop through though. var result:Object = myData.getItemAt(0); for (var name:String in result) { trace(name + :: + result[name]); } should output apple :: 81768 orange :: 60310 banana :: 43357 On Wed, Jul 2, 2008 at 1:46 PM, Stephen More [EMAIL PROTECTED] wrote: Here is my output: DEBUG: 2 null [object Object] CHECK : false CHECK : false Here is all the code: ?xml version=1.0? !-- charts/XMLFileToArrayCollectionDataProvider.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:Script import mx.utils.ArrayUtil; /mx:Script mx:Model id=results source=../assets/data.xml/ mx:ArrayCollection id=myData source={ArrayUtil.toArray(results.result)} / mx:Panel title=Line Chart mx:LineChart id=chart dataProvider={myData} showDataTips=true mx:horizontalAxis mx:CategoryAxis categoryField=month/ /mx:horizontalAxis mx:series mx:LineSeries yField=banana displayName=Banana/ mx:LineSeries yField=apple displayName=Apple/ mx:LineSeries yField=orange displayName=Orange/ /mx:series /mx:LineChart mx:Button id=iconButton label=Button with Icon labelPlacement=right color=#993300 click=printMessage(event);/ mx:Script ![CDATA[ import flash.events.Event; // Event handler function to print a message // describing the selected Button control. private function printMessage(event:Event):void { //message.text += event.target.label + pressed + \n; var myXML:XML; myXML = myData.getItemAt(0) as XML; trace( DEBUG: + myData.length + + myXML ); trace( myData.getItemAt(0) ); trace(CHECK : + (myData.getItemAt(0) is XML)); trace(CHECK : + (myData.getItemAt(0) is XMLList)); } ]] /mx:Script /mx:Panel /mx:Application On Wed, Jul 2, 2008 at 3:34 PM, Sean Clark Hess [EMAIL PROTECTED] wrote: What do you get when you trace myData.getItemAt(0)? That will return null if it isn't an XML. You can do this too: trace(CHECK : + (myData.getItemAt(0) is XML)); You can check to see if it is an XMLList too, but I thought looking at it, it seemed like a flat xml. On Wed, Jul 2, 2008 at 1:32 PM, Stephen More [EMAIL PROTECTED] wrote: Thats what I was thinking but when I try: var myXML:XML; myXML = myData.getItemAt(0) as XML; trace( DEBUG: + myXML ); I get DEBUG: null On Wed, Jul 2, 2008 at 2:30 PM, Sean Clark Hess [EMAIL PROTECTED] wrote: Each row is an xml object... So, (myData.getItemAt(i) as XML).children() Then you could loop through the children and ask them for their name. After the as XML step you can do anything you can normally do with the XML object On Wed, Jul 2, 2008 at 12:11 PM, Stephen More [EMAIL PROTECTED] wrote: ( Example code taken from: http://livedocs.adobe.com/flex/201/html/charts_intro_108_12.html ) Here is the dataset I am trying to work with: data result month=Jan-04 apple81768/apple orange60310/orange banana43357/banana /result result month=Feb-04 apple81156/apple orange58883/orange banana49280/banana /result /data The flex code will look like this: mx:HTTPService id=srv url=../assets/data.xml useProxy=false result=myData=ArrayCollection(srv.lastResult.data.result) / How can I interrogate the ArrayCollection named myData so that it will return apple, orange, and banana ? I am not looking to get the numerical values, I want to get the xml name. -Thanks Steve More
[flexcoders] Inspecting data from HTTPService result to an ArrayCollection
( Example code taken from: http://livedocs.adobe.com/flex/201/html/charts_intro_108_12.html ) Here is the dataset I am trying to work with: data result month=Jan-04 apple81768/apple orange60310/orange banana43357/banana /result result month=Feb-04 apple81156/apple orange58883/orange banana49280/banana /result /data The flex code will look like this: mx:HTTPService id=srv url=../assets/data.xml useProxy=false result=myData=ArrayCollection(srv.lastResult.data.result) / How can I interrogate the ArrayCollection named myData so that it will return apple, orange, and banana ? I am not looking to get the numerical values, I want to get the xml name. -Thanks Steve More
Re: [flexcoders] Inspecting data from HTTPService result to an ArrayCollection
Thats what I was thinking but when I try: var myXML:XML; myXML = myData.getItemAt(0) as XML; trace( DEBUG: + myXML ); I get DEBUG: null On Wed, Jul 2, 2008 at 2:30 PM, Sean Clark Hess [EMAIL PROTECTED] wrote: Each row is an xml object... So, (myData.getItemAt(i) as XML).children() Then you could loop through the children and ask them for their name. After the as XML step you can do anything you can normally do with the XML object On Wed, Jul 2, 2008 at 12:11 PM, Stephen More [EMAIL PROTECTED] wrote: ( Example code taken from: http://livedocs.adobe.com/flex/201/html/charts_intro_108_12.html ) Here is the dataset I am trying to work with: data result month=Jan-04 apple81768/apple orange60310/orange banana43357/banana /result result month=Feb-04 apple81156/apple orange58883/orange banana49280/banana /result /data The flex code will look like this: mx:HTTPService id=srv url=../assets/data.xml useProxy=false result=myData=ArrayCollection(srv.lastResult.data.result) / How can I interrogate the ArrayCollection named myData so that it will return apple, orange, and banana ? I am not looking to get the numerical values, I want to get the xml name. -Thanks Steve More
Re: [flexcoders] Inspecting data from HTTPService result to an ArrayCollection
Here is my output: DEBUG: 2 null [object Object] CHECK : false CHECK : false Here is all the code: ?xml version=1.0? !-- charts/XMLFileToArrayCollectionDataProvider.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:Script import mx.utils.ArrayUtil; /mx:Script mx:Model id=results source=../assets/data.xml/ mx:ArrayCollection id=myData source={ArrayUtil.toArray(results.result)} / mx:Panel title=Line Chart mx:LineChart id=chart dataProvider={myData} showDataTips=true mx:horizontalAxis mx:CategoryAxis categoryField=month/ /mx:horizontalAxis mx:series mx:LineSeries yField=banana displayName=Banana/ mx:LineSeries yField=apple displayName=Apple/ mx:LineSeries yField=orange displayName=Orange/ /mx:series /mx:LineChart mx:Button id=iconButton label=Button with Icon labelPlacement=right color=#993300 click=printMessage(event);/ mx:Script ![CDATA[ import flash.events.Event; // Event handler function to print a message // describing the selected Button control. private function printMessage(event:Event):void { //message.text += event.target.label + pressed + \n; var myXML:XML; myXML = myData.getItemAt(0) as XML; trace( DEBUG: + myData.length + + myXML ); trace( myData.getItemAt(0) ); trace(CHECK : + (myData.getItemAt(0) is XML)); trace(CHECK : + (myData.getItemAt(0) is XMLList)); } ]] /mx:Script /mx:Panel /mx:Application On Wed, Jul 2, 2008 at 3:34 PM, Sean Clark Hess [EMAIL PROTECTED] wrote: What do you get when you trace myData.getItemAt(0)? That will return null if it isn't an XML. You can do this too: trace(CHECK : + (myData.getItemAt(0) is XML)); You can check to see if it is an XMLList too, but I thought looking at it, it seemed like a flat xml. On Wed, Jul 2, 2008 at 1:32 PM, Stephen More [EMAIL PROTECTED] wrote: Thats what I was thinking but when I try: var myXML:XML; myXML = myData.getItemAt(0) as XML; trace( DEBUG: + myXML ); I get DEBUG: null On Wed, Jul 2, 2008 at 2:30 PM, Sean Clark Hess [EMAIL PROTECTED] wrote: Each row is an xml object... So, (myData.getItemAt(i) as XML).children() Then you could loop through the children and ask them for their name. After the as XML step you can do anything you can normally do with the XML object On Wed, Jul 2, 2008 at 12:11 PM, Stephen More [EMAIL PROTECTED] wrote: ( Example code taken from: http://livedocs.adobe.com/flex/201/html/charts_intro_108_12.html ) Here is the dataset I am trying to work with: data result month=Jan-04 apple81768/apple orange60310/orange banana43357/banana /result result month=Feb-04 apple81156/apple orange58883/orange banana49280/banana /result /data The flex code will look like this: mx:HTTPService id=srv url=../assets/data.xml useProxy=false result=myData=ArrayCollection(srv.lastResult.data.result) / How can I interrogate the ArrayCollection named myData so that it will return apple, orange, and banana ? I am not looking to get the numerical values, I want to get the xml name. -Thanks Steve More
RE: [flexcoders] Re: Best Practice Data Binding
Hi Maurice, You can see the doc on binding here: http://livedocs.adobe.com/flex/3/html/databinding_1.html http://livedocs.adobe.com/flex/3/html/databinding_1.html For infomration about creating bindable properties in custom MXML components, see this page: http://livedocs.adobe.com/flex/3/html/mxmlcomponents_advanced_3.html http://livedocs.adobe.com/flex/3/html/mxmlcomponents_advanced_3.html For information on creating bindable properties in custom AS components: http://livedocs.adobe.com/flex/3/html/ascomponents_3.html http://livedocs.adobe.com/flex/3/html/ascomponents_3.html Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mauricen Sent: Monday, June 30, 2008 6:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Best Practice Data Binding Where *is* the authoritative story on binding? As a newcomer to Flex I'm finding it hard to form a coherent picture of how the various binding features fit together. What's the mechanism, for example, that allows me to call addEventListener on a Bindable property? If there's no formal documentation, I'd be happy to look at code - but where/ Maurice --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , securenetfreedom [EMAIL PROTECTED] wrote: I found this page to be helpful but not authoritative (This is where I found the use of binding the setter); http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.ht \ http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.h t ml http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.h \ http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.h tml
RE: [flexcoders] Custom (mxml) UI Components in Flex?
There are many examples of MXML components in the doc here: http://livedocs.adobe.com/flex/3/html/Part2_mxml_components_1.html http://livedocs.adobe.com/flex/3/html/Part2_mxml_components_1.html Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pbrendanc Sent: Saturday, June 28, 2008 5:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Custom (mxml) UI Components in Flex? Hi Just getting into flex in my spare time and trying to learn as quickly as possible - so excuse me if some of my postings/questions seem somewhat redundant - however these groups are a valuable resource for future Flex noobies so hopefully others will benefit from the QA. (Later on I may compile a list of (HowDoI qns )that I've had to deal with in learning Flex and post ??where??). I know I can create custom classes defined in .as files and reuse these. Is is possible to create a custom component (say a composite if several multiple UI components (e.g. a logon form definition) in an .mxml file ant then reuse these? The examples in the docs all use .as files so I'm wondering if it's possible to do the same thing with mxml files. TIA, Patrick
RE: [flexcoders] A very simple component in AS :(
The doc describes the procedure for creating a component in AS. You can see it here: http://livedocs.adobe.com/flex/3/html/Part3_as_components_1.html http://livedocs.adobe.com/flex/3/html/Part3_as_components_1.html Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Sunday, June 29, 2008 8:11 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] A very simple component in AS :( A few things: You'll need to override measure(), like so: protected override function measure() : void { measuredWidth = _txt.measuredWidth; measuredHeight = _txt.measuredHeight; } and updateDisplayList(), like so: protected override function updateDisplayList(w:Number, h:Number) : void { _txt.move(0,0); _txt.setActualSize(Math.min(_txt.measuredWidth, w), Math.min(_txt.measuredHeight, h)); } That should do it. But this is typed in gmail, not Flex so it's probably got typos in it :) -Josh On Mon, Jun 30, 2008 at 9:50 AM, flexawesome [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hey there, I was trying to create a very simple component in as, there was no error in compiling. However, I was unable to see the text. :( can you take a quick look? thank you === AS package { import mx.controls.Text; import mx.core.UIComponent; public class Footer extends UIComponent { public var title:String; private var _txt:Text; public function Footer() { super.setActualSize(50 , 20 ); _txt= new Text(); _txt.text = title; addChild( _txt ); } } } in main.mxml === local:newText title=asdfasdfa / -- 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 (Yahoo! ID required) mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Re: [flexcoders] Re: Flex/AIR Mailing list?
2008/6/20 barry.beattie [EMAIL PROTECTED]: --- In flexcoders@yahoogroups.com, dnk [EMAIL PROTECTED] wrote: Appolocoders. with a typo like that Google may have trouble: Steve, this is what bnk meant http://tech.groups.yahoo.com/group/apollocoders/messages Splendid - cheer Barry/dnk. *slaps Anchal about for thread hijacking instead of creating a new message* Stephen
[flexcoders] Flex/AIR Mailing list?
Are there any mail lists that anyone can recommend for Flex/AIR development? Google has failed me. Regards Stephen
Re: [flexcoders] Re: Splitting FlexCoders in smaller, focused groups
2008/6/18 Tom Chiverton [EMAIL PROTECTED]: On Wednesday 18 Jun 2008, b_alen wrote: Can you do folders in gmail? I thought only labels are there and you still see all the emails in your inbox, even if you don't want to. Configure a filter to 'skip inbox' when it matches. I guess you already have a filter if you say you label them. There's even colour coding in google mail these days. As someone who used to be on this list, left it and just yesterday came back, I have to say that this list is pretty intimidating. (and I'm not easily intimidated) Mostly its because of the volume of traffic - how you could meaningfully split the list up to reduce the traffic, whilst avoiding cross-posting and dead lists, I'm not sure Sorry that this isn't particularly helpful. I just wanted to pass on a point of view.. :\ Stephen
RE: [flexcoders] Quick Start - Newbie help with Flex
Hi, The Flex Dev Center - http://www.adobe.com/devnet/flex/ - contains a Getting Started tab that links to the Getting Started Guide, an online site with overviews and examples, and also links to around 40 small quick start examples showing how to perform common Flex tasks. Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of brucewhealton Sent: Thursday, June 12, 2008 9:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Quick Start - Newbie help with Flex Hello all, I'm rather new to Flex but I see some exciting things that can be accomplished with Flex. In the past, I would try to get Flash to do everything that Flex can do now, with less work and effort. Anyway, I am using self-paced methods to learn Flex CS3 and be able to use it in my work with my clients/customers. I have the text: Flex Builder CS3 Training from the Source, which is a great text. I also use the training videos on Lynda.com for learning Flex. I'd like to see if there are some quick start texts or information on the web that someone knows about. While it won't replace learning and putting time into doing a lot of Flex Development, there are some tools and applications that I see that could be put into place on some of my sites and etc. Both training tools that I have, present a single project that is developed over the course of the training. This is good, except when you just need a few Flex components, menus, etc, etc. If I wasn't looking to have the entire site done entirely in Flex but wanted to use some Flex tools/components/applications, things would be different than if I were creating an entire web application within Flex, with XML or a database. The training I mentioned does not get into deploying the content and the Flex Designs until one is far into the text or training. I won't always need that much knowledge each time I create something using Flex CS3. So, if anyone could recommend additional training material, online or texts, please let me know, Thanks, Bruce
RE: RES: [flexcoders] Using CSS with custom item renderers
One more note on this one: Renderers have their TypeSelectors blocked for the styles: backgroundColor borderStyle borderStyle is blocked because DataGrid/List has a borderStyle and if you put a container in as your renderer, it would pick up that borderStyle by default. Similarly, backgroundColor is blocked, but also for another reason. We want the renderers to not have a background so the selection/highlight colors can be drawn behind them and show through. We can add this to the doc. Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle Sent: Tuesday, June 03, 2008 12:43 PM To: flexcoders@yahoogroups.com Subject: Re: RES: [flexcoders] Using CSS with custom item renderers Simply put, the IDataRenderer interface. ItemRenderers are supposed to be encapsulated, if Adobe used anything other than the styleName of the renderer's parent, they would be breaking this encapsulation rule. You could try un setting the styleName in commit properties and then try your TypeSelector again. If that dosn't work, override updateDisplayList() and unset it after super(). Mike On Tue, Jun 3, 2008 at 11:48 AM, Amy [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Michael Schmalle [EMAIL PROTECTED] wrote: The solution ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=200 height=50 mx:Script ![CDATA[ override protected function commitProperties():void { super.commitProperties() if (data) { // uncomment to see this actually work // setStyle(backgroundColor, 0xFF); // imaginary prop if (data.itemColor is Number) setStyle(backgroundColor, data.itemColor); } } ]] /mx:Script mx:Label x=10 y=10 text={data.label}/ /mx:Canvas I meant a CSS solution. I could possibly create a classFactory and pass in the styleName in that, but that's not nearly as clean as just using the TypeSelector. I could also pass in a reference to the Application and/or its styles and have the component look at that to see if there is a style that matches the ClassName, but that's sort of icky too. Why is the List component set up to break this? Thanks; Amy -- Teoti Graphix, LLC http://www.teotigraphix.com http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
Re: [flexcoders] bug in setMonth() method?
parseDate.setMonth(++parseDate.month); Then that statement above gives different results to: ++parseDate.month parseDate.setMonth(parseDate.month); which gives: Sat Nov 1 00:00:00 GMT+ 2008 Sun Feb 1 00:00:00 GMT+ 2009 Mon Dec 1 00:00:00 GMT+ 2008 Sun Feb 1 00:00:00 GMT+ 2009 Thu Jan 1 00:00:00 GMT+ 2009 Sun (i.e. it behaves as you would expect) Shouldn't the two versions be executed the same way? - i.e. month is incremented from 11 to 0 by the ++month (causing the year rollover) and then this 0 is passed into setMonth which should just set it to 0 again and cause no rollover. The call to setMonth is superfluous (though personally I'd go with setDate(parseDate.month + 1)) but shouldn't actually be doing anything as in both above cases it's just being passed 0 and so should either cause a year rollover in both cases (which would be buggy but consistent) or in neither case, that it's different is a bit worrying. Stephen
Re: [flexcoders] Re: Use Cairngorm wihtout Dispatch
You mean if you change the name of a method on your controller? Sounds like you'd have the same prob if you change the name of the event you were listening to on your controller. You'd have to change the event back to the correct name in your controller (i.e. the same as changing the method name back), or change every view to dispatch the new event your were using in your controller (after finding them ;)). The diff is, using events it would fail silently, then you'd have to search to find the events being dispatched by your view, where as the view calling a method on the controller that had its name changed would show me errors before I compiled. -- Stephen Downs Addict, Tink Ltd. e: [EMAIL PROTECTED] t: +44 (0) 7730 838 785 w: http://www.tink.ws -- On 6 May 2008, at 11:48, Tom Chiverton wrote: On Sunday 04 May 2008, Stephen Downs wrote: What is the difference of the view knowing what event it has to dispatch, to it actually knowing the method on the controller it was to invoke? If your Controller changes, you have to change every view that uses it. -- Tom Chiverton Helping to preemptively maintain strategic e-commerce on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Child items in custom component
sure you added your '_nodeContainer' Sprite to the display list? On 5 May 2008, at 16:34, Weyert de Boer wrote: Hello! I am currently a bit clueless regarding using Flex components. I am currently trying to port a .NET component to Flex. Only I have some problems. In a simplified form the problem is that I am trying to add childs to the component. The idea is to use public method to add nodes to the component. The code could be: var node: MyNode = new MyNode(); node.width = node.height = 125; myComponentInstance.addNode( node ); The addNode-method is basically contains: public function addNode( node: MyNode ): void { _nodeContainer.addChild( DisplayObject(node) ); invalidateDisplayList(); } The _nodeContainer is a Sprite class which gets created in the overriden createChildren-method. Now I would be expected that the MyNode- instance (which just draws a simple rectangle 125x125) would be shown. Sadly enough, this is not the case. Does anyone know what should be done to get this working? Yours, Weyert de Boer
Re: [flexcoders] Re: Use Cairngorm wihtout Dispatch
I'm not saying it's a major problem that we come across often, but when taking on other people's work, or working as a team it's something we have come across. We would expect all vars, methods, class, events to be named well, but we find it more efficient to error the project through changing a method name, than to do a find in files. We want to keep things as simple as possible. The point I was making as that just because events are used on the view instead of it accessing controller methods directly it doesn't necessarily de-couple them, since in most cases the view is relying on its events being picked up and acted upon. If my previous statement is true for you and your team, there's really no need to go down the event road, as it does introduces more complication and with it more time to implement. Just to clarify we don't take this approach on components, but we do for views/screens. On 5 May 2008, at 01:37, Jim Hayes wrote: I've not really had those problems myself Tink. I don't dispatch any standard cairngorm events, instead I have events that extend it and are (usually!) fairly well named to reflect what's happening. Maybe that's because for me they normally carry some data, and I like that data to be as strongly typed as is practicable. The command/delegate will usually follow the same naming, so I may have SaveBitmapEvent + SaveBitmapCommand + SaveBitmapDelegate, for example. So to find any particular event dispatch in my view, it's pretty easy to do a find in files on the project, though in practice I find I rarely need to. Likewise, finding the command it calls is pretty easy for the most part, as is the implementation in the delegate. Good point on the controller not listening, but I guess I've just got used to writing a shell version of my command, breakpointing it's constructor and checking it does get called when I expect it to before proceeding to fill in it's implementation. If not, then the frontController has it's fingers in it's ears shouting na na na I can't hear you :) It would be good if it could catch all cairngorm events and raise a warning if they were not registered, though. I have a feeling it wouldn't be too hard to extend it do that, but I've never felt the need myself. I'm sure we're both thinking don't make me have to think too hard, if at all, and I'm in broad agreement with you, but the 3 classes and controller entry approach does work for me (even if it is very tedious to write at the time). -Original Message- From: flexcoders@yahoogroups.com on behalf of Stephen Downs Sent: Sun 04/05/2008 14:08 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Use Cairngorm wihtout Dispatch I have to agree with MichNiu here. The CairngormEventDispatcher obsfucates the code. i.e. you come back to a project 6 months down the line, its difficult to find in the view where your CairngormEvents are dispatch. What is the difference of the view knowing what event it has to dispatch, to it actually knowing the method on the controller it was to invoke? Very little in my opinion, but the later enables you to very easily pinpoint all the calls from the view to a method on the controller, by just changing the name of the method on the controller, and looking at all the errors that will appear on the view. This makes things much easier to debug and therefore easier to maintain. You talk about making views re-useable, but if your view is dispatching CairngormEvents, you can guarantee it's relying on some action of the FrontController for it to work properly. If you FrontController doesn't listen to these events, your view won't work, therefore it aint re-usable, its relying on the FrontController acting upon the events is dispatches. We still keep a Controller unlike MichNui's implementation, but we cut out the use of CairngormEventDispatcher some time ago. Now when it comes to re-usable components, thats a different matter. Tink On 22 Apr 2008, at 03:53, ben.clinkinbeard wrote: One of the core principles of not just Cairngorm but MVC in general is for your views to be as dumb as possible. The less they know about models, services, etc the better. You've essentially taken the opposite approach. Creating reusable/generic views using your approach wouldn't really be possible. Also, Flex is an event driven architecture and events are another core aspect of creating loosely coupled application components. I think your approach will result in very brittle code that will be hard to maintain. Ben --- In flexcoders@yahoogroups.com, michniu [EMAIL PROTECTED] wrote: Hi Coders, I just want to discuss some issues about the Cairngorm, Because I cant find another mail list or forum to discuss it. I put it here. The most useless part in cairngorm FrontCotroller and command Just on my opinion, I really don't like to write the command for every action
Re: [flexcoders] Re: Use Cairngorm wihtout Dispatch
I have to agree with MichNiu here. The CairngormEventDispatcher obsfucates the code. i.e. you come back to a project 6 months down the line, its difficult to find in the view where your CairngormEvents are dispatch. What is the difference of the view knowing what event it has to dispatch, to it actually knowing the method on the controller it was to invoke? Very little in my opinion, but the later enables you to very easily pinpoint all the calls from the view to a method on the controller, by just changing the name of the method on the controller, and looking at all the errors that will appear on the view. This makes things much easier to debug and therefore easier to maintain. You talk about making views re-useable, but if your view is dispatching CairngormEvents, you can guarantee it's relying on some action of the FrontController for it to work properly. If you FrontController doesn't listen to these events, your view won't work, therefore it aint re-usable, its relying on the FrontController acting upon the events is dispatches. We still keep a Controller unlike MichNui's implementation, but we cut out the use of CairngormEventDispatcher some time ago. Now when it comes to re-usable components, thats a different matter. Tink On 22 Apr 2008, at 03:53, ben.clinkinbeard wrote: One of the core principles of not just Cairngorm but MVC in general is for your views to be as dumb as possible. The less they know about models, services, etc the better. You've essentially taken the opposite approach. Creating reusable/generic views using your approach wouldn't really be possible. Also, Flex is an event driven architecture and events are another core aspect of creating loosely coupled application components. I think your approach will result in very brittle code that will be hard to maintain. Ben --- In flexcoders@yahoogroups.com, michniu [EMAIL PROTECTED] wrote: Hi Coders, I just want to discuss some issues about the Cairngorm, Because I cant find another mail list or forum to discuss it. I put it here. The most useless part in cairngorm FrontCotroller and command Just on my opinion, I really don't like to write the command for every action and register it on FrontCotroller. I really think it waste time, and It make debugging difficult! Sometimes you don't know where do you get the result after you dispatched your Event. Use A ServiceFacade to replace the front controller and the command. I use a ServiceFacade to call the Delegate instead of the controller and the junk command. The idea is when the view page active some action. it will not dispatch any event . it will call the service method from service facade. Here is example code form flexStore: private function onLoadCatalog():void { var event : LoadCatalogEvent = new oadCatalogEvent(); event.dispatch(); } to replace the event dispatch() my solution is : private function onLoadCatalog():void { ServiceFacade.getInstance().loadCats(); } The ServiceFacade .loadCats() method call the delegate and service: public function loadCats():void { var handlers : IResponder = new Responder (onResults_loadCatalog,fault); getDelegate(handlers).loadCatalog(); } Use this way, I don't need create any front Controller and command. I also get the benefit from Cairngorm Service Locate Delegate and Model locator. Any suggestion or Criticize is Appreciated Mike
RE: [flexcoders] online docs seem to be unavailable
Our apologies - there seems to be an issue with adobe.com today. Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Maciek Sakrejda Sent: Thursday, May 01, 2008 2:10 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] online docs seem to be unavailable I'm seeing the same thing. Fortunately, the offline docs are available: http://livedocs.adobe.com/flex/3/flex3_documentation.zip http://livedocs.adobe.com/flex/3/flex3_documentation.zip (warning: ~70MB download). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com http://www.truviso.com -Original Message- From: ivo [EMAIL PROTECTED] mailto:cervantes_vive%40yahoo.com Reply-To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com To: FlexCoders flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] online docs seem to be unavailable Date: Thu, 1 May 2008 10:57:45 -0700 (PDT) Have recently been using the online docs again, as of a few minutes I am getting: 502 Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /flex/3/langref/index.html. Reason: DNS lookup failure for: d65app-vip.macromedia.com - Ivo
Re: [flexcoders]Setting DataGrid header to transparent
Or you could skin it and with something transparent. On 23 Apr 2008, at 07:08, Alex Harui wrote: Dude, that was four months ago! You could’ve asked again sooner. Another approach may be to subclass, get the .header, getChildByName (“headerBG”) and set its alpha=0 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Tuesday, April 22, 2008 9:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders]Setting DataGrid header to transparent I've been working on this for a while with no luck... can you provide an example or some tips? On Thu, Dec 27, 2007 at 6:53 PM, Alex Harui [EMAIL PROTECTED] wrote: Override drawHeaderBackground? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Thursday, December 27, 2007 3:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders]Setting DataGrid header to transparent Is there a way to set the Datagrid header to transparent? I want to set the header background fill to transparent and show a border along the bottom of the column headers. Currently the CSS Design View does not let me change the Datagrid header fill alpha. Here is the code I am using: mx:XML id=xmlData format=e4x XML1 items item name=item 1 enabled=true column1=8:00PM / /items /XML1 /mx:XML mx:DataGrid x=10 y=71 dataProvider={xmlData.items.item} mx:columns mx:DataGridColumn headerText=Name dataField=@name/ mx:DataGridColumn headerText=Column 1 dataField=@column1/ mx:DataGridColumn headerText=Edit dataField=edit/ mx:DataGridColumn headerText=Enabled dataField=@enabled/ /mx:columns /mx:DataGrid
Re: [flexcoders] Re: Feedback on my Image-caching code
Could be worth looking at storing a ByteArray and adding some compression instead of storing the original BitmapData. Tink On 18 Apr 2008, at 19:15, handitan wrote: Thanks for sharing the code, Eric. Have you ever checked how much memory got increased whenever you load your cached-img? With my code, I always have a memory increase when I use the cached- img because I always need to pass new Bitmap instance to image.load() otherwise it will not load the image. --- In flexcoders@yahoogroups.com, Eric Cancil [EMAIL PROTECTED] wrote: I made something fairly similar at one point http://3r1c.net/cacheableImages/ On Thu, Apr 17, 2008 at 7:55 PM, handitan [EMAIL PROTECTED] wrote: Hi all, I am trying to find a simple solution on caching images into the memory. I had written a code to do that and it seemed to be working but I am pretty sure there are things that I had missed. Any feedback is greatly appreciated. == == I am using associative array to store the Bitmap and using the image URL path as the key. Here's how the code works in general: - You select which image that you want to load by choosing one of the image's name in the comboBox. - The selected image's name will be appended to a URL where the image is located. Let's called this new appended string: newImgURL - Check to see if newImgURL is existed in the associative array. If it is existed, then load the cached-bitmap else pass newImgURL to imageObj.source. - If it's passed to imageObj.source, the imageObj will throw a complete event. On the completeEventHandler, cached the imageObj's Bitmap to the associative array. *Here's the code:* ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal creationComplete=imageInit() mx:Script ![CDATA[ *import* flash.utils.getTimer; *import* mx.collections.ArrayCollection; *import* mx.controls.ComboBox; *import* mx.events.ListEvent; [ *Bindable*] *private* *var* myArray:Array = [*Select*, *YourImageNameHere1.jpg*, *YourImageNameHere2.jpg*, *YourImageNameHere3.jpg*]; *private* *const* ResourceURL:String = *http://PutYourURL/*; [ *Bindable*] *private* *var* time2:int = 0; *private* *var* loadTime2:int = 0; *private* *var* myDictionary:Array = *new* Array; [ *Bindable*] *private* *var* status:String = *Not Updated*; [ *Bindable*] *private* *var* totalMemoryNum:uint = System.totalMemory; [ *Bindable*] *private* *var* byteDiff:uint = 0; [ *Bindable*] *private* *var* myLoaderContext : LoaderContext; *private* *function* imageInit() : *void* { myLoaderContext = *new* LoaderContext(); myLoaderContext.checkPolicyFile = *true*; } *//* *//Using dictionary* *//* *private* *var* exist:Boolean = *true*; *private* *function* loadImg2(event:ListEvent):*void* { *var* myImgName:String = (event.target *as* ComboBox).selectedItem *as*String; *var* imgPath:String = ResourceURL + myImgName; *var* myDisplayObj:DisplayObject = myDictionary[imgPath]; status = *Not Updated*; time2 = 0; *if* (myDisplayObj != *null*) { *//trace(Cached version);* *var* myImage:Bitmap = myDisplayObj *as* Bitmap; FlipSource2.load( *new* Bitmap(myImage.bitmapData)); } *else* { exist = *false*; FlipSource2.source = imgPath; } byteDiff = System.totalMemory - totalMemoryNum; totalMemoryNum = System.totalMemory; loadTime2 = getTimer(); } *private* *function* takeDiffTime2():*void* { *if* (!exist) { status = *Updated*; *var* myCloneBitmapData:BitmapData = (FlipSource2.content *as*Bitmap).bitmapData.clone(); *var* image:Bitmap = *new* Bitmap(myCloneBitmapData); myDictionary[FlipSource2.source] = image; } time2 = getTimer() - loadTime2; } ]] /mx:Script mx:VBox width=100% height=100% mx:ComboBox dataProvider={myArray} labelField=label change=loadImg2(event)/ mx:Label id=LoadTime2 text=Total Load Time: {time2} ms - {status}/ mx:HBox width=100% height=100% horizontalAlign=center mx:Image id=FlipSource2 width=480 height=480 horizontalAlign= center complete=takeDiffTime2();*trace*(*'Image Load2 Complete'*) cachePolicy=off cacheAsBitmap= false loaderContext= {myLoaderContext}/ /mx:HBox /mx:VBox mx:VBox width=100% mx:Label id=TotalMemory text=Total Memory: {totalMemoryNum/1024} KB/ mx:Label id=DiffMem text=Byte Diff: {byteDiff/1024} KB/ mx:Label text=Version 1.0 / /mx:VBox /mx:Application
Re: [flexcoders] Is there an easier way? [Embedding swf asset]
Those are the steps We'll be releasing some library classes over the next week or so which we use for embedding and loading assets, that might be of interest to ya. Tink On 17 Apr 2008, at 23:18, Steve Mathews wrote: Ok, so going off the steps on this page: http://www.adobe.com/devnet/flex/quickstart/embedding_assets/ I figured out how to embed a Flash library asset using the following steps: 1. Embed symbol as a Class (same as the link above). 2. Create a new instance of the Class as a Sprite. 3. Create a UIComponent, and add my Sprite to that. 4. Add the UIComponent to my Canvas. This seems more difficult that it should be. What am I missing?
Re: [flexcoders] Dynamic Instance Problem
You just need to declare it somewhere, its still dynamic, i.e. it may be created it may not. You don't have to actually use the declared var, your just making sure thats its available for creation. private var declared:views.pr.ProjectView; -- Stephen Downs Addict, Tink Ltd. e: [EMAIL PROTECTED] t: +44 (0) 7730 838 785 w: http://www.tink.ws -- On 18 Apr 2008, at 08:38, Dale Fraser wrote: Thanks, That kind of makes it non dynamic if I need to reference it elsewhere. Is there a way around this. Regards Dale Fraser http://learncf.com http://flexcf.com From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Christophe Herreman Sent: Friday, 18 April 2008 5:08 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dynamic Instance Problem Hi Dale, did you reference the class somewhere in your code? It needs to be compiled into the swf in order to instantiate it dynamically. My personal preference is to do this with a static code block: { MyClass1, MyClass2 } regards, Christophe -- Christophe Herreman http://www.herrodius.com http://www.pranaframework.org 2008/4/18, Dale Fraser [EMAIL PROTECTED]: Anyone tell me why this doesn't work. var ClassName:String = 'views.pr.ProjectView'; var ClassReference:Class = getDefinitionByName(ClassName) as Class; var instance:UIComponent = new ClassReference(); child.addChild( instance ); ReferenceError: Error #1065: Variable ProjectView is not defined. at global/flash.utils::getDefinitionByName() at Main/addTab()[C:\ Central\Flex\src\Main.mxml:86] at Main/treeChanged()[C:\ Central\Flex\src\Main.mxml:52] at Main/__menuTree_click()[C:\ Central\Flex\src\Main.mxml:138] Regards Dale Fraser http://learncf.com http://flexcf.com -- Christophe Herreman http://www.herrodius.com http://www.pranaframework.org
Re: [flexcoders] Re: Fade effect on a canvas
Changing from one child to another actually requires 2 effects. You see the first fade out, then the second fades in. PairedStackEffect enables you to combine the 2 effects into one. http://www.tink.ws/blog/pairedstackeffect-fade-squash/ There's a fade example there which might be what your after. Tink On 18 Apr 2008, at 21:07, mthomas1969 wrote: I found a way to do this by setting blendMode=layer on the parent canvas. I'm not sure *why* it works, though...! --- In flexcoders@yahoogroups.com, mthomas1969 [EMAIL PROTECTED] wrote: This one's got me stumped: I'm using a fade effect to fade out a canvas from alpha 1 to alpha 0. The canvas contains two overlapping PNG images, using mx:Image. The problem is that when I do the fade out effect (targeting the canvas), it looks like the alpha property of each child image is fading from 1 to 0, so that the background image begins to show through the foreground image as the fade progresses. How would I prevent this? Is there a way to treat all of the visuals in the canvas as a single entity whose alpha is faded out? thx! -Matt
Re: [flexcoders] Writing text directly to Graphics object.
http://five3d.mathieu-badimon.com/ (Make a new typography file v2.0) or old stylee http://www.quasimondo.com/shapedecoder/qm_shape_decoder.php there's a few useful links there too Tink On 16 Apr 2008, at 03:45, Rick Winscot wrote: Exactly – the method I provided uses a simple transport mechanism to get the string into a graphics context… that perhaps could be used with beginBitmapFill or a programmatic skin. As you say, without an API to do this directly… hmm… I feel a feature request coming on. Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith Sent: Tuesday, April 15, 2008 8:51 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Writing text directly to Graphics object. I think the original poster was looking for something like graphics.drawText(Hello, format); But there are (alas!) no APIs in the Graphics class that know how to render a text string. Only TextField knows how to do that. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Winscot Sent: Tuesday, April 15, 2008 5:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Writing text directly to Graphics object. There is a way to draw a string to an graphical control (i.e. Image) as: private function drawStringOnImage( string:String, image:Image ):void { var t:UITextField = new UITextField(); t.text = string; var b:BitmapData = new BitmapData( t.textWidth, t.textHeight, true, 0x00 ); b.draw( t ); image.source = new BitmapAsset( b ); } If you wanted to draw this on something like the canvas… well – you *could* take a dynamic skinning approach. Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith Sent: Monday, April 14, 2008 8:23 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Writing text directly to Graphics object. Unfortunately, the answer is no. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cooper Sent: Friday, April 11, 2008 3:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Writing text directly to Graphics object. Is there any way to write/draw text directly to a Graphics object? For that matter is there anyway to draw text (single line of static text) into a Canvas? I suspect that the answer is no, having searched and searched... but maybe there's some obscure utility class that I've overlooked. Thanks in advance. -Eric
RE: [flexcoders] Skinning in Flex - What a nightmare!!!
Hi, There are several places to start with skinning doc: - The Flex Developers Guide has a chapter on skinning. You can find it here: http://livedocs.adobe.com/flex/3/html/skinning_1.html - You can download and install the Flex Skinning Extensions for Adobe tools, such as Flash, Fireworks, Illustrator, and Photoshop. These include templates for all Flex skins. For more information, see http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex%5Fskins Hope that helps, Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polestar11 Sent: Tuesday, April 15, 2008 5:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Skinning in Flex - What a nightmare!!! Please help There is virtually no documentation on Flex skinning. I am really struggling with border sizes and content sizes with custom skins, in particular Panel skins using the borderSkin property. I'm currently trying to skin an Alert box. I have the following properties set: Alert { color:#ff; borderSkin: Embed(source=flex_skins.swf, symbol=Panel_popupSkin2); headerHeight: 30; paddingTop: 20; paddingBottom: 4; } My content only just fits, after much pixel pushing. It is still not perfect as it is all squashed in. I have tried various things, that have had no effect such as: - tweaking the scale-9 borders in the .fla symbol - setting verticalGap in the style - setting borderThickness in the style This is very frustrating as there only seems to be 1 definitive document on skinning[1] which doesn't cover detailed concepts like how to structure the .fla symbols. [1] http://www.adobe.com/devnet/flex/articles/flex_skins.html http://www.adobe.com/devnet/flex/articles/flex_skins.html (also documented in Flex Help) Where could I find out more information on skinning? Regards Tracy
[flexcoders] can I dispatch a dataTipFunction event
I currently have a working mx:LineChart with a dataTipFunction that shows up on mouse over. I would like to add some animation to this Chart, is there a way to show dataTip1, sleep some, then show dataTip2, sleep, etc without having the user mouse over the data points ? -Thanks Flex newbie
[flexcoders] Dump any Data Structure
Perl has Data::Dumper ( http://search.cpan.org/~ilyam/Data-Dumper-2.121/Dumper.pm ) It will output any data structure structure to output. Is there any equivalent method/object in flex ? -Thanks Flex newbie
[flexcoders] Re: Problem with DataGrid itemFocusIn event
Is there anyway to get the selected row from a DataGrid without it being editable ? It seems others have had this problem also: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg41468.html https://bugs.adobe.com/jira/browse/SDK-11690 -Thanks Flex newbie
[flexcoders] Re: Problem with DataGrid itemFocusIn event
Yes, a mx.events.ListEvent should be used instead of a mx.events.DataGridEvent; On Thu, Apr 3, 2008 at 1:33 PM, Stephen More [EMAIL PROTECTED] wrote: Is there anyway to get the selected row from a DataGrid without it being editable ? It seems others have had this problem also: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg41468.html https://bugs.adobe.com/jira/browse/SDK-11690 -Thanks Flex newbie
RE: [flexcoders] WHERE is ActionScript 3 Documentation HIDING ?
and here is the main Flex doc page on adobe.com: http://www.adobe.com/support/documentation/en/flex/ Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Kampschmidt Sent: Saturday, March 29, 2008 10:15 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] WHERE is ActionScript 3 Documentation HIDING ? Here are the Flex 3 livedocs, this what you're looking for? http://livedocs.adobe.com/flex/3/langref/index.html http://livedocs.adobe.com/flex/3/langref/index.html -kampy On 3/29/08 9:49 PM, Jeffry Houser [EMAIL PROTECTED] wrote: If I Google ActionScript 3 Documentation this page comes up: http://labs.adobe.com/wiki/index.php/ActionScript_3 http://labs.adobe.com/wiki/index.php/ActionScript_3 Which has a link to this Programming ActionScript 3 in PDF format ( http://www.adobe.com/go/programmingAS3_pdf http://www.adobe.com/go/programmingAS3_pdf ). If I go to LiveDocs.adobe.com, select Flex documentation it will send me here http://www.adobe.com/support/documentation/en/flex/ http://www.adobe.com/support/documentation/en/flex/ Which has the same PDF available. Both pages include other links (some in PDF) that may be helpful in the context of learning, or using ActionScript 3. I'd be very surprised if similar documentation was not included with Flex Builder (or the Flex SDK download), however I didn't check. It is rare I'm looking up ActionScript3 docs; although I use the Flex Framework docs quite a bit. All that said, ActionSCript 3 is an ECMA compliant language, so they may very well have the expectation that most programmers are already familiar with the syntax. comfederation wrote: I am looking for ActionScript 3 reference and other manuals, in PDF format, and I can not find them? Why are these PDF reference manuals hidden well enough that even dummies (like my self) can not easily find them ? It certainly does not seem to be one of Adobe's brightest moves that will help them in the Silverlight battle !
RE: [flexcoders] Custom component with custom style - help please
There is an example in the doc explaining this process: http://livedocs.adobe.com/flex/3/html/skinstyle_3.html Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Thursday, March 13, 2008 10:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Custom component with custom style - help please I assume you removed the getter/setters? Try: .wax { waxColor: #F0F0F0; } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dbronk Sent: Thursday, March 13, 2008 7:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Custom component with custom style - help please I've made a custom component and on it I want to place a custom style named waxColor. I started by simply creating getter/setters for waxColor. Worked great when I include waxColor=#F0F0F0 to the mxml, but I want this to be property driven. So I added [Style(name=waxColor, format=Color, type=unit, inherit=no)] to my as file. I then coded: override public function setStyle(styleProp:String, newValue:*) : void override public function styleChanged(styleProp:String) : void override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void to do what I needed. In my component that instantiates my custom component I do myComp.setStyle(waxColor, 0xF0F0F0) and it works great. But, the entire reason that I've added this as a style was that I wanted to control the color via a style sheet. So in my css file I added .wax { waxColor: 0xF0F0F0; } and removed the setStyle code. Now my mxml does not have waxColor=#F0F0F0 and instead has styleName=wax. This does not work. I have trace statements in all of my overridden functions and while styleChanged gets triggered, never with styleProp of waxColor. setStyle is never called. What am I doing wrong? I really want waxColor to be able to be set via my css file. Thanks, Dale
Re: [flexcoders] Flex communication with WCF(.net 3) webservice issue
We got Flex 3 talking to WCF (Windows Communication Foundation for the curious, a .NET 3.5 thing). I don't recall if we saw the same errors as you but to get it to work we had to flatten the WSDL as Flex didn't like the way WCF WSDL involves 'including' lots of little WSDL files together. I'm not sure how you do this but our .NET guy did it in about 10 minutes so I guess it's easy if you know what to do. On 29 Feb 2008, at 10:13, ravi mishra wrote: Hi All, I need some help in communicating Flex application with .net 3 (WCF) webservice. Anyone having experience in WCF services communications with Flex please respond.
RE: [flexcoders] Help-files as PDF-documents?
All the docs are available as HTML or PDF here: http://www.adobe.com/support/documentation/en/flex/ Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hyes3mn3 Sent: Tuesday, February 26, 2008 8:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Help-files as PDF-documents? Hi, When I'm trying to learn a new technology, in this case flex, I like to sit in my comfortable chair and read old fashioned papers. Yes - I know - I'm old. Therefore it would have been nice if the help files where available as PDF documents, I could print. I think I saw such PDF documents from a previous beta edition somewhere, but I decided to wait until the actual release, and now I can't find it. /Hye
RE: [flexcoders] Re: Why no Adobe Flex Language Reference PDF file
Ask and you shall receive. You can download the entire doc set, including the API Reference, from http://livedocs.adobe.com/flex/3/flex3_documentation.zip. That link was omitted from the main doc page, but we will add it. Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of greenfishinwater Sent: Tuesday, February 26, 2008 9:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Why no Adobe Flex Language Reference PDF file What I meant to ask was: is there a zip file to download? I realize that a PDF file is not relevant. Andrew --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , greenfishinwater [EMAIL PROTECTED] wrote: I've looked on the Flex documentation site and there is no PDF file for Adobe Flex Language Reference, there seems to be only a LiveDocs version. I feel more comfortable having it on my own system. Is it available as a PDF? Andrew
[flexcoders] Embedded fonts not working in Flex 3?
Hi all, I downloaded the 3.0.0.477 build from opensource.adobe.com and did a few simple test cases. The ff mxml failed to compile: == ?xml version=1.0? !-- fonts/EmbeddedFontFace.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Style @font-face { src: local(Arial); fontFamily: myFontFamily; advancedAntiAliasing: true; } VBox { fontFamily: myFontFamily; } /mx:Style mx:Panel title=Embedded Font Applied With Type Selector mx:VBox mx:Button label=Click Me/ mx:Label text=Label/ mx:TextArea width=400 height=75 text=The text uses the myClass class selector. / /mx:VBox /mx:Panel /mx:Application == The code is copy-and-paste almost exactly from an example in the livedocs...I just changed the font from Myriad Pro to Arial. Compiling the above gives a null pointer exception: == C:\flex3\binmxmlc test.mxml Loading configuration file C:\flex3\frameworks\flex-config.xml Error: null java.lang.NullPointerException at flash.swf.TagEncoder.defineFontAlignZones(TagEncoder.java:1254) at flash.swf.tags.DefineFontAlignZones.visit(DefineFontAlignZones.java:2 9) at flash.swf.MovieEncoder.visitAfter(MovieEncoder.java:259) at flash.swf.MovieEncoder.define(MovieEncoder.java:240) at flash.swf.MovieEncoder.export(MovieEncoder.java:116) at flex2.compiler.API.encode(API.java:4068) at flex2.tools.Compiler.mxmlc(Compiler.java:270) at flex2.tools.Compiler.main(Compiler.java:53) == Any idea? Or is there anything I need to set in the compiler to embed fonts? Thanks! Roy