passing parameters in a send call.

Andre Garzia soapdog at mac.com
Mon May 22 13:59:51 EDT 2006


My problem with all those approaches is that I need to pass an array.  
I can't "combine" the array because the array holds all kinds of HTTP  
header data and MIME data from the body. Since the body of an HTTP  
request might hold binary data, I can't afford to combine the data  
because the splitters I use might be present in some array element  
thus rendering the "split" command useless.

I could use a global, but, we can't nest arrays in Rev and I am  
working with multiple HTTP connections. So what I am doing now is  
holding everything in a global array. Each key has the format of a  
uniqueID & keyName, this way I can fetch the key elements for a given  
HTTP connection by filtering the keys with the uniqueID. This is far  
from optimum approach and I welcome any advise on the topic.

I used send before to pass strings to handlers outside the "usual"  
message path. I thought that I could use the same technique with  
arrays, guess I can't till we have a different array implementation  
in Rev. I could use a box-like approach as used by Dar Scott to  
generate strings that could hold multiple values. but this would add  
new API to my supposed-to-be easy module. So I used the described  
technique of a global array and a function that you pass a unique id  
and it returns an array with the values that belong to that id. The  
unique id is passed as a string in the send call. This is known to work.

its a hack, but it is working.

Thanks everyone for the input.

andre



More information about the use-livecode mailing list