Page 1 of 1

get IPXC_XForm data

Posted: Thu Jun 27, 2019 11:58 am
by jusWest
Hello!

Probably not seaing the forrest for the trees here, but how can I get the value of a textobject that is
in a IPXC_XForm?

I'm doing something like this:

Code: Select all

            for (int i = 0; i < _CoreDoc.Pages.Count; i++)
            {
                IPXC_Content content = _CoreDoc.Pages[(uint)i].GetContent(PXC_ContentAccessMode.CAccessMode_Readonly);

                for (uint c = 0; c < content.Items.Count; c++)
                {
                    if (content.Items[c].Type == PXC_CIType.CIT_XForm)
                    {
                        var xFormHandle = content.Items[c].XForm_Handle;
                        var xFormdata = _CoreDoc.GetXFormByHandle(xFormHandle);
                        var contentxForm = xFormdata.GetContentEx(PXC_ContentAccessMode.CAccessMode_Readonly);

                        if (contentxForm != null)
                        {
                            // what to do here?
                        }

                    }
                }
            }

Re: get IPXC_XForm data

Posted: Thu Jun 27, 2019 12:02 pm
by Sasha - Tracker Dev Team
Hello jusWest,

In place of the last var keyword there should have been an IPXC_Content interface that would instantly give you an idea on what to do next. Basically the XForm has it's own content that can hold another XForm and so on. So a recursive method would be perfect here.

Cheers,
Alex

Re: get IPXC_XForm data

Posted: Fri Jun 28, 2019 8:18 am
by jusWest
:roll:

duhh, I need a vacation it seems :P :lol:

Re: get IPXC_XForm data

Posted: Fri Jun 28, 2019 8:20 am
by Will - Tracker Supp
:D (Me too! :wink: )