[x3d-public] getContainerField() [was cobweb DOM integration]

Andreas Plesch andreasplesch at gmail.com
Mon Oct 10 06:27:47 PDT 2016


Hi Doug,

good questions.


> Date: Mon, 10 Oct 2016 12:53:22 +0000
> From: doug sanden <highaspirations at hotmail.com>
> To: X3D Graphics public mailing list <x3d-public at web3d.org>
> Subject: Re: [x3d-public] cobweb DOM integration
>
> if added to SAI SFNode interface, then it might need a parameter:
> sfnode.getContainerField(parent) since some nodetypes have multiple
> containerfield targets by fieldname, but usually (Q1. always?) just one
> field for a given parent nodetype.
>

I had the same suspicion and you confirmed that there are nodetypes which
have multiple containerfield targets. It may be useful to put together a
list of these starting with some examples. Do any come to mind ? I believe
cobweb does not accept a parent parameter to the .getContainerField()
method, but I may be wrong.

I seem to remember that there are cases where it is necessary to provide an
explicit containerField attribute. Not sure what these are, but the fact
that there is a containerField attribute indicates that it is sometimes
required.

Q2. in an ExternProto scenario, before extern proto is loaded, and no
> concrete node as first node of protobody, how to determine via a function
> what is the containerfield its instances should target their parents? Can
> we put a field 'containerField' or MFString containerFields? Does cobeweb
> delay instancing extern protos until the extern is loaded and concretized
> before allowing getContainerField?
>

I did not explore ExternProtos in cobweb sofar, so I do not have answers,
But I also suspect that a containerField field can be used. Not sure when
instancing occurs but I would also expect after completion of the async,
loading of the externproto.


> Q3. terminology: does 'container' part of containerfield refer to the
> parent ie parent is container or does it refer to the field ie a field is a
> container?
>

I thought 'container' refers to the parent node and 'field' refers to field
of the parent. So one would say the 'containerfield field'. But I am not
sure if containerfield is a field or just a xml attribute which acts as a
helper.

-Andreas


> ________________________________________
> From: x3d-public <x3d-public-bounces at web3d.org> on behalf of Andreas
> Plesch <andreasplesch at gmail.com>
> Sent: October 9, 2016 9:00 PM
> To: X3D Graphics public mailing list
> Subject: Re: [x3d-public] cobweb DOM integration
>
> On Sun, Oct 9, 2016 at 10:35 PM, Andreas Plesch <andreasplesch at gmail.com<
> mailto:andreasplesch at gmail.com>> wrote:
> ...
> What are other strategies for determining the field in a container node
> which should (most likely) be set given just the identity of a new node and
> its containing (parent) node ?
>
>
> Some more investigating brought to light that cobweb.js already has a
> node.getContainerField() method which seems to be exactly what I was
> looking for. Excellent.
>
> The SAI does not have such a function:
>
> http://www.web3d.org/documents/specifications/
> 19777-1/V3.3/Part1/functions.html#t-SFNodeFunctions
>
> Should it be added to the spec. ?
>
> --
> Andreas Plesch
> 39 Barbara Rd.
> Waltham, MA 02453
>
>
>
> --
> Andreas Plesch
> 39 Barbara Rd.
> Waltham, MA 02453
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> ------------------------------
>
> End of x3d-public Digest, Vol 91, Issue 16
> ******************************************
>



-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161010/eaf4644e/attachment.html>


More information about the x3d-public mailing list