Retrieves a block of text for use on the UI.
Public Member Functions | |
| TextPackage (string src, string relativeTo) | |
| Creates a new text package for the named file to get. You must then call PowerUI.TextPackage.Get to perform the request. More... | |
| void | Get (OnTextReady textReady) |
| Sends the request off and defines a callback to run when the result is ready. More... | |
| void | GotText (string text) |
| Got text is called by the file handler when the response is received. More... | |
| void | GotText (string text, string error) |
| Got text is called by the file handler when the response is received. More... | |
Public Attributes | |
| string | Text |
| The text that was retrieved. You must check if it is PowerUI.TextPackage.Ok first. More... | |
| string | Error |
| Any error that occured whilst retrieving the text. More... | |
| FilePath | File |
| The file that was requested. More... | |
| string | FileType |
| The type of file that was requested (e.g. "txt" or "html") More... | |
| object | ExtraData |
| A custom data object for passing anything else when the callback runs. More... | |
Properties | |
| string | Url [get] |
| The fully resolved URL requested. More... | |
| bool | Ok [get] |
| True if there is no error and the text is ok. More... | |
| bool | Errored [get] |
| True if there was an error and the text is not ok. More... | |
Events | |
| OnTextReady | TextReady |
| The callback to run when the text has been retrieved (or an error occured). More... | |
Private Member Functions | |
| void | SetPath (string src, string relativeTo) |
| Sets up the filepath to the given url which may be relative to a given location. More... | |
|
inline |
Creates a new text package for the named file to get. You must then call PowerUI.TextPackage.Get to perform the request.
| src | The file to get. |
| relativeTo | The path the file to get is relative to, if any (may be null). |
|
inline |
Sends the request off and defines a callback to run when the result is ready.
| textReady | The callback to run when the text has been retrieved. Note that the callback must check if the result is PowerUI.TextPackage.Ok. |
|
inline |
Got text is called by the file handler when the response is received.
| text | The text that was recieved. |
|
inline |
Got text is called by the file handler when the response is received.
| text | The text that was recieved, if any. |
| error | An error that occured, if any. |
|
inlineprivate |
Sets up the filepath to the given url which may be relative to a given location.
| src | The file to get. |
| relativeTo | The path the file to get is relative to, if any. May be null. |
| string PowerUI.TextPackage.Error |
Any error that occured whilst retrieving the text.
| object PowerUI.TextPackage.ExtraData |
A custom data object for passing anything else when the callback runs.
| FilePath PowerUI.TextPackage.File |
The file that was requested.
| string PowerUI.TextPackage.FileType |
The type of file that was requested (e.g. "txt" or "html")
| string PowerUI.TextPackage.Text |
The text that was retrieved. You must check if it is PowerUI.TextPackage.Ok first.
|
get |
True if there was an error and the text is not ok.
|
get |
True if there is no error and the text is ok.
|
get |
The fully resolved URL requested.
| OnTextReady PowerUI.TextPackage.TextReady |
The callback to run when the text has been retrieved (or an error occured).