vvvv / VL.StandardLibs

A collection of standard libraries for vvvv including VL.Stride, VL.Skia, VL.ImGui, msgpack.org[VL]
https://visualprogramming.net
GNU Lesser General Public License v3.0
35 stars 14 forks source link

[Core] add support for Lists and Arrays to ValueByPath methods #676

Closed woeishi closed 3 weeks ago

woeishi commented 4 weeks ago

PR Details

add support for Lists and Arrays to [X]ValueByPath methods

Description

extends existing lookup via index notation of spreads to list and arrays on VLObject TryGetValueByPath and WithValueByPath extension methods.

Motivation and Context

with this change Select (ByPath) index notation on (Mutable)List and (Mutable)Arrays analog to the lookup of slices of spreads

Types of changes

Checklist

gregsn commented 3 weeks ago

Thank you woei! Reminds me I did something similar together with @antongit. This ended up in a branch that should be merged back these days. 1c6b3e9e4739e4374b2e9c0dd918d0d5399c7056 Will have a look then

woeishi commented 3 weeks ago

That looks about the same minus the bounds checks

and note L948 looks like a copy paste error in context with L905 since both condition check for the same type

gregsn commented 3 weeks ago

Thank you Woei!