[flexcoders] Re: Positioning from a label in a Button
buttonArray[i] = Button(hContainerButton.createChild( Button, button+i, Button)); buttonArray[i].label= ar_documents[i].title; --NOT WORKING- buttonArray[i].labelPath._x = 0; buttonArray[i].labelPath._y = 0; -- buttonArray[i].styleName= (readmore); buttonArray[i].icon = ImageLibrary.gb_flag; buttonArray[i].height = 17; buttonArray[i].labelPlacement = left; buttonArray[i].setStyle(borderThickness,1); --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: A Button has an undocumented property called labelPath whose value is a reference to the TextField that displays the Button's label. You should be able to change labelPath._x and labelPath._y in an event handler for the Button's 'initialize' or 'creationComplete' event. The Button code is supposed to automatically center the label inside the Button, taking into account the font size and the button height. Are you saying this isn't working for you? Can you send a snippet of code or file a bug? - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 8:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Positioning from a label in a Button --- In flexcoders@yahoogroups.com, rockmoyosa [EMAIL PROTECTED] wrote: Ok ok , I got de icon in my Button,but... I resized the button to height = 17 and my label has a font-size of 10. but the effect is thathalf of my text is visble. So I want the following: Or I can position my text with x and y or an marginTop = X(something). I find no standard solution in Flex?! Anybody! Come it can't be that hard. Must I build my own Button just to place my label a little bit higher in the button? Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] menubar color
selection color, selected fillcolor, fillcolor- nothing works with the menubar.. should i be using theCSS to change this? Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] flash components in flex
Hi all, i have just read the document about Building Rich Internet Applications with Macromedia Flex: A Flash Perspective. Are there any known issues or limitations in using flash components in flex? Do you have more documents links or informations? Thanks in advance Duccio Del Ministro ___ Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica Scaricalo ora! http://it.messenger.yahoo.it Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: who have the experience in useing flex in portal?
Hi, personnally I had to implement the first solution (portal webapp servers two different servers)... The main problem is you'll have to use a different entry point for your RemoteObject than the portal server, if webapp server isn't public, you'll have to use a gatewayed URL (I'm using the plumtree one, as I'm obliged to use plumtree) as flex gateway url... Romain --- In flexcoders@yahoogroups.com, loveewind [EMAIL PROTECTED] wrote: there are two approaches to useing flex in portal: 1.use the flex as a flash to put in portal jsp the code of portal jsp: %@ page session=false contentType=text/html import=java.util.*, cpportal.*% %@ taglib uri=/WEB-INF/tld/portlet.tld prefix=portletAPI % portletAPI:init/ table border=0 cellspacing=0 cellpadding=0 height=100% width=100% tr tdimg alt= border=0 width=0 height=500 src='wps:urlFindInTheme file=transparent.gif/'/td td object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354 codebase=https://download.macromedia.com/pub/shockwave/cabs/flash/swf lash.cab#version=7,0,14,0 width=955 height='100%' id=ReportCenterInboxApp param name=flashVars value=userId param name=src value=http://192.168.15.140:8080/crm/CRMUI/CRMApp.mxml.swf; embed pluginspage=https://www.macromedia.com/go/getflashplayer; width=955 height=100% flashVars= src=http://192.168.15.140:8080/crm/CRMUI/CRMApp.mxml.swf; name=ReportCenterInboxApp/ /object /td /tr /table in this case,there two applications: the flex application run in jboss the portal application run in IBM portal server 2.use flex taglib to put mxml file in portal jsp the code: %@ taglib uri=FlexTagLib prefix=mm % mm:mxml source=/CRMUI/CRMApp.mxml / %@ page session=false contentType=text/html import=java.util.*, hello2.*% %@ taglib uri=/WEB-INF/tld/portlet.tld prefix=portletAPI % portletAPI:init/ . in this case,there is only on application the application run in portal server I'd like to know the difference between the two approaches and the related project development experience thank you, Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Positioning from a label in a Button
It works with forceMArgin, but... you don't need to create a theme to do so, probably only if you gonna use it in mxml, which I'm not. I implemented it like this: var b:Button = new Button(); b.createClassObject( CustomButtonSkin, face_mc, 1, {styleName:StyleName}); Works perfectly!! Thanx. --- In flexcoders@yahoogroups.com, Joe Berkovitz [EMAIL PROTECTED] wrote: Unfortunately it seems that it really *is* that hard. Someone at Macromedia should take note of the fact that the button label placement appears to be hardcoded into the border metrics of ButtonSkin. We wound up having to create a custom theme with its own ButtonSkin subclass just to override this annoying behavior. It uses a forceMargin style to selectively override the hardcoded margin of 3 pixels. To use this one must compile and make use of a theme containing the following class -- somewhat involved, see MM docs for programmatic skinning. Once done, one can override the margin by specifying a forceMargin: 1 or such, in the CSS style applied to one's button. . .. . ...j === import mx.skins.halo.ButtonSkin; import mx.core.ext.UIObjectExtensions; class yourPackageHere.CustomButtonSkin extends ButtonSkin { static var symbolName:String = ButtonSkin; static var symbolOwner:Object = CustomButtonSkin; function getBorderMetrics():Object { var forceMargin = getStyle(forceMargin); if (forceMargin == undefined) { return super.getBorderMetrics(); } else { __borderMetrics = { left: forceMargin, top: forceMargin, right: forceMargin, bottom:forceMargin }; return __borderMetrics; } } static function classConstruct():Boolean { UIObjectExtensions.Extensions(); _global.skinRegistry[CustomButtonSkin] = true; return true; } static var classConstructed:Boolean = classConstruct(); static var UIObjectExtensionsDependency:UIObjectExtensions = UIObjectExtensions; } rockmoyosa wrote: --- In flexcoders@yahoogroups.com, rockmoyosa [EMAIL PROTECTED] wrote: Ok ok , I got de icon in my Button,but... I resized the button to height = 17 and my label has a font-size of 10. but the effect is thathalf of my text is visble. So I want the following: Or I can position my text with x and y or an marginTop = X(something). I find no standard solution in Flex?! Anybody! Come it can't be that hard. Must I build my own Button just to place my label a little bit higher in the button? Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Tips on Custom component
With this email attached an swf. This swf was created by our designer. When u click the second item a pane opens. Its my job to make this into a component. However this component must be V2 compatable and should be usable like the accordian pane, via tags. Does any1 have a clue where to find the right information I need to create a V2 component wich has the functionalities the attached representation has. The component has: - an variable amount of children - a variable space between different items - an mxml component (like TabNavigator and Accordion) as child per item The component must be fully stylable and skinnable. Does any1 have some hints on how to start? Your help is greatly appreciated. Greetz Erik Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ menuExample.swf Description: menuExample.swf
[flexcoders] Info on debug
Hi, i have read CHAPTER 33: Debugging Flex Applications , but i don't understand because don't work. I'm using trace into my ActionScript class, here my mm.cfg ProfilingOutputFileEnable=0 ProfilingOutputDirectory={path to directory where profiler.war is deployed}\WEB-INF\ProfilerData FrameProfilingEnable=0 ProfileFunctionEnable=1 TraceOutputFileEnable=1 ErrorReportingEnable=1 TraceOutputFileName=c:\flashlog.txt TraceOutputFileEnable=1 ErrorReportingEnable=1 SuppressDebuggerDialog=1 TraceLocationEnable=1 this file i have put it in c:\programmi\macromedia\flex\bin? i have set all value in my flex config file. If possibile i won't use fdb, if possibile, for will be ok only print the var content into my TraceOutputFileName. i'm trying to use http://localhost:8000/jportal/view/shop/banco.mxml?debug=true and my IExplorer prompt the debug window, i choose the localhost but Flash Player debug return me canno't connect debugger. If i use fdb start http://localhost:8000/jportal/view/shop/banco.mxml debugger start fdb start http://localhost:8000/jportal/view/shop/banco.mxml continue But my trace don't display nothing, also because my app don't run, all interaction with button or amf don't work. surely i mistake anything, but i wish only to print some value of my ActionScript class into console or file, i don't interest me put breakpoint or other, only to see the value of my var. Can you help me Devis Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Asfunction not working inside htmlText
The problem here is that asfunction (at least the function asfunction is calling) is called on the parent movieclip where the textfield resides. So in this case your call will end up in your text component. If u change asfunction:hello_you to asfunction:_parent.hello_you the example should work. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: donderdag 28 april 2005 18:31 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Asfunction not working inside htmlText I just now needed this myself, and sure enough, it doesn't work. Is this an known bug? Has anyone discovered a workaround? Tracy -Original Message- From: Greg Fuller [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 5:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Asfunction not working inside htmlText Hi everyone, I'm having trouble getting asfunction to work inside htmlText. This post in the MM flex newgroup suggests that asfunction may have been broken with the release of 1.5: http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid= 346threadid=929079highlight_key=ykeyword1=asfunction Here's a super simplified version of what I'm trying to do: --- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=* mx:Script function hello_you(you:String) { alert(hello + you); } /mx:Script mx:Text mx:htmlText![CDATA[ Click a href=asfunction:hello_you,'Dolly'here/a to say hello. ]]/mx:htmlText /mx:Text mx:Spacer height=20/ !-- this works, but asfunction above does not -- mx:Button label=Click to say hello click=hello_you('Polly');/ /mx:Application Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: context-sensitive help
Thanks Jason. This is useful information. I'll try this. Thanks Sudha --- In flexcoders@yahoogroups.com, Jason Szeto [EMAIL PROTECTED] wrote: As a followup to my post, I realized I was running my test on Firefox, which does not display its own Context help when pressing F1. In IE, when you press F1, it pops up the context help. To get around this problem, you can use a bit of script in your html page. Create a wrapper for your mxml app (one method is to grab the html source when you view your mxml app), and then add in the following script into your html wrapper: SCRIPT function dsble_Help(){ //replace this -alert- with your help scripts alert('confirmation that event will trigger the F1 command') return false; } document.onhelp=dsble_Help /SCRIPT Note that your Flex app will still receive the F1 keystroke (ascii 112) in IE. Jason -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 11:17 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: context-sensitive help You can easily build your own context-sensitive help by listening for the keyDown event and using the FocusManager's getFocus call to retrieve the control in focus. Here is a simple app that can get you started: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=* width=700 keyDown=handleKey(event) mx:Script function handleKey(event) { msg.text += handleKey code + Key.getCode() + target + event.target + focus + getFocusManager().getFocus() + \n; } /mx:Script mx:HBox mx:Text text=lkajrlekja rekl / mx:RadioButton label=bobbe/ /mx:HBox mx:TextInput keyDown=handleKey(event)/ mx:NumericStepper/ mx:Button/ mx:TextArea width=90% height=70% id=msg/ /mx:Application -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 12:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: context-sensitive help As i know in flex,i think this type of requirement we can't implement in flex application.And this is very useful functionality.If they support in future this in flex very much useful!! -Thipperudra --- In flexcoders@yahoogroups.com, ssudha2 [EMAIL PROTECTED] wrote: Are features for context-sensitive help available in Flex out-of- box? That is, apart from tool-tip, can I invoke a help window for each field on click of F1. Should this be implemented programmatically or features are already available in Flex? Thanks Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Retrieving XML Document from Web Service
I've written a .Net web service which returns a XML Document object. I'd like to retreive this xml document and bind this as dataprovider to my menubar control. Can anybody let me know how this can be done? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Multiple dataProviders for 1 dataGrid??
2 ways of solving the issue: 1. Rewrite the Webservice (best solution) 2. Use 2 datagrids and bind the same WS to both. The first datagrid can display the TOTALBAL for the selected date and the other TOTALBAL for the yesterday's date. Then the problem is how you can make it look like one datagrid with synchronised scrolling etc. Well we have Alistair guru who has written an excellent article on how to accomplish this. http://www.richinternetapps.com/archives/000101.html Regards Sree --- In flexcoders@yahoogroups.com, Jesus Salvador Ramos Cardona [EMAIL PROTECTED] wrote: Would it not be better and cleaner to modify the WS so you have all the data needed in one and only one message? Best regards. J. De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre de Dave Enviado el: Jueves, 28 de Abril de 2005 05:24 pm Para: flexcoders@yahoogroups.com Asunto: [flexcoders] Re: Multiple dataProviders for 1 dataGrid?? Importancia: Alta OK. Let me backup. Below is a sample of the data returned (an array of objects?) from the WS with the date specified as 1/10/2005. The dataProvider for the datagrid is {service1.PulseLoansToday.result.diffgram.PulseLoansToday.PulseLo ansToday} Binding to the dataProvider as specified produces the desired results within the datagrid (using CATEGORY, TOTALBAL, etc. as the column names). Here's the rub; within the SAME datagrid, I need to display one column of TOTALBAL for the selected date(1/10/2005 in this case), and another column of TOTALBAL for yesterday's date (thisDate request is empty so default is previous day's date). Since I can only bind a datagrid to one dataProvider, I need a way to combine the results into a new dataProvider that I can bind to the datagrid. Thanks for your help, -Dave SAMPLE DATA RETURNED FROM WEB SERVICE ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body PulseLoansTodayResponse xmlns=http://srv-corp- sql/XmlWebServices/ PulseLoansTodayResult xs:schema xmlns:msdata=urn:schemas-microsoft-com:xml- msdata xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns= id=PulseLoansToday xs:element name=PulseLoansToday msdata:IsDataSet=true; xs:complexType xs:choice maxOccurs=unbounded xs:element name=PulseLoansToday xs:complexType xs:sequence xs:element name=SCHEDDATE type=xs:string minOccurs=0/ xs:element name=CATEGORY type=xs:string minOccurs=0/ xs:element name=TOTALBAL type=xs:decimal minOccurs=0/ xs:element name=TOTALCNT type=xs:decimal minOccurs=0/ xs:element name=SORTBY type=xs:int minOccurs=0/ /xs:sequence /xs:complexType /xs:element /xs:choice /xs:complexType /xs:element /xs:schema diffgr:diffgram xmlns:diffgr=urn:schemas-microsoft- com:xml-diffgram-v1 xmlns:msdata=urn:schemas-microsoft-com:xml- msdata PulseLoansToday xmlns= PulseLoansToday diffgr:id=PulseLoansToday1 msdata:rowOrder=0; SCHEDDATE01/10/2005/SCHEDDATE CATEGORY1-NEW VEHICLE/CATEGORY TOTALBAL61427820.1900/TOTALBAL TOTALCNT3177/TOTALCNT SORTBY1/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday2 msdata:rowOrder=1; SCHEDDATE01/10/2005/SCHEDDATE CATEGORY2-USED VEHICLE/CATEGORY TOTALBAL51179669.7000/TOTALBAL TOTALCNT4322/TOTALCNT SORTBY2/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday3 msdata:rowOrder=2; SCHEDDATE01/10/2005/SCHEDDATE CATEGORY3-UNSECURED/CATEGORY TOTALBAL997362.0700/TOTALBAL TOTALCNT761/TOTALCNT SORTBY3/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday4 msdata:rowOrder=3; SCHEDDATE01/10/2005/SCHEDDATE CATEGORY4-EQUITY MORTGAGES/CATEGORY TOTALBAL11356456.8100/TOTALBAL TOTALCNT545/TOTALCNT SORTBY4/SORTBY /PulseLoansToday
RE: [flexcoders] Newbie: Flash vs. Flex, CPUs, Lazslo
An example would be Remoting, any here who have used Flash Remoting in IDE form know its more tedious to implement then FLEX. I don't have this problem, but that may be because we internally use our own remoting components. On all other point I agree with u. We chose flex for another importend reason: the component framework. Allthough I personally don't like the V2 components, macromedia uses them in Flex and will continue to develop them. They are with a large team wich is capable of managing such a component library. We could develop components ourself wich would be half the size and more optimized, but the developing takes a lot of time and getting them completely bugfree would not be doable. Greetz erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Barnes Sent: vrijdag 29 april 2005 3:00 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Newbie: Flash vs. Flex, CPUs, Lazslo On 4/29/05, Jim Schneider [EMAIL PROTECTED] wrote: 1. Could someone explain (or point me to a doc/faq) that tells me why I would choose Flex over Flash. What can Flex do that Flash can't? Even if it's more difficult in Flash, perhaps it's worth it given the cost of Flex. I'll take a stab at this one. As a Flash IDE developer for many a year, I've found that its really a bottle neck and a slow process at times. Flash IDE takes a lot of discipline and understanding of the concept of flash itself and you better be armed before taking on a large project. When developing in large projects you tend to be a one man show, as to share resources or code amongst other developers takes a lot of communication and patience. That alone improves why FLEX is a valid purchase. As for what can FLEX do FLASH can't? not much technically as FLEX is really an alternative approach to the end goal. It does bring a lot more to the table then FLASH IDE in terms of Rapid Development. An example would be Remoting, any here who have used Flash Remoting in IDE form know its more tedious to implement then FLEX. Its examples like this that change your perspective on FLASH vs FLEX. On top of that, FLEX handles a lot of your tasks for you, things like initialization modals, busy cursors, history management etc are all automated tasks within FLEX. In terms of costs, i've seen soo many projects take months to do what could be done in FLEX in half the time. These are also run by some very competent FLASH developers who have years of experience and know the language/tool off by heart. Its just cumbersome, slow and at times very tedious. That being said, you do a lot more control visually / debugging wise in FLASH IDE then you currently at present have in FLEX. On top of that your portability is much more open then at present with FLEX. Implementing Runtime Shared Libraries in FLASH IDE is awful and painful, just ask JessterXL all about that one, he's mastered it but he went through a learning curve and pain to get to that point. I like wise, i think i've got it mastered but found it took a lot of imagination and research. In FLEX? bah its next to easy as implementing a Tree component. In FLASH MX 2004 Pro, implementing even a Tree component (databinding aside) isn't a simple task and requires some extra work then compared to FLEX. Cost wise, you'll blow more money using FLASH IDE then you will via FLEX for a large application. If you are building a small RIA app that isn't as large and doesn't require a team of developers to work on, then yes FLASH MX 2004 Pro is the suitable resource. 2. Speaking of cost, I read on MM's site that they recommend a typical deployment of a Flex app have 6 - 8 CPUs. Is this true in practice? If I have an app that has 50 users (would grow to perhaps 10K users) who don't hit the system very hard, what are CPU requirements? Are there any performance benchmarks that I can use as a guideline for what I would need initially and at what point I would need to upgrade. As a small company, we can probably chew off $12K, $70K is another story (unless I misunderstand the licensing). Not sure on server-side, i've oftend wondered that my self and while i've read various optimization techniques and resources i'm still skeptical of its use in terms of high volume. That being said, we could easily use a DUAL CPU setup here at work for a FLEX application (approx 300-500 end users hitting it daily) and provided there is enough ram thrown at it, it should hold up fine. If need be i'd look into clustering the servers or throwing more RAM at it. I've FLEX Server tends to have ok automated garbage collection and simply apply the same server-side rules as i do with a CFMX server. 3. Has anyone had any real-world experience/lessons-learned with Laszlo and any comparisons with Flex? I've gone down the path of using Laszlo as a prototype concept, comparing it to FLEX? In many ways the XML flavour Laszlo brings to the table is more simplistic but at
RE: [flexcoders] KeyDown Event returns incorrect ascii values
U could also try and see if Key.getCode does return the right value. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt ChotinSent: vrijdag 29 april 2005 6:15To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] KeyDown Event returns incorrect ascii values Can you try setting System.useCodepage = true and see if that changes which values you get? Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: Multiple dataProviders for 1 dataGrid??
Tracy, Thanks for your help. Now I have to add other fields from other dataproviders but I think I can handle it. I know this is probably AS 101, but how do I create an object in the new array that is a product of a math function between 2 other objects in the new array? Example: I need to create a column in the datagrid called GROWTH that is simply the difference between TOTALBAL for today and TOTALBAL for yesterday (TODAY - YESTERDAY). Everything I try results in NaN. Thanks for your patience. -Dave --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: The example is attached, along with the sample xml files I created to test it. Your array exists at result.diffgram.PulseLoansToday. In the example I left the diffgram node out of my test xml. Basically, you assign the today and yesterday arrays to variables, iterate through the today items, get the matching yesterday item, build a combined item object, and add it to the combined dataProvider array, which is bound to the DataGrid DataProvider. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Sent: Thursday, April 28, 2005 6:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Multiple dataProviders for 1 dataGrid?? OK. Let me backup. Below is a sample of the data returned (an array of objects?) from the WS with the date specified as 1/10/2005. The dataProvider for the datagrid is {service1.PulseLoansToday.result.diffgram.PulseLoansToday.PulseLo ansToday} Binding to the dataProvider as specified produces the desired results within the datagrid (using CATEGORY, TOTALBAL, etc. as the column names). Here's the rub; within the SAME datagrid, I need to display one column of TOTALBAL for the selected date(1/10/2005 in this case), and another column of TOTALBAL for yesterday's date (thisDate request is empty so default is previous day's date). Since I can only bind a datagrid to one dataProvider, I need a way to combine the results into a new dataProvider that I can bind to the datagrid. Thanks for your help, -Dave SAMPLE DATA RETURNED FROM WEB SERVICE ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body PulseLoansTodayResponse xmlns=http://srv-corp- sql/XmlWebServices/ PulseLoansTodayResult xs:schema xmlns:msdata=urn:schemas-microsoft-com:xml- msdata xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns= id=PulseLoansToday xs:element name=PulseLoansToday msdata:IsDataSet=true; xs:complexType xs:choice maxOccurs=unbounded xs:element name=PulseLoansToday xs:complexType xs:sequence xs:element name=SCHEDDATE type=xs:string minOccurs=0/ xs:element name=CATEGORY type=xs:string minOccurs=0/ xs:element name=TOTALBAL type=xs:decimal minOccurs=0/ xs:element name=TOTALCNT type=xs:decimal minOccurs=0/ xs:element name=SORTBY type=xs:int minOccurs=0/ /xs:sequence /xs:complexType /xs:element /xs:choice /xs:complexType /xs:element /xs:schema diffgr:diffgram xmlns:diffgr=urn:schemas-microsoft- com:xml-diffgram-v1 xmlns:msdata=urn:schemas-microsoft-com:xml- msdata PulseLoansToday xmlns= PulseLoansToday diffgr:id=PulseLoansToday1 msdata:rowOrder=0; SCHEDDATE01/10/2005/SCHEDDATE CATEGORY1-NEW VEHICLE/CATEGORY TOTALBAL61427820.1900/TOTALBAL TOTALCNT3177/TOTALCNT SORTBY1/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday2 msdata:rowOrder=1; SCHEDDATE01/10/2005/SCHEDDATE CATEGORY2-USED VEHICLE/CATEGORY TOTALBAL51179669.7000/TOTALBAL TOTALCNT4322/TOTALCNT SORTBY2/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday3 msdata:rowOrder=2; SCHEDDATE01/10/2005/SCHEDDATE CATEGORY3-UNSECURED/CATEGORY TOTALBAL997362.0700/TOTALBAL TOTALCNT761/TOTALCNT SORTBY3/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday4 msdata:rowOrder=3;
[flexcoders] Re-initializing
I have an app in which users are allowed to add and delete children from containers. The changes only seem to fully percolate through when the whole app is reinitialized through a browser refresh. What is the way to trigger that from a command within the app? - Tom Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: saving data from datagrid
Thanks for reply. I am new to these. Signature of my java class which returns array of value object is as follows Public static ItemdetailVO[] getItemDetails(String month); { . } when I make a call from mxml file as you mentioned below ro.updateMethod(myDataGrid.dataProvider); Can be the signature of my java class method be like this...? Public static String saveItemDetails(ItemDetailVO itemdetailArray) { System.out.println(from DAO save method array length +saveAdjVOArray.length); for(int i=0;isaveAdjVOArray.length;i++) { System.out.println(Factor from save method : +(ItemAdjApplVO)saveAdjVOArray[i]); } } If I have a save method signature like above and I got length = 5 from first system print out statement and null from second statement. How to access individual data elements in each VO in my java class. Please help. I am reaching my deadlines Thanks in advance.. Thanks! Hari -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of joao_m_fernandes Sent: Thursday, April 28, 2005 11:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: saving data from datagrid Hari, You can send it back like this: In AS: ro.updateMethod(myDataGrid.dataProvider); with MXML mx:RemoteObject id=ro ... mx:method name=updateMethod mx:arguments myArray{myDataGrid.dataProvider}/myArray /mx:arguments /mx:method /mx:RemoteObject João Fernandes --- In flexcoders@yahoogroups.com, Doodi, Hari - BLS CTR [EMAIL PROTECTED] wrote: Hi All, I have a updatable datagrid on my screen. I did get data from the RemoteObject call from java backend (an array of value objects). Data got displayed on screen well and user can make updates. Now my question is how can I send this data from datagrid back to my javaclass thru RemoteObject call to save on to database. Please advice or point me to some code examples. Thanks in advance.. Thanks! Hari Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Info on debug
On windows, mm.cfg goes in your user directory... by default this will be somewhere like: C:\Documents and Settings\yourloginname\mm.cfg The output file, flashlog.txt, contains messages from the debug version of the Flash Player including any trace() statements you add to your own ActionScript code. I use cygwin and run the tail command to keep a console window open to watch updates to flashlog.txt. You may want to creat a shortcut to conveniently run the following command: C:\cygwin\bin\tail.exe -0f C:\flashlog.txt (-f means follow, but -0f follows from the end of the file so that it looks like a fresh session when you open it despite whether the log is empty or not) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 5:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Info on debug Hi, i have read CHAPTER 33: Debugging Flex Applications , but i don't understand because don't work. I'm using trace into my ActionScript class, here my mm.cfg ProfilingOutputFileEnable=0 ProfilingOutputDirectory={path to directory where profiler.war is deployed}\WEB-INF\ProfilerData FrameProfilingEnable=0 ProfileFunctionEnable=1 TraceOutputFileEnable=1 ErrorReportingEnable=1 TraceOutputFileName=c:\flashlog.txt TraceOutputFileEnable=1 ErrorReportingEnable=1 SuppressDebuggerDialog=1 TraceLocationEnable=1 this file i have put it in c:\programmi\macromedia\flex\bin? i have set all value in my flex config file. If possibile i won't use fdb, if possibile, for will be ok only print the var content into my TraceOutputFileName. i'm trying to use http://localhost:8000/jportal/view/shop/banco.mxml?debug=true and my IExplorer prompt the debug window, i choose the localhost but Flash Player debug return me canno't connect debugger. If i use fdb start http://localhost:8000/jportal/view/shop/banco.mxml debugger start fdb start http://localhost:8000/jportal/view/shop/banco.mxml continue But my trace don't display nothing, also because my app don't run, all interaction with button or amf don't work. surely i mistake anything, but i wish only to print some value of my ActionScript class into console or file, i don't interest me put breakpoint or other, only to see the value of my var. Can you help me Devis Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: NetStream instance in Media Components
Let me know if I can help with any specific feedback on the Media components. Looking forward to the improvements. --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: Yeah, we're looking at improving the media components for 2.0 to hopefully avoid issues like this. Matt _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 8:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: NetStream instance in Media Components Thanks for the reply, When I use the start event to start playing the attached swf, the swf starts playing but the stream doesn't start playing for a little longer and since I am using the Media Component I can't tell if its buffering or doing what. I do know the play head doesn't really start playing until its done with what its doing (which clearly looks like buffering). So in short the start event is fired but the video doesn't play for a while. I had to end up doing the syncing off the change event which is not very reliable but is doable. As when the playHead moves the video really is playing. But the other thing was (Non-Flex or Non-Media components) articles I saw about NetStream and streaming FLV had some examples about showing a loader during the buffering time with netStream.onStatus. So I was hoping for a easy way to get control of the stream's instance to do the normal FCS FLV streaming enhancements. With Media components I can't get figure out what is really related to what and loose the power of talking with FCS. I guess I will have to ditch the Media Components and create a custom component to use in Flex to really get it to work. A little disappointed. --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: Hmm, in the code I wrote the start event generally fired right around the time things were ready to go. Even if I called play(someNon0Time) start would fire when the buffer had reached the point that I was ready to play (I think). The instance is very buried in the code and not really meant to be exposed. I don't have any reliable way of telling you what to look for. Matt _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 2:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] NetStream instance in Media Components Is there a instance of NetStream or PlayerNetStream in the Media Components? If not does the Media Components create some instance of the NetStream or PlayerNetStream some where else? The closest thing to FCS and Flex is: http://coenraets.com/viewarticle.jsp?articleId=90 http://coenraets.com/viewarticle.jsp?articleId=90 http://coenraets.com/viewarticle.jsp?articleId=90 http://coenraets.com/viewarticle.jsp?articleId=90 In his LiveMediaDisplay class he calls: mx.controls.streamingmedia.PlayerNetStream.prototype.play = function (s) { super.setBufferTime(1); super.play(s); } I know this is not calling an instance but overiding the play method of PlayerNetStream. But where is the instance? super has to be referencing a instance some where right? What I am doing right now is I have a Media Component (both Playback and the Display/Controller) that loads a FCS streaming flv by setMedia, with a url like rtmp://fcsserver/app/instance/some.flv. It loads the flv just fine, but the buffering is causing me troubles. As the start event on the Media Component doesn't relate to the buffering. Basically I am looking for an event that really means the flv is ready to play, as I am trying to sync some swf's to it. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Info on debug
Hi Peter, i have put my mm.cfg into my user Windows folder: 1) my flashlog.log is not created. 2) I have also http://localhost:8080/test/view/shop/banco.mxml?debug=true into my Explorer but i receive always cannot connect debugger. 3) I have also http://localhost:8080/test/view/shop/banco.mxml but nothing. Can you help me please. Devis On windows, mm.cfg goes in your user directory... by default this will be somewhere like: C:\Documents and Settings\yourloginname\mm.cfg The output file, flashlog.txt, contains messages from the debug version of the Flash Player including any trace() statements you add to your own ActionScript code. I use cygwin and run the tail command to keep a console window open to watch updates to flashlog.txt. You may want to creat a shortcut to conveniently run the following command: C:\cygwin\bin\tail.exe -0f C:\flashlog.txt (-f means follow, but -0f follows from the end of the file so that it looks like a fresh session when you open it despite whether the log is empty or not) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 5:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Info on debug Hi, i have read CHAPTER 33: Debugging Flex Applications , but i don't understand because don't work. I'm using trace into my ActionScript class, here my mm.cfg ProfilingOutputFileEnable=0 ProfilingOutputDirectory={path to directory where profiler.war is deployed}\WEB-INF\ProfilerData FrameProfilingEnable=0 ProfileFunctionEnable=1 TraceOutputFileEnable=1 ErrorReportingEnable=1 TraceOutputFileName=c:\flashlog.txt TraceOutputFileEnable=1 ErrorReportingEnable=1 SuppressDebuggerDialog=1 TraceLocationEnable=1 this file i have put it in c:\programmi\macromedia\flex\bin? i have set all value in my flex config file. If possibile i won't use fdb, if possibile, for will be ok only print the var content into my TraceOutputFileName. i'm trying to use http://localhost:8000/jportal/view/shop/banco.mxml?debug=true and my IExplorer prompt the debug window, i choose the localhost but Flash Player debug return me canno't connect debugger. If i use fdb start http://localhost:8000/jportal/view/shop/banco.mxml debugger start fdb start http://localhost:8000/jportal/view/shop/banco.mxml continue But my trace don't display nothing, also because my app don't run, all interaction with button or amf don't work. surely i mistake anything, but i wish only to print some value of my ActionScript class into console or file, i don't interest me put breakpoint or other, only to see the value of my var. Can you help me Devis Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Positioning from a label in a Button
You could also get this to work with the MXML component - which I like better than having to define the components in ActionScript - by ensuring the CustomButtonSkin is compiled into your SWF Eg: mx:Style Button { forceMargin: 20; } /mx:Style mx:Script ![CDATA[ var buttonSkinRef : yourpackage.skins.CustomButtonSkin; ]] /mx:Script mx:Button label=Whatever / The button would have margins of 20. Ali -- Alistair McLeod Development Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rockmoyosa Sent: 29 April 2005 10:10 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Positioning from a label in a Button It works with forceMArgin, but... you don't need to create a theme to do so, probably only if you gonna use it in mxml, which I'm not. I implemented it like this: var b:Button = new Button(); b.createClassObject( CustomButtonSkin, face_mc, 1, {styleName:StyleName}); Works perfectly!! Thanx. --- In flexcoders@yahoogroups.com, Joe Berkovitz [EMAIL PROTECTED] wrote: Unfortunately it seems that it really *is* that hard. Someone at Macromedia should take note of the fact that the button label placement appears to be hardcoded into the border metrics of ButtonSkin. We wound up having to create a custom theme with its own ButtonSkin subclass just to override this annoying behavior. It uses a forceMargin style to selectively override the hardcoded margin of 3 pixels. To use this one must compile and make use of a theme containing the following class -- somewhat involved, see MM docs for programmatic skinning. Once done, one can override the margin by specifying a forceMargin: 1 or such, in the CSS style applied to one's button. . .. . ...j === import mx.skins.halo.ButtonSkin; import mx.core.ext.UIObjectExtensions; class yourPackageHere.CustomButtonSkin extends ButtonSkin { static var symbolName:String = ButtonSkin; static var symbolOwner:Object = CustomButtonSkin; function getBorderMetrics():Object { var forceMargin = getStyle(forceMargin); if (forceMargin == undefined) { return super.getBorderMetrics(); } else { __borderMetrics = { left: forceMargin, top: forceMargin, right: forceMargin, bottom:forceMargin }; return __borderMetrics; } } static function classConstruct():Boolean { UIObjectExtensions.Extensions(); _global.skinRegistry[CustomButtonSkin] = true; return true; } static var classConstructed:Boolean = classConstruct(); static var UIObjectExtensionsDependency:UIObjectExtensions = UIObjectExtensions; } rockmoyosa wrote: --- In flexcoders@yahoogroups.com, rockmoyosa [EMAIL PROTECTED] wrote: Ok ok , I got de icon in my Button,but... I resized the button to height = 17 and my label has a font-size of 10. but the effect is thathalf of my text is visble. So I want the following: Or I can position my text with x and y or an marginTop = X(something). I find no standard solution in Flex?! Anybody! Come it can't be that hard. Must I build my own Button just to place my label a little bit higher in the button? Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Info on debug
I think you're confusing two concepts here... If you just want trace output, don't bother right now with the Flex concept of SWD generation with ?debug=true - it's not necessary to get ActionScript trace statements to show up in the log. What is necessary is the debugger version of the Flash Player - I believe an installer for the Flash Player 7 version of this special player ships with Flex 1.5. (I have two browsers installed and keep a flash player debugger version installed in one, and the normal flash player for real-world scenario testing in another). Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 10:52 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Info on debug Hi Peter, i have put my mm.cfg into my user Windows folder: 1) my flashlog.log is not created. 2) I have also http://localhost:8080/test/view/shop/banco.mxml?debug=true into my Explorer but i receive always cannot connect debugger. 3) I have also http://localhost:8080/test/view/shop/banco.mxml but nothing. Can you help me please. Devis On windows, mm.cfg goes in your user directory... by default this will be somewhere like: C:\Documents and Settings\yourloginname\mm.cfg The output file, flashlog.txt, contains messages from the debug version of the Flash Player including any trace() statements you add to your own ActionScript code. I use cygwin and run the tail command to keep a console window open to watch updates to flashlog.txt. You may want to creat a shortcut to conveniently run the following command: C:\cygwin\bin\tail.exe -0f C:\flashlog.txt (-f means follow, but -0f follows from the end of the file so that it looks like a fresh session when you open it despite whether the log is empty or not) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 5:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Info on debug Hi, i have read CHAPTER 33: Debugging Flex Applications , but i don't understand because don't work. I'm using trace into my ActionScript class, here my mm.cfg ProfilingOutputFileEnable=0 ProfilingOutputDirectory={path to directory where profiler.war is deployed}\WEB-INF\ProfilerData FrameProfilingEnable=0 ProfileFunctionEnable=1 TraceOutputFileEnable=1 ErrorReportingEnable=1 TraceOutputFileName=c:\flashlog.txt TraceOutputFileEnable=1 ErrorReportingEnable=1 SuppressDebuggerDialog=1 TraceLocationEnable=1 this file i have put it in c:\programmi\macromedia\flex\bin? i have set all value in my flex config file. If possibile i won't use fdb, if possibile, for will be ok only print the var content into my TraceOutputFileName. i'm trying to use http://localhost:8000/jportal/view/shop/banco.mxml?debug=true and my IExplorer prompt the debug window, i choose the localhost but Flash Player debug return me canno't connect debugger. If i use fdb start http://localhost:8000/jportal/view/shop/banco.mxml debugger start fdb start http://localhost:8000/jportal/view/shop/banco.mxml continue But my trace don't display nothing, also because my app don't run, all interaction with button or amf don't work. surely i mistake anything, but i wish only to print some value of my ActionScript class into console or file, i don't interest me put breakpoint or other, only to see the value of my var. Can you help me Devis Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Positioning from a label in a Button
Thanks for the code; I'll look into the problem and file a bug. But it doesn't surprise me that setting labelPath._x and labelPath._y like that doesn't work... you're doing it before the layout inside the Button occurs. I suggested setting them in an event handler, which would execute after the layout occurs. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 11:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Positioning from a label in a Button buttonArray[i] = Button(hContainerButton.createChild( Button, button+i, Button)); buttonArray[i].label= ar_documents[i].title; --NOT WORKING- buttonArray[i].labelPath._x = 0; buttonArray[i].labelPath._y = 0; -- buttonArray[i].styleName= (readmore); buttonArray[i].icon = ImageLibrary.gb_flag; buttonArray[i].height = 17; buttonArray[i].labelPlacement = left; buttonArray[i].setStyle(borderThickness,1); --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: A Button has an undocumented property called labelPath whose value is a reference to the TextField that displays the Button's label. You should be able to change labelPath._x and labelPath._y in an event handler for the Button's 'initialize' or 'creationComplete' event. The Button code is supposed to automatically center the label inside the Button, taking into account the font size and the button height. Are you saying this isn't working for you? Can you send a snippet of code or file a bug? - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 8:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Positioning from a label in a Button --- In flexcoders@yahoogroups.com, rockmoyosa [EMAIL PROTECTED] wrote: Ok ok , I got de icon in my Button,but... I resized the button to height = 17 and my label has a font-size of 10. but the effect is thathalf of my text is visble. So I want the following: Or I can position my text with x and y or an marginTop = X(something). I find no standard solution in Flex?! Anybody! Come it can't be that hard. Must I build my own Button just to place my label a little bit higher in the button? Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Info on debug
Hi, i found it the proble, if i use FireFox the flashlog.log don't work, then i use ieexplorer work. I don't know because, Ciao Devis ps. ok i don't use generation with ?debug=true . Peter Farland ha scritto: I think you're confusing two concepts here... If you just want trace output, don't bother right now with the Flex concept of SWD generation with ?debug=true - it's not necessary to get ActionScript trace statements to show up in the log. What is necessary is the debugger version of the Flash Player - I believe an installer for the Flash Player 7 version of this special player ships with Flex 1.5. (I have two browsers installed and keep a flash player debugger version installed in one, and the normal flash player for real-world scenario testing in another). Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 10:52 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Info on debug Hi Peter, i have put my mm.cfg into my user Windows folder: 1) my flashlog.log is not created. 2) I have also http://localhost:8080/test/view/shop/banco.mxml?debug=true into my Explorer but i receive always cannot connect debugger. 3) I have also http://localhost:8080/test/view/shop/banco.mxml but nothing. Can you help me please. Devis On windows, mm.cfg goes in your user directory... by default this will be somewhere like: C:\Documents and Settings\yourloginname\mm.cfg The output file, flashlog.txt, contains messages from the debug version of the Flash Player including any trace() statements you add to your own ActionScript code. I use cygwin and run the tail command to keep a console window open to watch updates to flashlog.txt. You may want to creat a shortcut to conveniently run the following command: C:\cygwin\bin\tail.exe -0f C:\flashlog.txt (-f means follow, but -0f follows from the end of the file so that it looks like a fresh session when you open it despite whether the log is empty or not) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 5:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Info on debug Hi, i have read CHAPTER 33: Debugging Flex Applications , but i don't understand because don't work. I'm using trace into my ActionScript class, here my mm.cfg ProfilingOutputFileEnable=0 ProfilingOutputDirectory={path to directory where profiler.war is deployed}\WEB-INF\ProfilerData FrameProfilingEnable=0 ProfileFunctionEnable=1 TraceOutputFileEnable=1 ErrorReportingEnable=1 TraceOutputFileName=c:\flashlog.txt TraceOutputFileEnable=1 ErrorReportingEnable=1 SuppressDebuggerDialog=1 TraceLocationEnable=1 this file i have put it in c:\programmi\macromedia\flex\bin? i have set all value in my flex config file. If possibile i won't use fdb, if possibile, for will be ok only print the var content into my TraceOutputFileName. i'm trying to use http://localhost:8000/jportal/view/shop/banco.mxml?debug=true and my IExplorer prompt the debug window, i choose the localhost but Flash Player debug return me canno't connect debugger. If i use fdb start http://localhost:8000/jportal/view/shop/banco.mxml debugger start fdb start http://localhost:8000/jportal/view/shop/banco.mxml continue But my trace don't display nothing, also because my app don't run, all interaction with button or amf don't work. surely i mistake anything, but i wish only to print some value of my ActionScript class into console or file, i don't interest me put breakpoint or other, only to see the value of my var. Can you help me Devis Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: creditcard dashboard - for Alistair
Dear MR. WEBSTER: READ pages that you mention, and READ chapter 21, and I DO UNDERSTAND the concepts of the whitelist VERY well, and I DO have a CLEAR understanding of the mentioned concepts. Rather than make a smart assed comment like "...it's probably worth making sure you've got a clear understanding of the concepts covered in the relevant and preceeding chapters" or "...and then make sure you understand why that's a woefully insecure way of achieving your short term goal of getting the code to work" and (my favorite), "...if you still don'tunderstand the concept of the whitelist,..." you could offer a better answer...MY SHORT TERM GOAL IS NOT TO MAKE YOUR CODE WORK, but to see it in action so that I can better understand WHY it is working the way it does and to see if your concepts mentioned in your book can be of use in my own development. If that is your understanding of my questions, then please don't answer...I'll figure it out on my own. You have NO idea of how I have my system configured, or where I have placed 'your' code in relation to my install, so making your statements the way you did is just ludicrous. AND Iresent your implication(s) that I don'tUNDERSTAND the concept of what I am doing!BTW...here is what I have in the whitelist and it still don't work smart guy! oh, wait, I forgot, don'tanswer me! whitelist !-- whitelist config for unnamed objects -- unnamedsourcecom.bng.flex.remoteObject.*/sourcesourcecom.iterationtwo.boe.business.ApplicationDelegate/sourcesourcecom.iterationtwo.boe.business.CreditCardDelegate/sourcesourcecom.iterationtwo.boe.business.Responder/sourcesource*/source !-- For security, the whitelist is locked down by default. Uncomment the source element below to enable access to all classes, or add the individual URLs you wish to access. We strongly recommend not allowing access to all source files in production, since this exposes Java and Flex system classes. source*/source -- /unnamed !-- whitelist config for named objects --namedobject name="ApplicationDelegate"sourcecom.iterationtwo.boe.business.ApplicationDelegate/sourcetypestateless-class/typeallow-unnamed-accessfalse/allow-unnamed-accessuse-custom-authenticationfalse/use-custom-authentication/object/namedSteven Webster [EMAIL PROTECTED] wrote: did look at flex-config.mxml... not a clue sorry. CTRL-F (Find) "whitelist" or "remote" or "remote-object in flex-config.xml and you should find the whitelist and the book it self doesn't seem to explain where or give example for whitelist..Index at the back. W. Whitelist. Page 685 - "whitelists, overview495-496"On page 495-497, there are 3 pages of clear description of how to set the whitelist for RemoteObject calls, HTTPService calls and WebService calls,and the concept of named services and unnamed services. In fact Chapter 21opens with a section titled "The Flex Whitelist".Before trying to compile the code from the book and get the examplesworking, it's probably worth making sure you've got a clear understandingof the concepts covered in the relevant and preceeding chapters. The code is there to underline points in the text, not vice versa.Once you've read through the chapter material, if you still don'tunderstand the concept of the whitelist, go and set*and then make sure you understand why that's a woefully insecureway of achieving your short term goal of getting the code to work.Steven-- No virus found in this outgoing message.Checked by AVG Anti-Virus.Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 27/04/2005Yahoo! Groups Links* To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/* To unsubscribe from this group, send an email to:[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Multiple dataProviders for 1 dataGrid??
Just a thought: A while ago someone posted a workaround to cell-freezing (like MSExcel). You could use that approach to face such problem without having to combine WS results. Just place one grid in one side of the other, and set their containers margins to 0, in order for them to appear that both grids are part of one whole. That way you reduce overhead, and stick to a modular approach. Best regards. J. De: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] En nombre de Dave Enviado el: Viernes, 29 de Abril de 2005 08:10 am Para: flexcoders@yahoogroups.com Asunto: [flexcoders] Re: Multiple dataProviders for 1 dataGrid?? Importancia: Alta Tracy, Thanks for your help. Now I have to add other fields from other dataproviders but I think I can handle it. I know this is probably AS 101, but how do I create an object in the new array that is a product of a math function between 2 other objects in the new array? Example: I need to create a column in the datagrid called GROWTH that is simply the difference between TOTALBAL for today and TOTALBAL for yesterday (TODAY - YESTERDAY). Everything I try results in NaN. Thanks for your patience. -Dave --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: The example is attached, along with the sample xml files I created to test it. Your array exists at result.diffgram.PulseLoansToday. In the example I left the diffgram node out of my test xml. Basically, you assign the today and yesterday arrays to variables, iterate through the today items, get the matching yesterday item, build a combined item object, and add it to the combined dataProvider array, which is bound to the DataGrid DataProvider. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Dave Sent: Thursday, April 28, 2005 6:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Multiple dataProviders for 1 dataGrid?? OK. Let me backup. Below is a sample of the data returned (an array of objects?) from the WS with the date specified as 1/10/2005. The dataProvider for the datagrid is {service1.PulseLoansToday.result.diffgram.PulseLoansToday.PulseLo ansToday} Binding to the dataProvider as specified produces the desired results within the datagrid (using CATEGORY, TOTALBAL, etc. as the column names). Here's the rub; within the SAME datagrid, I need to display one column of TOTALBAL for the selected date(1/10/2005 in this case), and another column of TOTALBAL for yesterday's date (thisDate request is empty so default is previous day's date). Since I can only bind a datagrid to one dataProvider, I need a way to combine the results into a new dataProvider that I can bind to the datagrid. Thanks for your help, -Dave SAMPLE DATA RETURNED FROM WEB SERVICE ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ soap:Body PulseLoansTodayResponse xmlns=http://srv-corp- sql/XmlWebServices/ PulseLoansTodayResult xs:schema xmlns:msdata=urn:schemas-microsoft-com:xml- msdata xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns= id=PulseLoansToday xs:element name=PulseLoansToday msdata:IsDataSet=true xs:complexType xs:choice maxOccurs=unbounded xs:element name=PulseLoansToday xs:complexType xs:sequence xs:element name=SCHEDDATE type=xs:string minOccurs=0/ xs:element name=CATEGORY type=xs:string minOccurs=0/ xs:element name=TOTALBAL type=xs:decimal minOccurs=0/ xs:element name=TOTALCNT type=xs:decimal minOccurs=0/ xs:element name=SORTBY type=xs:int minOccurs=0/ /xs:sequence /xs:complexType /xs:element /xs:choice /xs:complexType /xs:element /xs:schema diffgr:diffgram xmlns:diffgr=urn:schemas-microsoft- com:xml-diffgram-v1 xmlns:msdata=urn:schemas-microsoft-com:xml- msdata PulseLoansToday xmlns= PulseLoansToday diffgr:id=PulseLoansToday1 msdata:rowOrder=0 SCHEDDATE01/10/2005/SCHEDDATE CATEGORY1-NEW VEHICLE/CATEGORY TOTALBAL61427820.1900/TOTALBAL TOTALCNT3177/TOTALCNT SORTBY1/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday2 msdata:rowOrder=1 SCHEDDATE01/10/2005/SCHEDDATE CATEGORY2-USED VEHICLE/CATEGORY TOTALBAL51179669.7000/TOTALBAL TOTALCNT4322/TOTALCNT SORTBY2/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday3 msdata:rowOrder=2 SCHEDDATE01/10/2005/SCHEDDATE CATEGORY3-UNSECURED/CATEGORY TOTALBAL997362.0700/TOTALBAL TOTALCNT761/TOTALCNT SORTBY3/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday4 msdata:rowOrder=3 SCHEDDATE01/10/2005/SCHEDDATE CATEGORY4-EQUITY MORTGAGES/CATEGORY TOTALBAL11356456.8100/TOTALBAL TOTALCNT545/TOTALCNT SORTBY4/SORTBY /PulseLoansToday PulseLoansToday diffgr:id=PulseLoansToday5 msdata:rowOrder=4 SCHEDDATE01/10/2005/SCHEDDATE
RE: [flexcoders] Tips on Custom component
Hi Erik, I see you've posted this twice without reply - I think I know why To create such a component, with all the features you're after, I'd say that you're undertaking a fairly complicated component development task, with effort measured in days, if not weeks, and I've not seen a great deal evidence that completely new components of such complexity have been created, outwith of Macromedia. However, saying that, its definitely possible and the Flex docs do give us all the information needed to create V2 components, though I understand that a lot of people would like to see more examples. As well as the LiveDocs, this article should help: http://www.macromedia.com/support/documentation/en/flex/1_5/createcomponents /createcomponents2.html Your component is a bit similar to how the Accordion works, so taking a look at how that works in Flex might be a good place to start. Cheers, Ali -- Alistair McLeod Development Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Erik Westra Sent: 29 April 2005 10:22 To: flexcoders@yahoogroups.com Subject: [flexcoders] Tips on Custom component With this email attached an swf. This swf was created by our designer. When u click the second item a pane opens. Its my job to make this into a component. However this component must be V2 compatable and should be usable like the accordian pane, via tags. Does any1 have a clue where to find the right information I need to create a V2 component wich has the functionalities the attached representation has. The component has: - an variable amount of children - a variable space between different items - an mxml component (like TabNavigator and Accordion) as child per item The component must be fully stylable and skinnable. Does any1 have some hints on how to start? Your help is greatly appreciated. Greetz Erik Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: creditcard dashboard - for Alistair
Craig, On page 576 of the book, the RemoteObject service is defined as an unnamed service (using the source="") tag, which I will presume to be what you have in yoru code. You have placed the service in your whitelist (double-check, I presume this is under the remote-objects node) as both an unnamed and named service, so you probably expect either named/unnamed services to both work. However, in your named service block you have allow-unnamed-accessfalse/allow-unnamed-access This means that even though you are (I imagine, unless you have changed the code from p 576) accessing the RemoteObject as an unnamed service, your flex-config is prohibiting that for this very service. Make sense ? If this isn't your issue, then perhaps you could post the error message you are receiving ... in gateway-config.xml you can turn on a little more debugging of events over the wire as well. Your original email suggested that "...the book doesn't seem to explain or give examples for the whitelist..." which is why I pointed you in my last response to the appropriate sections in the book where the whitelist is explained, and examples given. The more specific you can specify the problem you are having, and the error messages you are receiving, the more specific our responses can be. I hope that the above helps you find the source of your problem. Kindest Regards, Steven From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Craig NewrothSent: 29 April 2005 17:27To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Re: creditcard dashboard - for Alistair Dear MR. WEBSTER: READ pages that you mention, and READ chapter 21, and I DO UNDERSTAND the concepts of the whitelist VERY well, and I DO have a CLEAR understanding of the mentioned concepts. Rather than make a smart assed comment like "...it's probably worth making sure you've got a clear understanding of the concepts covered in the relevant and preceeding chapters" or "...and then make sure you understand why that's a woefully insecure way of achieving your short term goal of getting the code to work" and (my favorite), "...if you still don'tunderstand the concept of the whitelist,..." you could offer a better answer...MY SHORT TERM GOAL IS NOT TO MAKE YOUR CODE WORK, but to see it in action so that I can better understand WHY it is working the way it does and to see if your concepts mentioned in your book can be of use in my own development. If that is your understanding of my questions, then please don't answer...I'll figure it out on my own. You have NO idea of how I have my system configured, or where I have placed 'your' code in relation to my install, so making your statements the way you did is just ludicrous. AND Iresent your implication(s) that I don'tUNDERSTAND the concept of what I am doing!BTW...here is what I have in the whitelist and it still don't work smart guy! oh, wait, I forgot, don'tanswer me! whitelist !-- whitelist config for unnamed objects -- unnamedsourcecom.bng.flex.remoteObject.*/sourcesourcecom.iterationtwo.boe.business.ApplicationDelegate/sourcesourcecom.iterationtwo.boe.business.CreditCardDelegate/sourcesourcecom.iterationtwo.boe.business.Responder/sourcesource*/source !-- For security, the whitelist is locked down by default. Uncomment the source element below to enable access to all classes, or add the individual URLs you wish to access. We strongly recommend not allowing access to all source files in production, since this exposes Java and Flex system classes. source*/source -- /unnamed !-- whitelist config for named objects --namedobject name="ApplicationDelegate"sourcecom.iterationtwo.boe.business.ApplicationDelegate/sourcetypestateless-class/typeallow-unnamed-accessfalse/allow-unnamed-accessuse-custom-authenticationfalse/use-custom-authentication/object/named Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 27/04/2005
RE: [flexcoders] Background Gradient
The way we do the gradient in 1.5 is we actually embed a SWF as a backgroundImage that we created in Flash. Were looking on improving this in 2.0. The title of a Panel by default is white, but you change the title using the titleStyleDeclaration. Matt From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] Sent: Thursday, April 28, 2005 9:45 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Background Gradient How do I set the application to use a different background gradient I can change the color but would like to use gradient tried backgroundColor=[0x464646,0x212121] and it didn't like that :) Ideally I would like use a horizontal gradient instead of vertical and transition through three colors. --- Also how do I make the title of this panel white and still leave the body text black? mx:Panel width=100% title=Panel 1 height=100% headerColors=[0x464646,0x212121] Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] User Infor in Flex Architecture
Hi,I am new programmer in Flex (RIA) using Cairngrom 0.9 Framework. I am using Flex with full fledge J2EE Application. My question is How to handle User Management (User Object as Session Variable) in Flex to reap the best performance possible as my User Info is massive. Is there any documentation? Thanks in advance for reply.Thank you, Shahnavaz Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Asfunction not working inside htmlText
Freakin' awesome! Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Erik Westra Sent: Friday, April 29, 2005 5:49 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Asfunction not working inside htmlText The problem here is that asfunction (at least the function asfunction is calling) is called on the parent movieclip where the textfield resides. So in this case your call will end up in your text component. If u change asfunction:hello_you to asfunction:_parent.hello_you the example should work. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: donderdag 28 april 2005 18:31 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Asfunction not working inside htmlText I just now needed this myself, and sure enough, it doesn't work. Is this an known bug? Has anyone discovered a workaround? Tracy -Original Message- From: Greg Fuller [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 5:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Asfunction not working inside htmlText Hi everyone, I'm having trouble getting asfunction to work inside htmlText. This post in the MM flex newgroup suggests that asfunction may have been broken with the release of 1.5: http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid= 346threadid=929079highlight_key=ykeyword1=asfunction Here's a super simplified version of what I'm trying to do: --- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=* mx:Script function hello_you(you:String) { alert(hello + you); } /mx:Script mx:Text mx:htmlText![CDATA[ Click a href=asfunction:hello_you,'Dolly'here/a to say hello. ]]/mx:htmlText /mx:Text mx:Spacer height=20/ !-- this works, but asfunction above does not -- mx:Button label=Click to say hello click=hello_you('Polly');/ /mx:Application Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Retrieving XML Document from Web Service
Sure, where do you need to start? Have you looked at the examples, the docs, or any of these resources? Flex sites/blogs: http://www.cflex.net/ http://www.flexauthority.com/ http://www.markme.com/ http://www.flexdaddy.info/ http://www.clinttredway.com/blog/ http://www.richinternet.de/blog/ http://www.everythingflex.com Documentation: http://livedocs.macromedia.com/flex/15/asdocs_en/index.html http://www.macromedia.com/go/flex15_java_livedocs http://www.macromedia.com/cfusion/knowledgebase/index.cfm Lists: http://www.macromedia.com/cfusion/webforums/forum/categories.cfm?catid=3 46 http://groups.yahoo.com/group/flexcoders/ Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ssudha2 Sent: Friday, April 29, 2005 6:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Retrieving XML Document from Web Service I've written a .Net web service which returns a XML Document object. I'd like to retreive this xml document and bind this as dataprovider to my menubar control. Can anybody let me know how this can be done? Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] dynamically generating tabs with nested datagrids
I think all of your data grids have the same dataProvider. I bet they all display the last call? {proposalsRO.getProductsForRoom.result} is one object, and each call/result changes it. Not sure how you would do this, but it is a cool idea. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mplacedigital Sent: Friday, April 29, 2005 1:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] dynamically generating tabs with nested datagrids I'm trying to use a tab navigator that dynamically generates tabs, each tab has a datagrid inside of a vbox that is generated with a repeater. I'm trying to populate each datagrid with the results of a remote object method call. I'm able to generate the tabs with the correct names but am unable to populate the datagrids. Each time through the loop I'm calling the remote object method, but the same results are being displayed in each grid. Here is my code. (I think,. I've changed it so many times.) mx:TabNavigator id=roomTabs width=100% height=50% mx:Repeater id=roomRepeater dataProvider=roomNameList mx:DataGrid height=100% width=100% load=proposalsRO.getProductsForRoom(proposal.proposalId, roomRepeater.currentItem.roomId) dataProvider={proposalsRO.getProductsForRoom.result} mx:columns mx:Array mx:DataGridColumn columnName=name headerText=Item / mx:DataGridColumn columnName=quantity headerText=Quantity/ mx:DataGridColumn columnName=price headerText=Price/ /mx:Array /mx:columns /mx:DataGrid /mx:Repeater /mx:TabNavigator ~ Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: creditcard dashboard - for Alistair
I'll try to be more civil Steven... so okay let try this ONE more time, as I know that I posted the error that I am getting the first time... onFault Client.NotAllowed You are not allowed to access the service com.iterationtwo.boe.business.ApplicationDelegate. The service is not in the configured whitelist. I have tried to place an instance of this in every flex-config.xml file that I can find, and have used, source*/source (even though I know about the security) just to make it work to no avail...that is why i posted the question in the first place... I have enjoyed your book and learned quite alot from it, so i cannot understand why this is not working out of the box so to speak...just about everything else has (with the exception of the chart thing - thank god for grep and global replace) Craig --- Steven Webster [EMAIL PROTECTED] wrote: Craig, On page 576 of the book, the RemoteObject service is defined as an unnamed service (using the source=) tag, which I will presume to be what you have in yoru code. You have placed the service in your whitelist (double-check, I presume this is under the remote-objects node) as both an unnamed and named service, so you probably expect either named/unnamed services to both work. However, in your named service block you have allow-unnamed-accessfalse/allow-unnamed-access This means that even though you are (I imagine, unless you have changed the code from p 576) accessing the RemoteObject as an unnamed service, your flex-config is prohibiting that for this very service. Make sense ? If this isn't your issue, then perhaps you could post the error message you are receiving ... in gateway-config.xml you can turn on a little more debugging of events over the wire as well. Your original email suggested that ...the book doesn't seem to explain or give examples for the whitelist... which is why I pointed you in my last response to the appropriate sections in the book where the whitelist is explained, and examples given. The more specific you can specify the problem you are having, and the error messages you are receiving, the more specific our responses can be. I hope that the above helps you find the source of your problem. Kindest Regards, Steven _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Craig Newroth Sent: 29 April 2005 17:27 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: creditcard dashboard - for Alistair Dear MR. WEBSTER: READ pages that you mention, and READ chapter 21, and I DO UNDERSTAND the concepts of the whitelist VERY well, and I DO have a CLEAR understanding of the mentioned concepts. Rather than make a smart assed comment like ...it's probably worth making sure you've got a clear understanding of the concepts covered in the relevant and preceeding chapters or ...and then make sure you understand why that's a woefully insecure way of achieving your short term goal of getting the code to work and (my favorite), ...if you still don't understand the concept of the whitelist,... you could offer a better answer...MY SHORT TERM GOAL IS NOT TO MAKE YOUR CODE WORK, but to see it in action so that I can better understand WHY it is working the way it does and to see if your concepts mentioned in your book can be of use in my own development. If that is your understanding of my questions, then please don't answer...I'll figure it out on my own. You have NO idea of how I have my system configured, or where I have placed 'your' code in relation to my install, so making your statements the way you did is just ludicrous. AND I resent your implication(s) that I don't UNDERSTAND the concept of what I am doing! BTW...here is what I have in the whitelist and it still don't work smart guy! oh, wait, I forgot, don't answer me! whitelist !-- whitelist config for unnamed objects -- unnamed sourcecom.bng.flex.remoteObject.*/source sourcecom.iterationtwo.boe.business.ApplicationDelegate/source sourcecom.iterationtwo.boe.business.CreditCardDelegate/source sourcecom.iterationtwo.boe.business.Responder/source source*/source !-- For security, the whitelist is locked down by default. Uncomment the source element below to enable access to all classes, or add the individual URLs you wish to access. We strongly recommend not allowing access to all source files in production, since this exposes Java and Flex system classes. source*/source -- /unnamed !-- whitelist config for named objects -- named object name=ApplicationDelegate sourcecom.iterationtwo.boe.business.ApplicationDelegate/source typestateless-class/type
Re: [flexcoders] Tips on Custom component
Willing to contract out the job, hehe? If I were you, I'd read up on the various Flash component integration articles. Then, I'd inherit from Container to get the ability to load children into it. If those items that you put in it inherit from UIComponet, I reckon you'll get the margins you need. As far as multiple, that's easy; just throw 'em into a VBox, and he'll deal with the spacing issues. - Original Message - From: Erik Westra [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, April 29, 2005 5:22 AM Subject: [flexcoders] Tips on Custom component With this email attached an swf. This swf was created by our designer. When u click the second item a pane opens. Its my job to make this into a component. However this component must be V2 compatable and should be usable like the accordian pane, via tags. Does any1 have a clue where to find the right information I need to create a V2 component wich has the functionalities the attached representation has. The component has: - an variable amount of children - a variable space between different items - an mxml component (like TabNavigator and Accordion) as child per item The component must be fully stylable and skinnable. Does any1 have some hints on how to start? Your help is greatly appreciated. Greetz Erik Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Tips on Custom component
Erik, Unfortunately I'm not at liberty to share our source code, but I've created a component that is very similar to what you want. I can describe the overall approach since we're not in the business of building component libraries, so no state secrets here. But no code, sorry. It did take us the better part of a week and was not a trivial task, although the volume of code is not great. There are a lot of details that one must get right. However, when done, you will wind up with a fairly general solution. If you don't feel like doing all this work, at least it does give a sense of what effort is involved. I am sure there are other recipes for doing this. I would be surprised if they were much easier, though. Here is a roadmap: - structure the whole component as a specialized VBox subclass containing ViewStack children. The ViewStack children switch between compressed and expanded appearances, as alternate subviews in the stack. (The nice thing about ViewStacks is that you could have any number of appearances for each child view.) - When a change in one or more childrens' appearance occurs, first hide or fade the contents of all changing ViewStacks (this speeds up the animation effect described below). Then change the selectedChild property of all changing ViewStacks, which will trigger a relayout of the parent VBox. You must be sure to do all the hiding/fading before changing any of the selectedChild properties. - in your VBox subclass, override layoutChildren() to call super.layoutChildren() and then determine all changes that the superclass just made to the child ViewStack dimensions. Then, trigger an effect to animate all child dimension changes simultaneously. For better performance, first set the autoLayout property of changing chldren to false. - After the resizing effect completes, restore autoLayout properties, then unhide/unfade the contents of the changing children. For more flexibility, we found it most convenient to use the Tween class rather than the EffectManager framework to accomplish all of the above effects. I would like to be more helpful but it's probably not going to be possible for me to walk through this at a finer level of detail due to time constraints. The best I can do is assure you that the approach is solid. Perhaps someone else will come up with some free code that does the same thing that they can share. Good luck... . .. . ...j Erik Westra wrote: With this email attached an swf. This swf was created by our designer. When u click the second item a pane opens. Its my job to make this into a component. However this component must be V2 compatable and should be usable like the accordian pane, via tags. Does any1 have a clue where to find the right information I need to create a V2 component wich has the functionalities the attached representation has. The component has: - an variable amount of children - a variable space between different items - an mxml component (like TabNavigator and Accordion) as child per item The component must be fully stylable and skinnable. Does any1 have some hints on how to start? Your help is greatly appreciated. Greetz Erik Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[Fwd: Re: [flexcoders] Tips on Custom component]
Erik, one more thing: I guess I should have mentioned that what I consider the hard part here is creating the kind of animation effects that are shown in the SWF that you posted. If all you want is to just have the appropriate components appearing and disappearing in a VBox with no animation or tweening, it's much simpler and JesterXL's suggestion applies -- it's pretty straightforward Flex component stuff. . .. . ...j Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ ---BeginMessage--- Erik, Unfortunately I'm not at liberty to share our source code, but I've created a component that is very similar to what you want. I can describe the overall approach since we're not in the business of building component libraries, so no state secrets here. But no code, sorry. It did take us the better part of a week and was not a trivial task, although the volume of code is not great. There are a lot of details that one must get right. However, when done, you will wind up with a fairly general solution. If you don't feel like doing all this work, at least it does give a sense of what effort is involved. I am sure there are other recipes for doing this. I would be surprised if they were much easier, though. Here is a roadmap: - structure the whole component as a specialized VBox subclass containing ViewStack children. The ViewStack children switch between compressed and expanded appearances, as alternate subviews in the stack. (The nice thing about ViewStacks is that you could have any number of appearances for each child view.) - When a change in one or more childrens' appearance occurs, first hide or fade the contents of all changing ViewStacks (this speeds up the animation effect described below). Then change the selectedChild property of all changing ViewStacks, which will trigger a relayout of the parent VBox. You must be sure to do all the hiding/fading before changing any of the selectedChild properties. - in your VBox subclass, override layoutChildren() to call super.layoutChildren() and then determine all changes that the superclass just made to the child ViewStack dimensions. Then, trigger an effect to animate all child dimension changes simultaneously. For better performance, first set the autoLayout property of changing chldren to false. - After the resizing effect completes, restore autoLayout properties, then unhide/unfade the contents of the changing children. For more flexibility, we found it most convenient to use the Tween class rather than the EffectManager framework to accomplish all of the above effects. I would like to be more helpful but it's probably not going to be possible for me to walk through this at a finer level of detail due to time constraints. The best I can do is assure you that the approach is solid. Perhaps someone else will come up with some free code that does the same thing that they can share. Good luck... . .. . ...j Erik Westra wrote: With this email attached an swf. This swf was created by our designer. When u click the second item a pane opens. Its my job to make this into a component. However this component must be V2 compatable and should be usable like the accordian pane, via tags. Does any1 have a clue where to find the right information I need to create a V2 component wich has the functionalities the attached representation has. The component has: - an variable amount of children - a variable space between different items - an mxml component (like TabNavigator and Accordion) as child per item The component must be fully stylable and skinnable. Does any1 have some hints on how to start? Your help is greatly appreciated. Greetz Erik Yahoo! Groups Links Yahoo! Groups Links ---End Message---
RE: [flexcoders] Info on debug
You probably only installed the debug version of Flash Player 7 Active-X which would explain why it is in IE only. This isn't a bad thing - I suggest you don't worry about tracking down a debug version for FireFox so that you can have a normal and debug version on your machine - debug for debugging, normal for real-world/performance testing. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 12:02 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Info on debug Hi, i found it the proble, if i use FireFox the flashlog.log don't work, then i use ieexplorer work. I don't know because, Ciao Devis ps. ok i don't use generation with ?debug=true . Peter Farland ha scritto: I think you're confusing two concepts here... If you just want trace output, don't bother right now with the Flex concept of SWD generation with ?debug=true - it's not necessary to get ActionScript trace statements to show up in the log. What is necessary is the debugger version of the Flash Player - I believe an installer for the Flash Player 7 version of this special player ships with Flex 1.5. (I have two browsers installed and keep a flash player debugger version installed in one, and the normal flash player for real-world scenario testing in another). Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 10:52 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Info on debug Hi Peter, i have put my mm.cfg into my user Windows folder: 1) my flashlog.log is not created. 2) I have also http://localhost:8080/test/view/shop/banco.mxml?debug=true into my Explorer but i receive always cannot connect debugger. 3) I have also http://localhost:8080/test/view/shop/banco.mxml but nothing. Can you help me please. Devis On windows, mm.cfg goes in your user directory... by default this will be somewhere like: C:\Documents and Settings\yourloginname\mm.cfg The output file, flashlog.txt, contains messages from the debug version of the Flash Player including any trace() statements you add to your own ActionScript code. I use cygwin and run the tail command to keep a console window open to watch updates to flashlog.txt. You may want to creat a shortcut to conveniently run the following command: C:\cygwin\bin\tail.exe -0f C:\flashlog.txt (-f means follow, but -0f follows from the end of the file so that it looks like a fresh session when you open it despite whether the log is empty or not) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 29, 2005 5:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Info on debug Hi, i have read CHAPTER 33: Debugging Flex Applications , but i don't understand because don't work. I'm using trace into my ActionScript class, here my mm.cfg ProfilingOutputFileEnable=0 ProfilingOutputDirectory={path to directory where profiler.war is deployed}\WEB-INF\ProfilerData FrameProfilingEnable=0 ProfileFunctionEnable=1 TraceOutputFileEnable=1 ErrorReportingEnable=1 TraceOutputFileName=c:\flashlog.txt TraceOutputFileEnable=1 ErrorReportingEnable=1 SuppressDebuggerDialog=1 TraceLocationEnable=1 this file i have put it in c:\programmi\macromedia\flex\bin? i have set all value in my flex config file. If possibile i won't use fdb, if possibile, for will be ok only print the var content into my TraceOutputFileName. i'm trying to use http://localhost:8000/jportal/view/shop/banco.mxml?debug=true and my IExplorer prompt the debug window, i choose the localhost but Flash Player debug return me canno't connect debugger. If i use fdb start http://localhost:8000/jportal/view/shop/banco.mxml debugger start fdb start http://localhost:8000/jportal/view/shop/banco.mxml continue But my trace don't display nothing, also because my app don't run, all interaction with button or amf don't work. surely i mistake anything, but i wish only to print some value of my ActionScript class into console or file, i don't interest me put breakpoint or other, only to see the value of my var. Can you help me Devis Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Data-binding problem using Cairngorm ServiceLocator
I have defined a HTTPService in my Services.mxml as follows: mx:HTTPService id=myQuery url=http://www.mysite.com/index.xml; mx:request username{username}/username /mx:request /mx:HTTPService I then try to invoke the service from a different MXML file: var query = ServiceLocator.getInstance().getService(myQuery); query.send(); The problem is that 'username' is bound to myQuery before myQuery has been given a value by the app, so running the query fails. Is there a way to force a 'rebind' of the query once it has been returned from the ServiceLocator and before invoking query.send()? (this is not necessarily Cairngorm's fault, but I need a workaround when for when services are defined in MXML) Thanks, John Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] HTTPService and dynamic result handlers
I need to define my HTTPService in MXML so that the invoker of the service.send() call gets notified once the query result is ready (i.e. the service may be invoked from within class C1 or C2, so either C1 or C2 would get nofied depending on where the call was made from). The following code is from the Cairngorm demo application, and shows how this can be done for a mx:RemoteObject. Is there way to do the same thing for a HTTPService? Thanks, John mx:RemoteObject id=customerDelegate source=com.iterationtwo.demo.business.CustomerDelegate protocol=http showBusyCursor=true result=event.call.resultHandler( event ) fault=event.call.faultHandler( event ) /mx:RemoteObject service = ServiceLocator.getInstance().getService (customerDelegate); var call = service.login( loginVO ); call.resultHandler = Delegate.create(Object(this), this.onResult); Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] dispatchEvent in AS class?
I'm trying to wrap an XMLSocket object in a singleton class to manage my (single) XMLSocket connection, but I can't seem to get it to throw any events. Is it that I need to put it into my .mxml file as a component or something? Right now it is just an actionScript class. I was wanting to stick to the cairngorm framework's delegate model, but my SocketManager actually initiates commands from the server it is connected to (the whole point of my XMLSocket) so this class will need to dispatch a bunch events, preferably using the addEventListener+dispatchEvent model. Whenever the socket connection succeeds, I get my SocketManager: Socket connection attempt succeeded trace statement, then I get a warning which says Warning: dispatchEvent is not a function which leads me to believe that the EventDispatcher voodoo I'm doing in my constructor isn't working. Is it possible to send events like this? Any help is appreciated. Thanks, Sean McKibben (code below) import com.iterationtwo.cairngorm.business.*; import mx.utils.Delegate; import mx.events.*; [Event(onSocketOpen)] [Event(onSocketClose)] class com.client.capture.business.SocketManager extends MovieClip //(also tried extending mx.core.UIObject and nothing) { public static var socketManager:SocketManager; private static var mySocket:XMLSocket; private static var isSocketConnected:Boolean = false; public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; public function SocketManager() { if ( SocketManager.socketManager != undefined ) throw new Error(Only one SocketManager should be instantiated); SocketManager.mySocket = new XMLSocket(); SocketManager.mySocket.onConnect = handleConnect; SocketManager.mySocket.onClose = handleClose; SocketManager.mySocket.onXML = handleIncoming; SocketManager.socketManager = this; var sm:Object = SocketManager.prototype; EventDispatcher.initialize(sm);//also tried UIEventDispatcher.initialize } public static function getInstance():SocketManager { if(SocketManager.socketManager == undefined) SocketManager.socketManager = new SocketManager(); return SocketManager.socketManager; } public function connect() { if(!SocketManager.isSocketConnected) { if (!SocketManager.mySocket.connect(localhost, 1249))//--INSERT PORT # HERE!! throw new Error(SocketManager: socket connection attempt failed early); } else throw new Error(SocketManager: connect method called while connected); } public function disconnect() { if(SocketManager.isSocketConnected) { SocketManager.mySocket.close(); SocketManager.isSocketConnected = false; trace(SocketManager: closed socket); } else throw new Error(SocketManager: disconnect method called while not connected); } private function handleConnect (succeeded) { if(succeeded) { trace(SocketManager: Socket connection attempt succeeded); SocketManager.isSocketConnected = true; dispatchEvent({type:onSocketOpen}); } else { throw new Error(SocketManager: Socket connection attempt failed); } } private function handleClose () { trace(SocketManager: server closed connection); SocketManager.isSocketConnected = false; dispatchEvent({type:onSocketClose}); } private function handleIncoming (messageObj) { // display the received xml data in the output window trace( + messageObj.toString() + ); } } then, in other objects i have SocketManager.getInstance().addEventListener(onSocketOpen, mx.utils.Delegate.create(this,onSocketOpen)); but it never gets called... Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] dispatchEvent in AS class?
You need access to the EventDispatcher, which is natively mixed in with any UIObject subclass (which is why all MXML components can use it. You can either subclass your class from UIObject, or initialize the Event Dispatcher with your class. The latter would look like this: import mx.events.EventDispatcher; function YourConstructor(){ EventDispatcher.initialize(this); } At 05:49 PM 4/29/2005, you wrote: I'm trying to wrap an XMLSocket object in a singleton class to manage my (single) XMLSocket connection, but I can't seem to get it to throw any events. Is it that I need to put it into my .mxml file as a component or something? Right now it is just an actionScript class. I was wanting to stick to the cairngorm framework's delegate model, but my SocketManager actually initiates commands from the server it is connected to (the whole point of my XMLSocket) so this class will need to dispatch a bunch events, preferably using the addEventListener+dispatchEvent model. Whenever the socket connection succeeds, I get my SocketManager: Socket connection attempt succeeded trace statement, then I get a warning which says Warning: dispatchEvent is not a function which leads me to believe that the EventDispatcher voodoo I'm doing in my constructor isn't working. Is it possible to send events like this? Any help is appreciated. Thanks, Sean McKibben (code below) import com.iterationtwo.cairngorm.business.*; import mx.utils.Delegate; import mx.events.*; [Event(onSocketOpen)] [Event(onSocketClose)] class com.client.capture.business.SocketManager extends MovieClip //(also tried extending mx.core.UIObject and nothing) { public static var socketManager:SocketManager; private static var mySocket:XMLSocket; private static var isSocketConnected:Boolean = false; public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; public function SocketManager() { if ( SocketManager.socketManager != undefined ) throw new Error(Only one SocketManager should be instantiated); SocketManager.mySocket = new XMLSocket(); SocketManager.mySocket.onConnect = handleConnect; SocketManager.mySocket.onClose = handleClose; SocketManager.mySocket.onXML = handleIncoming; SocketManager.socketManager = this; var sm:Object = SocketManager.prototype; EventDispatcher.initialize(sm);//also tried UIEventDispatcher.initialize } public static function getInstance():SocketManager { if(SocketManager.socketManager == undefined) SocketManager.socketManager = new SocketManager(); return SocketManager.socketManager; } public function connect() { if(!SocketManager.isSocketConnected) { if (!SocketManager.mySocket.connect(localhost, 1249))//--INSERT PORT # HERE!! throw new Error(SocketManager: socket connection attempt failed early); } else throw new Error(SocketManager: connect method called while connected); } public function disconnect() { if(SocketManager.isSocketConnected) { SocketManager.mySocket.close(); SocketManager.isSocketConnected = false; trace(SocketManager: closed socket); } else throw new Error(SocketManager: disconnect method called while not connected); } private function handleConnect (succeeded) { if(succeeded) { trace(SocketManager: Socket connection attempt succeeded); SocketManager.isSocketConnected = true; dispatchEvent({type:onSocketOpen}); } else { throw new Error(SocketManager: Socket connection attempt failed); } } private function handleClose () { trace(SocketManager: server closed connection); SocketManager.isSocketConnected = false; dispatchEvent({type:onSocketClose}); } private function handleIncoming (messageObj) { // display the received xml data in the output window trace( + messageObj.toString() + ); } } then, in other objects i have SocketManager.getInstance().addEventListener(onSocketOpen, mx.utils.Delegate.create(this,onSocketOpen)); but it never gets called... -- Yahoo! Groups Links * To visit your group on the web, go to: * http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/ * * To unsubscribe from this group, send an email to: * mailto:[EMAIL PROTECTED][EMAIL PROTECTED] * * Your use of Yahoo! Groups is subject to the
[flexcoders] Re: dispatchEvent in AS class?
You need access to the EventDispatcher, which is natively mixed in with any UIObject subclass (which is why all MXML components can use it. You can either subclass your class from UIObject, or initialize the Event Dispatcher with your class. The latter would look like this: import mx.events.EventDispatcher; function YourConstructor(){ EventDispatcher.initialize(this); } I tried that (just as you typed it), and a variation of that is in my example code: var sm:Object = SocketManager.prototype; EventDispatcher.initialize(sm);//also tried UIEventDispatcher.initialize and EventDispatcher.initialize(this) I still get the weird warning when my class tries to call dispatchEvent that says Warning: dispatchEvent is not a function. Any more ideas? Thanks, Sean McKibben At 05:49 PM 4/29/2005, you wrote: I'm trying to wrap an XMLSocket object in a singleton class to manage my (single) XMLSocket connection, but I can't seem to get it to throw any events. Is it that I need to put it into my .mxml file as a component or something? Right now it is just an actionScript class. I was wanting to stick to the cairngorm framework's delegate model, but my SocketManager actually initiates commands from the server it is connected to (the whole point of my XMLSocket) so this class will need to dispatch a bunch events, preferably using the addEventListener+dispatchEvent model. Whenever the socket connection succeeds, I get my SocketManager: Socket connection attempt succeeded trace statement, then I get a warning which says Warning: dispatchEvent is not a function which leads me to believe that the EventDispatcher voodoo I'm doing in my constructor isn't working. Is it possible to send events like this? Any help is appreciated. Thanks, Sean McKibben (code below) import com.iterationtwo.cairngorm.business.*; import mx.utils.Delegate; import mx.events.*; [Event(onSocketOpen)] [Event(onSocketClose)] class com.client.capture.business.SocketManager extends MovieClip //(also tried extending mx.core.UIObject and nothing) { public static var socketManager:SocketManager; private static var mySocket:XMLSocket; private static var isSocketConnected:Boolean = false; public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; public function SocketManager() { if ( SocketManager.socketManager != undefined ) throw new Error(Only one SocketManager should be instantiated); SocketManager.mySocket = new XMLSocket(); SocketManager.mySocket.onConnect = handleConnect; SocketManager.mySocket.onClose = handleClose; SocketManager.mySocket.onXML = handleIncoming; SocketManager.socketManager = this; var sm:Object = SocketManager.prototype; EventDispatcher.initialize(sm);//also tried UIEventDispatcher.initialize } public static function getInstance():SocketManager { if(SocketManager.socketManager == undefined) SocketManager.socketManager = new SocketManager(); return SocketManager.socketManager; } public function connect() { if(!SocketManager.isSocketConnected) { if (!SocketManager.mySocket.connect(localhost, 1249))//--INSERT PORT # HERE!! throw new Error(SocketManager: socket connection attempt failed early); } else throw new Error(SocketManager: connect method called while connected); } public function disconnect() { if(SocketManager.isSocketConnected) { SocketManager.mySocket.close(); SocketManager.isSocketConnected = false; trace(SocketManager: closed socket); } else throw new Error(SocketManager: disconnect method called while not connected); } private function handleConnect (succeeded) { if(succeeded) { trace(SocketManager: Socket connection attempt succeeded); SocketManager.isSocketConnected = true; dispatchEvent({type:onSocketOpen}); } else { throw new Error(SocketManager: Socket connection attempt failed); } } private function handleClose () { trace(SocketManager: server closed connection); SocketManager.isSocketConnected = false; dispatchEvent({type:onSocketClose}); } private function handleIncoming (messageObj) { // display the received xml data in the output window trace( + messageObj.toString() + ); } } then, in other objects i have SocketManager.getInstance().addEventListener(onSocketOpen, mx.utils.Delegate.create(this,onSocketOpen)); but it never gets called... Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Data Grip Width
How can I get this data grid to grop to 100% width height mx:HBox xmlns:mx=http://www.macromedia.com/2003/mxml; width=100% height=100% mx:DataGrid id=inventory width=100% mx:columns mx:Array mx:DataGridColumn headerText=Column 3 columnName=col3 / mx:DataGridColumn headerText=Column 4 columnName=col4 / mx:DataGridColumn headerText=Column 5 columnName=col5 / mx:DataGridColumn headerText=Column 6 columnName=col6 / mx:DataGridColumn headerText=Column 7 columnName=col7 / mx:DataGridColumn headerText=Column 1 columnName=col1 / mx:DataGridColumn headerText=Column 2 columnName=col2 / /mx:Array /mx:columns /mx:DataGrid /mx:HBox Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] dispatchEvent in AS class?
Add this as a static member: static var mixIt = EventDispatcher.initalize(SocketManager.prototype); - Original Message - From: Sean McKibben [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, April 29, 2005 5:49 PM Subject: [flexcoders] dispatchEvent in AS class? I'm trying to wrap an XMLSocket object in a singleton class to manage my (single) XMLSocket connection, but I can't seem to get it to throw any events. Is it that I need to put it into my .mxml file as a component or something? Right now it is just an actionScript class. I was wanting to stick to the cairngorm framework's delegate model, but my SocketManager actually initiates commands from the server it is connected to (the whole point of my XMLSocket) so this class will need to dispatch a bunch events, preferably using the addEventListener+dispatchEvent model. Whenever the socket connection succeeds, I get my SocketManager: Socket connection attempt succeeded trace statement, then I get a warning which says Warning: dispatchEvent is not a function which leads me to believe that the EventDispatcher voodoo I'm doing in my constructor isn't working. Is it possible to send events like this? Any help is appreciated. Thanks, Sean McKibben (code below) import com.iterationtwo.cairngorm.business.*; import mx.utils.Delegate; import mx.events.*; [Event(onSocketOpen)] [Event(onSocketClose)] class com.client.capture.business.SocketManager extends MovieClip //(also tried extending mx.core.UIObject and nothing) { public static var socketManager:SocketManager; private static var mySocket:XMLSocket; private static var isSocketConnected:Boolean = false; public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; public function SocketManager() { if ( SocketManager.socketManager != undefined ) throw new Error(Only one SocketManager should be instantiated); SocketManager.mySocket = new XMLSocket(); SocketManager.mySocket.onConnect = handleConnect; SocketManager.mySocket.onClose = handleClose; SocketManager.mySocket.onXML = handleIncoming; SocketManager.socketManager = this; var sm:Object = SocketManager.prototype; EventDispatcher.initialize(sm);//also tried UIEventDispatcher.initialize } public static function getInstance():SocketManager { if(SocketManager.socketManager == undefined) SocketManager.socketManager = new SocketManager(); return SocketManager.socketManager; } public function connect() { if(!SocketManager.isSocketConnected) { if (!SocketManager.mySocket.connect(localhost, 1249))//--INSERT PORT # HERE!! throw new Error(SocketManager: socket connection attempt failed early); } else throw new Error(SocketManager: connect method called while connected); } public function disconnect() { if(SocketManager.isSocketConnected) { SocketManager.mySocket.close(); SocketManager.isSocketConnected = false; trace(SocketManager: closed socket); } else throw new Error(SocketManager: disconnect method called while not connected); } private function handleConnect (succeeded) { if(succeeded) { trace(SocketManager: Socket connection attempt succeeded); SocketManager.isSocketConnected = true; dispatchEvent({type:onSocketOpen}); } else { throw new Error(SocketManager: Socket connection attempt failed); } } private function handleClose () { trace(SocketManager: server closed connection); SocketManager.isSocketConnected = false; dispatchEvent({type:onSocketClose}); } private function handleIncoming (messageObj) { // display the received xml data in the output window trace( + messageObj.toString() + ); } } then, in other objects i have SocketManager.getInstance().addEventListener(onSocketOpen, mx.utils.Delegate.create(this,onSocketOpen)); but it never gets called... Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Dynamically Generated MXML without using JSP
Is there way to pipe output of a Java servlet or .NET HTTPRequestHandler through the Flex server-side interpreter so that dynamically generated MXML can be emitted from an application and properly pre-processed? This would open up an interesting class of applications... Thanks for any insights. Rick Bullotta CTO Lighthammer Software (http://www.lighthammer.com) Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Dynamically Generated MXML without using JSP
...not sure about the server-side, but in client side Flex, you could do: my_xml = new XML(); my_xml.ignoreWhite = true; my_xml[owner] = this; my_xml.onData = function(str) { trace(raw MXML: + str); }; my_xml.load(http://yourserver.com/index.mxml); - Original Message - From: RBullotta [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, April 29, 2005 7:30 PM Subject: [flexcoders] Dynamically Generated MXML without using JSP Is there way to pipe output of a Java servlet or .NET HTTPRequestHandler through the Flex server-side interpreter so that dynamically generated MXML can be emitted from an application and properly pre-processed? This would open up an interesting class of applications... Thanks for any insights. Rick Bullotta CTO Lighthammer Software (http://www.lighthammer.com) Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Using SharedObject to communicate between two OPEN apps?
Title: Using SharedObject to communicate between two OPEN apps? I thought I could set a value in a local SharedObject, call flush(), then, in another already open app, do getLocal() and access the value set in the first app. But this is not working. Flush() is returning true, but I do not see the new set and flushed value, unless I refresh the app. Can I do this? Or should I find another solution? Below is the tiny sample app I am using to test with. Tracy ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml initialize=initApp() mx:Script![CDATA[ private var goLSO:SharedObject; private function initApp():Void{ goLSO = SharedObject.getLocal(testlso, /); tiLSOValue.text = goLSO.data.test1; } private function showLSOValue():Void{ goLSO = SharedObject.getLocal(testlso, /); tiLSOValue.text = goLSO.data.test1; alert(goLSO.data.test1 == + goLSO.data.test1); } private function setLSO(event):Void { goLSO.data.test1 = tiLSOValue.text; goLSO.flush(); } ]]/mx:Script mx:Button label=Show LSO Value click=showLSOValue()/ mx:TextInput id=tiLSOValue focusOut=setLSO()/ /mx:Application Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Using SharedObject to communicate between two OPEN apps?
Try using LocalConnecting instead. SharedObjects really exist for persistence, LocalConnection exists for communicating between flash players I've got an example here: http://jeff.mxdj.com/read/1080369.htm At 07:56 PM 4/29/2005, you wrote: I thought I could set a value in a local SharedObject, call flush(), then, in another already open app, do getLocal() and access the value set in the first app. But this is not working. Flush() is returning true, but I do not see the new set and flushed value, unless I refresh the app. Can I do this? Or should I find another solution? Below is the tiny sample app I am using to test with. Tracy ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxmlhttp://www.macromedia.com/2003/mxml; initialize=initApp() mx:Script![CDATA[ private var goLSO:SharedObject; private function initApp():Void{ goLSO = SharedObject.getLocal(testlso, /); tiLSOValue.text = goLSO.data.test1; } private function showLSOValue():Void{ goLSO = SharedObject.getLocal(testlso, /); tiLSOValue.text = goLSO.data.test1; alert(goLSO.data.test1 == + goLSO.data.test1); } private function setLSO(event):Void { goLSO.data.test1 = tiLSOValue.text; goLSO.flush(); } ]]/mx:Script mx:Button label=Show LSO Value click=showLSOValue()/ mx:TextInput id=tiLSOValue focusOut=setLSO()/ /mx:Application -- Yahoo! Groups Links * To visit your group on the web, go to: * http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/ * * To unsubscribe from this group, send an email to: * mailto:[EMAIL PROTECTED][EMAIL PROTECTED] * * Your use of Yahoo! Groups is subject to the http://docs.yahoo.com/info/terms/Yahoo! Terms of Service. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Using SharedObject to communicate between two OPEN apps?
That's the ticket, baby! Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Tapper Sent: Friday, April 29, 2005 7:45 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Using SharedObject to communicate between two OPEN apps? Try using LocalConnecting instead. SharedObjects really exist for persistence, LocalConnection exists for communicating between flash players I've got an example here: http://jeff.mxdj.com/read/1080369.htm At 07:56 PM 4/29/2005, you wrote: I thought I could set a value in a local SharedObject, call flush(), then, in another already open app, do getLocal() and access the value set in the first app. But this is not working. Flush() is returning true, but I do not see the new set and flushed value, unless I refresh the app. Can I do this? Or should I find another solution? Below is the tiny sample app I am using to test with. Tracy ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxmlhttp://www.macromedia.co m/2003/mxml initialize=initApp() mx:Script![CDATA[ private var goLSO:SharedObject; private function initApp():Void{ goLSO = SharedObject.getLocal(testlso, /); tiLSOValue.text = goLSO.data.test1; } private function showLSOValue():Void{ goLSO = SharedObject.getLocal(testlso, /); tiLSOValue.text = goLSO.data.test1; alert(goLSO.data.test1 == + goLSO.data.test1); } private function setLSO(event):Void { goLSO.data.test1 = tiLSOValue.text; goLSO.flush(); } ]]/mx:Script mx:Button label=Show LSO Value click=showLSOValue()/ mx:TextInput id=tiLSOValue focusOut=setLSO()/ /mx:Application -- Yahoo! Groups Links * To visit your group on the web, go to: * http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group /flexcoders/ * * To unsubscribe from this group, send an email to: * mailto:[EMAIL PROTECTED]flexc [EMAIL PROTECTED] * * Your use of Yahoo! Groups is subject to the http://docs.yahoo.com/info/terms/Yahoo! Terms of Service. Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/