Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Now the location to which to teleport and the camera focus point can both be
specified by the caller, in this case the frame_profile bash script.
|
|
|
|
|
|
frame_profile.lua teleports home when done.
Further add frame_profile bash script to run the specified viewer,
automatically log into said known spot, take frame profile and quit.
The frame_profile bash script runs frame_profile_quit.lua.
frame_profile_quit.lua is derived from frame_profile.lua, but different:
it doesn't teleport either way because it assumes autologin to the target
location, and because it logs out instead of returning home.
|
|
|
|
|
|
that wraps existing "LLTeleportHandler" LEAP listener.
|
|
Add a menus.lua autorun script that waits until login, then adds the Lua
floaters back into the Develop->Consoles menu where they were originally.
Extend UI.addMenuItem() and addMenuSeparator() to support pos argument.
|
|
|
|
`LL.setdtor(desc, table, func)` eventually calls `func(table)`. So the
`close()` method on the table returned by `result_view()` can be directly
passed to `setdtor()`, instead of wrapped in a new anonymous function whose
only job is to pass the table to it.
Moreover, there's no need for the table returned by LLInventory.lua's
`result()` function to lazily instantiate the `result_view()` for `categories`
or `items`: neither `result_view` will fetch a slice unless asked. Just return
`{categories=result_view(...), items=result_view(...), close=...}`. This
dramatically simplifies the `result()` function.
Since that table also defines a `close()` function, that too can be passed
directly to `setdtor()` without being wrapped in a new anonymous function.
|
|
Make test_LLInventory.lua directly select from the calling_cards result set,
instead of first copying all names to a separate array.
|
|
This is the query that produced so many results that, before we lifted the
infinite-loop interrupt limit, inspect(result) hit the limit and terminated.
|
|
Change `result_view()` from a simple function to a callable table so we can
add conventional/default functions to it: `result_view.fetch()` is a generic
`fetch()` function suitable for use with `result_view()`, and `result_view.close()`
is a variadic function that closes result sets for whichever keys are passed.
This arises from the fact that any `LL::ResultSet` subclass is accessed
generically through its base class, therefore we don't need distinct
"getSlice" and "closeResult" operations for different `LLEventAPI` listeners.
(It might make sense to relocate those operations to a new generic listener,
but for now "LLInventory" works.)
That lets `result_view()`'s caller omit the `fetch` parameter unless it
requires special behavior. Omitting it uses the generic `result_view.fetch()`
function.
Moreover, every view returned by `result_view()` now contains a close()
function that closes that view's result set.
The table returned by LLInventory.lua's `result()` function has a `close()`
method; that method can now call `result_view.close()` with the two keys of
interest. That table's `__index()` metamethod can now leverage `result_view()`'s
default `fetch` function.
|
|
At this point, inspect(landmarks) just returns "<userdata 1>".
|
|
|
|
|
|
|
|
result_view(key_length, fetch) returns a virtual view of a potentially-large
C++ result set. Given the result-set key, its total length and a function
fetch(key, start) => (slice, adjusted start), the read-only table returned by
result_view() manages indexed access and table iteration over the entire
result set, fetching a slice at a time as required.
Change LLInventory to use result_view() instead of only ever fetching the
first slice of a result set.
TODO: This depends on the viewer's "LLInventory" listener returning the total
result set length as well as the result set key. It does not yet return the
length.
|
|
Introduce abstract base class InvResultSet, derived from LLIntTracker so each
instance has a unique int key. InvResultSet supports virtual getLength() and
getSlice() operations. getSlice() returns an LLSD array limited to
MAX_ITEM_LIMIT result set entries. It permits retrieving a "slice" of the
contained result set starting at an arbitrary index. A sequence of getSlice()
calls can eventually retrieve a whole result set.
InvResultSet has subclasses CatResultSet containing cat_array_t, and
ItemResultSet containing item_array_t. Each implements a virtual method that
produces an LLSD map from a single array item.
Make LLInventoryListener::getItemsInfo(), getDirectDescendants() and
collectDescendantsIf() instantiate heap CatResultSet and ItemResultSet objects
containing the resultant LLPointer arrays, and return their int keys for
categories and items.
Add LLInventoryListener::getSlice() and closeResult() methods that accept the
int keys of result sets. getSlice() returns the requested LLSD array to its
caller, while closeResult() is fire-and-forget.
Because bulk data transfer is now performed by getSlice() rather than by
collectDescendantsIf(), change the latter's "limit" default to unlimited.
Allow the C++ code to collect an arbitrary number of LLPointer array entries,
as long as getSlice() limits retrieval overhead.
Spell "descendants" correctly, unlike the "descendents" spelling embedded in
the rest of the viewer... sigh. Make the Lua module provide both spellings.
Make MAX_ITEM_LIMIT a U32 instead of F32.
In LLInventory.lua, store int result set keys from 'getItemsInfo',
'getDirectDescendants' and 'collectDescendantsIf' in a table with a close()
function. The close() function invokes 'closeResult' with the bound int keys.
Give that table an __index() metamethod that recognizes only 'categories' and
'items' keys: anything else returns nil. For either of the recognized keys,
call 'getSlice' with the corresponding result set key to retrieve (the initial
slice of) the actual result set. Cache that result. Lazy retrieval means that
if the caller only cares about categories, or only about items, the other
result set need never be retrieved at all.
This is a first step: like the previous code, it still retrieves only up to
the first 100 result set entries. But the C++ code now supports retrieval of
additional slices, so extending result set retrieval is mostly Lua work.
Finally, wrap the table-with-metamethod in an LL.setdtor() proxy whose
destructor calls its close() method to tell LLInventoryListener to destroy the
CatResultSet and ItemResultSet with the bound keys.
|
|
|
|
|
|
Replace the global next(), pairs() and ipairs() functions with a C++ function
that drills down through layers of setdtor() proxy objects and then forwards
the updated arguments to the original global function.
Add a Luau __iter() metamethod to setdtor() proxy objects that, like other
proxy metamethods, drills down to the underlying _target object. __iter()
recognizes the case of a _target table which itself has a __iter() metamethod.
Also add __idiv() metamethod to support integer division.
Add tests for proxy // division, next(proxy), next(proxy, key), pairs(proxy),
ipairs(proxy) and 'for k, v in proxy'. Also test the case where the table
wrapped in the proxy has an __iter() metamethod of its own.
|
|
Trim redundant output from test_setdtor.lua.
|
|
`setdtor('description', object, function)` returns a proxy userdata object
referencing object and function. When the proxy is garbage-collected, or at
the end of the script, its destructor calls `function(object)`.
The original object may be retrieved as `proxy._target`, e.g. to pass it to
the `table` library. The proxy also has a metatable with metamethods
supporting arithmetic operations, string concatenation, length and table
indexing. For other operations, retrieve `proxy._target`. (But don't assign to
`proxy._target`. It will appear to work, in that subsequent references to
`proxy._target` will retrieve the replacement object -- however, the
destructor will still call `function(original object)`.)
Fix bugs in `lua_setfieldv()`, `lua_rawgetfield()` and `lua_rawsetfield()`.
Add C++ functions `lua_destroyuserdata()` to explicitly destroy a
`lua_emplace<T>()` userdata object, plus `lua_destroybounduserdata()`. The
latter can bind such a userdata object as an upvalue to pass to `LL.atexit()`.
Make `LL.help()` and `LL.leaphelp()` help text include the `LL.` prefix.
|
|
Allow UI to have lazily-loaded submodules.
|
|
|
|
|
|
In particular, where the raw leap.request().response call would return
{OK_okcancelbuttons=true}, just return the string 'OK' or 'Cancel'.
Update existing consumer scripts.
|
|
|
|
This way encourages "UI = require 'UI'; UI.Floater"
instead of just "Floater = require 'Floater'".
Moreover, now we don't need UI to maintain a list of allowed submodules;
that's effected by membership in the subdirectory.
|
|
Equip UI with an __index metamethod. When someone references an unknown
key/field in UI, require() that module and cache it for future reference.
Add util.setmetamethods() as a way to find or create a metatable on a
specified table containing specified metamethods.
Exercise the new functionality by referencing UI.popup in test_popup.lua.
|
|
|
|
|
|
Specifically, defend against a callback that runs so long it suspends at a
point after the next timer tick.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add test_flycam.lua to exercise the smaller intervals.
|
|
Also add Region.lua.
|
|
Also update the 'UI' help text to reflect its more general nature.
Mention 0-relative rank in the xxToolbarBtn operation help text.
|
|
|
|
|