[flexcoders] Re: Time Problem flex4 + blazeDS + spring
Thanks Evan Klein for response, I read the link you mentioned and tried to dig further to root cause of the problem. Just before executing the RO's method the values of birth time are as follows case 1 - 01 Jan 1900 05:30:00 and timezone offset is -330 hence UTC should be 01 Jan 1900 00:00:00 and it is as expected but when I look at network monitor trace for request/response it is like -- birthTime=Mon Jan 01 05:53:20 IST 1900 on server side timezone offset is -330 here actually 23 min 20 seconds are being added. case 2 - 01 Jan 1900 05:59:59 and timezone offset is -330 hence UTC should be 31 Dec 1899 23:59:59 and it is as expected When I look at Network Monitor it is birthTime=Mon Jan 01 05:59:59 IST 1900 which gets translated on server side correctly. since timezone offset there is -330 So I think that when AMF message is created conversion routine is behaving as expected but since I dont know much about timezones and other related matters First I will dig on server side about timezone offsets values and let you know. So long untill then. Thanks once again and regards Raja. --- In flexcoders@yahoogroups.com, Evan Klein e...@... wrote: The crux of it is that on transfer of time the client is converting time to local timezone. On get/set of these values the time must be converted to whichever timezone you would like to operate in. Read this blog: http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html Evan Klein http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html On Sun, May 23, 2010 at 6:57 PM, raja_s_patil kpr.rspa...@... wrote: Hello I am developing my first application in which I have to deal with time. On server side java VO i have defined the field as java.sql.Time and on flex side VO it has to be date. This is happening in windows XP client (browsers Firefox Chrome) while inserting data I am making a fresh copy of Flex VO and time is set as 10:00:00 the timezone set for XP is +05:30 when its received at Java service its 10:23:20+0553 and gets saved to database as 10:23:20. When I retrieved from Java and send back to Flex for editing it comes back as 10:23:20+0553 and now if I set it again to 10:00:00 it gets saved properly. Means in edits no 00:23:20 additions are there but for inserts addition is there. I guess that since TimeZone is taken as +0553 rather than +0530 23 minutes might have added but what about 20 seconds why, where and how 00 23 20 being added ? Are any settings to be done on client side or server side. Server is KUbuntu 9.10 java latest installed from repository and windows xp being used as VM on Vmware all set up is on Dell Vostro 1710 Laptop. Thanks and best regards Raja
Re: [flexcoders] Re: itemEditor | Nested Objects in dataProvider
Hmm. That didn’t call preventDefault either. If it works for you, great. I don’t know of any examples but custom ITEM_EDIT_END handlers have been discussed often on this forum and others. On 5/24/10 8:36 PM, ilikeflex ilikef...@yahoo.com wrote: Is this the correct way http://kennethteo.com/2008/12/19/editing-nested-data-for-flex-datagrid/#more-431 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , ilikeflex ilikef...@... wrote: Hi Can you please point to any code sample? Thanks ilikeflex --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Standard practice is to call preventDefault on ITEM_EDIT_END and update the data yourself. On 5/17/10 1:31 PM, ilikeflex ilikeflex@ wrote: Hi I am using the item editors and went through the following article http://www.adobe.com/devnet/flex/articles/itemeditors_pt2.html. I am using nested properties in the dataprovider. I use label function to diaplay the data in grid. But when i edit the datagrid usinf the itemeditors i get the error -- ReferenceError: Error #1069: Property compatableInd.id not found on com.vzw.mpi.rss.valueobject.client.CompatableFeatureCustomVO and there is no default value. at mx.controls::DataGrid/itemEditorItemEditEndHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\DataGrid.as:4860] at flash.events::EventDispatcher/dispatchEventFunction() -- com.vzw.mpi.rss.valueobject.client.CompatableFeatureCustomVO is the opbject i am using in dataprovider. compatableInd.id is the nested object insde the dataprovider. -- I am getting the error at itemEditorItemEditEndHandler method of DaatGrid. code snippet from DataGrid.as if (itemEditorInstance event.reason != DataGridEventReason.CANCELLED) { var newData:Object = itemEditorInstance[_columns[event.columnIndex].editorDataField]; var property:String = _columns[event.columnIndex].dataField; var data:Object = event.itemRenderer.data; var typeInfo:String = ; for each(var variable:XML in describeType(data).variable) { if (property == variable.@ mailto:variable.%40name.toString ()) { typeInfo = variable.@ mailto:variable.%40type.toString (); break; } } if (typeInfo == String) { if (!(newData is String)) newData = newData.toString(); } else if (typeInfo == uint) { if (!(newData is uint)) newData = uint(newData); } else if (typeInfo == int) { if (!(newData is int)) newData = int(newData); } else if (typeInfo == Number) { if (!(newData is int)) newData = Number(newData); } if (property != null data[property] !== newData) { bChanged = true; data[property] = newData; I debug the code and found that the data refers to com.vzw.mpi.rss.valueobject.client.CompatableFeatureCustomVO and the property refers to compatableInd.id when it tries to data[property] it fails because data[compatableInd] is valid data[compatableInd.id] is not valid so how to overcome this. Any pointer is highly appreciated. Thanks ilikeflex -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] The Flex DOM?
Cheers Jake - thanks for the reply. @Oleg: I was trying to find out if there was a 'DOM' within Flex to easily access to the Containers and other Objects but I guess the more correct way to ask, would've been to question how Flex manages components but I didn't want to open the doors about the component life cycle. Apologies if I got the terminology wrong - I'm still getting my head round certain things and I saw a thread yesterday about looping through dynamically added TextInputs to which Valdor replied and it made me think how I used to do similar operations with JavaScript and the HTML-DOM and was thinking could I apply similar concepts?... (I've got another question and it's not abut squares :) but I'll create another thread). @Paul - I'll have a quick search, thanks. Cheers guys, Nick On 24 May 2010 22:30, Jake Churchill reyna...@gmail.com wrote: It's kind of like a DOM. It's just a hierarchical relationship of components and controls. On Mon, May 24, 2010 at 4:01 PM, Nick Middleweek n...@middleweek.co.ukwrote: Hi, Might be a silly one but Flex doesn't have a DOM does it... or does it? I'm pretty sure I've seen a debugger app that shows a hierachical view starting from the Application level and displays all the containers and objects within. Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
[flexcoders] NEW Melbourne Flex User Group
We are officially up and running for the new Melbourne Flex User Group. The group is all established and the old one has been removed. I am also looking to have someone help me in a Co / Manager capacity. There are advantages to running a User Group including software entitlements and strong networking and name recognition. There is a bit of work to be done, and appreciate that it's not for everyone, so rather than directly ask people for help, please contact me off list if you're interested. To join the group and see details of the first event in June visit the group site, I hope you can join the group and RSVP for the first meeting. http://mfug.groups.adobe.com Regards Dale Fraser http://dale.fraser.id.au http://dale.fraser.id.au http://cfmldocs.com/ http://cfmldocs.com http://learncf.com http://learncf.com http://flexcf.com http://flexcf.com
[flexcoders] Re: Detecting Browser Re-Size
I don't have any experience with this but thinking about it I can see using ExternalInterface with JavaScript to achieve this. The basic idea... Set up a JS event listener for the resize event. On resize, call a Flex method to grab the screen coordinates of your Flex app. Position the IFrame appropriately. Call Flex method to tell your app that resize is complete and new screen size. Redraw your app appropriately. Don't ask me to show you any code as I don't have any. Google for some sample code using ExternalInterface. HTH Steve --- In flexcoders@yahoogroups.com, Battershall, Jeff jeff.battersh...@... wrote: There's a lot on this subject out there but not the definitive answer I'm looking for - so I thought I'd see what Flex Coders has on the subject. I need to be able to re-position some HTML content (an IFrame) relative to the screen coordinates of my Flex app, when the browser is re-sized. Can anyone point me in the direction of the best solutions to this? Jeff Battershall Application Architect Dow Jones Indexes jeff.battersh...@... (609) 520-5637 (p) (484) 477-9900 (c)
Re: [flexcoders] Detecting Browser Re-Size
Can you expand a little on the page layout you ha.ve that needs to change?.. You might be able to just use CSS to position some DIV tags in a fluid layout and your SWF is in one DIV, your IFRAME in another and when the browser resizes, the browser handles the moving using relative positioning. So maybe forget that you've got an IFRAME and SWF, this fluid layout concept will apply to any HTML objects such as two images. Hope that helps somehow... (unless I've misread your problem?) Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } ); On 24 May 2010 20:35, Battershall, Jeff jeff.battersh...@dowjones.comwrote: There’s a lot on this subject out there but not the definitive answer I’m looking for – so I thought I’d see what Flex Coders has on the subject. I need to be able to re-position some HTML content (an IFrame) relative to the screen coordinates of my Flex app, when the browser is re-sized. Can anyone point me in the direction of the best solutions to this?
RE: [flexcoders] Detecting Browser Re-Size
Nick, Steve, Thanks for your input. To provide a little background data - I'm using the DrumbeatInsight HTML component, which works pretty well so long as you're left-aligned. But when the Flex content is center aligned, the IFrame overlay does not compensate. So I was thinking along the lines of what Steve was saying - listen to window resize and use external interface to have Flex re-position the html content. I was really hoping for a solution that was less of a hack and I'm hoping that it works well with multiple IFrames open at once (which is my use-case). Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nick Middleweek Sent: Tuesday, May 25, 2010 9:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Detecting Browser Re-Size Can you expand a little on the page layout you ha.vehttp://ha.ve that needs to change?.. You might be able to just use CSS to position some DIV tags in a fluid layout and your SWF is in one DIV, your IFRAME in another and when the browser resizes, the browser handles the moving using relative positioning. So maybe forget that you've got an IFRAME and SWF, this fluid layout concept will apply to any HTML objects such as two images. Hope that helps somehow... (unless I've misread your problem?) Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.ukmailto:n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } ); On 24 May 2010 20:35, Battershall, Jeff jeff.battersh...@dowjones.commailto:jeff.battersh...@dowjones.com wrote: There's a lot on this subject out there but not the definitive answer I'm looking for - so I thought I'd see what Flex Coders has on the subject. I need to be able to re-position some HTML content (an IFrame) relative to the screen coordinates of my Flex app, when the browser is re-sized. Can anyone point me in the direction of the best solutions to this?
[flexcoders] Re: Security sandbox violation
--- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote: No, it is different. If the SWF is embedded in HTML page, it requires that you specify the trusted locations on your machine, so it could load content: http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html Read carefully the text in gray under the picture. But, if you launch it in standalone player, then, I reckon, it should be able to access local files. No, I am pretty sure you (and all your users) will need to use the Settings Manager page in order to trust the directory with your XML in it. Apparently, you can provide a config file to get around this: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7c95.html , but the directory where this is supposed to live doesn't even exist on my computer, and there is no clue of where to get one to use as a starting point. Good luck! Amy
Re: [flexcoders] The Flex DOM?
Sorry if I caused disruption :) Yes, the terminology you used is confusing. What you are referring to is Flex framework, but it is not the only way to go about visual components in Flex, other component frameworks exist. It is also not uncommon to write components yourself (unlike in desktop development). You may draw a parallel between Flex framework and HTML DOM, but they are distant relatives and the underlying architecture is different. It is rather often that the technique used for HTML DOM manipulation applied to AS3 display list will give you a suboptimal solution. If you want an analogue from other technologies, think SWing or WPF, although these may be more robust then what we have in AS3 and Flex framework, conceptually, they are more similar than HTML and Flex framework. On the other hand, DOM if not used in context of HTML display may have quite a few of other meanings. For instance, in Java it would relate to different techniques of processing XML data, where DOM would be a processing of already parsed XMLs as opposed to SAX, which allows you to handle parsing events. In .NET DOM would be applied to XmlDocument as opposed to XML processing using XmlReader or LinQ, and so on. If you seek an analogy to this in AS3, then there's XMLDocument class, which is a DOM implementation, however, there's also XML class (E4X), which is a different approach to XML processing, more similar to LinQ and FluidInterface concepts. Best. Oleg
Re: [flexcoders] Detecting Browser Re-Size
Hi, we had this issue in flex-iframe and solved it, may you can take inspiration: http://code.google.com/p/flex-iframe/source/browse/trunk/library/src/com/google/code/flexiframe/IFrame.as#1167 http://code.google.com/p/flex-iframe/source/browse/trunk/library/src/com/google/code/flexiframe/IFrame.as#1167Good luck understanding it :) 2010/5/25 Battershall, Jeff jeff.battersh...@dowjones.com Nick, Steve, Thanks for your input. To provide a little background data – I’m using the DrumbeatInsight HTML component, which works pretty well so long as you’re left-aligned. But when the Flex content is center aligned, the IFrame overlay does not compensate. So I was thinking along the lines of what Steve was saying – listen to window resize and use external interface to have Flex re-position the html content. I was really hoping for a solution that was less of a hack and I’m hoping that it works well with multiple IFrames open at once (which is my use-case). Jeff -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Nick Middleweek *Sent:* Tuesday, May 25, 2010 9:53 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Detecting Browser Re-Size Can you expand a little on the page layout you ha.ve that needs to change?.. You might be able to just use CSS to position some DIV tags in a fluid layout and your SWF is in one DIV, your IFRAME in another and when the browser resizes, the browser handles the moving using relative positioning. So maybe forget that you've got an IFRAME and SWF, this fluid layout concept will apply to any HTML objects such as two images. Hope that helps somehow... (unless I've misread your problem?) Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } ); On 24 May 2010 20:35, Battershall, Jeff jeff.battersh...@dowjones.com wrote: There’s a lot on this subject out there but not the definitive answer I’m looking for – so I thought I’d see what Flex Coders has on the subject. I need to be able to re-position some HTML content (an IFrame) relative to the screen coordinates of my Flex app, when the browser is re-sized. Can anyone point me in the direction of the best solutions to this?
[flexcoders] Re: Data grid vary column sizes
Any 'resize data grid columns to content' code examples? --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: The column has to be the same size for every row, but each column can have different widths. It would be rare to set it from the itemrenderer, usually some other code accesses datagrid.column[i].width. On 5/19/10 11:02 AM, method_air loudj...@... wrote: How do you vary the data grid column widths? Setting the width property inside the item renderers to different values is not working. Thanks, Philip -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Set Width of An Item Renderer Component Based on Visible Property of the Control
Hi Angelo, If you don't set a width on the column it will default to 100. What I think you'd need to do is create a customComponent for your item Renderer, most likely based on an HBox with your link buttons inside that. On the creationComplete event of the itemRenderer you could get the actual width of the HBox, check that the itemRenderer is in row ONE of the data grid (or it is the actual first row - see the API) and then fire out a custom Event with the width value attribute and then set the column width from the parent component. You might also be able to reach the DataGrid Column from within the itemRenderer itself. I'm saying only do this on row one, just to optimise it, otherwise it'll run for ever row in the DG, which would hinder performance. Hope this helps, ask if you need anymore help. Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } ); On 21 May 2010 14:09, Angelo Anolin angelo_ano...@yahoo.com wrote: Thanks for this tip. But, I came across another thing. How would I set the width of the column so that it matches the width of the itemrenderers inside it? Apparently, setting the width to 100% for the datagrid column is not allowed. Thanks. Angelo -- *From:* Christopher McArthur cmcart...@riotgames.com *To:* flexcoders@yahoogroups.com *Sent:* Thu, 20 May, 2010 17:14:06 *Subject:* RE: [flexcoders] Set Width of An Item Renderer Component Based on Visible Property of the Control the includeInLayout property may also be helpful to you in this case, try: includeInLayout={outerDocument. fncVisible( )} *From:* flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] *On Behalf Of *Angelo Anolin *Sent:* Thursday, May 20, 2010 2:46 PM *To:* flexcod...@yahoogro ups.com *Subject:* [flexcoders] Set Width of An Item Renderer Component Based on Visible Property of the Control Hi FlexCoders, I have declared an in-line item renderer in my datagrid: mx:DataGridColumn headerText=Test textAlign=center sortable=false mx:itemRenderer mx:Component mx:HBox horizontalAlign=center mx:LinkButton id=lnk1 label=Link 1 visible={outerDocum ent.fncVisible( )} width={???}/ mx:LinkButton id=lnk1 label=Link 1 / mx:LinkButton id=lnk1 label=Link 1 / /mx:HBox /mx:Component /mx:itemRenderer /mx:DataGridColumn as you may see, I am determining the visibility of the link button via a function. What I want to achieve is that if the linkbutton contrl is invisible, the width should be 0, but if it is visible, then width should be 100. How do I pass in a function for the width of the control whether it's visibility is set to true or false? Thanks.
Re: [flexcoders] Re: Security sandbox violation
I'm not sure we're all talking about the same thing, but there must be zillions of SWFs accessing external XML configurations without any user intervention. I haven't tested on a web server yet, but this -use-network=false seems appropriate. On Tue, May 25, 2010 at 8:49 AM, Amy amyblankens...@bellsouth.net wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Oleg Sivokon olegsivo...@... wrote: No, it is different. If the SWF is embedded in HTML page, it requires that you specify the trusted locations on your machine, so it could load content: http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html Read carefully the text in gray under the picture. But, if you launch it in standalone player, then, I reckon, it should be able to access local files. No, I am pretty sure you (and all your users) will need to use the Settings Manager page in order to trust the directory with your XML in it. Apparently, you can provide a config file to get around this: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7c95.html, but the directory where this is supposed to live doesn't even exist on my computer, and there is no clue of where to get one to use as a starting point. Good luck! Amy
[flexcoders] Flex4 Swf loading real slow because of loading lots of swfs
I just created a Flex4 swf with IntelliJ. When I load the swf, a lot of other stuff is loaded like: - textLayout_swf - osmf_flex.4...swf - framework ... swf - spark swf - sparkskins ...swf - rpc swf If I try to run my swf offline, it doesn't load at all. Is this a bug in Flex4 SDK? Online it does load, eventually, but slow. Lieven Cardoen Technical Team lead televic education Phone +32 56 243 125 Mobile +32 479 970 641 Torkonjestraat 21D B-8510 Kortrijk (Marke) - Belgium
[flexcoders] Re: Is it possible to integrate the CTRL+F browser search with flex text?
Yes, openSearchWindow() is my own custom find functionality coded in flex and manually searches contents on the page. The browsers search box is part of the browser that has no knowledge of the contents of the Flash plug-in. I also had a different project that has a menu bar system at the top and a text field for searching. I set up the CTRL+F listener to set focus to that text field. It made it look kinda like the browsers search box (Enough so that the users didn't complain). --- In flexcoders@yahoogroups.com, Baz li...@... wrote: I love it. So openSearchWindow() is your own custom find functionality coded in flex and manually searches contents on the page, right? You haven't found a way to integrate directly with a browser's search box? Baz On Mon, May 24, 2010 at 10:48 AM, valdhor valdhorli...@...wrote: openSearchWindow();
Re: [flexcoders] Re: Security sandbox violation
I'm obviously thoroughly confused. Presumably -use-network must be true in order to run the folder from the server, because the swf will be local once it's trying to read the XML config file sitting beside the SWF on the server. I'm hoping I don't need a different SWF for the second scenario (unzipping a folder and opening the wrapper html locally. I just tried again, launching the debugger, even without setting -use-network to false, and this time it worked. On Tue, May 25, 2010 at 11:08 AM, Richard Rodseth rrods...@gmail.comwrote: I'm not sure we're all talking about the same thing, but there must be zillions of SWFs accessing external XML configurations without any user intervention. I haven't tested on a web server yet, but this -use-network=false seems appropriate. On Tue, May 25, 2010 at 8:49 AM, Amy amyblankens...@bellsouth.net wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Oleg Sivokon olegsivo...@... wrote: No, it is different. If the SWF is embedded in HTML page, it requires that you specify the trusted locations on your machine, so it could load content: http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html Read carefully the text in gray under the picture. But, if you launch it in standalone player, then, I reckon, it should be able to access local files. No, I am pretty sure you (and all your users) will need to use the Settings Manager page in order to trust the directory with your XML in it. Apparently, you can provide a config file to get around this: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7c95.html, but the directory where this is supposed to live doesn't even exist on my computer, and there is no clue of where to get one to use as a starting point. Good luck! Amy
[flexcoders] Chart Bug in Flash Builer?
Anyone else have this problem with charts in Flash Builder 4? - before making a bug submit I want to know if I am missing something. I place a chart into a panel - and as I drag the corner of the browser around, the panel resizes and the graph resizes. If, however, I add a button and then click it to set the panel width and height to 100%, the chart resizes the y-axis to an un-usuable number. i.e. the axis ranges between 1 and 5 during resizing, but when I click the button the axis becomes 1 to 100. Thus my data is smushed on the bottom of the page. I tried catching the resize event and invalidating the vertical axis along with refreshing the data sources. All attempts have failed. -ray
Re: [flexcoders] Re: Is it possible to integrate the CTRL+F browser search with flex text?
Does the search functionality have to be customized for the different elements and states currently on the screen, or is there a way to generalize it for any/all visible text? For example if you have an About Us page with one big text block, it takes different code to search that over the Search Results page which has an itemrenderer composed of multiple labels. Cheers. On Tue, May 25, 2010 at 6:01 AM, valdhor valdhorli...@embarqmail.comwrote: Yes, openSearchWindow() is my own custom find functionality coded in flex and manually searches contents on the page. The browsers search box is part of the browser that has no knowledge of the contents of the Flash plug-in. I also had a different project that has a menu bar system at the top and a text field for searching. I set up the CTRL+F listener to set focus to that text field. It made it look kinda like the browsers search box (Enough so that the users didn't complain). --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Baz li...@... wrote: I love it. So openSearchWindow() is your own custom find functionality coded in flex and manually searches contents on the page, right? You haven't found a way to integrate directly with a browser's search box? Baz On Mon, May 24, 2010 at 10:48 AM, valdhor valdhorli...@...wrote: openSearchWindow();
[flexcoders] Re: Security sandbox violation
What I do for debugging purposes is to set my debug folder as a trusted source in http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html To do this... Click Edit Locations-Add Location Click Browse for Folder Browse to your bin-debug folder This allows you to debug locally - ie. from a file://location_of_bin-debug_HTML_file. If you have a local server running (Which I do) the you can set your run/debug settings to open the html file on your local server. ie. http://127.0.0.1/myproject/bin-debug/myproject.html. In this case, you would need a crossdomain.xml file. --- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote: Not sure I follow that page, but it appears that the -use-network=false compiler flag may be helpful for this scenario. If only FB allowed you to set different compiler options for different applications within a project. On Mon, May 24, 2010 at 4:11 PM, Oleg Sivokon olegsivo...@... wrote: No, it is different. If the SWF is embedded in HTML page, it requires that you specify the trusted locations on your machine, so it could load content: http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html Read carefully the text in gray under the picture. But, if you launch it in standalone player, then, I reckon, it should be able to access local files.
Re: [flexcoders] Re: Security sandbox violation
Thanks. That's good to know about. It seems, though, that one has to choose between allowing local access or network access. Can anyone tell me if it's possible to create a single SWF (plus companion wrapper html and config xml that can either be hosted on a web server, or unzipped and run locally? Or would the end user have to use that page you linked to? On Tue, May 25, 2010 at 6:18 AM, valdhor valdhorli...@embarqmail.comwrote: What I do for debugging purposes is to set my debug folder as a trusted source in http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html To do this... Click Edit Locations-Add Location Click Browse for Folder Browse to your bin-debug folder This allows you to debug locally - ie. from a file://location_of_bin-debug_HTML_file. If you have a local server running (Which I do) the you can set your run/debug settings to open the html file on your local server. ie. http://127.0.0.1/myproject/bin-debug/myproject.html. In this case, you would need a crossdomain.xml file. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Richard Rodseth rrods...@... wrote: Not sure I follow that page, but it appears that the -use-network=false compiler flag may be helpful for this scenario. If only FB allowed you to set different compiler options for different applications within a project. On Mon, May 24, 2010 at 4:11 PM, Oleg Sivokon olegsivo...@... wrote: No, it is different. If the SWF is embedded in HTML page, it requires that you specify the trusted locations on your machine, so it could load content: http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html Read carefully the text in gray under the picture. But, if you launch it in standalone player, then, I reckon, it should be able to access local files.
Re: [flexcoders] Flex4 Swf loading real slow because of loading lots of swfs
Oh, and to run it offline you should of course compile with the RSLs linked in. This has changed since SDK 3, now -static-link-runtime-shared-libraries is false by default.
Re: [flexcoders] Re: Security sandbox violation
OK, it's like this: SWF launched in standalone player can interact with the system AND load remote content, just like the browser can do the same thing. SWF launched in browser plugin can only access permitted folders on your hard disc. To allow access to the folder you should either use the web interface (see my previous link), or read from the link Ami posted and try to figure out how to do that on Mac (you are not required to use web interface to establish local trust relationships between SWF and specific locations in file system, it's just that, I simply don't know how to do that on Mac...) There's yet another option for launching a SWF - that's how I usually do that - from the local HTTP server, in such case it acts more like as if it was deployed to the actual server and all the following rules apply. I would definitely recommend the later way of debugging as it is the most similar to the live situation. The loading of content other than SWF into another SWF is governed by policy files aka crossdomain.xml. You need these files if you are loading content from domains other than SWF origin. The loading of other SWFs by SWF is governed by two things: ApplicationDomain provided to the Loader when loading SWF with LoaderContext - by default it won't allow crosscripting. Security.allowDomain() doesn't define how classes are loaded into application domain, however, should prevent security errors related to crosscripting. Well, yes, it is complicated...
[flexcoders] Re: ItemRenderer factories, on the fly resetting
Hey Alex, The code that is bonking is in TileBase.createItemRenderer. The comment on this block is if it is the default column factory, see if the freeItemRenderers table has a free one. factory and renderer objects are valid and non-null. delete freeItemRenderersByFactory[factory][renderer]; thanks! --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: I don't have that version handy. What line of code is throwing the error?
Re: [flexcoders] Flex4 Swf loading real slow because of loading lots of swfs
Yes, It's like that, however, you can avoid the dependency to OSMF, if you are not using it's video player and you compile with accessibility turned of. If you use spark components than you cannot avoid making dependencies to TLF and all other spark related stuff, of course. But if size matters you should't be using the framework at all... it's not really made for small size applications... I think, that with some tweaking you can remove dependencies to RPC library, if you don't use any of it's components. However, again, framework is intended for making things easier to develop - you are paying for that with your traffic ;)
[flexcoders] Flex Webservice for .NET - converting to C#
I need to re-write my Flex app for C#.. this webservice will not run in VS2005, and I am pulling my hair out (not much left!). Does anyone have an idea why I get this error System.NullReferenceException: Object reference not set to an instance of an object at VTResults.GetResult() This is a SQL query for DataSet that then serializes to a Class as Data Model for Flex. using System; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Services.Protocols; using System.Data; using System.Data.SqlClient; using System.Configuration; using System.Diagnostics; /// summary /// Summary description for VTResults /// /summary [WebService(Namespace = http://velocitytrading.net/ResultsVT.aspx;)] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class VTResults : System.Web.Services.WebService { public class Results { public string SellDate; public string Ticker; public string BuyDate; public string Sell; public string Buy; public string Profit; public string Period; } [WebMethod] public Results[] GetResult() { string conn = ConfigurationManager.ConnectionStrings[LocalSqlServer].ConnectionString; SqlConnection myconn = new SqlConnection(conn); SqlCommand mycomm = new SqlCommand(); SqlDataAdapter myda = new SqlDataAdapter(); DataTable mydt= new DataTable(); mycomm.CommandType = CommandType.StoredProcedure; mycomm.Connection = myconn; mycomm.CommandText = dbo.Results; myconn.Open(); myda.SelectCommand = mycomm; myda.Fill(mydt); myconn.Close(); myconn.Dispose(); int i = 0; Results[] dts = new Results[mydt.Rows.Count]; foreach (DataRow arow in mydt.Rows) { dts[i] = new Results(); dts[i].SellDate = arow[SellDate].ToString(); dts[i].Ticker = arow[Ticker].ToString(); dts[i].BuyDate = arow[BuyDate].ToString(); dts[i].Sell = arow[Sell].ToString(); dts[1].Buy = arow[Buy].ToString(); dts[i].Profit = arow[Profit].ToString(); dts[i].Period = arow[Period].ToString(); i += 1; } return dts; } }
[flexcoders] Having trouble justifying Flex to the higher-ups... It only seems to be appropriate for media based sites...
We are building a text-based app that searches records in a database then displays the results on a page using an ItemRenderer type deal. We want to include some niceties like infinite-scroll - where a user would simply scroll down and subsequent records would load automatically in the background - and intelligent feedback - where different elements on the page animate in some way to show progress or activity. These can be accomplished easily using either Flex or AJAX. My superiors, and admittedly myself, are having trouble justifying using Flex to implement this. Some reasons: - Text is not properly selectable (unless you put everything in one huge/ugly/unfeasible TextInput block) - Text is not findable using the browser's CTRL+F - Text is not properly/nicely indexable by search engines - Slower to render than HTML (as fast as it is, it is still slower, more to load, etc) - Inferior mobile experience (I tested 10.1 on my Nexus One, and it's very good, but still far worse (for text/scrolling) than simply using HTML in the native browser (which has built-in scrolling, flicking, and zooming, with zero additional effort, while Flash doesn't). If you do any research for whose using Flex in public applications, you will only find media based sites like: - picnik.com (photos) - beatport.com (mp3's) - mixbook.com (photos) - mastercard.com (only a configurator sub-element) - ANYTHING VIDEO I am having trouble seeing the benefit of using Flex for anything non audio/visual related. Besides the advantage of it being cross-browser/cross-platform, is there any compelling reason to consider Flex for this app rather than HTML/AJAX? Cheers, Baz
[flexcoders] AdvancedDataGrid custom drawRowBackground with HierarchicalCollectionView
Hi, I have to color the nodes shown in my adg. The code below do the job but the performances insanely decrease. Any idea how to improve it please? Best regards, Henry override protected function drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void { //default background alpha var alpha:Number = 1.0; if (dataProvider is HierarchicalCollectionView) { var cursor:IViewCursor = dataProvider.createCursor(); var index:int=0; // move on the current row while (index dataIndex) { index++; cursor.moveNext(); } // if the current row is a node, then set the color // and the background alpha (the deeper, the darker) if(dataProvider.source.canHaveChildren(cursor.current)){ color = 0x25e16d; alpha = dataProvider.getNodeDepth(cursor.current) / 10; if (alpha 1) alpha = 1; } } var background:Shape; if (rowIndex s.numChildren) { background = Shape(s.getChildAt(rowIndex)); } else { background = new FlexShape(); background.name = background; s.addChild(background); } background.y = y; // Height is usually as tall is the items in the row, but not if // it would extend below the bottom of listContent var height:Number = Math.min(height, listContent.height - y); var displayWidth:int = unscaledWidth - viewMetrics.right - viewMetrics.left; var g:Graphics = background.graphics; g.clear(); g.beginFill(color, alpha); g.drawRect(0, 0, displayWidth, height); g.endFill(); }
Re: [flexcoders] Re: Security sandbox violation
Thanks. That sounds like a no for supporting my two use cases, unless the customer adds a trusted location or opens the SWF in the standalone player. On Tue, May 25, 2010 at 12:45 PM, Oleg Sivokon olegsivo...@gmail.comwrote: OK, it's like this: SWF launched in standalone player can interact with the system AND load remote content, just like the browser can do the same thing. SWF launched in browser plugin can only access permitted folders on your hard disc. To allow access to the folder you should either use the web interface (see my previous link), or read from the link Ami posted and try to figure out how to do that on Mac (you are not required to use web interface to establish local trust relationships between SWF and specific locations in file system, it's just that, I simply don't know how to do that on Mac...) There's yet another option for launching a SWF - that's how I usually do that - from the local HTTP server, in such case it acts more like as if it was deployed to the actual server and all the following rules apply. I would definitely recommend the later way of debugging as it is the most similar to the live situation. The loading of content other than SWF into another SWF is governed by policy files aka crossdomain.xml. You need these files if you are loading content from domains other than SWF origin. The loading of other SWFs by SWF is governed by two things: ApplicationDomain provided to the Loader when loading SWF with LoaderContext - by default it won't allow crosscripting. Security.allowDomain() doesn't define how classes are loaded into application domain, however, should prevent security errors related to crosscripting. Well, yes, it is complicated...
[flexcoders] Flash Player Detection / ServerSide
Does anyone have any knowledge of how to detect whether or not a simple REST call to a server (java/php/etc.) is from the Flash Player (flex app)? It would appear that application/x-shockwave-flash can be detected by the server in the HTTP_ACCEPT header as long as the type is defined in the html wrapper like this... embed src=${swf}.swf quality=high bgcolor=${bgcolor} width=${width} height=${height} name=${application} align=middle play=true loop=false quality=high allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.adobe.com/go/getflashplayer; /embed Outside of this methodology, is there another approach or perhaps something the flash player sends along with each request? I saw this reference as well so any additional comments are welcome. The HTTP_X_FLASH_VERSION HTTP field, which returns the players FLASH version in a server side script, only appears to be available when opening a .swf in Internet Explorer. Nothing is returned for HTTP_X_FLASH_VERSION when opening the same .swf in Google Chrome or Firefox 3+.
Re: [flexcoders] Flex Webservice for .NET - converting to C#
Erm... set breakpoint somewhere before the loop an hit F11 until you see it? there may be to many things, like, maybe you mistyped a name of the property... Funny I didn't know C# allows variables in array initializer... :)
[flexcoders] Re: Module help in flash builder
Since you are using mx components (ModuleLoaders) inside an mx component (ViewStack), just use Canvas or one of the mx containers. If the architecture worked under Flex 3, it should work under Flex 4. --- In flexcoders@yahoogroups.com, Raymond Brown silenttr...@... wrote: Does anyone know how to have multiple modules load inside a view stack in flash builder? So you have something like this: mx:ViewStack id=myViewStack s:NavigatorContent id=one mx:ModuleLoader id=oneModule/ /s:NavigatorContent s:NavigatorContent id=two mx:ModuleLoader id=twoModule/ /s:NavigatorContent s:NavigatorContent id=three mx:ModuleLoader id=threeModule/ /s:NavigatorContent /mx:ViewStack The problem is this - when the app first loads, the modules within the first navigatorContent show fine the others just load as a blank screen and do nothing. Now granted some of the modules may make the same restful interface call and flex doesn't enable anything to run in a thread like system but why can't I get the modules to load? I am not working on a web page but a real time monitor and control system and so to save bandwidth and memory I want to load and unload the modules based on which navigatorContent is active. I have googled and tried many solutions, all to no avail. I have resorted back to pulling out the code from the modules and adding them as direct components which works but isn't optimized. PLEASE HELP! -ray
Re: [flexcoders] Having trouble justifying Flex to the higher-ups... It only seems to be appropriate for media based sites...
Actually some of your observations are imprecise, but this is because you compared wrong things. Flex is to general name. So, if you are talking about Flex framework - yes, I would imagine it is slower when rendering simple stuff as compared to HTML, though it may compete against HTML when it comes to complex layout. However, if we speak about normal AS3 it will be significantly faster than Canvas, though, for the very basic tabloid-like pagination it may not be so... There is a problem if you want to measure SWF size against HTML. In general, SWF would win, because it is a binary zipped format. However, often times people tend to overuse this feature, so they put lots of content in. If you want to see a what I would call a good example of using flash (not Flex framework) here it is: http://www.pixlr.com/editor/ this site loads at average 2 times faster than any VBulletin board and about 5 times faster then Gmail :) and it is sophisticated enough to be compared to the sites I've mentioned. Also, regarding your research. Flash isn't about delivering textual content, and although I think I remember Adobe promised Ctrl+F integration in Flash Player 10.1, I don't think it is going to change the situation. So, if text accessibility is a core requirement I would think that you would be better of with HTML and JavaScript.
Re: [flexcoders] Re: Data grid vary column sizes
I don’t know of any, but this question has been asked so many times, there’s probably an example if you search the web. On 5/25/10 10:36 AM, method_air loudj...@hotmail.com wrote: Any 'resize data grid columns to content' code examples? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aha...@... wrote: The column has to be the same size for every row, but each column can have different widths. It would be rare to set it from the itemrenderer, usually some other code accesses datagrid.column[i].width. On 5/19/10 11:02 AM, method_air loudj...@... wrote: How do you vary the data grid column widths? Setting the width property inside the item renderers to different values is not working. Thanks, Philip -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: ItemRenderer factories, on the fly resetting
That’s a bug that got fixed at some point. I see it is fixed in 3.5, maybe earlier, but not in 3.2 On 5/25/10 9:56 AM, flexwdw flex...@yahoo.com wrote: Hey Alex, The code that is bonking is in TileBase.createItemRenderer. The comment on this block is if it is the default column factory, see if the freeItemRenderers table has a free one. factory and renderer objects are valid and non-null. delete freeItemRenderersByFactory[factory][renderer]; thanks! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aha...@... wrote: I don't have that version handy. What line of code is throwing the error? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: Security sandbox violation
I got lost trying to follow this topic. Whether it is browser or standalone shouldn’t matter. What matters is the url of the SWF (file:// or http://), the trust file settings on the computer, the use-network flag, and how you access the external resources. If you build a SWF to run locally then it cannot access the network. If you build a SWF to access the network, it cannot access the local files unless trusted. Even if trusted, you may run into issues using certain file paths. Be sure to use relative paths to subfolders of the trusted folder. On 5/25/10 2:42 PM, Richard Rodseth rrods...@gmail.com wrote: Thanks. That sounds like a no for supporting my two use cases, unless the customer adds a trusted location or opens the SWF in the standalone player. On Tue, May 25, 2010 at 12:45 PM, Oleg Sivokon olegsivo...@gmail.com wrote: OK, it's like this: SWF launched in standalone player can interact with the system AND load remote content, just like the browser can do the same thing. SWF launched in browser plugin can only access permitted folders on your hard disc. To allow access to the folder you should either use the web interface (see my previous link), or read from the link Ami posted and try to figure out how to do that on Mac (you are not required to use web interface to establish local trust relationships between SWF and specific locations in file system, it's just that, I simply don't know how to do that on Mac...) There's yet another option for launching a SWF - that's how I usually do that - from the local HTTP server, in such case it acts more like as if it was deployed to the actual server and all the following rules apply. I would definitely recommend the later way of debugging as it is the most similar to the live situation. The loading of content other than SWF into another SWF is governed by policy files aka crossdomain.xml. You need these files if you are loading content from domains other than SWF origin. The loading of other SWFs by SWF is governed by two things: ApplicationDomain provided to the Loader when loading SWF with LoaderContext - by default it won't allow crosscripting. Security.allowDomain() doesn't define how classes are loaded into application domain, however, should prevent security errors related to crosscripting. Well, yes, it is complicated... -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: ItemRenderer factories, on the fly resetting
Check out TileList_withStyle. http://flexdiary.blogspot.com/2008/08/tilelist-with-stylefunction.html. I think this will do what you want--you'll just need to shift your approach a bit and move the things that you would normally set in the factory into being styles. HTH; Amy --- In flexcoders@yahoogroups.com, flexwdw flex...@... wrote: A pattern I am particularly fond of when dealing with TileList(s) that use complex item renderers is to split my parameters up. I only pass items in via the data property which are different on a per tile basis. For items that need to be passed into the renderer that are the same for each tile, I pass them in via a ClassFactory instance that is newed up to MyItemRenderer. I then set myClassFactory.properties to contain the properties I wish to set (which are exposed as public properties on the item renderer class). Finally, I set the TileList's .itemRenderer property to myClassFactory. Typically, I only ever have to set the TileList's itemRenderer property once. However, I recently ran into a situation where I have a piece of factory data that changes, but needs to change for all items in the TileList. Therefore, resetting the TileList's itemRenderer by creating a new ClassFactory instance seems to be the most logical way to achieve this. Problem is, this causes a term is undefined and has no properties error in TileBase.createItemRenderer [line 1956]. Is there anything wrong with this approach? Do I need to null out a data provider or something to make this work? I know of many other solutions to this problem than this, but this pattern is so handy and clean for my situation that it would be a bummer if this didn't work I'd like to understand why. Thanks for the help! [note, I am currently targeting Flash 10.0 and using the 3.2 SDK]
Re: [flexcoders] Flash Player Detection / ServerSide
No, and it is not even in general possible. Flash can send requests using the browser where it is running. Exceptions are FileReference and NetConnection, but all the rest you can do via calling JavaScript and thus using browsers own functionality.
[flexcoders] Flash Player Detection / ServerSide
Does anyone have any knowledge of how to detect whether or not a simple REST call to a server (java/php/etc.) is from the Flash Player (flex app)? It would appear that application/x-shockwave-flash can be detected by the server in the HTTP_ACCEPT header as long as the type is defined in the html wrapper like this... embed src=${swf}.swf quality=high bgcolor=${bgcolor} width=${width} height=${height} name=${application} align=middle play=true loop=false quality=high allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.adobe.com/go/getflashplayer; /embed Outside of this methodology, is there another approach or perhaps something the flash player sends along with each request? I saw this reference as well so any additional comments are welcome. The HTTP_X_FLASH_VERSION HTTP field, which returns the players FLASH version in a server side script, only appears to be available when opening a .swf in Internet Explorer. Nothing is returned for HTTP_X_FLASH_VERSION when opening the same .swf in Google Chrome or Firefox 3+.
Re: [flexcoders] Re: Security sandbox violation
Sorry :) That seems to happen a lot with my topics. Use case 1: Customer (a sales engineer) accesses a demo that is hosted on the web like any other Flex app. This demo makes no api calls, but does need to access an XML config file that lives in a data folder beside the SWF Use case 2: Sales engineer has a copy of the entire directory (swf, wrapper html, config file) and runs it locally I think your second point confirms that to support both use cases with one version of the application, the customer would have to add a trusted location so that the app could get to the config. That may be fine, I would have to check. Since this is all read-only stuff, I would have hoped I could do it with one SWF and no user-intervention, but I imagine there are good reasons for these restrictions. On Tue, May 25, 2010 at 3:26 PM, Alex Harui aha...@adobe.com wrote: I got lost trying to follow this topic. Whether it is browser or standalone shouldn’t matter. What matters is the url of the SWF (file://or http://), the trust file settings on the computer, the use-network flag, and how you access the external resources. If you build a SWF to run locally then it cannot access the network. If you build a SWF to access the network, it cannot access the local files unless trusted. Even if trusted, you may run into issues using certain file paths. Be sure to use relative paths to subfolders of the trusted folder. On 5/25/10 2:42 PM, Richard Rodseth rrods...@gmail.com wrote: Thanks. That sounds like a no for supporting my two use cases, unless the customer adds a trusted location or opens the SWF in the standalone player. On Tue, May 25, 2010 at 12:45 PM, Oleg Sivokon olegsivo...@gmail.com wrote: OK, it's like this: SWF launched in standalone player can interact with the system AND load remote content, just like the browser can do the same thing. SWF launched in browser plugin can only access permitted folders on your hard disc. To allow access to the folder you should either use the web interface (see my previous link), or read from the link Ami posted and try to figure out how to do that on Mac (you are not required to use web interface to establish local trust relationships between SWF and specific locations in file system, it's just that, I simply don't know how to do that on Mac...) There's yet another option for launching a SWF - that's how I usually do that - from the local HTTP server, in such case it acts more like as if it was deployed to the actual server and all the following rules apply. I would definitely recommend the later way of debugging as it is the most similar to the live situation. The loading of content other than SWF into another SWF is governed by policy files aka crossdomain.xml. You need these files if you are loading content from domains other than SWF origin. The loading of other SWFs by SWF is governed by two things: ApplicationDomain provided to the Loader when loading SWF with LoaderContext - by default it won't allow crosscripting. Security.allowDomain() doesn't define how classes are loaded into application domain, however, should prevent security errors related to crosscripting. Well, yes, it is complicated... -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: Security sandbox violation
Whether it is browser or standalone shouldn’t matter. Now I'm lost... I have ShockwaveFlash ActiveX sitting on the form and loading MP3 files from any place on my PC (well, this is the easiest way to have MP3 player in .NET :D ), it can playback MP3s just fine, I'm getting no warnings / errors, checked the logs and it says it's all good... how's that possible / should it be that way? This is an entirely clean install of Windows, and I haven't yet set any trust records...
Re: [flexcoders] Re: Time Problem flex4 + blazeDS + spring
If you want to modify settings on the server you'll need to modify the JVM timezone setting. Also, it's possible the database has specific timezone settings too. On Tue, May 25, 2010 at 3:54 AM, raja_s_patil kpr.rspa...@gmail.com wrote: Thanks Evan Klein for response, I read the link you mentioned and tried to dig further to root cause of the problem. Just before executing the RO's method the values of birth time are as follows case 1 - 01 Jan 1900 05:30:00 and timezone offset is -330 hence UTC should be 01 Jan 1900 00:00:00 and it is as expected but when I look at network monitor trace for request/response it is like -- birthTime=Mon Jan 01 05:53:20 IST 1900 on server side timezone offset is -330 here actually 23 min 20 seconds are being added. case 2 - 01 Jan 1900 05:59:59 and timezone offset is -330 hence UTC should be 31 Dec 1899 23:59:59 and it is as expected When I look at Network Monitor it is birthTime=Mon Jan 01 05:59:59 IST 1900 which gets translated on server side correctly. since timezone offset there is -330 So I think that when AMF message is created conversion routine is behaving as expected but since I dont know much about timezones and other related matters First I will dig on server side about timezone offsets values and let you know. So long untill then. Thanks once again and regards Raja. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Evan Klein e...@... wrote: The crux of it is that on transfer of time the client is converting time to local timezone. On get/set of these values the time must be converted to whichever timezone you would like to operate in. Read this blog: http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html Evan Klein http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html On Sun, May 23, 2010 at 6:57 PM, raja_s_patil kpr.rspa...@... wrote: Hello I am developing my first application in which I have to deal with time. On server side java VO i have defined the field as java.sql.Time and on flex side VO it has to be date. This is happening in windows XP client (browsers Firefox Chrome) while inserting data I am making a fresh copy of Flex VO and time is set as 10:00:00 the timezone set for XP is +05:30 when its received at Java service its 10:23:20+0553 and gets saved to database as 10:23:20. When I retrieved from Java and send back to Flex for editing it comes back as 10:23:20+0553 and now if I set it again to 10:00:00 it gets saved properly. Means in edits no 00:23:20 additions are there but for inserts addition is there. I guess that since TimeZone is taken as +0553 rather than +0530 23 minutes might have added but what about 20 seconds why, where and how 00 23 20 being added ? Are any settings to be done on client side or server side. Server is KUbuntu 9.10 java latest installed from repository and windows xp being used as VM on Vmware all set up is on Dell Vostro 1710 Laptop. Thanks and best regards Raja -- Evan Klein
Re: [flexcoders] Re: Security sandbox violation
BTW, this is what the code looks like if you want to try... // // flashMovie // this.flashMovie.Dock = System.Windows.Forms.DockStyle.Fill; this.flashMovie.Enabled = true; this.flashMovie.Location = new System.Drawing.Point(0, 0); this.flashMovie.Name = flashMovie; this.flashMovie.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject(flashMovie.OcxState))); this.flashMovie.Size = new System.Drawing.Size(279, 128); this.flashMovie.TabIndex = 1; this.flashMovie.Visible = false; . . . private void PreviewMp3Content(SamTreeNode node) { if (File.Exists(node.File)) { if (!this.flashMovie.Visible) this.flashMovie.Visible = true; this.flashMovie.Width = this.splitContainer1.Width; this.flashMovie.FlashVars = sound= + node.File; this.flashMovie.LoadMovie(0, this.pluginMain.MP3Player); } }
[flexcoders] Custom keyboard navigation on AdvancedDataGrid
I am trying to make the left and right arrows on scroll the columns on AdvancedDataGrids. The default keyboard navigation keys work with SHIFT+PAGEDOWN and SHIFT+PAGEUP. But my client would like the functions to work with left and right arrows. I am able to create an event handler for KeyboardEvent.KeyDown and check for event.keyCode == KeyBoard.RIGHT and KeyBoard.LEFT. But I can't figure out what code to execute from the handler to scroll the columns. Does anybody know how to make this work? Thanks, Paul
[flexcoders] How to show a hand cursor when mouse over a s:Label control ?
Hi I'm using this inside a spark skin class, but the mouse does not change when hovering over the control. Tnx -Itai s:Label id=labelDisplay left=5 fontSize=16 styleName.up=upStyle styleName.over=overStyle styleName.down=downStyle styleName.disabled=disabledStyle buttonMode=true useHandCursor=true mouseChildren=true mouseOver=Mouse.cursor = MouseCursor.HAND; mouseOut=Mouse.cursor = MouseCursor.ARROW; /
Re: [flexcoders] Having trouble justifying Flex to the higher-ups... It only seems to be appropriate for media based sites...
Thanks Oleg. You confirmed my suspicions. You are right that Flex/Flash performs very well for exactly the type of site you referenced (pixlr.com). I can affirm though, that it does not perform great with text heavy activities - especially if we are talking about RichEditableText with the span and b, etc - even excluding discussion of load times and such, just runtime performance is flickery, choppy, etc. I guess I have to master JQuery now, sad... I love Flex.
[flexcoders] Re: Time Problem flex4 + blazeDS + spring
hello Evan Klein, I studied Whats happens to timezone offset on server side for case I i.e Time is 05:30 which is received as 05:53:20 on server has timezone offset as 2120 millisecs. which translate to 05:53:20 for case 2 i.e. Time is 05:29:59 which is recived correctly on server has timezone offset as 1980 which translate to 05:30:00 it seems that on serverside when date is translated offset of 05:30:00 is taken though it should be 05:53:20 hence difference of 00:23:20 is being there. Yes I got answer how 23:20 difference is occuring but there are two offsets are there when standard IST is +0530 how this 05:53:20 offset is comming in to picture ? that to precisely at threshold of 05:30 has it something to do with DST ? One more question Flex is also converting 05:29:59 with 05:30:00 offset and when time is 05:30:00 its also using 05:53:20 then why java is using 05:30 offset when time is 05:30 and letting discrepancy of 23:20 to slip in in converted time. Really this is driving me mad. it seems that time date dealing in flex java has lots of tricks which need to reveal. Thanks and best regards. Raja --- In flexcoders@yahoogroups.com, raja_s_patil kpr.rspa...@... wrote: Thanks Evan Klein for response, I read the link you mentioned and tried to dig further to root cause of the problem. Just before executing the RO's method the values of birth time are as follows case 1 - 01 Jan 1900 05:30:00 and timezone offset is -330 hence UTC should be 01 Jan 1900 00:00:00 and it is as expected but when I look at network monitor trace for request/response it is like -- birthTime=Mon Jan 01 05:53:20 IST 1900 on server side timezone offset is -330 here actually 23 min 20 seconds are being added. case 2 - 01 Jan 1900 05:59:59 and timezone offset is -330 hence UTC should be 31 Dec 1899 23:59:59 and it is as expected When I look at Network Monitor it is birthTime=Mon Jan 01 05:59:59 IST 1900 which gets translated on server side correctly. since timezone offset there is -330 So I think that when AMF message is created conversion routine is behaving as expected but since I dont know much about timezones and other related matters First I will dig on server side about timezone offsets values and let you know. So long untill then. Thanks once again and regards Raja. --- In flexcoders@yahoogroups.com, Evan Klein evan@ wrote: The crux of it is that on transfer of time the client is converting time to local timezone. On get/set of these values the time must be converted to whichever timezone you would like to operate in. Read this blog: http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html Evan Klein http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html On Sun, May 23, 2010 at 6:57 PM, raja_s_patil kpr.rspatil@ wrote: Hello I am developing my first application in which I have to deal with time. On server side java VO i have defined the field as java.sql.Time and on flex side VO it has to be date. This is happening in windows XP client (browsers Firefox Chrome) while inserting data I am making a fresh copy of Flex VO and time is set as 10:00:00 the timezone set for XP is +05:30 when its received at Java service its 10:23:20+0553 and gets saved to database as 10:23:20. When I retrieved from Java and send back to Flex for editing it comes back as 10:23:20+0553 and now if I set it again to 10:00:00 it gets saved properly. Means in edits no 00:23:20 additions are there but for inserts addition is there. I guess that since TimeZone is taken as +0553 rather than +0530 23 minutes might have added but what about 20 seconds why, where and how 00 23 20 being added ? Are any settings to be done on client side or server side. Server is KUbuntu 9.10 java latest installed from repository and windows xp being used as VM on Vmware all set up is on Dell Vostro 1710 Laptop. Thanks and best regards Raja
[flexcoders] Looping to addChild TextInputs, then removeAllChildren, are they GC'd?
Hi, If I looped ten times and added ten Ten TextInputs to the 'stage' (addChild) they would remain in memory until they were removed (removeAllChildren) and then Garbabe Collected? Right? Let's say I created an Array and changed my loop to add them to the 'stage' (addChild) *AND* put the object reference into the Array. If I then removed them from the stage, am I right in thinking they'd remain in memory because they are referenced by the Array so therefore wouldn't be GC'd? I'm trying to tick some boxes in my head about how the inners of Flex works so if by reading this you think I might benefit from reading soemthing, I'd appreciate some links to articles. Thanks guys, Nick
[flexcoders] DataGrid ItemRenderer Problem
I have an itemRenderer: mx:DataGridColumn headerText= dataField=remove width=20 mx:itemRenderer fx:Component mx:Image source=assets/Remove-32.png height=20 width=20 useHandCursor=true buttonMode=true click=trace (parentDocument); parentDocument.removeItem()/ /fx:Component /mx:itemRenderer When I first load the state where the DataGrid is, add items to the grid, remove items from the grid, etc., the trace returns the root application (My_Site). When I subsequently change states and then back to the state where the DataGrid is located, the trace returns the container: My_Site.ApplicationSkin2._ApplicationSkin_Group1.contentGroup._My_Site_SkinnableContainer1.mainContainer6 This causes an error, so the question is, how do I call the function regardless.
Re: [flexcoders] Looping to addChild TextInputs, then removeAllChildren, are they GC'd?
You are correct. On 5/25/10 3:30 AM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, If I looped ten times and added ten Ten TextInputs to the 'stage' (addChild) they would remain in memory until they were removed (removeAllChildren) and then Garbabe Collected? Right? Let's say I created an Array and changed my loop to add them to the 'stage' (addChild) *AND* put the object reference into the Array. If I then removed them from the stage, am I right in thinking they'd remain in memory because they are referenced by the Array so therefore wouldn't be GC'd? I'm trying to tick some boxes in my head about how the inners of Flex works so if by reading this you think I might benefit from reading soemthing, I'd appreciate some links to articles. Thanks guys, Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Having trouble justifying Flex to the higher-ups... It only seems to be appropriate for media based sites...
There should be some improvements to text performance real soon (4.1) which you can try out in the nightly builds, but it still won’t beat HTML. The question is really if there are other advantages of Flex/Flash that will outweigh the trade-off. Sometimes you can do things that will make Flash appear faster even though raw performance may be lacking. On 5/25/10 3:56 PM, Baz li...@thinkloop.com wrote: Thanks Oleg. You confirmed my suspicions. You are right that Flex/Flash performs very well for exactly the type of site you referenced (pixlr.com http://pixlr.com ). I can affirm though, that it does not perform great with text heavy activities - especially if we are talking about RichEditableText with the span and b, etc - even excluding discussion of load times and such, just runtime performance is flickery, choppy, etc. I guess I have to master JQuery now, sad... I love Flex. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] How to show a hand cursor when mouse over a s:Label control ?
MouseEnabled=true? On 5/25/10 9:54 AM, itaid1 ita...@yahoo.com wrote: Hi I'm using this inside a spark skin class, but the mouse does not change when hovering over the control. Tnx -Itai s:Label id=labelDisplay left=5 fontSize=16 styleName.up=upStyle styleName.over=overStyle styleName.down=downStyle styleName.disabled=disabledStyle buttonMode=true useHandCursor=true mouseChildren=true mouseOver=Mouse.cursor = MouseCursor.HAND; mouseOut=Mouse.cursor = MouseCursor.ARROW; / -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: Security sandbox violation
What is the use-network setting? I don’t know the rules for audio. Remember that you can load an image from just about anywhere, but you can’t access the pixels. Poke through the security white-papers on the Adobe site. On 5/25/10 3:49 PM, olegsivo...@gmail.com olegsivo...@gmail.com wrote: Whether it is browser or standalone shouldn’t matter. Now I'm lost... I have ShockwaveFlash ActiveX sitting on the form and loading MP3 files from any place on my PC (well, this is the easiest way to have MP3 player in .NET :D ), it can playback MP3s just fine, I'm getting no warnings / errors, checked the logs and it says it's all good... how's that possible / should it be that way? This is an entirely clean install of Windows, and I haven't yet set any trust records... -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui