[flexcoders] Re: Cache-Control header not working in HTTPService

2007-09-17 Thread dario.drome
The http headers to control (and avoid the cache) come from the 
server side, that is, it is not useful at all that you set the 
headers from the client side.
In order to avoid cache you need to set the header "Pragma" with the 
value "no-cache" and also set "Expires" with "-1" to give your 
content an inmediate expiration, but remember: set these values from 
the server, not from the client.

Regards.

--- In flexcoders@yahoogroups.com, Scott - FastLane <[EMAIL PROTECTED]> 
wrote:
>
> If you have control of the server side of your project, you could 
ask 
> them to include the cache in their response header... I believe 
that is 
> the way it is supposed to work.  The server indicates that the 
content 
> it is returning is dynamic in nature and should not be cached.  
While 
> adding the current time to each of your requests as a parameter 
will 
> avoid caching, it is a bit burdensome if you have a large system to 
> implement.  Note also that the no-cache response header is ignored 
by 
> IE/flashplayer when your request is over https as described here 
> http://blog.fastlanesw.com/?p=9.  Note: I also describe the 
workaround 
> that I use to get around this issue.
> 
> hth
> Scott
> 
> Dan Todor wrote:
> >
> > Try adding current system time as a parameter to your request, it 
will 
> > avoid caching.
> > hth
> >
> > On 9/17/07, *Guido* <[EMAIL PROTECTED] > wrote:
> >
> > Hi y'all,
> >
> > I've been having this problem for a while now, and I've went 
by
> > the docs on RPC components time and time again, getting no
> > solution for this.
> >
> > I have an HTTP service and I need to guarantee that its 
results
> > are not cached by either the app or the browser.
> >
> > My last attempt on this is:
> >
> >  > concurrency="last"
> > headers="{new URLRequestHeader("Cache-Control" ,
> > "no-cache")}"
> > makeObjectsBindable="true"
> > requestTimeout="10"
> > showBusyCursor="true"
> > useProxy="false"
> > url="{myServiceURL}"/>
> >
> > When debugging the app, the service's HTTP header property is
> > populated by the URLRequestHeader, so I believe It's getting 
built
> > adequately. Also, when inspecting the AsyncToken returned by
> > myService.send(), the message property has its headers also
> > populated by the URLRequestHeader.
> >
> > The thing is that when I check for adequate reception on the
> > server side, I don't get the Cache-Control header at all.
> >
> >
> > Does anyone know how to make HTTP headers work for 
HTTPServices?
> >
> > TIA,
> >
> > Guido.
> >
> >
> >
> >
> > -- 
> > All best,
> > Dan
> >
> > Zen is like looking for the spectacles that are sitting on your 
nose
> >
>




[flexcoders] Re: How to get the target node in dragEnter()

2007-05-29 Thread dario.drome
Tracy,
Possibly, if you implement dragEnter in a tree item renderer, then you 
can get the data's reference that you are looking for.

Let me know if you have success.

Regards.



[flexcoders] Re: examples of advanced datagrid functions (paging/filters)

2007-05-29 Thread dario.drome
Hi Derrick,

FDS handles that issue very well (I'm not sure if you are willing to 
use Flex Data Services.)
Also you will find a very illustrative set of articles from Matt 
Chotin blogs: 
http://weblogs.macromedia.com/mchotin/archives/2004/03/large_data_sets.
cfm

See if this helps

Regards



[flexcoders] Re: Problem with loading xml file using HTTPService or URLLoader

2007-05-29 Thread dario.drome
Hi,
Though it sounds to a tipical "flash security enforcemente problem", 
Could you be more specific? have you got any error?

Regards




[flexcoders] Re: Defining a dynamic UI

2007-05-29 Thread dario.drome
Hi,
Probably you want something like this:
https://www.adobe.com/livedocs/flex/2/langref/mx/core/UIComponentDescri
ptor.html#UIComponentDescriptor()

Let me know if this is your way

Regards.



[flexcoders] ByteArray.readMultiByte bug on Macintosh?

2007-05-16 Thread dario.drome
Hi,
I have isolated a problem that appears only when a SWF (built using 
Flex 2.0.1) runs under Macintosh:

The flex application reads a binary data package (serialized on a 
windows server) using an URLLoader
In that binary stream the server serialize things like numbers, 
single bytes and strings.
All is OK with the de-serialization of the data except with strings. 
They are serialized in a very simple way: first a byte containing the 
string's length and, then, the characters stream encoded 
using "Windows-1252".
When the application tries to de-serialize such a string, it first 
read the string's length (ByteArray.readByte) and then, it tries to 
read the "string body" using ByteArray.readMultiByte() method.
The result: when the client is a windows box (using firefox or MSIE) 
there is not any problem. However, when the client is a Mac box (OSX 
10.4 with FireFox) readMultiByte gives a different result each time 
it de-serialize the (same) binary stream.

The function where the problem is isolated is the following:

public function readString(binData:ByteArray):String
{
   var str:String="";
   var length:int = binData.readUnsignedByte();
   str = binData.readMultiByte(length, "Windows-1252");
   return str;
}

I think that I could get rid of the problem by reading each single 
string's character and applying my self the conversion from Windows-
1252 to UTF-8, but I would like to rely on ByteArray.readMultiByte.

Have anybody out there found also this problem?
Perhaps it is not a problem and I am doing something in the wrong 
way, Could anybody help?

Thanks in advance.




[flexcoders] Re: Convert ByteArray to Bitmap

2007-01-30 Thread dario.drome
I agree with Franto friend: You need to know something about the 
bytearray you are receiving, i.e. format, disposition, etc.
Most of image formats have a kind of header where you could find its 
width, height and so on.
Once you know the dimensions and the format, you would need to use 
the apropriate decoder to transform the bytearray in pixels of a Flex 
Bitmapdata object.

--- In flexcoders@yahoogroups.com, franto <[EMAIL PROTECTED]> wrote:
>
> if you dont know what is it ByteArray how you want todisplayit :)
> you have to know at least 1 parameter, width or height...
> 
> thats my opinion
> Franto
> 
> On 1/26/07, Steve Cox <[EMAIL PROTECTED]> wrote:
> >
> >All,
> >
> >
> >
> > I'm retrieving an image via remoting as a ByteArray. How can I 
convert
> > this to a Bitmap without knowing the width/height of the image? 
I've seen
> > SetPixels – but that requires me knowing the dimensions of an 
image – which
> > I don't.
> >
> >
> >
> > Any ideas?
> >
> >  
> >
> 
> 
> 
> -- 
> 
--
---
> Franto
> 
> http://blog.franto.com
> http://www.flashcoders.sk
>




[flexcoders] Application's creationPolicy

2007-01-29 Thread dario.drome
Hi guys,
As far as I understand, the Application is a container and containers
have a "creationPolicy" that affect to the moment where container's
chidren are instantiated. Moreover, there are many examples showing
how to "createChildrenFromDescriptor".

The problem comes when one (me) need to defer the creation of
application's children until a more apropriate moment: if I set the
application's "creationPolicy" to none, then, "initialize" nor
"creationComplete" events are never fired (?)

The fact is that I would need to be sure that all my external styles
(CSS compiled) are properly loaded before any application´s children
start to instantiate or initilize.

I have succeded by inserting an instrumental container between the
application and its chidren but I'am wondering if it is really needed.

Any ideas.





[flexcoders] Re: e4x - attribute based selector

2007-01-26 Thread dario.drome
It is not possible. You will need to perform that kind of selection 
by yourself (i.e. transversing the xml tree)

--- In flexcoders@yahoogroups.com, "Shailesh Mangal" 
<[EMAIL PROTECTED]> wrote:
>
> All,
> 
>I have a following xml structure retrieved from server
> 
>
>   
>   
>   
>
>
>   
>   
>   
>
> 
>  
> and I want to make a selection based on the attribute of child. e.g.
> for child with name "abc", get a result as..
> 
>
>   
>   
>
>
>   
>
> 
> 
> I tried following, 
>  result..child.(@name=="abc")
>  result.root.parent.child.(@name=="abc")
> but I end up getting following 
>   
>   
>   
> 
> Any suggestions?
> sxm
>




[flexcoders] Re: Posting PNG to server

2007-01-25 Thread dario.drome
Try this bellow, it is working for me (though I do not use PHP in 
server side, I use an ASP page.)

P.S.- Any help on message #61263?... I'm also in deadline

function upLoadRemote(endpointURL:String, binData:ByteArray):void
{
   var loader:URLLoader;
   var request:URLRequest;

   loader = new URLLoader();
   request = new URLRequest(endpointURL);
   request.method = "POST";
   binData.position = 0;
   request.data = binData;
   request.contentType = "application/octect-stream";

   loader.addEventListener(COMPLETE, uploadComplete );
   loader.addEventListener(IO_ERROR, uploaderIOError );

   loader.load(request);
}
--- In flexcoders@yahoogroups.com, franto <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> Please help me, how can I post PNG (ByteArray created by Tini Uro's
> convertor) to server (PHP)
> 
> Im try URLLoader + URLRequest.data = png
> 
> but it doesnt work :(
> Does anyone know, what should I do?
> 
> Thanks
> P.S. Close to deadline :))
> 
> Franto
>




[flexcoders] Drawing a custom component in "offscreen"

2007-01-12 Thread dario.drome
Hello,
I would like to know if it is possible to draw a component in a Bitmap.
I have a custom component that graphically render some data tha user 
has input. I do no want to display it on screen but I would need to 
convert it to bimap data and send it to the server for storing.

I am able to do that if I first display the component on screen and 
then draw it in a BitmapData.

Any ideas?

Thank you in advance.



[flexcoders] Re: Customizing the index.template.html wrapper

2007-01-12 Thread dario.drome
Ben,
That's great!... it is what I need.

Thank you very much.

--- In flexcoders@yahoogroups.com, "ben.clinkinbeard" 
<[EMAIL PROTECTED]> wrote:
>
> http://www.morearty.com/blog/2006/12/11/changing-the-filenames-in-
flex-builder-html-templates/
> 
> HTH,
> Ben
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "dario.drome"  
wrote:
> >
> > Hello Flexcoders,
> > I'm trying to figure out if there is a way to change the usual 
> > behaviour of the flex builder's generated html wrapper:
> > 
> > I want that the final html hosting my swf is an html generated by 
an 
> > aspx page on the server. Thus, I would like to configure 
FlexBuilder in 
> > such a way that it uses my own, let's say, "index.template.aspx" 
to 
> > have "myFlexApp.aspx" and "myFlexApp-Debug.aspx" generated at 
output.
> > 
> > If I replace the standard "index.template.html" with 
> > an "index.template.aspx", I get only one "index.aspx" at output 
which 
> > is the debug version (I think that FlexBuilder generates the 
release 
> > version first and then, it overwrites it with the debug version)
> > 
> > Is there any way possibility to do this?
> > 
> > Thank you in advance.
> >
>




[flexcoders] Customizing the index.template.html wrapper

2007-01-11 Thread dario.drome
Hello Flexcoders,
I'm trying to figure out if there is a way to change the usual 
behaviour of the flex builder's generated html wrapper:

I want that the final html hosting my swf is an html generated by an 
aspx page on the server. Thus, I would like to configure FlexBuilder in 
such a way that it uses my own, let's say, "index.template.aspx" to 
have "myFlexApp.aspx" and "myFlexApp-Debug.aspx" generated at output.

If I replace the standard "index.template.html" with 
an "index.template.aspx", I get only one "index.aspx" at output which 
is the debug version (I think that FlexBuilder generates the release 
version first and then, it overwrites it with the debug version)

Is there any way possibility to do this?

Thank you in advance.