**** BEGIN LOGGING AT Wed Sep 26 02:59:58 2012 Sep 26 13:38:15 hey, is there a way in Enyo to serve up a file for the user to download? Sep 26 13:47:00 hello? Sep 26 16:44:22 i had a answer, too Sep 26 17:01:37 not exactly the channel for instant gratification Sep 26 17:09:10 grrr, silly titanium, having issues w/ pydev on latest android build Sep 26 19:18:32 hi Sep 26 19:18:46 from Enyo 2.0.1 Release Notes Sep 26 19:19:09 In enyo.UiComponent, when adding a child component, you can now specify the position within the components list where it will be added. Sep 26 19:19:16 how can i do that? Sep 26 19:56:12 calarval: I would guess there is some way to use an index. Is there nothing in the API? Sep 26 19:57:28 didn't find nothing in Sep 26 19:57:35 API docs* Sep 26 19:57:36 ah Sep 26 19:58:19 btw, you wouldn't happen to know how I can get Enyo to serve up a file, would you? (Seeing as you are the only active person here) Sep 26 19:59:33 this is in 2.0.1 release notes also: Added enyo.load() API for loading files/packages at runtime. Sep 26 19:59:34 fxspec06: had an answer for your earlier, but you were gone Sep 26 19:59:51 err... GodGinrai, fxspec06 had an answer earlier Sep 26 20:00:11 after I quit, then Sep 26 20:00:23 I left for lunch a couple of hours ago Sep 26 20:00:32 and there is no answer in my logs Sep 26 20:01:09 calarval: I need to give a file to the user to download Sep 26 20:01:19 summatusmentis: Can you paste it? Sep 26 20:01:58 no, he never posted it, he just mentioned that he had one, but you weren't here Sep 26 20:02:14 aw :( Sep 26 20:02:28 fxspec06: you there? Sep 26 20:05:33 yo Sep 26 20:05:38 in theory, yes Sep 26 20:05:48 lol Sep 26 20:05:57 I heard you had a solution for me Sep 26 20:06:03 this is true Sep 26 20:06:21 github.com/fxspec06/ and look for.... system ext i believe Sep 26 20:06:39 https://github.com/fxspec06/webOS-System-Extension Sep 26 20:07:05 then just use file picker as you would in enyo 1. Sep 26 20:08:48 I never used Enyo 1 Sep 26 20:10:02 Basically, I have a PHP script that generates a CSV. I want to serve the PHP script to the user so it gives them a CSV to download Sep 26 20:19:35 fxspec06: Is that possible with that code you linked? Sep 26 20:22:13 you can do that with a link that points to the file and force download with appropriate http headers Sep 26 20:24:14 I wanted to use a button, tho', so it looks like an app. Will the link lead them away from the app? Sep 26 20:25:29 and what If I need to send POST data to the script? Sep 26 20:27:19 wait, you want to upload file? Sep 26 20:27:26 you use file picker to pick a file to upload Sep 26 20:28:02 then, you have to include jason robitaille's webos-ext so you get access to the palmservice requests Sep 26 20:28:37 and you call a palmservice request with the method 'upload', youc an find the docs on the palm dev site Sep 26 20:28:38 no, I want the user to download a file Sep 26 20:28:42 from the server Sep 26 20:28:53 oh, well.. then you don't need my thing, then, just jason's Sep 26 20:29:03 the app and the PHP script are on the same server Sep 26 20:53:05 GodGinrai this works for me Sep 26 20:53:05 enyo.kind({ Sep 26 20:53:05 name: "DownloadButton", Sep 26 20:53:05 components: [ Sep 26 20:53:05 {kind: enyo.Button, ontap: "download", content: "Download"} Sep 26 20:53:05 ], Sep 26 20:53:05 download: function(){ Sep 26 20:53:06 window.location.href = "/test" Sep 26 20:53:07 } Sep 26 20:53:07 }) Sep 26 20:54:57 maybe you should point href to the path of your file, like: '/somedir/where_the_file_is/acsvfile.csv' Sep 26 21:02:39 if you need to post to that url then you can use a hidden form and instead of window.location.href do myform_ref.submit() **** ENDING LOGGING AT Thu Sep 27 02:59:57 2012