|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-03-2006 14:49
Given that LL already has HTML in the UI, how about using that for structured forms? This would be infinitely more useful than HTML on a prim.
llDialogHTML(integer channel,string title, string HTML,key id);
HTML is either the name of a notecard containing the HTML, or a valid HTML body starting with "<BODY>", ending in "</BODY>", and containing at least one "<FORM>" tag. The leading "<" would distinguish the two cases.
When the use clicks on an <INPUT TYPE=SUBMIT> button in the dialog, then they chat on the specified channel a line containing the encoded "GET" response.
list llResponseToList(string response);
Converts "a=foo&b=bar" to a list ['a', 'foo', 'b', 'bar'].
string llList2Response(list l);
Reverses the above conversion.
|
|
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
|
12-03-2006 14:52
The client is XML. HTML is a subset of XML. Unless you mean because of the Mozilla browser.
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
12-04-2006 06:29
Yeah, XML. That I would definitely like though, since any UI element in the game could then be used by a script for input, would be pretty awesome. Only change really (besides XML) would be to generalise the conversion functions into: list decodeURL(string url); (returns the params, index 0 is the address part of a url. For dialogues this would probably be the object ID or something). and string encodeURL(string urlOrID, list params); Where lists are name/value pairs (anything that could be an array would be repeatedly listed, so a string like: "foo[]=bar&foo[]=bear" would be a list: ["foo", "bar", "foo", "bear"] urlOrID in encodeURL is either a url, or the id of the object being interacted with, or maybe just blank. Because this function would be useful for dealing with URLs for example for use in llHTTPRequest() 
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-04-2006 23:19
From: Draco18s Majestic The client is XML. HTML is a subset of XML. HTML is based on SGML, not XML. I'm not referring to the XML user interface, I'm referring to them embedding an HTML control (Gecko, the rendering engine in Firefox and Seamonkey - the browser itself isn't really called Mozilla any more) in the UI. Using HTML would mean that the same forms could be used in both regular browser contexts and from LSL, and HTML editing tools could be used by developers. Allowing the ability to parse out complete URIs is a good idea, it would make this integration of the two dialog roles even simpler.
|