Re: [flexcoders] Script timeout binding selection in Tree
I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a breakpoint on setSelectionDataLoop. See how often it gets called. On 5/17/10 4:49 PM, Richard Rodseth rrods...@gmail.com wrote: Thanks for trying. No, the presentation model has an array collection whose .source gets changed after an HTTPService call returns (although I should mention that I am using my mock service layer at the moment). I added a a collection change listener to the collection reference. I have set a breakpoint in setSelectionDataLoop(). I hit it twice (the parameters appear the same - index 0, items array containing the object to select, useFind=false). Then the debugger stopped with the finally{} block in Binding.watcherFired highlighted and the stack crawl below. Below this stack crawl I've included the last few lines of the one that shows up in the console. Main Thread (Suspended: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.) mx.binding::Binding/watcherFired mx.binding::Watcher/notifyListeners mx.binding::PropertyWatcher/eventHandler flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] com.companyname.admin.deviceshome.ui.presentation::DevicesHome/changeSelectedGroupIds com.companyname.admin.deviceshome.ui.presentation::DevicesHome/groupsChangedListener flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] mx.collections::ListCollectionView/dispatchEvent mx.collections::ListCollectionView/ http://www.adobe.com/2006/flex/mx/internal::reset mx.collections::ListCollectionView/set list mx.collections::ArrayCollection/set source anonymous mx.rpc::Responder/result anonymous Array$/_forEach [no source] Array/http://adobe.com/AS3/2006/builtin::forEach [no source] anonymous flash.utils::Timer/_timerDispatch [no source] flash.utils::Timer/tick [no source] Console: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds. at mx.controls.treeClasses::HierarchicalViewCursor/moveNext() at mx.controls.listClasses::ListBase/setSelectionDataLoop()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:6455] On Mon, May 17, 2010 at 4:09 PM, Oleg Sivokon olegsivo...@gmail.com wrote: I wish I could help more... well here's another guess: - if you are using XML / XMLList, and have used insertBefore / isertAfter from the same XML / XMLList, then it is a known bug. - if you dispatch collectionChange on your own you might have messed something in the event's properties, which then will make the collection run in a loop thinking it's being updated over and over again. It is slow, but it isn't that slow to run out of script timeout limit :) Anyways, bindings are the first suspect in such case, but if that's not... ah, and, why won't you debug it? the debugger should be able to look into the framework sources. If, for whatever reason it doesn't, copy the Tree and other classes involved into your project and try debugging this way. Best. Oleg -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] type was not found or was not a compile-time constant Error
Hello, I'm new to the Flex scene and I'm trying out an open source project called Merapi ( http://merapiproject.net/index.php ), which is essentially a bridge between java and AIR.I've been building a Flex app to use this package and I keep getting type was not found or was not a compile-time constant:BridgeInstance error. This code is pretty much taken straight from their hello world video which can be found here http://merapiproject.net/index.php?option=com_contentview=articleid=5\ 1Itemid=84 . Here's my code: ?xml version=1.0 encoding=utf-8? s:WindowedApplication xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx xmlns:merapi=merapi.* merapi:BridgeInstance id=bridge result=handleResult(event)/ mx:Script ![CDATA[ import merapi.messages.*; import mx.rpc.events.ResultEvent; private function handleResult( event : ResultEvent ) : void { var message : IMessage = event.result as IMessage; } ]] /mx:Script /s:WindowedApplication My understanding is that this have something to do importing the swc file - I tried putting the argument -include-libraries merapi/merapi-core.swc in the flex compiler and I've put the merapi-core.swc file in everywhere in desperate attempt: now it's in src, libs and the main project folder. Still I get type was not found or was not a compile-time constant on the line merapi:BridgeInstance id=bridge result=handleResult(event)/. Any ideas on this?
[flexcoders] Maximized alwaysInFront AIR App covers Windows TaskBar
If I have an AIR app and set it to alwaysInFront and them I maximize it it covers the Windows TaskBar. Is there a way to either make it maximized but behind the TaskBar or failing that can I resize it so it fills the screen leaving space for the TaskBar. (Basically whilst visible the app is on top and fills the screen, then it gets hidden to the systray)
Re: [flexcoders] Maximized alwaysInFront AIR App covers Windows TaskBar
On Tuesday 18 May 2010 09:13:41 you wrote: Is there a way to either make it maximized but behind the TaskBar or failing that can I resize it so it fills the screen leaving space for the TaskBar. You can get the screen bounds from the Screens object, check the reference. -- Tom Chiverton Helping to paradigmatically embrace efficient IPOs as part of the IT team of the year 2010, '09 and '08 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 together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. 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] Adding nr of items to the label in a treeView
Hello, I have a treeView based on a XML-list. mx:XMLList id=xmlData folder label=Toplevel folder label=2ndLevel_folder1/ folder label=2ndLevel_folder2/ folder label=2ndLevel_folder3 file label=File1/ file label=File2/ file label=File3/ /folder folder label=2ndLevel_folder4 file label=File4/ file label=File5/ file label=File6/ /folder /folder I have a piece of code which shows me a treeview. In here I want to extend each label with the number of items which are under each node. I already can do that, but it only gives me the number of children directly under the node (in this example no matter if the item is a folder or a label). private function tvwNrOfFiles(item:XML):String { var label:String = it...@label; if (treeData.dataDescriptor.hasChildren(item)) { label += ( + treeData.dataDescriptor.getChildren(item).length + ); } return label; } What I want is to see how many items of the type files are below each node, no matter the number of subfolders which are in between. Based on the example I need following result : - TopLvevel (6) - 2nd Level_Folder1 (0) - 2nd Level_Folder2 (0) - 2nd Level_Folder3 (3) - 2nd Level_Folder4 (3) Hope this is a bit clear. Thanks in advance
[flexcoders] Re: Maximized alwaysInFront AIR App covers Windows TaskBar
I thought of that but from what I can see the Screen bounds are returning the same dimensions i.e. not taking the TaskBar into account. On my screen everything from Screen/Stage/NativeWindow all return the same height 1050px (well 1054px actually but that is down to the usual 3+1 bug) Currently the only way I can seem to do it is to manually calculate the height (32px) and deduct it, of course that doesnt work as expected if the TaskBar is anywhere other than at the bottom and isn't the same height as the one on my PC. --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote: On Tuesday 18 May 2010 09:13:41 you wrote: Is there a way to either make it maximized but behind the TaskBar or failing that can I resize it so it fills the screen leaving space for the TaskBar. You can get the screen bounds from the Screens object, check the reference. -- Tom Chiverton Helping to paradigmatically embrace efficient IPOs as part of the IT team of the year 2010, '09 and '08 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 together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. 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] Re: adding transparent images to a canvas
Yes, removed those bits of code in the new BitmapData Calls. It was a desperate try to obtain a satisfying result. It didn't change anything to my problem in good or bad so I removed them, but only after posting my problem. I'm still wondering how my transparent png images becomes opaque when handled in flex.
Re: [flexcoders] How to align label text to the left in Spark Button (no textAlign style)?
Hi Judah, I really do not get the Adobe folks reasoning why textAlign style was excluded from Spark Buttton. BTW, the binding of textAlign style property in your custom skin via {getStyle('textAlign')} is redundant. The s:Label inside Button's skin would inherit the value set from textAlign style from s:Button, because s:Label will have no explicit value set to textAlign in our custom skin e.g s:SparkSkin ... s:Label id=labelDisplay verticalAlign=middle maxDisplayedLines=1 horizontalCenter=0 verticalCenter=1 left=10 right=10 top=2 bottom=2 /s:Label /s:SparkSkin -- Best regards, Andriy Panas On 18 May 2010 07:53, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: Hi Andriy, Yes. You will need to create a custom skin. You can base it on the Button skin. In the skin you can use the following code: s:Label id=labelDisplay textAlign=getStyle('textAlign') left=2 right=2 top=2 bottom=2/ /s:Skin And you must set the style in CSS. The other way to set it is to extend Button and add a property for text alignment. Then you can set it in MXML. JP On Mon, May 17, 2010 at 3:25 AM, Andriy Panas a.pa...@gmail.com wrote: Hi all, textAlign style is excluded for Spark Button, and probably for a good reason. [Exclude(name=textAlign, kind=style)] If I want to align Spark Button text label to the left, should I create custom skin to accomplish that? Something e.g: ?xml version=1.0 encoding=utf-8? s:Skin 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=21 minHeight=21 alpha.disabled=0.5 ... s:Label id=labelDisplay textAlign=left left=2 right=2 top=2 bottom=2/ /s:Skin -- Best regards, Andriy Panas
[flexcoders] Anybody has worked with flex-plugin and MAVEN ..???
Hello I am working with Maven in order to automatise Unit tests, I have use the plugin flex-plugin : plugin groupIdorg.servebox.flex/groupId artifactIdflex-plugin/artifactId version2.3.2/version extensionstrue/extensions inheritedtrue/inherited configuration targetFlashPlayer10.0.0/targetFlashPlayer /configuration executions execution phaseinstall/phase id___Test/id goals goaltest/goal /goals /execution /executions /plugin But it didnt generates a file which contains the results of the tests :( ;( Does any one has worked with this plugin please Thank you very much _ Découvrez Windows Phone 7 : Une nouvelle ère de téléphones ! http://www.microsoft.com/windowsmobile/fr-fr/cmpn1/windowsphone7series/default.mspx
[flexcoders] How to automatise Unit test with Maven ???
Hello I would like to automatise Unit tests but i didn't find the best plugin which does this ? does anyone did this before Thanks _ Vous voulez regarder la TV directement depuis votre PC ? C'est très simple avec Windows 7 http://clk.atdmt.com/FRM/go/229960614/direct/01/
Re: [flexcoders] How to automatise Unit test with Maven ???
when you say automate what do you exactly mean. DO you mean running unit tests on the back of a continues integration build? Paul B-H has blogged about that a fair bit http://eyefodder.com/ On Tue, May 18, 2010 at 3:56 PM, Nini7016 Nini7016 nahloulaha...@hotmail.com wrote: Hello I would like to automatise Unit tests but i didn't find the best plugin which does this ? does anyone did this before Thanks -- Envie de plus d'originalité dans vos conversations ? Téléchargez gratuitement les Emoch'ticones !http://www.ilovemessenger.fr/emoticones/telecharger-emoticones-emochticones.aspx -- j:pn \\no comment
[flexcoders] Re: type was not found or was not a compile-time constant Error
Have you tried checking out the examples from http://code.google.com/p/merapi-examples/source/checkout --- In flexcoders@yahoogroups.com, heygapdol hey_gap...@... wrote: Hello, I'm new to the Flex scene and I'm trying out an open source project called Merapi ( http://merapiproject.net/index.php ), which is essentially a bridge between java and AIR.I've been building a Flex app to use this package and I keep getting type was not found or was not a compile-time constant:BridgeInstance error. This code is pretty much taken straight from their hello world video which can be found here http://merapiproject.net/index.php?option=com_contentview=articleid=5\ 1Itemid=84 . Here's my code: ?xml version=1.0 encoding=utf-8? s:WindowedApplication xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx xmlns:merapi=merapi.* merapi:BridgeInstance id=bridge result=handleResult(event)/ mx:Script ![CDATA[ import merapi.messages.*; import mx.rpc.events.ResultEvent; private function handleResult( event : ResultEvent ) : void { var message : IMessage = event.result as IMessage; } ]] /mx:Script /s:WindowedApplication My understanding is that this have something to do importing the swc file - I tried putting the argument -include-libraries merapi/merapi-core.swc in the flex compiler and I've put the merapi-core.swc file in everywhere in desperate attempt: now it's in src, libs and the main project folder. Still I get type was not found or was not a compile-time constant on the line merapi:BridgeInstance id=bridge result=handleResult(event)/. Any ideas on this?
[flexcoders] Generic Function To Set ComboBox Item
Hi FlexCoders, I would want to create a generic function to be able to set a ComboBox item. The function I have goes like this: private function selectComboItem(itemID:String, dataProv:XMLListCollection, cmb:ComboBox, dpID:String) :void { for (var i:int = 0; i dataProv.length; i++) { var item:String = dataProv.getItemAt(i).dpID; if(itemID == item) { cmb.selectedIndex = i; break; } } } dpID is the data item in the XML List collection which should match the passed itemID. But I can't seem to get properly the item. Any suggestions highly appreciated. Thanks.
Re: [flexcoders] Script timeout binding selection in Tree
Two or three times. Then I get the spinning beach ball. On Mon, May 17, 2010 at 11:12 PM, Richard Rodseth rrods...@gmail.comwrote: I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a breakpoint on setSelectionDataLoop. See how often it gets called. On 5/17/10 4:49 PM, Richard Rodseth rrods...@gmail.com wrote: Thanks for trying. No, the presentation model has an array collection whose .source gets changed after an HTTPService call returns (although I should mention that I am using my mock service layer at the moment). I added a a collection change listener to the collection reference. I have set a breakpoint in setSelectionDataLoop(). I hit it twice (the parameters appear the same - index 0, items array containing the object to select, useFind=false). Then the debugger stopped with the finally{} block in Binding.watcherFired highlighted and the stack crawl below. Below this stack crawl I've included the last few lines of the one that shows up in the console. Main Thread (Suspended: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.) mx.binding::Binding/watcherFired mx.binding::Watcher/notifyListeners mx.binding::PropertyWatcher/eventHandler flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] com.companyname.admin.deviceshome.ui.presentation::DevicesHome/changeSelectedGroupIds com.companyname.admin.deviceshome.ui.presentation::DevicesHome/groupsChangedListener flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] mx.collections::ListCollectionView/dispatchEvent mx.collections::ListCollectionView/ http://www.adobe.com/2006/flex/mx/internal::reset mx.collections::ListCollectionView/set list mx.collections::ArrayCollection/set source anonymous mx.rpc::Responder/result anonymous Array$/_forEach [no source] Array/http://adobe.com/AS3/2006/builtin::forEach [no source] anonymous flash.utils::Timer/_timerDispatch [no source] flash.utils::Timer/tick [no source] Console: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds. at mx.controls.treeClasses::HierarchicalViewCursor/moveNext() at mx.controls.listClasses::ListBase/setSelectionDataLoop()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:6455] On Mon, May 17, 2010 at 4:09 PM, Oleg Sivokon olegsivo...@gmail.com wrote: I wish I could help more... well here's another guess: - if you are using XML / XMLList, and have used insertBefore / isertAfter from the same XML / XMLList, then it is a known bug. - if you dispatch collectionChange on your own you might have messed something in the event's properties, which then will make the collection run in a loop thinking it's being updated over and over again. It is slow, but it isn't that slow to run out of script timeout limit :) Anyways, bindings are the first suspect in such case, but if that's not... ah, and, why won't you debug it? the debugger should be able to look into the framework sources. If, for whatever reason it doesn't, copy the Tree and other classes involved into your project and try debugging this way. Best. Oleg -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Script timeout binding selection in Tree
If that’s true, on the second invocation, step through it. It might be hung up in moveNext() not advancing to the next item, maybe because you’ve run out of items. On 5/17/10 11:12 PM, Richard Rodseth rrods...@gmail.com wrote: I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a breakpoint on setSelectionDataLoop. See how often it gets called. On 5/17/10 4:49 PM, Richard Rodseth rrods...@gmail.com http://rrods...@gmail.com wrote: Thanks for trying. No, the presentation model has an array collection whose .source gets changed after an HTTPService call returns (although I should mention that I am using my mock service layer at the moment). I added a a collection change listener to the collection reference. I have set a breakpoint in setSelectionDataLoop(). I hit it twice (the parameters appear the same - index 0, items array containing the object to select, useFind=false). Then the debugger stopped with the finally{} block in Binding.watcherFired highlighted and the stack crawl below. Below this stack crawl I've included the last few lines of the one that shows up in the console. Main Thread (Suspended: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.) mx.binding::Binding/watcherFired mx.binding::Watcher/notifyListeners mx.binding::PropertyWatcher/eventHandler flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] com.companyname.admin.deviceshome.ui.presentation::DevicesHome/changeSelectedGroupIds com.companyname.admin.deviceshome.ui.presentation::DevicesHome/groupsChangedListener flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] mx.collections::ListCollectionView/dispatchEvent mx.collections::ListCollectionView/http://www.adobe.com/2006/flex/mx/internal::reset mx.collections::ListCollectionView/set list mx.collections::ArrayCollection/set source anonymous mx.rpc::Responder/result anonymous Array$/_forEach [no source] Array/http://adobe.com/AS3/2006/builtin::forEach [no source] anonymous flash.utils::Timer/_timerDispatch [no source] flash.utils::Timer/tick [no source] Console: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds. at mx.controls.treeClasses::HierarchicalViewCursor/moveNext() at mx.controls.listClasses::ListBase/setSelectionDataLoop()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:6455] On Mon, May 17, 2010 at 4:09 PM, Oleg Sivokon olegsivo...@gmail.com http://olegsivo...@gmail.com wrote: I wish I could help more... well here's another guess: - if you are using XML / XMLList, and have used insertBefore / isertAfter from the same XML / XMLList, then it is a known bug. - if you dispatch collectionChange on your own you might have messed something in the event's properties, which then will make the collection run in a loop thinking it's being updated over and over again. It is slow, but it isn't that slow to run out of script timeout limit :) Anyways, bindings are the first suspect in such case, but if that's not... ah, and, why won't you debug it? the debugger should be able to look into the framework sources. If, for whatever reason it doesn't, copy the Tree and other classes involved into your project and try debugging this way. Best. Oleg -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Script timeout binding selection in Tree
That sounds about right. moveNext() does appear in the stack sometimes, and I am changing the data provider contents. I may have to put the restoreselection code somewhere other than in a collection change handler. On Tue, May 18, 2010 at 9:16 AM, Alex Harui aha...@adobe.com wrote: If that’s true, on the second invocation, step through it. It might be hung up in moveNext() not advancing to the next item, maybe because you’ve run out of items. On 5/17/10 11:12 PM, Richard Rodseth rrods...@gmail.com wrote: I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a breakpoint on setSelectionDataLoop. See how often it gets called. On 5/17/10 4:49 PM, Richard Rodseth rrods...@gmail.com http://rrods...@gmail.com wrote: Thanks for trying. No, the presentation model has an array collection whose .source gets changed after an HTTPService call returns (although I should mention that I am using my mock service layer at the moment). I added a a collection change listener to the collection reference. I have set a breakpoint in setSelectionDataLoop(). I hit it twice (the parameters appear the same - index 0, items array containing the object to select, useFind=false). Then the debugger stopped with the finally{} block in Binding.watcherFired highlighted and the stack crawl below. Below this stack crawl I've included the last few lines of the one that shows up in the console. Main Thread (Suspended: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.) mx.binding::Binding/watcherFired mx.binding::Watcher/notifyListeners mx.binding::PropertyWatcher/eventHandler flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] com.companyname.admin.deviceshome.ui.presentation::DevicesHome/changeSelectedGroupIds com.companyname.admin.deviceshome.ui.presentation::DevicesHome/groupsChangedListener flash.events::EventDispatcher/dispatchEventFunction [no source] flash.events::EventDispatcher/dispatchEvent [no source] mx.collections::ListCollectionView/dispatchEvent mx.collections::ListCollectionView/ http://www.adobe.com/2006/flex/mx/internal::reset mx.collections::ListCollectionView/set list mx.collections::ArrayCollection/set source anonymous mx.rpc::Responder/result anonymous Array$/_forEach [no source] Array/http://adobe.com/AS3/2006/builtin::forEach [no source] anonymous flash.utils::Timer/_timerDispatch [no source] flash.utils::Timer/tick [no source] Console: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds. at mx.controls.treeClasses::HierarchicalViewCursor/moveNext() at mx.controls.listClasses::ListBase/setSelectionDataLoop()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:6455] On Mon, May 17, 2010 at 4:09 PM, Oleg Sivokon olegsivo...@gmail.com http://olegsivo...@gmail.com wrote: I wish I could help more... well here's another guess: - if you are using XML / XMLList, and have used insertBefore / isertAfter from the same XML / XMLList, then it is a known bug. - if you dispatch collectionChange on your own you might have messed something in the event's properties, which then will make the collection run in a loop thinking it's being updated over and over again. It is slow, but it isn't that slow to run out of script timeout limit :) Anyways, bindings are the first suspect in such case, but if that's not... ah, and, why won't you debug it? the debugger should be able to look into the framework sources. If, for whatever reason it doesn't, copy the Tree and other classes involved into your project and try debugging this way. Best. Oleg -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] how to adjust mouse wheel scrolling for custom itemrender?
I have a skinnabledatacontainer with custom itemrender surrounded by a scroller and I want to adjust how many records are scrolled when the mouse-wheel is used. Currently it scrolls way to many records. Is there an easy way to do this? So far, the only way I've found is to extend the existing scroller, then override the mx_internals set mouseWheel function. The file also has to be AS, because overriding mx_internals functions doesn't work in mxml fx:script. It's a very heavy solution for a relatively simple activity, am I missing something? Cheers, Baz
Re: [flexcoders] Script timeout binding selection in Tree
I've attempted to create a one-file test case, and while it doesn't exhibit the script timeout, the selection restoration does not work as part of the collection listener. Is it significant that selectedItems does not show up in code completion while selectedIndices does? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical minWidth=955 minHeight=600 creationComplete=application1_creationCompleteHandler(event) mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.events.CollectionEvent; import mx.events.CollectionEventKind; import mx.events.FlexEvent; import mx.events.ListEvent; [Bindable] public var items:ArrayCollection = new ArrayCollection(); [Bindable(event=selectionChanged)] public function get selectedItems():Array { return _selectedItems; } private var _selectedItems:Array = []; private var _selectedIds:Array = []; private function selectItems(items:Array):void { _selectedItems = items; _selectedIds = this.toIds(items); dispatchEvent(new Event(selectionChanged)); } protected function application1_creationCompleteHandler(event:FlexEvent):void { items.addEventListener(CollectionEvent.COLLECTION_CHANGE, itemsListener, false, 0, true); } private function itemsListener(event:CollectionEvent):void { if (event.kind == CollectionEventKind.RESET) { this.restoreSelection(); } } private function refresh():void { this.items.source = [ { uid:1, name:Root, children: [ { uid:2, name:Child } ] } ]; } private function toIds(items:Array):Array { var result:Array = new Array(); for each (var item:Object in items) { result.push(item.uid); } return result; } private function toItems(ids:Array):Array { var root:Object = this.items ? this.items.getItemAt(0) : null; var result:Array = new Array(); for each (var id:String in ids) { var item:Object = find(root, id); if (item) { result.push(item); } } return result; } private function restoreSelection():void { _selectedItems = toItems(_selectedIds); dispatchEvent(new Event(selectionChanged)); } private function find(start:Object, uid:String):Object { if (start.uid == uid) return start; for each (var child:Object in start.children) { var found:Object = this.find(child, uid); if (found) return found; } return null; } protected function tree1_changeHandler(event:ListEvent):void { this.selectItems(theTree.selectedItems); } protected function button1_clickHandler(event:MouseEvent):void { this.refresh(); } ]] /mx:Script mx:Tree id=theTree dataProvider={this.items} selectedItems={this.selectedItems} labelField=name allowMultipleSelection=true change=tree1_changeHandler(event)/ mx:Button label=Refresh click=refresh()/ mx:Button label=Restore Selection click=restoreSelection()/ /mx:Application On Tue, May 18, 2010 at 9:23 AM, Richard Rodseth rrods...@gmail.com wrote: That sounds about right. moveNext() does appear in the stack sometimes, and I am changing the data provider contents. I may have to put the restoreselection code somewhere other than in a collection change handler. On Tue, May 18, 2010 at 9:16 AM, Alex Harui aha...@adobe.com wrote: If that’s true, on the second invocation, step through it. It might be hung up in moveNext() not advancing to the next item, maybe because you’ve run out of items. On 5/17/10 11:12 PM, Richard Rodseth rrods...@gmail.com wrote: I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a breakpoint on setSelectionDataLoop. See how often it gets called. On 5/17/10 4:49 PM, Richard Rodseth rrods...@gmail.com http://rrods...@gmail.com wrote: Thanks for trying. No, the presentation model has an array collection whose .source gets changed after an HTTPService call
Re: [flexcoders] Script timeout binding selection in Tree
My bad (at least in this example). The selectedItems getter is incorrect. On Tue, May 18, 2010 at 12:15 PM, Richard Rodseth rrods...@gmail.comwrote: I've attempted to create a one-file test case, and while it doesn't exhibit the script timeout, the selection restoration does not work as part of the collection listener. Is it significant that selectedItems does not show up in code completion while selectedIndices does? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical minWidth=955 minHeight=600 creationComplete=application1_creationCompleteHandler(event) mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.events.CollectionEvent; import mx.events.CollectionEventKind; import mx.events.FlexEvent; import mx.events.ListEvent; [Bindable] public var items:ArrayCollection = new ArrayCollection(); [Bindable(event=selectionChanged)] public function get selectedItems():Array { return _selectedItems; } private var _selectedItems:Array = []; private var _selectedIds:Array = []; private function selectItems(items:Array):void { _selectedItems = items; _selectedIds = this.toIds(items); dispatchEvent(new Event(selectionChanged)); } protected function application1_creationCompleteHandler(event:FlexEvent):void { items.addEventListener(CollectionEvent.COLLECTION_CHANGE, itemsListener, false, 0, true); } private function itemsListener(event:CollectionEvent):void { if (event.kind == CollectionEventKind.RESET) { this.restoreSelection(); } } private function refresh():void { this.items.source = [ { uid:1, name:Root, children: [ { uid:2, name:Child } ] } ]; } private function toIds(items:Array):Array { var result:Array = new Array(); for each (var item:Object in items) { result.push(item.uid); } return result; } private function toItems(ids:Array):Array { var root:Object = this.items ? this.items.getItemAt(0) : null; var result:Array = new Array(); for each (var id:String in ids) { var item:Object = find(root, id); if (item) { result.push(item); } } return result; } private function restoreSelection():void { _selectedItems = toItems(_selectedIds); dispatchEvent(new Event(selectionChanged)); } private function find(start:Object, uid:String):Object { if (start.uid == uid) return start; for each (var child:Object in start.children) { var found:Object = this.find(child, uid); if (found) return found; } return null; } protected function tree1_changeHandler(event:ListEvent):void { this.selectItems(theTree.selectedItems); } protected function button1_clickHandler(event:MouseEvent):void { this.refresh(); } ]] /mx:Script mx:Tree id=theTree dataProvider={this.items} selectedItems={this.selectedItems} labelField=name allowMultipleSelection=true change=tree1_changeHandler(event)/ mx:Button label=Refresh click=refresh()/ mx:Button label=Restore Selection click=restoreSelection()/ /mx:Application On Tue, May 18, 2010 at 9:23 AM, Richard Rodseth rrods...@gmail.comwrote: That sounds about right. moveNext() does appear in the stack sometimes, and I am changing the data provider contents. I may have to put the restoreselection code somewhere other than in a collection change handler. On Tue, May 18, 2010 at 9:16 AM, Alex Harui aha...@adobe.com wrote: If that’s true, on the second invocation, step through it. It might be hung up in moveNext() not advancing to the next item, maybe because you’ve run out of items. On 5/17/10 11:12 PM, Richard Rodseth rrods...@gmail.com wrote: I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a breakpoint on setSelectionDataLoop. See how
Re: [flexcoders] How to align label text to the left in Spark Button (no textAlign style)?
Thanks Andriys, I see what you mean. I didn't look at the actual button skin. I assumed the textAlign and top left right bottom constraints were hardcoded in the default button skin's label. My example was mainly for illustrative purposes on how to pull in and set a style in your skin from CSS. In my experience so far I've had to extend almost all the controls to get the look and feel we want. This would have been a lot of work in Flex 3 but with skinning in FDK 4 (yeah i said it - coined!) and FC it's turning out to be a lot less work and lot more fun (is it ok to say work is fun?). ;) JP On Tue, May 18, 2010 at 8:04 AM, Andriy Panas a.pa...@gmail.com wrote: Hi Judah, I really do not get the Adobe folks reasoning why textAlign style was excluded from Spark Buttton. BTW, the binding of textAlign style property in your custom skin via {getStyle('textAlign')} is redundant. The s:Label inside Button's skin would inherit the value set from textAlign style from s:Button, because s:Label will have no explicit value set to textAlign in our custom skin e.g s:SparkSkin ... s:Label id=labelDisplay verticalAlign=middle maxDisplayedLines=1 horizontalCenter=0 verticalCenter=1 left=10 right=10 top=2 bottom=2 /s:Label /s:SparkSkin -- Best regards, Andriy Panas On 18 May 2010 07:53, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: Hi Andriy, Yes. You will need to create a custom skin. You can base it on the Button skin. In the skin you can use the following code: s:Label id=labelDisplay textAlign=getStyle('textAlign') left=2 right=2 top=2 bottom=2/ /s:Skin And you must set the style in CSS. The other way to set it is to extend Button and add a property for text alignment. Then you can set it in MXML. JP On Mon, May 17, 2010 at 3:25 AM, Andriy Panas a.pa...@gmail.com wrote: Hi all, textAlign style is excluded for Spark Button, and probably for a good reason. [Exclude(name=textAlign, kind=style)] If I want to align Spark Button text label to the left, should I create custom skin to accomplish that? Something e.g: ?xml version=1.0 encoding=utf-8? s:Skin 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=21 minHeight=21 alpha.disabled=0.5 ... s:Label id=labelDisplay textAlign=left left=2 right=2 top=2 bottom=2/ /s:Skin -- Best regards, Andriy Panas
[flexcoders] Errors from generated MXML code from module
Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory
Re: [flexcoders] Script timeout binding selection in Tree
Here's a corrected test case, where only the persistent uids are stored, and selectedItems is computed. The Restore Selection button works, the collection event listener doesn't. It would be great if someone could give this a whirl and confirm what I see. Not sure how this relates to the script timeout, but I really need a reliable way to move the selection into the model and bind to it. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical minWidth=955 minHeight=600 creationComplete=application1_creationCompleteHandler(event) mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.events.CollectionEvent; import mx.events.CollectionEventKind; import mx.events.FlexEvent; import mx.events.ListEvent; [Bindable] public var items:ArrayCollection = new ArrayCollection(); [Bindable(event=selectionChanged)] public function get selectedItems():Array { return toItems(_selectedIds); } private var _selectedIds:Array = []; private function selectItems(items:Array):void { _selectedIds = this.toIds(items); dispatchEvent(new Event(selectionChanged)); } protected function application1_creationCompleteHandler(event:FlexEvent):void { items.addEventListener(CollectionEvent.COLLECTION_CHANGE, itemsListener, false, 0, true); } private function itemsListener(event:CollectionEvent):void { if (event.kind == CollectionEventKind.RESET) { this.restoreSelection(); } } private function refresh():void { this.items.source = [ { uid:1, name:Root, children: [ { uid:2, name:Child } ] } ]; } private function toIds(items:Array):Array { var result:Array = new Array(); for each (var item:Object in items) { result.push(item.uid); } return result; } private function toItems(ids:Array):Array { var root:Object = this.items ? this.items.getItemAt(0) : null; var result:Array = new Array(); for each (var id:String in ids) { var item:Object = find(root, id); if (item) { result.push(item); } } return result; } private function toIndices(ids:Array):Array { var root:Object = this.items ? this.items.getItemAt(0) : null; var result:Array = new Array(); for each (var id:String in ids) { var item:Object = find(root, id); if (item) { var index:int = this.items.getItemIndex(item); result.push(index); } } return result; } private function restoreSelection():void { //_selectedItems = toItems(_selectedIds); dispatchEvent(new Event(selectionChanged)); } private function find(start:Object, uid:String):Object { if (start.uid == uid) return start; for each (var child:Object in start.children) { var found:Object = this.find(child, uid); if (found) return found; } return null; } protected function tree1_changeHandler(event:ListEvent):void { this.selectItems(theTree.selectedItems); } protected function button1_clickHandler(event:MouseEvent):void { this.refresh(); } ]] /mx:Script mx:Tree id=theTree dataProvider={this.items} selectedItems={this.selectedItems} labelField=name allowMultipleSelection=true change=tree1_changeHandler(event)/ mx:Button label=Refresh click=refresh()/ mx:Button label=Restore Selection click=restoreSelection()/ /mx:Application On Tue, May 18, 2010 at 12:24 PM, Richard Rodseth rrods...@gmail.comwrote: My bad (at least in this example). The selectedItems getter is incorrect. On Tue, May 18, 2010 at 12:15 PM, Richard Rodseth rrods...@gmail.comwrote: I've attempted to create a one-file test case, and while it doesn't exhibit the script timeout, the selection restoration does not work as part of the collection listener. Is it significant that selectedItems does not show up in code completion while selectedIndices does?
[flexcoders] how to create custom tables
Hi! I wanna create different kinds of table inside my flex application like pivot tables, but without data processing as OLAP cube does. So, I spend some time looking for (googling) solutions about how to include tables inside flex applications. I'm a little confuse aboud which solution I should take, so I will present here the solutions that I found and considering and some quotes about them: 1) Pivot table component or OLAP CUBE It solution show the information in the same way that I want, but I don't want to reprocess the information creating queries, filters and so... It look like huge and complex component just for present information without data processing. 2) Iframe-flex This solution seemed to be a good solution because, with the Iframe, I could put my data in a simple html table struture but, as I was expecting, the behavior has a trade-off : It will hide any flash content that enters the area bounded by the IFrame. (source: iframe-flex faq). 3) Alex's solution ( http://blogs.adobe.com/aharui/2008/01/html_and_flex_1.html) It seem a good solution for presenting html, I didn't test it yet. Is there someone working on this solution It? Or using it? you know, this post is from 2008 and as I could see the project site was drop. 4) DataGrid and AdvancedDataGrid It presents a good solution for tables, simple tables, drag and drop columns, ordering columns, etc. But It is not so good for present a simple pivot table, with columns or lines in different styles. :-( Which solution would be the best to show a custom table? Is there any other solution for custom tables? tnks a lot Ivan Perez
Re: [flexcoders] how to adjust mouse wheel scrolling for custom itemrender?
Scrolling speed is a known issue. Some folks have had luck by modifying the delta property of the MouseEvent before the scroller sees it by using a capture phase or high priority event handler. On 5/18/10 11:23 AM, Baz li...@thinkloop.com wrote: I have a skinnabledatacontainer with custom itemrender surrounded by a scroller and I want to adjust how many records are scrolled when the mouse-wheel is used. Currently it scrolls way to many records. Is there an easy way to do this? So far, the only way I've found is to extend the existing scroller, then override the mx_internals set mouseWheel function. The file also has to be AS, because overriding mx_internals functions doesn't work in mxml fx:script. It's a very heavy solution for a relatively simple activity, am I missing something? Cheers, Baz -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Errors from generated MXML code from module
Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmbo...@bellsouth.net jim_bo...@premierinc.com wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
RE: [flexcoders] Limit to number of states in a Flex application?
Is there a limit to the number of states in a Flex application? Not that I'm aware of. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Joel Sent: Saturday, May 15, 2010 8:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Limit to number of states in a Flex application? Is there a limit to the number of states in a Flex application? Joel
[flexcoders] Re: Errors from generated MXML code from module
Hummm, I don't know how that would be. This happens within Eclipse, and when I compile using Maven from the command line using version 3.2 of the compiler. I have verified that the compiler version is the same across all my projects. I get the same error if I add a Module to my project that does nothing. I don't get the error in any of my other similar projectsI hate software some days. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmbo...@... jim_bo...@... wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] init, creationcomplete and other events
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
RE: [flexcoders] init, creationcomplete and other events
preinitialize - before child components are created initialize - after children are created, but before component undergoes layout creationComplete - after layout Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Angelo Anolin Sent: Tuesday, May 18, 2010 3:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] init, creationcomplete and other events 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
Re: [flexcoders] Re: Errors from generated MXML code from module
If you have a library/swc in the library-path that is based on code newer than 3.2, that would cause this problem. On 5/18/10 2:23 PM, jmbo...@bellsouth.net jim_bo...@premierinc.com wrote: Hummm, I don't know how that would be. This happens within Eclipse, and when I compile using Maven from the command line using version 3.2 of the compiler. I have verified that the compiler version is the same across all my projects. I get the same error if I add a Module to my project that does nothing. I don't get the error in any of my other similar projectsI hate software some days. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aha...@... wrote: Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmbo...@... jim_bo...@... wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
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_ano...@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/aharui
Re: [flexcoders] Script timeout binding selection in Tree
Erm... I just went to try it and... ouch, how do you compile that with SDK 4.X?
Re: [flexcoders] Script timeout binding selection in Tree
If I rewrite it to SDK 4 (it's basically the same tree anyway), the collection event listener is called... well, I cannot see anything extraordinary in what it does to be honest.
Re: [flexcoders] Script timeout binding selection in Tree
Thanks for testing. At this point, I consider this a bug, that the tree does not display its selection, when it is updated via binding of selectedItems, where the property bound to is updated in response to a RESET of the data provider collection. My workaround might interest some people. It is inspired by the pop-ups-with-presentation-manager pattern described by Theo Iconara Hultberg here: http://mate.asfusion.com/forums/topic.php?id=591 So, using BindingUtils.bindSetter, I have a function in the view which observes a status property in the presentation model. In the past, I have also used the Observe tag from Adobe consulting for this sort of thing. The observing function does the selection updating (though tree.selectedItems is still bound as well). The status property in the presentation model is updated when the collection is reset. In order to get this to work, I *still* had to wrap the view-based selection updating in a callLater(), which I hate, but such is life. On Tue, May 18, 2010 at 6:20 PM, Oleg Sivokon olegsivo...@gmail.com wrote: If I rewrite it to SDK 4 (it's basically the same tree anyway), the collection event listener is called... well, I cannot see anything extraordinary in what it does to be honest.
[flexcoders] Re: Errors from generated MXML code from module
Good point. With Flex 4 out and us still using Flex 3.2,we will need to be on the lookout for inconsistencies. I recompiled several swfs locally using 3.2 to ensure this wasn't the problem. I probably omitted important information. I was compiling a swf file that inherited from Application. Because we are really treating them as Modules, I changed the base class to Module from Application. When I change it back to Application, everything compiles. So, it apparently has to do with trying to compile stand-alone Modules using FB3 and Maven. I tried hard to get the org.sonatype.flexmojos to compile my code when I inherited from Module, but no luck. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: If you have a library/swc in the library-path that is based on code newer than 3.2, that would cause this problem. On 5/18/10 2:23 PM, jmbo...@... jim_bo...@... wrote: Hummm, I don't know how that would be. This happens within Eclipse, and when I compile using Maven from the command line using version 3.2 of the compiler. I have verified that the compiler version is the same across all my projects. I get the same error if I add a Module to my project that does nothing. I don't get the error in any of my other similar projectsI hate software some days. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmboone@ jim_boone@ wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: Adding nr of items to the label in a treeView
--- In flexcoders@yahoogroups.com, secrit.service secrit-serv...@... wrote: Hello, I have a treeView based on a XML-list. mx:XMLList id=xmlData folder label=Toplevel folder label=2ndLevel_folder1/ folder label=2ndLevel_folder2/ folder label=2ndLevel_folder3 file label=File1/ file label=File2/ file label=File3/ /folder folder label=2ndLevel_folder4 file label=File4/ file label=File5/ file label=File6/ /folder /folder I have a piece of code which shows me a treeview. In here I want to extend each label with the number of items which are under each node. I already can do that, but it only gives me the number of children directly under the node (in this example no matter if the item is a folder or a label). private function tvwNrOfFiles(item:XML):String { var label:String = it...@label; if (treeData.dataDescriptor.hasChildren(item)) { label += ( + treeData.dataDescriptor.getChildren(item).length + ); } return label; } What I want is to see how many items of the type files are below each node, no matter the number of subfolders which are in between. Based on the example I need following result : - TopLvevel (6) - 2nd Level_Folder1 (0) - 2nd Level_Folder2 (0) - 2nd Level_Folder3 (3) - 2nd Level_Folder4 (3) Hope this is a bit clear. Thanks in advance Try something like item..file.length(); HTH; Amy
Re: [flexcoders] Re: Errors from generated MXML code from module
Try a brand new project w/o any third-party libraries. It may not help to just recompile third-party libraries if those libraries reference Flex 4 versions of classes and interfaces. You have to make sure there aren’t any references to Flex 4 (or even 3.3 and later) in the libraries you are using. On 5/18/10 7:08 PM, jmbo...@bellsouth.net jim_bo...@premierinc.com wrote: Good point. With Flex 4 out and us still using Flex 3.2,we will need to be on the lookout for inconsistencies. I recompiled several swfs locally using 3.2 to ensure this wasn't the problem. I probably omitted important information. I was compiling a swf file that inherited from Application. Because we are really treating them as Modules, I changed the base class to Module from Application. When I change it back to Application, everything compiles. So, it apparently has to do with trying to compile stand-alone Modules using FB3 and Maven. I tried hard to get the org.sonatype.flexmojos to compile my code when I inherited from Module, but no luck. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aha...@... wrote: If you have a library/swc in the library-path that is based on code newer than 3.2, that would cause this problem. On 5/18/10 2:23 PM, jmbo...@... jim_bo...@... wrote: Hummm, I don't know how that would be. This happens within Eclipse, and when I compile using Maven from the command line using version 3.2 of the compiler. I have verified that the compiler version is the same across all my projects. I get the same error if I add a Module to my project that does nothing. I don't get the error in any of my other similar projectsI hate software some days. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmboone@ jim_boone@ wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui