RE: [flexcoders] Re: Crash while using MenuBar from a module.
Might be worth filing a bug with a small test case. I don't think that should've been required. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Rajkumar Sent: Tuesday, August 18, 2009 9:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Crash while using MenuBar from a module. Finally after a lot of trials I found the solution. In my MainApp project config file the following setting was required keep-all-type-selectorstrue/keep-all-type-selectors --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: I would use the -keep-generated-actionscript option and -link-report option to see why MenuBar's default styles are not being added to the StyleManager. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of Rajkumar Sent: Sunday, August 16, 2009 10:47 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Crash while using MenuBar from a module. Hello Alex, I had mentioned the top of stack trace in the first post , here is the complete stack trace. TypeError: Error #1007: Instantiation attempted on a non-constructor. at mx.controls::MenuBar/updateBackground()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\MenuBar.as:1029] at mx.controls::MenuBar/styleChanged()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\MenuBar.as:1263] at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addingChild()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:5244] at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingChild()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:3262] at mx.core::Container/addChildAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2207] at mx.core::Container/addChild()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2140] at com.atex.OV.Core.UI::OVUIMgr/addUIToApp()[G:\Projects_RJK\AtexUIF\Codebase\App\src\com\atex\OV\Core\UI\OVUIMgr.as:111] at com.atex.OV.Core.Application::OVAppBase/listenPlnLoadNotification()[G:\Projects_RJK\AtexUIF\Codebase\App\src\com\atex\OV\Core\Application\OVAppBase.as:251] at com.atex.OVF.Core.Notification::OVNotificationCenter/postNotification()[G:\Projects_RJK\AtexUIF\Codebase\Framework\com\atex\OVF\Core\Notification\OVNotificationCenter.as:179] at com.atex.OVF.Core.Notification::OVNotificationCenter/postNotificationName()[G:\Projects_RJK\AtexUIF\Codebase\Framework\com\atex\OVF\Core\Notification\OVNotificationCenter.as:197] at com.atex.OV.Core.Module::OVModuleMgr/sendPlnsLoadNotification()[G:\Projects_RJK\AtexUIF\Codebase\App\src\com\atex\OV\Core\Module\OVModuleMgr.as:349] at com.atex.OV.Core.Module::OVModuleMgr/modulesLoadHandler()[G:\Projects_RJK\AtexUIF\Codebase\App\src\com\atex\OV\Core\Module\OVModuleMgr.as:255] at com.atex.OV.Core.Module::OVModuleMgr/onModuleLoad()[G:\Projects_RJK\AtexUIF\Codebase\App\src\com\atex\OV\Core\Module\OVModuleMgr.as:182] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ModuleInfoProxy/moduleEventHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1097] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ModuleInfo/readyHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:752] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::FlexModuleFactory/update()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:327] at mx.core::FlexModuleFactory/timerHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:556] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() Thanks, Rajkumar --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: Post the stack trace. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of Rajkumar Sent: Thursday, August 13, 2009 11:13 PM To:
RE: [flexcoders] Singletons and Modules - Application domain problem
When you optimize a module, classes are removed from the module and must be found in the parent applicationdomain. For me, if I then load the module into an app that doesn't supply the missing classes, I see verify errors, but some folks seem to see nothing, just silent failure. So first, you have to make sure required classes exist in the module or in its parent applicationdomain. Then, once you get it to load, further requests to load the same URL will just be ignored and the same factory is returned. That means all instances created by the factory will be from the same appdom and share singletons. To not share, you can try adding fake params to the url. That should generate a separate child appdom with its own singletons as long as those classes aren't inherited from the parent appdom. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Everson Alves Sent: Tuesday, August 18, 2009 10:01 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Singletons and Modules - Application domain problem I did that too, in fact I explained it in the first mail, when I tried: moduleInfo.load(new ApplicationDomain(ApplicationDomain.currentDomain)) it dispatches a ModuleEvent.ERROR saying that file isn't a loadable module or something like that. Also i tried var somObj:SomeInterface = module.factory.create as SomeInterface var somObj:Object = module.factory.create; var somObj:*= module.factory.create; when loading using moduleInfo.load(); On Wed, Aug 19, 2009 at 1:19 AM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: If you use new ApplicationDomain() then module.factory.create() will return an object of an unknown type because you've created a whole new applicationDomain with different classes so the type of what you create is not going to match. Your code probably does this: var somObj:SomeInterface = module.factory.create as SomeInterface So the as returns null. With modules you must use a child applicationdomain i.e. new ApplicationDomain(applicationDomain.currentDomain) so that the interface is shared. The next trick is to get the ModuleManager to attempt a second load in a separate child applicationdomain so fake url params might work. As long as the singletons are not in the main app, each child appdomain should have its own singleton. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Everson Alves Sent: Tuesday, August 18, 2009 5:28 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Singletons and Modules - Application domain problem The problem is that when I try to load it into a different applicationDomain other than ApplicationDomain.currentDomain , even the first instance won't load. ModuleEvent.READY is dispatched but moduleEvent.module.factory.create() gives me null. On Tue, Aug 18, 2009 at 8:45 PM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: A module is a factory of potentially many instances, so multiple requests to load the same url are ignored and the same factory is returned to create the instance. You might try adding dummy url variables to see if you can fool ModuleManager into loading the module SWF again. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Everson Alves Sent: Tuesday, August 18, 2009 4:38 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Singletons and Modules - Application domain problem It's a good post but doesn't solve my problem without a lot of changes in the whole application. What i was really wanting from here is to know why I can't load the modules into different application domains. I'll use a ModelLocator factory per conversation instead of Singleton, but that requires changing in a lot of places, mainly propageting the conversationId all components and classes that need to access the modelLocator. On Tue, Aug 18, 2009 at 6:35 PM, Everson Alves jho...@eversonalves.com.brmailto:jho...@eversonalves.com.br wrote: I'll have a look at it say the outcome here. Thanks. On Tue, Aug 18, 2009 at 6:03 PM, Rick Winscot rick.wins...@zyche.commailto:rick.wins...@zyche.com wrote: Take a look at a good write-up by Steve Brownlee... http://www.fusioncube.net/index.php/cairngorm-sharing-a-common-modellocator-with-modules With the added security restrictions... Your singleton implementation may need to be
[flexcoders] Re: Flex UI and NT Login
Whats your server technology? On Wed, Aug 19, 2009 at 6:58 AM, ballofmagic ballofma...@yahoo.com wrote: Thank you! I tried to download the project.zip to work with the code and I received a decompression failure. Any other recommendations? Would it be difficult to use the wizard login then set up a remote object .cfc to authenticate against the domain + a database to set up user roles? -e
Re: [flexcoders] Flex 3.3 SDK and DataVisualization
On Tuesday 18 Aug 2009, Annette Spooner wrote: Is it possible to use the Flex 3.3 SDK on its own, without Flex Builder 3, and use the Data Visualization components such as AdvancedDataGrid? Absolutely ! $FLEX_HOME\frameworks\libs\datavisualization.swc. However, when I try to compile some code using jrun4 I get the following error message: Could not Using what ? Are you using the web tier compiler or something ? If so, get it working with mxmlc directly first. -- Helping to carefully aggregate revolutionary seamless slick end-to-end relationships as part of the IT team of the year, '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.
Re: [flexcoders] Re: Advanced Data Grid + ILOG
So this is fixed in the DV classes that ship with Builder 4 ? Is that available as a stand alone download, just like the older ones are ? -- Helping to greatly pursue fine-grained e-business as part of the IT team of the year, '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] Hi, I have some questions about the olapgatagrid.
Hi, I have some questions about the olapgatagrid. -IS there any way to add two values of Olap data by looping through data and display the total value as final total on the grid . This is kind of functionality we can achieve on XML Data is this possible for OLAP Data also . - Can we use result of OLAP Query for the Charting Component as the data provider RItesh
[flexcoders] Regarding Customizing column chart
Hi All, I have requirement, which needs customizing column chart. My Requirement is, For a given column chart, 1) change the column color according to data( i could do this, used degrafa.swc to style the column ) 2) display a image on top of the column for some condition ( say have to display a trophy on top of the column, if the data satisfies some condition.) I have solved first condition, if req. i can post my code... Anybody here who can solve my problem. Thanks in advance. Regards, Preetham Hegde
[flexcoders] Re: Instant messaging example
Ok cool thank you. How do I go about defining one? --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: Well, from that file, there is no channel defined as weborb-rtmp. --- In flexcoders@yahoogroups.com, Andrew roly445@ wrote: Hi valdhor, thanks for any help you can give me. From the custom site: 'services-config.xml' ?xml version=1.0 encoding=UTF-8? services-config services service-include file-path=remoting-config.xml / service-include file-path=data-management-config.xml / /services channels channel-definition id=my-amf class=mx.messaging.channels.AMFChannel endpoint uri=weborb.aspx class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition channel-definition id=amf-sessionactivation class=mx.messaging.channels.AMFChannel endpoint uri=weborb.aspx?activate=session class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition channel-definition id=amf-singletonactivation class=mx.messaging.channels.AMFChannel endpoint uri=weborb.aspx?activate=application class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition channel-definition id=my-secure-amf class=mx.messaging.channels.SecureAMFChannel endpoint uri=weborb.aspx class=flex.messaging.endpoints.SecureAMFEndpoint/ /channel-definition channel-definition id=air-http class=mx.messaging.channels.AMFChannel endpoint uri=http://localhost:80/weborb30/weborb.aspx; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition /channels /services-config 'remoting-config.xml' ?xml version=1.0 encoding=UTF-8? service id=remoting-service class=Weborb.V3Types.Core.RemotingHandler messageTypes=flex.messaging.messages.RemotingMessage adapters / default-channels channel ref=my-amf/ channel ref=my-secure-amf/ /default-channels destination id=computerinfo properties sourceGettingStarted.Examples.ComputerInfoService/source /properties /destination destination id=autoupdater properties sourceWeborb.Service.AutoUpdater/source /properties /destination destination id=ApplicationManager properties sourceFlexStore.ApplicationManager.ProductFetcher/source /properties /destination destination id=WeborbSecurity properties sourceWeborb.Management.SecurityService/source /properties /destination destination id=WeborbManagement properties sourceWeborb.Management.ManagementService/source /properties /destination destination id=WeborbConfiguration properties sourceWeborb.Management.ConfigurationService/source /properties /destination destination id=SecureTest properties sourceWeborb.Examples.InvocationTests.SecureTest/source /properties security security-constraint auth-methodCustom/auth-method roles roleadministrator/role /roles /security-constraint /security /destination destination id=AccountBalanceDestination properties sourceWeborb.Examples.AccountBalance/source /properties security security-constraint auth-methodCustom/auth-method roles roleexamplesuser/role /roles /security-constraint /security /destination destination id=WDMFCodeGen properties sourceWeborb.Management.DataManagement.Codegen.AppHandler/source /properties /destination destination id=GenericDestination properties source*/source /properties /destination destination id=BusinessIntelligenceDestination properties sourceWeborb.Management.RBIManagementService/source /properties /destination destination channels=amf-sessionactivation id=SessionGenericDestination
[flexcoders] Click Datagrid row - Custom class popup window showing database values?
I appreciate everyone's assistance thus far in answering my questions. We've got a lot of experts in this group! Is there a customized popup window class that databinds with a datagrid row so when a user clicks the row, the pop up window displays not only what's visible in the datagrid (limited to 2 or 3 columns) but most, if not all, the database row data? Using a SQL database with ColdFusion.
[flexcoders] Re: Connecting to remote JMS: name TopicConnectionFactory not bound
Okay, I have found the solution to this problem. When I installed LCDS I originally selected the option to install LCDS with tomcat included. That seems to have caused the problem. Now I have selected the install web app option and I've installed it under tomcat myself. The issue is now solved. Here's my configuration: In tomcat-5.5.28\conf\context.xml I have: Context !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- !-- Manager pathname= / -- Resource name=jms/flex/TopicConnectionFactory auth=Container type=org.apache.activemq.ActiveMQConnectionFactory description=JMS Connection Factory factory=org.apache.activemq.jndi.JNDIReferenceFactory brokerURL=tcp://localhost:61616 brokerName=LocalActiveMQBroker/ Resource name=jmz/topic/flex/simpletopic auth=Container type=org.apache.activemq.command.ActiveMQTopic description=my topic factory=org.apache.activemq.jndi.JNDIReferenceFactory physicalName=APP.STOCK.MARKETDATA/ /Context In webapps\lcds\WEB-INF\flex\messaging-config.xml I have: destination id=chat-topic-jms properties jms destination-typeTopic/destination-type message-typejavax.jms.TextMessage/message-type connection-factoryjava:comp/env/jms/flex/TopicConnectionFactory /connection-factory destination-jndi-namejava:comp/env/jmz/topic/flex/simpletopic /destination-jndi-name destination-nameAPP.STOCK.MARKETDATA /destination-name delivery-modeNON_PERSISTENT/delivery-mode message-priorityDEFAULT_PRIORITY/message-priority acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode transacted-sessionsfalse/transacted-sessions initial-context-environment property nameContext.PROVIDER_URL/name valuevm://localhost/value /property property nameContext.INITIAL_CONTEXT_FACTORY/name !-- valueorg.apache.activemq.jndi.ActiveMQInitialContextFactory/value -- valueorg.apache.naming.java.javaURLContextFactory/value /property property nameContext.URL_PKG_PREFIXES/name valueorg.apache.naming/value /property /initial-context-environment /jms /properties channels channel ref=my-rtmp/ !-- channel ref=samples-amf-polling/ -- /channels adapter ref=jms/ /destination Hope this is of any help to anyone. Best regards, Bas --- In flexcoders@yahoogroups.com, vermeulen_bas vermeulen_...@... wrote: Dear all, I'm trying to send messages from and to a remote JMS (activemq) (it is on localhost now for testing purposes). However, I keep getting error messages no matter how I try. The message is: INFO: [LCDS] [INFO] JMS consumer for JMS destination 'java:comp/env/jmz/topic/flex/simpletopic ' is being removed from the JMS adapter due to the following error: Name TopicConnectionFactory is not bound in this Context My tomcat/conf/server.xml looks as follows: Context WatchedResourceWEB-INF/web.xml/WatchedResource Manager pathname=/ Resource name=jms/flex/TopicConnectionFactory auth=Container type=org.apache.activemq.ActiveMQConnectionFactory description=JMS Connection Factory factory=org.apache.activemq.jndi.JNDIReferenceFactory brokerURL=tcp://localhost:61616 brokerName=LocalActiveMQBroker/ Resource name=jmz/topic/flex/simpletopic auth=Container type=org.apache.activemq.command.ActiveMQTopic description=my topic factory=org.apache.activemq.jndi.JNDIReferenceFactory physicalName=APP.STOCK.MARKETDATA/ /Context My messaging config is: ?xml version=1.0 encoding=UTF-8? service id=message-service class=flex.messaging.services.MessageService adapters adapter-definition id=actionscript class=flex.messaging.services.messaging.adapters.ActionScriptAdapter default=true/ adapter-definition id=jms class=flex.messaging.services.messaging.adapters.JMSAdapter/ /adapters !-- another destination cut -- destination id=chat-topic-jms properties jms destination-typeTopic/destination-type message-typejavax.jms.TextMessage/message-type connection-factoryjava:comp/env/jms/flex/TopicConnectionFactory /connection-factory destination-jndi-namejava:comp/env/jmz/topic/flex/simpletopic /destination-jndi-name destination-nameAPP.STOCK.MARKETDATA /destination-name delivery-modeNON_PERSISTENT/delivery-mode message-priorityDEFAULT_PRIORITY/message-priority acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode
[flexcoders] Capturing URL Requests in AIR application (HTML/HTMLLoader/HTMLHost)
Hi, This post is quite lengthy, but I really need to explain in detail what it is I'm trying to achieve here. I am developing an AIR application that has an mx.controls.HTML component as the only child; in essence the application is a custom web browser in AIR. I have created a custom HTMLHost component that extends the flash.html.HTMLHost class per the Adobe documentation, so that my application can intercept particular JavaScript calls; i.e. (AS)createWindow() - (JS)window.open(). The main HTML component has its htmlHost property set to an instance of this CustomHTMLHost class, and every new window that is created via the createWindow() method also has its htmlHost set to an instance of the CustomHTMLHost class. In my CustomHTMLHost class, I also override the updateLocation(locationURL:String) method, enabling me to inspect the new URL that is being set on either the main HTML component, or any popup windows that are created. The web application I am loading into the main HTML component allows users to export reports in a number of formats (HTML, PDF, XLS, CSV, TXT) which can either be opened or downloaded when using a conventional browser (IE/FF/Safari). When the user exports a report, a popup window is displayed (which works fine with my application because of the overridden createWindow() method in the CutsomHTMLHost class). After the user clicks the final Export button on a PDF/HTML/TXT export, everything works fine and the report results are displayed as the AIR runtime can handle these files. However when the user exports to XLS/CSV nothing happens, which is expected because the AIR runtime does not support those file types. I intend to create a file download manager to handle this so that the user can just save the files to their local file system, and this is where I'm hitting a brick wall. I am able to capture the URL that is being requested to get these latter export types from the overridden updateLocation(locationURL:String) method in the CustomHTMLHost class, but the URL alone is not enough information for the AIR application to send to the web application that provides the report exporting functionality. I need to get access to the rest of the header information (such as POST variables, and also the cookie information) that is sent in the HTTP request when the final Export button is clicked by the user to ensure I am getting a valid response from the web application. So, to finally get to my main question... is there any way to intercept the URLRequests that are created and invoked from a HTML/HTMLHost component? What I really want to be able to do is to inspect the HTTP responses, so that I can determine content of the HTTP response i.e. Content-Disposition: filename*=Report.xls; Content-Type: application/vnd.ms-excel; charset=UnicodeLittle With this information I can let my AIR application display a save file dialog or something along those lines. Sorry for the long post, and any help would be appreciated as this is a critical part of my AIR application, and I REALLY need to figure this out. I understand that the approach I am proposing may not even be possible, as I have been doing a number of things to try and solve it. One of which was extending the HTMLLoader class and overriding the load(urlRequestToLoad:URLRequest) method to I could intercept all URLRequests, but I couldn't even get the HTML component that used this class as its htmlLoader property to load any HTML content. Thanks in advance, Barry
[flexcoders] Keyboard navigation in Advanced Datagrid
Hi, I am trying to implement an Excel like keyboard navigation in an ADG. Arrow keys move around the cells, and only on pressing enter or starting typing the cell moves to editing mode. Highlighting the currently selected cell would also be nice. Any ideas on this? Thanks! Martin -- Martin Moschitz mar...@moschitz.at
[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo
I've been looking at this problem for just about a day straight now, and just can't see why I'm getting an out of bounds error on send. I've tried updated to the latest Gumbo nightly (9377), which no luck. My code to launch the WebService call looks like this: _calibrationData = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ); stream.readBytes(_calibrationData, 0, stream.bytesAvailable); var token:AsyncToken = this._service.mLoadCalibration(file.name, _calibrationData); token.addResponder(this._mLoadCalibrationResponder); Which seems to be a-okay. Or, am I missing something obvious? I'm pretty sure I've hit up against a SDK bug. I've opened a bug report with Adobe, to track this issue at http://bugs.adobe.com/jira/browse/SDK-22751 Anyone else transferring large (1MB) base64 encoded data using the Flex webservice client? Any feedback highly welcome! Thanks, Mike
Re: [flexcoders] Capturing URL Requests in AIR application (HTML/HTMLLoader/HTMLHost)
Is it not the responseHeaders that you need? on the following object http://livedocs.adobe.com/flex/3/langref/flash/events/HTTPStatusEvent.html Regards, Wesley Acheson On Wed, Aug 19, 2009 at 12:54 PM, Barry Evans bazza...@hotmail.com wrote: Hi, This post is quite lengthy, but I really need to explain in detail what it is I'm trying to achieve here. I am developing an AIR application that has an mx.controls.HTML component as the only child; in essence the application is a custom web browser in AIR. I have created a custom HTMLHost component that extends the flash.html.HTMLHost class per the Adobe documentation, so that my application can intercept particular JavaScript calls; i.e. (AS)createWindow() - (JS)window.open(). The main HTML component has its htmlHost property set to an instance of this CustomHTMLHost class, and every new window that is created via the createWindow() method also has its htmlHost set to an instance of the CustomHTMLHost class. In my CustomHTMLHost class, I also override the updateLocation(locationURL:String) method, enabling me to inspect the new URL that is being set on either the main HTML component, or any popup windows that are created. The web application I am loading into the main HTML component allows users to export reports in a number of formats (HTML, PDF, XLS, CSV, TXT) which can either be opened or downloaded when using a conventional browser (IE/FF/Safari). When the user exports a report, a popup window is displayed (which works fine with my application because of the overridden createWindow() method in the CutsomHTMLHost class). After the user clicks the final Export button on a PDF/HTML/TXT export, everything works fine and the report results are displayed as the AIR runtime can handle these files. However when the user exports to XLS/CSV nothing happens, which is expected because the AIR runtime does not support those file types. I intend to create a file download manager to handle this so that the user can just save the files to their local file system, and this is where I'm hitting a brick wall. I am able to capture the URL that is being requested to get these latter export types from the overridden updateLocation(locationURL:String) method in the CustomHTMLHost class, but the URL alone is not enough information for the AIR application to send to the web application that provides the report exporting functionality. I need to get access to the rest of the header information (such as POST variables, and also the cookie information) that is sent in the HTTP request when the final Export button is clicked by the user to ensure I am getting a valid response from the web application. So, to finally get to my main question... is there any way to intercept the URLRequests that are created and invoked from a HTML/HTMLHost component? What I really want to be able to do is to inspect the HTTP responses, so that I can determine content of the HTTP response i.e. Content-Disposition: filename*=Report.xls; Content-Type: application/vnd.ms-excel; charset=UnicodeLittle With this information I can let my AIR application display a save file dialog or something along those lines. Sorry for the long post, and any help would be appreciated as this is a critical part of my AIR application, and I REALLY need to figure this out. I understand that the approach I am proposing may not even be possible, as I have been doing a number of things to try and solve it. One of which was extending the HTMLLoader class and overriding the load(urlRequestToLoad:URLRequest) method to I could intercept all URLRequests, but I couldn't even get the HTML component that used this class as its htmlLoader property to load any HTML content. Thanks in advance, Barry -- 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
[flexcoders] Re: Module and Application Communication.
What are MyCustomMdoule (Spelling?) and moduleContent ? The following works for me: Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ import mx.events.ModuleEvent; import mx.modules.IModuleInfo; import mx.modules.ModuleManager; import mx.controls.Alert; private var modInfo:IModuleInfo; private var myModule:myMod; private function onCreationComplete():void { modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); } private function onModuleReady(event:ModuleEvent):void { myModule = modInfo.factory.create() as myMod; addChild(myModule); myModule.addEventListener('customEventDispatchedByModule', onEvent); } private function onEvent(event:Event):void { Alert.show(event.type, Event Received!); } ]] /mx:Script /mx:Application MyMod.mxml: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ private function doDispatchEvent(event:MouseEvent):void { dispatchEvent(new Event('customEventDispatchedByModule',true)); } ]] /mx:Script mx:Button label=Dispatch Event click=doDispatchEvent(event)/ /mx:Module --- In flexcoders@yahoogroups.com, cuttenv cutt...@... wrote: I have a rather straight forward question. I am creating a module like this: private var modInfo:IModuleInfo private var myModule:MyCustomMdoule; //In creation complete of application modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); //In tho onModuleReady command myModule = modInfo.factory.create() as MyCustomModule; moduleContent.addChild( myModule ); myModule.addEventListener( 'customEventDispatchedByModule', onEvent ); //Inside my module there is dispatchEvent( new Event('customEventDispatchedByModule',true) ); Even though the code for the dispatch event is running the handler never runs... am I doing something wrong?? or do module not dispatch events??
[flexcoders] Tree Control Populating from Database via XMLListCollection
Hi FlexCoders, Am currently working on a Tree control, and being my first time to delve into this, I need your inputs and advice. My tree control is retrieving data from a .NET web service. My .NET webservice returns a string which is parsed from a dataset via the command DataSet.GetXML method. In my flex application, I am converting the string value returned by the webservice into an XML: private var _xmlMyData:XML; private function myResultHandler(event:ResultEvent) :void { _xmlMyData = XML(event.result); // This script to view the XML data in Text Area var strData:String = String(event.result); taData.text = strData; } Which I am then passing to my xmlListCollection control mx:XMLListCollection id=xmllc_myData source={_xmlMyData.Table} / mx:TextArea id=taData width=300 height=100 / Then binding to my tree control: mx:Tree id=treeOffshore dataProvider={xmllc_myData} labelField=DESCN showRoot=false /mx:Tree When viewing the data in the text area control, I have the following: NewDataSet Table CODEA1/CODE DESCArea One/DESC /Table Table CODEB2/CODE DESCBase Two/DESC /Table Table CODEC4/CODE DESCClass Four/DESC /Table Table CODED8/CODE DESCDemo Eight/DESC /Table /NewDataSet This is how the treeview renders: Area One A1 Area One Base Two B2 Base Two Class Four C4 Class Four Demo Eight D8 Demo Eight What I want is to be able to define the Description only at the first level only: Area One Base Two Class Four Demo Eight The next thing that I need to accomplish is that the second level of the treeview should actually be populated based on the CODE from the first level. For example: Area One Sub Item Area One Sub Item Area Two Base Two Sub Item Base Two Sub Item Base Three Sub Item Base Four Class Four Sub Item Class Four Demo Eight Sub Item Demo Eight Sub Item Demo Nine Sub Item Demo Ten Sub Item Demo Eleven The sub-items would be retrieved from the database based on the parent code (i.e Demo Eight = D8, Class Four = C4... etc.) I am quite new in this tree control thing (as well as flex) and have limited grasp of the concepts to be able to accomplish this. I am thinking either of modifying the XML data which I originally retrieve and probably insert the sub items per each node, although I am in a bind of how to accomplish the same. On the other hand, to give some of you further details, the treeview data would actually be coming from three tables where the table 1 is the base table, and the table 2 contains the children of table 1 and table 3 contains children data from table 3. I think I can manage to make one SQL statement to be able to retrieve the data for the whole treeview but I think that would be very complicated especially in the part where parsing the XML goes. I would sincerely appreciate your inputs on this. I am foraying into the world of Flex and this is quite a make or break scenario towards embracing this technology in our organization. Thanks and hoping to hear from all of you soon. Regards, Angelo
RE: [flexcoders] Click Datagrid row - Custom class popup window showing database values?
I do this right now and I use the popupmanager. You'll just call another mxml component with the extended information then call the popupmanager using the click() event for the datagrid. http://livedocs.adobe.com/flex/3/langref/mx/managers/PopUpManager.html http://blog.flexexamples.com/category/popupmanager/ You have two choices for the CF data, you can either pass it to the window or make the detail call within the detail component.mxml. I personally try to keep the data calls within the components that are displaying the data. sj From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ballofmagic Sent: Wednesday, August 19, 2009 12:04 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Click Datagrid row - Custom class popup window showing database values? I appreciate everyone's assistance thus far in answering my questions. We've got a lot of experts in this group! Is there a customized popup window class that databinds with a datagrid row so when a user clicks the row, the pop up window displays not only what's visible in the datagrid (limited to 2 or 3 columns) but most, if not all, the database row data? Using a SQL database with ColdFusion. -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
Re: [flexcoders] Flex 3.3 SDK and DataVisualization
Most likely the datavisualization.swc is not being included during the compile of the MXML. I ran across the same problem. What I did was copied the datavisualization.swc to a folder where the MXMLC compiler is located and when I run the compiler, I include the folder as library in the command line. I can't recall the whole MXMLC command line but I can remember it contains lib+=Folder Name Where folder name contains the datavisualization.SWC file. HTH. From: Tom Chiverton tom.chiver...@halliwells.com To: flexcoders@yahoogroups.com Sent: Wednesday, 19 August, 2009 17:35:31 Subject: Re: [flexcoders] Flex 3.3 SDK and DataVisualization On Tuesday 18 Aug 2009, Annette Spooner wrote: Is it possible to use the Flex 3.3 SDK on its own, without Flex Builder 3, and use the Data Visualization components such as AdvancedDataGrid? Absolutely ! $FLEX_HOME\framewor ks\libs\datavisu alization. swc. However, when I try to compile some code using jrun4 I get the following error message: Could not Using what ? Are you using the web tier compiler or something ? If so, get it working with mxmlc directly first. -- Helping to carefully aggregate revolutionary seamless slick end-to-end relationships as part of the IT team of the year, '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: Instant messaging example
It looks like you are referencing services-config.xml instead of weborb-services-config.xml in your compilere settings. weborb-rtmp should be defined in that file. --- In flexcoders@yahoogroups.com, Andrew roly...@... wrote: Ok cool thank you. How do I go about defining one? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Well, from that file, there is no channel defined as weborb-rtmp.
[flexcoders] Re: degrafa capacity indicator resizing
From looking at the source code for that application, the width of the indicator bar is bound to the value of the capacityWidth slider. Try adding the following button to the controls HBox to see what happens: mx:Button label=Change Width click={capacityWidth.value += 50}/ --- In flexcoders@yahoogroups.com, kaushal.shah05 kshah0...@... wrote: Below is the link to the application: http://degrafa.org/source/CapacityIndicator/CapacityIndicator.html --- In flexcoders@yahoogroups.com, kaushal.shah05 kshah0097@ wrote: does anyone know how to dynamically change the size of the indicator bar? binding variables to the width and height did not work. I also tried changing the surface component but no luck below is the isolated capacity indicator bar code. !-- Graphics and Paint for the inner bars and background -- GeometryComposition graphicsTarget={[capacitySurface]} propertyChange=initChange(event); fills SolidFill id=colorOne color={cpOne.selectedColor}/ SolidFill id=colorTwo color={cpTwo.selectedColor}/ SolidFill id=colorThree color={cpThree.selectedColor}/ SolidFill id=colorFour color={cpFour.selectedColor}/ ComplexFill id=complex SolidFill color={cpFour.selectedColor}/ BlendFill blendMode=multiply BitmapFill id=crosshatch source=@Embed(apos;assets/65003.pngapos;)/ /BlendFill /ComplexFill LinearGradientFill id=highlight angle=90 GradientStop color=#FFF alpha=.3/ GradientStop color=#FFF alpha=.05/ /LinearGradientFill LinearGradientFill id=shadow angle=90 blendMode=multiply GradientStop color=#000 alpha=.01/ GradientStop color=#000 alpha=.5/ /LinearGradientFill LinearGradientFill id=inset angle=90 GradientStop color=#CCC alpha=.2 ratio=0 ratioUnit=pixels/ GradientStop color=#FFF alpha=.3 ratio=16 ratioUnit=pixels/ /LinearGradientFill /fills strokes SolidStroke id=whiteStroke color=#FFF weight=1 alpha=.15/ SolidStroke id=darkStroke color=#000 weight=1 alpha=.2/ /strokes RegularRectangle id=insetRect width={capacityWidth.value} height={capacitySurface.height} fill={inset}/ RegularRectangle id=fourthRect width={capacitySlider.values[3]} height={capacitySurface.height} fill={complex}/ RegularRectangle id=thirdRect width={capacitySlider.values[2]} height={capacitySurface.height} fill={colorThree}/ RegularRectangle id=secondRect width={capacitySlider.values[1]} height={capacitySurface.height} fill={colorTwo}/ RegularRectangle id=firstRect width={capacitySlider.values[0]} height={capacitySurface.height} fill={colorOne}/ RegularRectangle id=shadowRect width={capacityWidth.value} height={capacitySurface.height} fill={shadow}/ VerticalLineRepeater x=20 y=0 y1={capacitySurface.height} moveOffsetX=20 count={capacityWidth.value/20} stroke={darkStroke}/ VerticalLineRepeater x=21 y=0 y1={capacitySurface.height}
[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo
I wonder if you have hit a windows limitation. This article may give you some ideas... http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcap...@... wrote: I've been looking at this problem for just about a day straight now, and just can't see why I'm getting an out of bounds error on send. I've tried updated to the latest Gumbo nightly (9377), which no luck. My code to launch the WebService call looks like this: _calibrationData = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ); stream.readBytes(_calibrationData, 0, stream.bytesAvailable); var token:AsyncToken = this._service.mLoadCalibration(file.name, _calibrationData); token.addResponder(this._mLoadCalibrationResponder); Which seems to be a-okay. Or, am I missing something obvious? I'm pretty sure I've hit up against a SDK bug. I've opened a bug report with Adobe, to track this issue at http://bugs.adobe.com/jira/browse/SDK-22751 Anyone else transferring large (1MB) base64 encoded data using the Flex webservice client? Any feedback highly welcome! Thanks, Mike
[flexcoders] Flex Datagrid -Extract non formatted (raw) value onItemEditBegin
Hi there, I have an Advanced Data Grid (Flex) and I am showing numeric values. I am formatting each value by using a labelFunction, which returns a currency formatted value (using a currency formatter). Let's say the dataprovider holds the value 1000 for the first element. The first cell of the datagrid will then show $1,000 Now, if I click into a cell, and start the editing process, I only want to see 1000, not $1,000. I can not set the itemEditorInstance.text property to the value in the datagrid onItemEditBegin, since the itemEditorInstance is only created afterwards. How would I accomplish this then? Thx, Martin -- Martin Moschitz mar...@moschitz.at
[flexcoders] Re: Capturing URL Requests in AIR application (HTML/HTMLLoader/HTMLHost)
Yes your kind of right, what i think i really need to do is extend the HTMLLoader class so that i can override the load(urlRequestToLoad:URLRequest) method. I have tried this and get similar results to the user from this post (http://tech.groups.yahoo.com/group/apollocoders/message/2900), the new extended HTMLLoader is not visible on the stage. Is it even possible to extend the HTMLLoader class? --- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Is it not the responseHeaders that you need? on the following object http://livedocs.adobe.com/flex/3/langref/flash/events/HTTPStatusEvent.html Regards, Wesley Acheson On Wed, Aug 19, 2009 at 12:54 PM, Barry Evans bazza...@... wrote: Hi, This post is quite lengthy, but I really need to explain in detail what it is I'm trying to achieve here. I am developing an AIR application that has an mx.controls.HTML component as the only child; in essence the application is a custom web browser in AIR. I have created a custom HTMLHost component that extends the flash.html.HTMLHost class per the Adobe documentation, so that my application can intercept particular JavaScript calls; i.e. (AS)createWindow() - (JS)window.open(). The main HTML component has its htmlHost property set to an instance of this CustomHTMLHost class, and every new window that is created via the createWindow() method also has its htmlHost set to an instance of the CustomHTMLHost class. In my CustomHTMLHost class, I also override the updateLocation(locationURL:String) method, enabling me to inspect the new URL that is being set on either the main HTML component, or any popup windows that are created. The web application I am loading into the main HTML component allows users to export reports in a number of formats (HTML, PDF, XLS, CSV, TXT) which can either be opened or downloaded when using a conventional browser (IE/FF/Safari). When the user exports a report, a popup window is displayed (which works fine with my application because of the overridden createWindow() method in the CutsomHTMLHost class). After the user clicks the final Export button on a PDF/HTML/TXT export, everything works fine and the report results are displayed as the AIR runtime can handle these files. However when the user exports to XLS/CSV nothing happens, which is expected because the AIR runtime does not support those file types. I intend to create a file download manager to handle this so that the user can just save the files to their local file system, and this is where I'm hitting a brick wall. I am able to capture the URL that is being requested to get these latter export types from the overridden updateLocation(locationURL:String) method in the CustomHTMLHost class, but the URL alone is not enough information for the AIR application to send to the web application that provides the report exporting functionality. I need to get access to the rest of the header information (such as POST variables, and also the cookie information) that is sent in the HTTP request when the final Export button is clicked by the user to ensure I am getting a valid response from the web application. So, to finally get to my main question... is there any way to intercept the URLRequests that are created and invoked from a HTML/HTMLHost component? What I really want to be able to do is to inspect the HTTP responses, so that I can determine content of the HTTP response i.e. Content-Disposition: filename*=Report.xls; Content-Type: application/vnd.ms-excel; charset=UnicodeLittle With this information I can let my AIR application display a save file dialog or something along those lines. Sorry for the long post, and any help would be appreciated as this is a critical part of my AIR application, and I REALLY need to figure this out. I understand that the approach I am proposing may not even be possible, as I have been doing a number of things to try and solve it. One of which was extending the HTMLLoader class and overriding the load(urlRequestToLoad:URLRequest) method to I could intercept all URLRequests, but I couldn't even get the HTML component that used this class as its htmlLoader property to load any HTML content. Thanks in advance, Barry -- 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
[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo
Interesting point. I tried truncating my byte array down to 60KB, I still got the out of bounds fault. However, if i drop the byte array down to 10KB, no out of bounds error. Somewhere between the two (60KB and 10KB) is the breaking point. I've read through the article you referenced (thanks for the link!), but still don't see what quota parameter Flex would be blowing. Are we talking MaxReceivedMessageSize? The other interesting thing is that I'm seeing much greater volume than 60KB being transmitted to the SOAP server when inspecting incoming data server side using Wireshark. If this is a quota violation being triggered, how would it enforce on the packet data? Would some of it be dropped? Maybe everything following the violation? Thanks, Mike --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: I wonder if you have hit a windows limitation. This article may give you some ideas... http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote: I've been looking at this problem for just about a day straight now, and just can't see why I'm getting an out of bounds error on send. I've tried updated to the latest Gumbo nightly (9377), which no luck. My code to launch the WebService call looks like this: _calibrationData = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ); stream.readBytes(_calibrationData, 0, stream.bytesAvailable); var token:AsyncToken = this._service.mLoadCalibration(file.name, _calibrationData); token.addResponder(this._mLoadCalibrationResponder); Which seems to be a-okay. Or, am I missing something obvious? I'm pretty sure I've hit up against a SDK bug. I've opened a bug report with Adobe, to track this issue at http://bugs.adobe.com/jira/browse/SDK-22751 Anyone else transferring large (1MB) base64 encoded data using the Flex webservice client? Any feedback highly welcome! Thanks, Mike
[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo
Ah, MaxReceivedMessageSize is not a Windows limit,per se, but a Windows WCF limit that is programatically controlled by the SOAP server. That shouldn't be a factor with the out of bounds fault? --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcap...@... wrote: Interesting point. I tried truncating my byte array down to 60KB, I still got the out of bounds fault. However, if i drop the byte array down to 10KB, no out of bounds error. Somewhere between the two (60KB and 10KB) is the breaking point. I've read through the article you referenced (thanks for the link!), but still don't see what quota parameter Flex would be blowing. Are we talking MaxReceivedMessageSize? The other interesting thing is that I'm seeing much greater volume than 60KB being transmitted to the SOAP server when inspecting incoming data server side using Wireshark. If this is a quota violation being triggered, how would it enforce on the packet data? Would some of it be dropped? Maybe everything following the violation? Thanks, Mike --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I wonder if you have hit a windows limitation. This article may give you some ideas... http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote: I've been looking at this problem for just about a day straight now, and just can't see why I'm getting an out of bounds error on send. I've tried updated to the latest Gumbo nightly (9377), which no luck. My code to launch the WebService call looks like this: _calibrationData = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ); stream.readBytes(_calibrationData, 0, stream.bytesAvailable); var token:AsyncToken = this._service.mLoadCalibration(file.name, _calibrationData); token.addResponder(this._mLoadCalibrationResponder); Which seems to be a-okay. Or, am I missing something obvious? I'm pretty sure I've hit up against a SDK bug. I've opened a bug report with Adobe, to track this issue at http://bugs.adobe.com/jira/browse/SDK-22751 Anyone else transferring large (1MB) base64 encoded data using the Flex webservice client? Any feedback highly welcome! Thanks, Mike
Re: [flexcoders] Tree Control Populating from Database via XMLListCollection
Anyone?? Thanks. From: Angelo Anolin angelo_ano...@yahoo.com To: flexcoders@yahoogroups.com Sent: Wednesday, 19 August, 2009 20:53:49 Subject: [flexcoders] Tree Control Populating from Database via XMLListCollection Hi FlexCoders, Am currently working on a Tree control, and being my first time to delve into this, I need your inputs and advice. My tree control is retrieving data from a .NET web service. My .NET webservice returns a string which is parsed from a dataset via the command DataSet.GetXML method. In my flex application, I am converting the string value returned by the webservice into an XML: private var _xmlMyData:XML; private function myResultHandler( event:ResultEven t) :void { _xmlMyData = XML(event.result) ; // This script to view the XML data in Text Area var strData:String = String(event. result); taData.text = strData; } Which I am then passing to my xmlListCollection control mx:XMLListCollectio n id=xmllc_myData source={_xmlMyData .Table} / mx:TextArea id=taData width=300 height=100 / Then binding to my tree control: mx:Tree id=treeOffshore dataProvider= {xmllc_myData} labelField= DESCN showRoot=false /mx:Tree When viewing the data in the text area control, I have the following: NewDataSet Table CODEA1/CODE DESCArea One/DESC /Table Table CODEB2/CODE DESCBase Two/DESC /Table Table CODEC4/CODE DESCClass Four/DESC /Table Table CODED8/CODE DESCDemo Eight/DESC /Table /NewDataSet This is how the treeview renders: Area One A1 Area One Base Two B2 Base Two Class Four C4 Class Four Demo Eight D8 Demo Eight What I want is to be able to define the Description only at the first level only: Area One Base Two Class Four Demo Eight The next thing that I need to accomplish is that the second level of the treeview should actually be populated based on the CODE from the first level. For example: Area One Sub Item Area One Sub Item Area Two Base Two Sub Item Base Two Sub Item Base Three Sub Item Base Four Class Four Sub Item Class Four Demo Eight Sub Item Demo Eight Sub Item Demo Nine Sub Item Demo Ten Sub Item Demo Eleven The sub-items would be retrieved from the database based on the parent code (i.e Demo Eight = D8, Class Four = C4... etc.) I am quite new in this tree control thing (as well as flex) and have limited grasp of the concepts to be able to accomplish this. I am thinking either of modifying the XML data which I originally retrieve and probably insert the sub items per each node, although I am in a bind of how to accomplish the same. On the other hand, to give some of you further details, the treeview data would actually be coming from three tables where the table 1 is the base table, and the table 2 contains the children of table 1 and table 3 contains children data from table 3. I think I can manage to make one SQL statement to be able to retrieve the data for the whole treeview but I think that would be very complicated especially in the part where parsing the XML goes. I would sincerely appreciate your inputs on this. I am foraying into the world of Flex and this is quite a make or break scenario towards embracing this technology in our organization. Thanks and hoping to hear from all of you soon. Regards, Angelo
[flexcoders] Re: Error: -Bookmark no longer valid- when removing or adding items to node's children on AdvancedDataGrid with hierarchical data
Sorry I meant of course: ContainerObj1's children property is a sorted ArrayCollection (although I tried that removing sort has no effect on this issue). If I scroll the ADG so that ChildContainerObj1 and it's children are not visible and programmatically add new ChildContainerObj4 (it has it's own children too!) by calling ContainerObj.children.addItem(ChildContainerObj4 ); Then the error occurs. It seems to occur quite randomly when adding or removing nodes depending how nodes are opened and ADG scrolled. On Tue, Aug 18, 2009 at 3:00 PM, Mika Kiljunen mkintens...@gmail.comwrote: Hi, I'm having a serious problem with AdvancedDataGrid and HierarchicalCollectionView. I have following structure on ADG (whose datasource is hierarchical data): ContainerObj1 -ChildContainerObj1 --ChildObj1 --ChildObj2 -ChildContainerObj2 --ChildObj3 --ChildObj4 -ChildContainerObj3 --etc ContainerObj1's children property is a sorted ArrayCollection. If I scroll the ADG so that ChildContainerObj1 and it's children are not visible and programmatically add new ChildContainerObj4 (it has it's own children too!) by calling ContainerObj.children.addItem(ContainerObj1); then I get the following Error below. If I choose to Continue it works ok. I've tried dozens of ways to get aroung this but nothing seems to work. If ADG is not scrolled and ContainerObj1 is visible, then it works without errors. This starts to seem like a bug to me, any ideas how to fix this or how to workaround it or should I file a bug? Error: Bookmark no longer valid. at ListCollectionViewCursor/seek()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:2055] at mx.collections::HierarchicalCollectionViewCursor/collectionChangeHandler()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\collections\HierarchicalCollectionViewCursor.as:1116] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::HierarchicalCollectionView/nestedCollectionChangeHandler()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\collections\HierarchicalCollectionView.as:1202] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::ListCollectionView/dispatchEvent()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:833] at mx.collections::ListCollectionView/addItemsToView()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:931] at mx.collections::ListCollectionView/listChangeHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:1051] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::ArrayList/internalDispatchEvent()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\collections\ArrayList.as:510] at mx.collections::ArrayList/addItemAt()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\collections\ArrayList.as:311] at mx.collections::ListCollectionView/addItemAt()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:501] ...
[flexcoders] VBox constrains - A simple question :-p
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=640 height=480 mx:VBox top=100 bottom=10 horizontalCenter=0 width=90% horizontalAlign=left verticalGap=5 id=debugWinVB_ID /mx:VBox /mx:Application At the start of the application the VBox height is 370 (Application.height - vbox.top - vbox.bottom) - Correct. Child labels are added to this vbox in runtime and as soon as the cumulative labels height becomes 370 the vbox expands and scroll bars appear @ the Application level...Why? Should not the Vbox remain @ 370 height and display inner scrollbars, according to the following rule:? * Component size determined by a pair of constraint-based layout properties (left-right or top-bottom) overrides any explicit or percentage-based size specifications. For example, if you specify both left and right constraints, the calculated constraint-based width overrides the width set by a width or percentWidth property.
Re: [flexcoders] Re: ComboBox not updating
Thanks. I should add that my combobox is in use in an item renderer. A colleague had a similar problem which went away when he switched to a repeater. It's not clear which if any of your modifications will help my use case, but I'll try some of them. Is there a bug we can vote on besides the one you mentioned (11282) ? It strikes me that comboboxes in forms must be one of the more common use cases, and it's pretty disappointing that this component is so problematic. On Tue, Aug 18, 2009 at 9:01 PM, Dmitri Girski mite...@gmail.com wrote: This is an old story with ComboBox selectedIndex. It does not count the fact that binding on SelectedIndex could come well before dataProvider property assignment, so it simply resets itself every time it has dataProvider property being updated. I have rewritten the ComboBox class to make it working properly with dataProviders. http://mitek.id.au/blog/2008/10/28/combobox-madness-continues/ http://mitek.id.au/blog/2008/08/18/combobox-selecteditem-problem/ http://mitek.id.au/blog/2008/06/09/unselect-in-combobox/ Cheers, Dmitri. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Richard Rodseth rrods...@... wrote: The full story is too long to relate and involves the component which has given me more grief than any other - ComboBox. I'm pretty sure I established a while ago that there's a bug in using a ComboBox with a bound value for selectedIndex. I have one whose dataprovider (and current selected index) are both highly dynamic (changing in response to changes in another combobox). There is a circumstance in which the displayed label does not update until you roll over the combobox, or sometimes click on it. Is there a brute force way I can make it update? I've tried various invalidateXXX methods.
[flexcoders] Re: Advanced Data Grid + ILOG
Hey Tom, I reopened the bug here: http://bugs.adobe.com/jira/browse/FLEXDMV-2191 You can vote on it and watch the progress if you want. The fix is in SDK4 so you have to download the latest version of FB and then use that sdk. I reopened the bug because the fix doesn't help enough. It still takes about 4 seconds to open a data set with 500 records so if you are in the thousands then it's game over man... game over... --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote: So this is fixed in the DV classes that ship with Builder 4 ? Is that available as a stand alone download, just like the older ones are ? -- Helping to greatly pursue fine-grained e-business as part of the IT team of the year, '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: Module and Application Communication.
So I was going to make you a sample app to show you what was wrong, but then it was working. Then I looked at my code and again and realized I was actually dispatching the event in a popup that was created inside that module. So let me change the question! Is it possible to catch an event in the main application dispatched by a Popup in a module, by adding an event listener to the instance of the module you added to the stage! Cause I can't get that to work :( --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: How is moduleContent set up. Is it on the display list? Who is dispatching the event? Code in the module class or some other object? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of cuttenv Sent: Tuesday, August 18, 2009 6:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Module and Application Communication. Hey Alex, I set it up so the event is dispatching when I clickity click a button. So I know for sure the event is being dispatched. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: I think you would have had some other problem if it was security/domain related. You didn't say when the event gets dispatched, so maybe it gets dispatched before you add your listener. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of cuttenv Sent: Tuesday, August 18, 2009 3:21 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Module and Application Communication. not sure. How could I test that? They are both on the same domain (locahost) and even in the same directory. Wouldn't it throw a sandbox violation error if it was that? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Rick Winscot rick.winscot@ wrote: Have you tested to see if this is a security / app domain issue? Cheers, Rick Winscot On 8/17/09 1:24 PM, cuttenv cuttenv@ wrote: I have a rather straight forward question. I am creating a module like this: private var modInfo:IModuleInfo private var myModule:MyCustomMdoule; //In creation complete of application modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); //In tho onModuleReady command myModule = modInfo.factory.create() as MyCustomModule; moduleContent.addChild( myModule ); myModule.addEventListener( 'customEventDispatchedByModule', onEvent ); //Inside my module there is dispatchEvent( new Event('customEventDispatchedByModule',true) ); Even though the code for the dispatch event is running the handler never runs... am I doing something wrong?? or do module not dispatch events??
[flexcoders] Re: Module and Application Communication.
Hi valdhor, Thanks for making a sample! I went back and looked at my code again and realized I was trying to catch an event that was being dispatched via a Popup inside the module! Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ import mx.events.ModuleEvent; import mx.modules.IModuleInfo; import mx.modules.ModuleManager; import mx.controls.Alert; private var modInfo:IModuleInfo; private var myModule:myMod; private function onCreationComplete():void { modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); } private function onModuleReady(event:ModuleEvent):void { myModule = modInfo.factory.create() as myMod; addChild(myModule); myModule.addEventListener('customEventDispatchedByModule', onEvent); } private function onEvent(event:Event):void { Alert.show(event.type, Event Received!); } ]] /mx:Script /mx:Application MyMod.mxml: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreate() mx:Script ![CDATA[ private var myPopUp:MyPopUp; private function onCreate():void { myPopUp = MyPopUp(PopUpManager.createPopUp(this,MyPopUp,true)); PopUpManager.centerPopUp(myPopUp); } ]] /mx:Script mx:Button label=Dispatch Event click=doDispatchEvent(event)/ /mx:Module my popup MyMod.mxml: ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ private function doDispatchEvent(event:MouseEvent):void { dispatchEvent(new Event('customEventDispatchedByModule',true)); } ]] /mx:Script mx:Button label=Dispatch Event click=doDispatchEvent(event)/ /mx:Panel --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: What are MyCustomMdoule (Spelling?) and moduleContent ? The following works for me: Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ import mx.events.ModuleEvent; import mx.modules.IModuleInfo; import mx.modules.ModuleManager; import mx.controls.Alert; private var modInfo:IModuleInfo; private var myModule:myMod; private function onCreationComplete():void { modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); } private function onModuleReady(event:ModuleEvent):void { myModule = modInfo.factory.create() as myMod; addChild(myModule); myModule.addEventListener('customEventDispatchedByModule', onEvent); } private function onEvent(event:Event):void { Alert.show(event.type, Event Received!); } ]] /mx:Script /mx:Application MyMod.mxml: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ private function doDispatchEvent(event:MouseEvent):void { dispatchEvent(new Event('customEventDispatchedByModule',true)); } ]] /mx:Script mx:Button label=Dispatch Event click=doDispatchEvent(event)/ /mx:Module --- In flexcoders@yahoogroups.com, cuttenv cuttenv@ wrote: I have a rather straight forward question. I am creating a module like this: private var modInfo:IModuleInfo private var myModule:MyCustomMdoule; //In creation complete of application modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); //In tho onModuleReady command myModule = modInfo.factory.create() as MyCustomModule; moduleContent.addChild( myModule ); myModule.addEventListener( 'customEventDispatchedByModule', onEvent ); //Inside my module there is dispatchEvent( new Event('customEventDispatchedByModule',true) ); Even though the code for the dispatch event is running the
[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo
I wonder if it's the actual size or whether there is something in the data that it doesn't like. Could you try a different portion of the data (Say between the 60K point and 120K ?). --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcap...@... wrote: Ah, MaxReceivedMessageSize is not a Windows limit,per se, but a Windows WCF limit that is programatically controlled by the SOAP server. That shouldn't be a factor with the out of bounds fault? --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote: Interesting point. I tried truncating my byte array down to 60KB, I still got the out of bounds fault. However, if i drop the byte array down to 10KB, no out of bounds error. Somewhere between the two (60KB and 10KB) is the breaking point. I've read through the article you referenced (thanks for the link!), but still don't see what quota parameter Flex would be blowing. Are we talking MaxReceivedMessageSize? The other interesting thing is that I'm seeing much greater volume than 60KB being transmitted to the SOAP server when inspecting incoming data server side using Wireshark. If this is a quota violation being triggered, how would it enforce on the packet data? Would some of it be dropped? Maybe everything following the violation? Thanks, Mike --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I wonder if you have hit a windows limitation. This article may give you some ideas... http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote: I've been looking at this problem for just about a day straight now, and just can't see why I'm getting an out of bounds error on send. I've tried updated to the latest Gumbo nightly (9377), which no luck. My code to launch the WebService call looks like this: _calibrationData = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ); stream.readBytes(_calibrationData, 0, stream.bytesAvailable); var token:AsyncToken = this._service.mLoadCalibration(file.name, _calibrationData); token.addResponder(this._mLoadCalibrationResponder); Which seems to be a-okay. Or, am I missing something obvious? I'm pretty sure I've hit up against a SDK bug. I've opened a bug report with Adobe, to track this issue at http://bugs.adobe.com/jira/browse/SDK-22751 Anyone else transferring large (1MB) base64 encoded data using the Flex webservice client? Any feedback highly welcome! Thanks, Mike
[flexcoders] RE: Adobe Air app losing connection to DB
Are you setting the person's credentials in your Remote Object using setRemoteCredentials()? Sounds like you might not be. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Monday, August 17, 2009 10:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Adobe Air app losing connection to DB This is another weird one. I'm struggling with session management in Air and Coldfusion. I've got Coldfusion session variables set to: Use J2EE vars Unchecked Enable app vars checked enable session vars enabled MAX timeout: Application vars: 2 days 0 hours 0 minutes 0 secs Session vars: 2 days 0 hours 0 minutes 0 secs Default timeout: App vars: 2 days 0 hours 0 mins 0 secs Sess vars:0 days 0 hours 59 mins 0 secs I log in the user and use roles to manage access in the CFC on the server. If I let my app sit open for around 3-5 mins then try clicking on something that causes a query against the server I get the following message: (mx.rpc::Fault)#0 content = (null) errorID = 0 faultCode = Server.Processing faultDetail = faultString = Unable to invoke CFC - The current user is not authorized to invoke this method. message = faultCode:Server.Processing faultString:'Unable to invoke CFC - The current user is not authorized to invoke this method.' faultDetail:'' name = Error rootCause = (null) I shouldn't be losing a session within 5 mins... Anyone else seen this or know a good way to manage an active session?
Re: [flexcoders] Re: ComboBox not updating
My solution (which is not a general one) appears to be avoiding using a binding function with selectedIndex. Rather than: mx:ComboBox xmlns:mx=http://www.adobe.com/2006/mxml; dataProvider={this.availableOperators} selectedIndex={findSelectedIndex(this.selectedOperator, this.availableOperators)} I have custom custom setters for selectedOperator and availableOperators, and update selectedIndex in those. On Wed, Aug 19, 2009 at 9:34 AM, Richard Rodseth rrods...@gmail.com wrote: Thanks. I should add that my combobox is in use in an item renderer. A colleague had a similar problem which went away when he switched to a repeater. It's not clear which if any of your modifications will help my use case, but I'll try some of them. Is there a bug we can vote on besides the one you mentioned (11282) ? It strikes me that comboboxes in forms must be one of the more common use cases, and it's pretty disappointing that this component is so problematic. On Tue, Aug 18, 2009 at 9:01 PM, Dmitri Girski mite...@gmail.com wrote: This is an old story with ComboBox selectedIndex. It does not count the fact that binding on SelectedIndex could come well before dataProvider property assignment, so it simply resets itself every time it has dataProvider property being updated. I have rewritten the ComboBox class to make it working properly with dataProviders. http://mitek.id.au/blog/2008/10/28/combobox-madness-continues/ http://mitek.id.au/blog/2008/08/18/combobox-selecteditem-problem/ http://mitek.id.au/blog/2008/06/09/unselect-in-combobox/ Cheers, Dmitri. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Richard Rodseth rrods...@... wrote: The full story is too long to relate and involves the component which has given me more grief than any other - ComboBox. I'm pretty sure I established a while ago that there's a bug in using a ComboBox with a bound value for selectedIndex. I have one whose dataprovider (and current selected index) are both highly dynamic (changing in response to changes in another combobox). There is a circumstance in which the displayed label does not update until you roll over the combobox, or sometimes click on it. Is there a brute force way I can make it update? I've tried various invalidateXXX methods.
[flexcoders] Adobe AIR L-shaped custom chrome
I am wanting to create an Adobe AIR application that is L-shaped so that another application can fit in the open area of the screen. In other words, I would like an AIR app to surround another application on 2 sides (left and bottom). Is this possible? And if I do this will the AIR app cover the other application with a transparency?
[flexcoders] Re: Module and Application Communication.
System Manager is the handler for popup windows. So, either add the event listener to the system manager of the application or add it to the system manager of the module. systemManager.addEventListener('customEventDispatchedByModule', onEvent); --- In flexcoders@yahoogroups.com, cuttenv cutt...@... wrote: Hi valdhor, Thanks for making a sample! I went back and looked at my code again and realized I was trying to catch an event that was being dispatched via a Popup inside the module! Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ import mx.events.ModuleEvent; import mx.modules.IModuleInfo; import mx.modules.ModuleManager; import mx.controls.Alert; private var modInfo:IModuleInfo; private var myModule:myMod; private function onCreationComplete():void { modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); } private function onModuleReady(event:ModuleEvent):void { myModule = modInfo.factory.create() as myMod; addChild(myModule); myModule.addEventListener('customEventDispatchedByModule', onEvent); } private function onEvent(event:Event):void { Alert.show(event.type, Event Received!); } ]] /mx:Script /mx:Application MyMod.mxml: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreate() mx:Script ![CDATA[ private var myPopUp:MyPopUp; private function onCreate():void { myPopUp = MyPopUp(PopUpManager.createPopUp(this,MyPopUp,true)); PopUpManager.centerPopUp(myPopUp); } ]] /mx:Script mx:Button label=Dispatch Event click=doDispatchEvent(event)/ /mx:Module my popup MyMod.mxml: ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ private function doDispatchEvent(event:MouseEvent):void { dispatchEvent(new Event('customEventDispatchedByModule',true)); } ]] /mx:Script mx:Button label=Dispatch Event click=doDispatchEvent(event)/ /mx:Panel --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: What are MyCustomMdoule (Spelling?) and moduleContent ? The following works for me: Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ import mx.events.ModuleEvent; import mx.modules.IModuleInfo; import mx.modules.ModuleManager; import mx.controls.Alert; private var modInfo:IModuleInfo; private var myModule:myMod; private function onCreationComplete():void { modInfo = ModuleManager.getModule('myMod.swf'); modInfo.addEventListener(ModuleEvent.READY, onModuleReady); modInfo.load(); } private function onModuleReady(event:ModuleEvent):void { myModule = modInfo.factory.create() as myMod; addChild(myModule); myModule.addEventListener('customEventDispatchedByModule', onEvent); } private function onEvent(event:Event):void { Alert.show(event.type, Event Received!); } ]] /mx:Script /mx:Application MyMod.mxml: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ private function doDispatchEvent(event:MouseEvent):void { dispatchEvent(new Event('customEventDispatchedByModule',true)); } ]] /mx:Script mx:Button label=Dispatch Event click=doDispatchEvent(event)/ /mx:Module --- In flexcoders@yahoogroups.com, cuttenv cuttenv@ wrote: I have a rather straight forward question. I am creating a module like this: private var modInfo:IModuleInfo private var myModule:MyCustomMdoule; //In creation complete of application modInfo =
[flexcoders] Mx:VBOX
Hi How to Refresh the MX:VBOX after some condition check I want to refresh the VBOX. PLease help me for this. Thanks Ramesh
[flexcoders] Re: flexlib enhancedButtonSkin causes blank Design mode
Fixed this by repeatedly toggling F4 - Show Surrounding Containers - screen eventually draws layout. Not sure why but glad it does :-) --- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote: Using this skin stops design mode from showing layout, which I need as this layout is extremely complicated. Interested to know why this happens and if there is a solution. TIA, Mic.
RE: [flexcoders] Mx:VBOX
Set an ID on your VBox (call it vboxID) and call this: vboxID.invalidateDisplayList(); Jake Churchill CF Webtools 11204 Davenport, Ste. 100 Omaha, NE 68154 http://www.cfwebtools.com http://www.cfwebtools.com 402-408-3733 x103 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ram ramesh Sent: Wednesday, August 19, 2009 1:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Mx:VBOX Hi How to Refresh the MX:VBOX after some condition check I want to refresh the VBOX. PLease help me for this. Thanks Ramesh No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.61/2313 - Release Date: 08/19/09 06:03:00
[flexcoders] How to force construction when creationPolicy=all' does not work?
ViewStack.vsMainDash VBox.vbDrctrDash VBox.vbParmsAndDrills ViewStack.vsDashDrills VBox.CustLevel VBox.UDAC is the hierarchy. Run code vsMainDash.selectedChild = vbParmsAndDrills; vsDashDrills.selectedChild = vbCustLevel; ** null reference error Debug at line that errors does show vsDashDrills = null, whereas vsMainDash = ViewStack. I have tried splattering creationPolicy=all' everywhere - of course if I do this too high up I start getting null reference errors there. (If I OK the error the app does continue with everything displayed correctly so Flex does create what it should.) If creationPolicy=all' does not work, how do I force the ViewStack vsDashDrills into existence? TIA, Mic.
[flexcoders] Cannot select identical item in my tree component...
Hi everyone, I'm having an issue with my tree component. I use an arrayCollection for my dataProvider. I have the same object in my arrayCollection nested at different levels. I cannot select this object at different levels in my tree, it always select the topmost nested object. Is there a way to work around this? I would like to be able to select an item even though the same item is found at different nested levels within the tree. Thanks!
Re: [Spam] Re: [flexcoders] Fields grouping?
Tim and Wesley, thanks for your replies... really appreciate it. I've not been flexing for long so that's for helping me out... I treid using forms with a border and using a formheader but it didn't give the look I was after. I guess i can change my UI designs if needed though but I though the field grouping thing was a standard object in most development environments... I think the Panel will give me the best enclosure feel... One thing I've noticed about Forms is that they're great for vertical layouts but if I want to have fields side by side then I need to use two forms and then second having a blank header to force the first field to be lined up with the field in the first Form. A problem though is pressing tab in the first form moves the cursor down it's elements and then moving onto the second. I'm sure there's a way to sort this but will it be a 'hack' - checking for TAB on keypress events and applying focus to the desired field... bit messy I guess and prone to breakage. Am I wrong? Hope so... Also, where is the Shapes area in FB3? Are there drawing tools or do i have to draw within a specific container? Cheers for the help guys! Nick 2009/8/18 Wesley Acheson wesley.ache...@gmail.com On Tue, Aug 18, 2009 at 7:07 PM, Nick Middleweek n...@middleweek.co.ukwrote: hi guys, Is there a component that allows us to group fields/ objects together? I can't find a built in object, I'm after something visual that i can use to group fields, such as all the address fields together and another group to collate the numerous emails and phone numbers... You can use a container with a border I. I'd personally use Panel. however there are several ways to do this. Please note this was to be quick not pretty. See below ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] mx:Form x=10 y=10 borderStyle=inset width=293 mx:FormHeading label=Address/ mx:FormItem label=House mx:TextInput/ /mx:FormItem mx:FormItem label=Street mx:TextInput/ /mx:FormItem mx:FormItem label=Town mx:TextInput/ /mx:FormItem /mx:Form mx:Form x=10 y=158 width=293 borderStyle=inset height=170 mx:FormHeading label=Contact Details/ mx:FormItem label=Mobile mx:TextInput/ /mx:FormItem mx:FormItem label=Phone mx:TextInput/ /mx:FormItem mx:HRule width=100%/ mx:FormItem label=e-mail mx:TextInput/ /mx:FormItem /mx:Form /mx:Application Or if you want it dynamic you can use something like an accordian. Can I draw it? Is there a line tool? I think theres lines in the shape area Thanks! :) Nick
[flexcoders] Re: weird NumericStepper question / script
I was looking for a way to create a no-maximum NumericStepper and came up with the idea of listening to the Change event and just upping the maximum value by 1-stepSize unit above the current value. The only thing was, I needed to use a callLater() in order to change the maximum or else the change didn't take effect in time. So I would suggest a listener on each, in which you would calculate the new maximum of the other two steppers, then perform a callLater that looks like this: callLater(resetMaxValues, [newMaxValue, stepperA, stepperB]) ... and then something like this: private function resetMaxValues(newMaxValue:int, stepperA:NumericStepper, stepperB:NumericStepper):void { stepperA.maximum = newMaxValue; stepperB.maximum = newMaxValue; } --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: I have a change event handler on each. It would perform the logic and adjust the other three. Or is it the logic itself you are asking about? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of grimmwerks Sent: Saturday, April 05, 2008 5:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] weird NumericStepper question / script I've got 4 NumericSteppers; and the problem I'm having is one I can't get my head 'round: the values of all the NumericSteppers have to add up to 100. On the whole I could easily check via a 'submit' button if they don't addup, but I'd like to check on any of the stepper's 'change' function -- what I was thinking was: As a one is going up, the maximum of all the others goes down in a cycle (ie if someone is putting numB, then C then D -- they're max slowly goes down. If the max value of a numeric stepper meets the current value of that stepper, and there's no more 'room' -- then the user can't keep increasing the size of the current numeric. Is this making sense? In other words, how does one tie in the value of one stepper with another to equal 100. Sure, having 2 steppers makes it easier somewhat, but with 4 I don't know how best to pay attention to them all while still keeping the numbers validating. I'd appreciate any thoughts.
[flexcoders] ImageSnapshot without scroll bars?
Anyone know of how to avoid the scroll bars in an imagesnapshot of a container? Thanks.
[flexcoders] 5 Datagrids ontop of each other, one resizes and the ones below shift up or down?
Hi guys, Excuse the subject of this post :-) But it does sum up what I'm trying to achieve. I want to have 5 DataGrids ontop of each other in a vertical arrangement (A bit like the rows in Excel are ontop of each). In the bottom right of each DG, I want a little button that when clicked, expands/ collapses it's DG. When e.g. DG_2 is expanded, I want DG_1 to remain where it is but DG_3, DG_4 and DG_5 to shunt downwards and DG_2 will be expanded down to say ten rows. What is the best way to achieve this? Or should I be looking into DividedBox components? Or does the Tile Component help me? Or do I write it all myself using maths and do the resizing using top and bottom properties of the DG's? Thanks for any help... Nick
[flexcoders] Re: NumericStepper no maximum value
I was looking to do the same thing ... came up with this: numericStepper.addEventListener(NumericStepperEvent.CHANGE, function(event:NumericStepperEvent):void { callLater(resetMaximumValue); }); ... and then a function like this: private function resetMaximumValue():void { numericStepper.maximum = numericStepper.value + numericStepper.stepSize; } ... inflates the maximum value one stepSize above whatever the current value is. The callLater is the key, since timing can screw this up. It seems to work for me, but I haven't thoroughly tested it beyond what I made it for. --- In flexcoders@yahoogroups.com, David Clark davidkcl...@... wrote: Hello, Does anyone know of a way to create a NumericStepper without a specified maximum value? Thanks -- david The difference between theory and practice is that in theory, there is no difference between theory and practice
Re: [flexcoders] ImageSnapshot without scroll bars?
Never printed anything from flex back you could either: 1) remove scrollbars prior to printing and then put them back (horizontal and vertical scroll policies set to off) 2) if this makes the application 'jumpy' due to bars disappearing and then reappearing, you could possibly try and copy the contents of the container to an offscreen copy of it with scroll policies set to off and print this (no idea if you can print offscreen containers, cannot imagine why not but then again...) Please let us know if any of these works for future reference, cheers, Fotis On Wed, Aug 19, 2009 at 9:06 PM, flexjunker willtheb...@yahoo.com wrote: Anyone know of how to avoid the scroll bars in an imagesnapshot of a container? Thanks. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
Re: [Spam] Re: [flexcoders] Fields grouping?
I think theres a lot you can do to style these things I'm not really that up on it. though. :P On Wed, Aug 19, 2009 at 10:08 PM, Nick Middleweek n...@middleweek.co.ukwrote: Tim and Wesley, thanks for your replies... really appreciate it. I've not been flexing for long so that's for helping me out... I treid using forms with a border and using a formheader but it didn't give the look I was after. I guess i can change my UI designs if needed though but I though the field grouping thing was a standard object in most development environments... I think the Panel will give me the best enclosure feel... One thing I've noticed about Forms is that they're great for vertical layouts but if I want to have fields side by side then I need to use two forms and then second having a blank header to force the first field to be lined up with the field in the first Form. A problem though is pressing tab in the first form moves the cursor down it's elements and then moving onto the second. I'm sure there's a way to sort this but will it be a 'hack' - checking for TAB on keypress events and applying focus to the desired field... bit messy I guess and prone to breakage. Am I wrong? Hope so... Also, where is the Shapes area in FB3? Are there drawing tools or do i have to draw within a specific container? Cheers for the help guys! Nick 2009/8/18 Wesley Acheson wesley.ache...@gmail.com On Tue, Aug 18, 2009 at 7:07 PM, Nick Middleweek n...@middleweek.co.ukwrote: hi guys, Is there a component that allows us to group fields/ objects together? I can't find a built in object, I'm after something visual that i can use to group fields, such as all the address fields together and another group to collate the numerous emails and phone numbers... You can use a container with a border I. I'd personally use Panel. however there are several ways to do this. Please note this was to be quick not pretty. See below ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] mx:Form x=10 y=10 borderStyle=inset width=293 mx:FormHeading label=Address/ mx:FormItem label=House mx:TextInput/ /mx:FormItem mx:FormItem label=Street mx:TextInput/ /mx:FormItem mx:FormItem label=Town mx:TextInput/ /mx:FormItem /mx:Form mx:Form x=10 y=158 width=293 borderStyle=inset height=170 mx:FormHeading label=Contact Details/ mx:FormItem label=Mobile mx:TextInput/ /mx:FormItem mx:FormItem label=Phone mx:TextInput/ /mx:FormItem mx:HRule width=100%/ mx:FormItem label=e-mail mx:TextInput/ /mx:FormItem /mx:Form /mx:Application Or if you want it dynamic you can use something like an accordian. Can I draw it? Is there a line tool? I think theres lines in the shape area Thanks! :) Nick
[flexcoders] Re: Instant messaging example
Thanks valdhor. I have double checked but I am already referencing 'weborb-services-config.xml' and i and still having the same issue. --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: It looks like you are referencing services-config.xml instead of weborb-services-config.xml in your compilere settings. weborb-rtmp should be defined in that file. --- In flexcoders@yahoogroups.com, Andrew roly445@ wrote: Ok cool thank you. How do I go about defining one? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Well, from that file, there is no channel defined as weborb-rtmp.
Re: [flexcoders] VBox constrains - A simple question :-p
try setting the minWidth also. On Wed, Aug 19, 2009 at 6:29 PM, fotis.chatzinikos fotis.chatzini...@gmail.com wrote: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=640 height=480 mx:VBox top=100 bottom=10 horizontalCenter=0 width=90% horizontalAlign=left verticalGap=5 id=debugWinVB_ID /mx:VBox /mx:Application At the start of the application the VBox height is 370 (Application.height - vbox.top - vbox.bottom) - Correct. Child labels are added to this vbox in runtime and as soon as the cumulative labels height becomes 370 the vbox expands and scroll bars appear @ the Application level...Why? Should not the Vbox remain @ 370 height and display inner scrollbars, according to the following rule:? * Component size determined by a pair of constraint-based layout properties (left-right or top-bottom) overrides any explicit or percentage-based size specifications. For example, if you specify both left and right constraints, the calculated constraint-based width overrides the width set by a width or percentWidth property. -- 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
Re: [flexcoders] VBox constrains - A simple question :-p
Hi Wesley, do you mean the maxHeight? My problem is with the height of the box getting bigger than the application instead of staying @ bottom 10. If i set the height or maxHeight it works as advertised. I am not trying to just fix it though.. I am trying to understand/know why it does not work.. Thanks, for the reply though On Thu, Aug 20, 2009 at 12:47 AM, Wesley Acheson wesley.ache...@gmail.comwrote: try setting the minWidth also. On Wed, Aug 19, 2009 at 6:29 PM, fotis.chatzinikos fotis.chatzini...@gmail.com wrote: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=640 height=480 mx:VBox top=100 bottom=10 horizontalCenter=0 width=90% horizontalAlign=left verticalGap=5 id=debugWinVB_ID /mx:VBox /mx:Application At the start of the application the VBox height is 370 (Application.height - vbox.top - vbox.bottom) - Correct. Child labels are added to this vbox in runtime and as soon as the cumulative labels height becomes 370 the vbox expands and scroll bars appear @ the Application level...Why? Should not the Vbox remain @ 370 height and display inner scrollbars, according to the following rule:? * Component size determined by a pair of constraint-based layout properties (left-right or top-bottom) overrides any explicit or percentage-based size specifications. For example, if you specify both left and right constraints, the calculated constraint-based width overrides the width set by a width or percentWidth property. -- 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 -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
[flexcoders] Re: ImageSnapshot without scroll bars?
Hey Fotis, I've tried all that and yes, if I resize the container according to it's children, then remove the scroll bars, it does allow me to take an ImageShapShot that is the correct size height and width. BUT it still has the bars and even strange black 'un-drawn' areas even after container.invalidateDisplayList(). My only other thought would be to use swfObject and allow the browser to resize according to the flex app. junker
[flexcoders] noob questions... horizontal pagination of multiple objects
Hi all, I want to have a XxY grid of containers (they might be images and/or imported swfs.) I want to have some sort of pagination to view them all (think iPhone home screen.) Any pointers on how to get started with this? I looked at Horizontal List but I'm not sure that'll really do the trick? After getting the pagination to work, the next step would be to make the objects drag/drop-able to reorder. Is this possible with arbitrary items? In other words it might be an imported swf or an image or just some text panel. thanx!
Re: [Spam] [flexcoders] ImageSnapshot without scroll bars?
Sorry for the newbie question but what do you mean image snapshot?... Do you mean take a screen shot of a certain area in flex and save it as a JPEG or something? Cheers, Nick 2009/8/19 flexjunker willtheb...@yahoo.com Anyone know of how to avoid the scroll bars in an imagesnapshot of a container? Thanks.
[flexcoders] Coding The itemClick event of the List Control
Hi. I looked up the documentation for Flex and was not able to find a good sample of coding for the itemClick event for a list control. Any good example or link would be appreciated. Thanks.
[flexcoders] Parser Error | Itemrender
Hi ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationcomplete() mx:Script ![CDATA[ import mx.collections.ArrayCollection; import com.DateUtils; private var stateList:Array = [ { label: Alaska, selected: false }, { label: Arkansas, selected: false }, { label: California, selected: false }, { label: Delaware, selected: false }, { label: Florida, selected: false }, { label: Georgia, selected: false }, { label: Hawaii, selected: false }, { label: Massachusetts, selected: false }, { label: Nevada, selected: false }, { label: Pennsylvania, selected: false }, { label: South Dakota, selected: false }, { label: Tennessee, selected: false }, { label: Utah, selected: false }, { label: Virginia, selected: false }, { label: Washington, selected: false } ]; public function onCreationcomplete():void { test.dataProvider = new ArrayCollection(stateList); } ]] /mx:Script mx:ComboBox id=test width=300 mx:itemRenderer mx:Component mx:CheckBox selectedField=selected change=data.selected = selected / /mx:Component /mx:itemRenderer /mx:ComboBox /mx:Application The above file works fine and it show check box as itemrender. Now if i want to create same itemrender in different file like ?xml version=1.0 encoding=utf-8? mx:Component xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:CheckBox label={data.label} selected={data.selected}/ /mx:Component it gives me parser error. Can somebody throw some light?? Thanks ilikeflex
RE: [flexcoders] Re: ComboBox not updating
Maybe the solution is not to bind the selectedItem but set it explicitly? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Richard Rodseth Sent: Wednesday, August 19, 2009 12:34 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: ComboBox not updating Thanks. I should add that my combobox is in use in an item renderer. A colleague had a similar problem which went away when he switched to a repeater. It's not clear which if any of your modifications will help my use case, but I'll try some of them. Is there a bug we can vote on besides the one you mentioned (11282) ? It strikes me that comboboxes in forms must be one of the more common use cases, and it's pretty disappointing that this component is so problematic. On Tue, Aug 18, 2009 at 9:01 PM, Dmitri Girski mite...@gmail. mailto:mite...@gmail.com com wrote: This is an old story with ComboBox selectedIndex. It does not count the fact that binding on SelectedIndex could come well before dataProvider property assignment, so it simply resets itself every time it has dataProvider property being updated. I have rewritten the ComboBox class to make it working properly with dataProviders. http://mitek. http://mitek.id.au/blog/2008/10/28/combobox-madness-continues/ id.au/blog/2008/10/28/combobox-madness-continues/ http://mitek. http://mitek.id.au/blog/2008/08/18/combobox-selecteditem-problem/ id.au/blog/2008/08/18/combobox-selecteditem-problem/ http://mitek. http://mitek.id.au/blog/2008/06/09/unselect-in-combobox/ id.au/blog/2008/06/09/unselect-in-combobox/ Cheers, Dmitri. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Richard Rodseth rrods...@... wrote: The full story is too long to relate and involves the component which has given me more grief than any other - ComboBox. I'm pretty sure I established a while ago that there's a bug in using a ComboBox with a bound value for selectedIndex. I have one whose dataprovider (and current selected index) are both highly dynamic (changing in response to changes in another combobox). There is a circumstance in which the displayed label does not update until you roll over the combobox, or sometimes click on it. Is there a brute force way I can make it update? I've tried various invalidateXXX methods.
RE: [flexcoders] Tree Control Populating from Database via XMLListCollection
If you want a tee structure that is different from the xml structure, you can use a custom datadescriptor. If you just want to control the displayed labels, you can use a label function. I would be inclined to manipulate the xml into the structure I want for the tree, just because I have not done a custom dataDescriptor yet. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Angelo Anolin Sent: Wednesday, August 19, 2009 11:12 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Tree Control Populating from Database via XMLListCollection Anyone?? Thanks. _ From: Angelo Anolin angelo_ano...@yahoo.com To: flexcoders@yahoogroups.com Sent: Wednesday, 19 August, 2009 20:53:49 Subject: [flexcoders] Tree Control Populating from Database via XMLListCollection Hi FlexCoders, Am currently working on a Tree control, and being my first time to delve into this, I need your inputs and advice. My tree control is retrieving data from a .NET web service. My .NET webservice returns a string which is parsed from a dataset via the command DataSet.GetXML method. In my flex application, I am converting the string value returned by the webservice into an XML: private var _xmlMyData:XML; private function myResultHandler( event:ResultEven t) :void { _xmlMyData = XML(event.result) ; // This script to view the XML data in Text Area var strData:String = String(event. result); taData.text = strData; } Which I am then passing to my xmlListCollection control mx:XMLListCollectio n id=xmllc_myData source={_xmlMyData .Table} / mx:TextArea id=taData width=300 height=100 / Then binding to my tree control: mx:Tree id=treeOffshore dataProvider= {xmllc_myData} labelField= DESCN showRoot=false /mx:Tree When viewing the data in the text area control, I have the following: NewDataSet Table CODEA1/CODE DESCArea One/DESC /Table Table CODEB2/CODE DESCBase Two/DESC /Table Table CODEC4/CODE DESCClass Four/DESC /Table Table CODED8/CODE DESCDemo Eight/DESC /Table /NewDataSet This is how the treeview renders: Area One A1 Area One Base Two B2 Base Two Class Four C4 Class Four Demo Eight D8 Demo Eight What I want is to be able to define the Description only at the first level only: Area One Base Two Class Four Demo Eight The next thing that I need to accomplish is that the second level of the treeview should actually be populated based on the CODE from the first level. For example: Area One Sub Item Area One Sub Item Area Two Base Two Sub Item Base Two Sub Item Base Three Sub Item Base Four Class Four Sub Item Class Four Demo Eight Sub Item Demo Eight Sub Item Demo Nine Sub Item Demo Ten Sub Item Demo Eleven The sub-items would be retrieved from the database based on the parent code (i.e Demo Eight = D8, Class Four = C4... etc.) I am quite new in this tree control thing (as well as flex) and have limited grasp of the concepts to be able to accomplish this. I am thinking either of modifying the XML data which I originally retrieve and probably insert the sub items per each node, although I am in a bind of how to accomplish the same. On the other hand, to give some of you further details, the treeview data would actually be coming from three tables where the table 1 is the base table, and the table 2 contains the children of table 1 and table 3 contains children data from table 3. I think I can manage to make one SQL statement to be able to retrieve the data for the whole treeview but I think that would be very complicated especially in the part where parsing the XML goes. I would sincerely appreciate your inputs on this. I am foraying into the world of Flex and this is quite a make or break scenario towards embracing this technology in our organization. Thanks and hoping to hear from all of you soon. Regards, Angelo
RE: [flexcoders] How to force construction when creationPolicy=all' does not work?
Attempting to force instantiation is usually a sign that you need to rethink your data flow. Use events to grab data from a model when the sub component is instantiated of shown. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mic Sent: Wednesday, August 19, 2009 3:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to force construction when creationPolicy=all' does not work? ViewStack.vsMainDash VBox.vbDrctrDash VBox.vbParmsAndDrills ViewStack.vsDashDrills VBox.CustLevel VBox.UDAC is the hierarchy. Run code vsMainDash.selectedChild = vbParmsAndDrills; vsDashDrills.selectedChild = vbCustLevel; ** null reference error Debug at line that errors does show vsDashDrills = null, whereas vsMainDash = ViewStack. I have tried splattering creationPolicy=all' everywhere - of course if I do this too high up I start getting null reference errors there. (If I OK the error the app does continue with everything displayed correctly so Flex does create what it should.) If creationPolicy=all' does not work, how do I force the ViewStack vsDashDrills into existence? TIA, Mic.
RE: [flexcoders] Parser Error | Itemrender
mx:Component defines a sub-document within an MXML file. You don't need it in the component file, just ?xml version=1.0 encoding=utf-8? mx:CheckBox label={data.label} selected={data.selected}/ Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ilikeflex Sent: Wednesday, August 19, 2009 7:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Parser Error | Itemrender Hi ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationcomplete() mx:Script ![CDATA[ import mx.collections.ArrayCollection; import com.DateUtils; private var stateList:Array = [ { label: Alaska, selected: false }, { label: Arkansas, selected: false }, { label: California, selected: false }, { label: Delaware, selected: false }, { label: Florida, selected: false }, { label: Georgia, selected: false }, { label: Hawaii, selected: false }, { label: Massachusetts, selected: false }, { label: Nevada, selected: false }, { label: Pennsylvania, selected: false }, { label: South Dakota, selected: false }, { label: Tennessee, selected: false }, { label: Utah, selected: false }, { label: Virginia, selected: false }, { label: Washington, selected: false } ]; public function onCreationcomplete():void { test.dataProvider = new ArrayCollection(stateList); } ]] /mx:Script mx:ComboBox id=test width=300 mx:itemRenderer mx:Component mx:CheckBox selectedField=selected change=data.selected = selected / /mx:Component /mx:itemRenderer /mx:ComboBox /mx:Application The above file works fine and it show check box as itemrender. Now if i want to create same itemrender in different file like ?xml version=1.0 encoding=utf-8? mx:Component xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:CheckBox label={data.label} selected={data.selected}/ /mx:Component it gives me parser error. Can somebody throw some light?? Thanks ilikeflex
RE: [flexcoders] 5 Datagrids ontop of each other, one resizes and the ones below shift up or down?
Should just be VBox with 5 DG's in it. Set rowCount to change its size. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nick Middleweek Sent: Wednesday, August 19, 2009 1:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 5 Datagrids ontop of each other, one resizes and the ones below shift up or down? Hi guys, Excuse the subject of this post :-) But it does sum up what I'm trying to achieve. I want to have 5 DataGrids ontop of each other in a vertical arrangement (A bit like the rows in Excel are ontop of each). In the bottom right of each DG, I want a little button that when clicked, expands/ collapses it's DG. When e.g. DG_2 is expanded, I want DG_1 to remain where it is but DG_3, DG_4 and DG_5 to shunt downwards and DG_2 will be expanded down to say ten rows. What is the best way to achieve this? Or should I be looking into DividedBox components? Or does the Tile Component help me? Or do I write it all myself using maths and do the resizing using top and bottom properties of the DG's? Thanks for any help... Nick
RE: [flexcoders] Cannot select identical item in my tree component...
Each object must have a unique UID. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of whiskerstasters Sent: Wednesday, August 19, 2009 1:06 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cannot select identical item in my tree component... Hi everyone, I'm having an issue with my tree component. I use an arrayCollection for my dataProvider. I have the same object in my arrayCollection nested at different levels. I cannot select this object at different levels in my tree, it always select the topmost nested object. Is there a way to work around this? I would like to be able to select an item even though the same item is found at different nested levels within the tree. Thanks!