Flex 3 file download - Without URLRequest - apache-flex

My Flex client app has got some data from the back end (RemoteObjects, BlazeDS, Spring). Client has got all the data it needs, it now needs to put some information in a CSV format and make it available for download.
Using Flex 3 for this. Any ideas?
Thanks,
Sri

If you are compiling for Flash Player 10 then you can call the FileReference.save() function to save to the local file-system:
http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/flash/net/FileReference.html#save()
Just make sure you take note of this section:
In Flash Player, you can only call this method successfully in response to a user event (for example, in an event handler for a mouse click or keypress event). Otherwise, calling this method results in Flash Player throwing an Error exception. This limitation does not apply to AIR content in the application sandbox.
The only other alternative if you can't compile for Flash Player 10 is to send the data to the server and have the user download it from there as a CSV.
You can do this with the FileReference.download() in a simlar manner to save():
http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/flash/net/FileReference.html#download()

Unfortunately you cannot do it. You have to use FileReference+URLRequest, you cannot create on the fly a file available for download in Flash Player.
One workaround is to display your data in a text file and allow the user to do copy/paste. Of course, it works only if you have a small amount of information.

Related

D365FO RSAT Action ExecuteHyperlink is not supported

I am using D365FO Task Recorder to document a test case where the user clicks on a hyperlink in a dropdown control to see details of a certain type of item. The downloaded XML runs in the Playback Recorder without issues but RSAT cannot Generate Test Execution and Parameters File. Here is the error message:
Cannot generate test execution files. Action ExecuteHyperlink is not supported on control ReferenceGroup. Recreate the recording without this action.
The users of my company use hyperlinks quite often so it’s impossible to record test cases avoiding this functionality.
Did anyone find or solve this hyperlink problem?
Thanks in advance, regards

Symfony Command that keeps listening for stream input and updates screen information

I have a plan of writing a small command line tool that does the following (without getting into details):
Listen for input stream (a tail of some files)
Parse incoming data and update screen information real-time (like the top command does for example)
Untill the application is being quited (CTLR + C) it will be updating (not appending!) the information on the screen.
I prefer to work with the Symfony console.
Since they have for example the progress-bar I expect it to be doable, since the progress-bar does update the screen. (However, I don't need an actual progressbar).
Keep listening for an input stream and keep updating when information comes in is something I am not sure about to be possible in this manner.
I can't find enough information on how to do this. Does anyone know if this is possible and what components I would need to:
Listen for input stream and trigger an event when information comes in
Update screen information
Any help would be appreciated.
Update:
For now I built the tool without using any framework. I wrote it myself by using this "Listening for incoming streams" example and this "setting cursor position" example (and ofcourse this referenced overview of commands).
However I still would like to know whether and how this would be possible using Symfony's console components.

Open multiple files with an application using QDesktopServices

Currently a user can select a song on my Qt application and play it using his default media player. I have implemented this using QDesktopServices::openUrl().
However I want the user to be able to select multiple songs and enque them in his media player. With the current implementation as soon as the user selects the second song the first song stops and the second one starts to play.
What would be the best way to do this?
I'm afraid, enqueueing songs cannot be done, using QDesktopServices::openUrl() only. I see two main ways to do that:
You can adjust your player to enqueue all songs, opened with QDesktopServices::openUrl() (which is practically equivalent to double clicking in your file magager).
Most players I know have parameters, which tell them to enqueue listed file(s). For example, deadbeef can be launched with parameter --queue. You can use QProcess::startDetached to launch the player with parameters.
In both ways you need to know the exact player, you are using.
If your player supports MPRIS (if it's a media player which is expected to be integrated to a modern Unix desktop, it does), the addTrack method of the D-BUS MPRIS interface for track list manipulation should help you. You might want to call QDesktopServices::openUrl on the first file to make sure that a player is running before you invoke that.

reading txt storing in different

ASp.NET application.
In button click i am accessing one text file and reading content and storing in other destination.
while both users clicking this button at a time deadlock(thread is being used by other process) will occurs so how to handle this i want to read each user one by one can any one suggest method to handle.
i am looking to handle with waithandle events so can any one give a code sample for above scenario.
You could use a ReaderWriterLockSlim to synchronize access to a shared resource such as a file.

ABAP RFC Debugging

I'm a ASP.NET and ABAP developer. For years, I used RFC's to communicate with ASP.NET using SAP .NET Connector.
During the integrated tests, sometimes we need to debug a RFC that has been called from ASP.ENT, just because the bug we are facing does not happens at SE37.
So, everytime I needed to debug the RFC, I just inserted:
IF <<CONDITION>>. WHILE 1 EQ 1. BREAK-POINT. ENDWHILE. ENDIF.
By doing so, the program gets stuck. Then I go to SM50 and debug it.
I was wondering if there is any other way of doing this, because I don't like the idea of changing code in order to debug, or implementing some debug control functionality.
So, what do you do when you need to debug RFC's?
Thanks in advance!
I assume you are using a fairly recent version of sap (4.7+)
Do the following:
Get the username that makes the RFC call into SAP in ASP
Fire up SE37, go to the code section of your RFC
Look at the menu on top, click on 'Utilities'
Click on Settings
Go for the Debugging tab
Fill in the username that will make the call from ASP
Click IP Matching (otherwise a debug session appears for every time any user makes the call)
Session breakpoint active immediately is nice to click as well
Put your external breakpoint where you need it (click the icon with the stop sign and the little man)
Test your ASP connector
The breakpoint should come into effect, a debug window will pop up
You might not have the authorization to do this, if it doesnt work, use SU53 to find out what you're missing.
This should work.
Tricky .. can you elaborate what you mean by "the bug does not happen at se37"?
Does that mean that you cannot reproduce the data that leads to your problem or that the problem is specific to the fact that the function module is called via RFC?
Usually, you should be able to use se37 to start the function module, and there are some ways to record different data constellations to the function module. The behavior of the function module should be the same, regardles of being called from se37 or via RFC ...
When you call a RFM via SE37 you unknowingly use SAP selection screen.
In case you have a table with header-line
when invoked from RFC it might have header line "filled up"
In case you call same FM from RFC the header line in initial.
LOOP AT PT_JNC.
EXIT.
ENDLOOP.
or READ TABLE PT_JNC INDEX 1.
will help populate header line
This is a subtle difference.
Other simple differences are SAP uses YYYYMMDD date format and HH24MISS time
Regards
jnc at Kolkata

Resources