XPan Sheet

dpont

Member
Hi,

Have someone got some success with the new Sheet in XPanel?
At least I got the sheet with a few flags,
but functions are in a structure, I tried to allocate memory,
making a few functions (empty) declared in the structure,
but in the SDK, what is "funcs" for the "hint", the structure itself (crash)?
one of the declared functions (crash)?

Denis.
 
If I understand correctly you have to:

static LWXPanelSheetFuncs funcs = { 0 };
funcs.version = 1;
funcs.getColumn = sheet_getColumn;
[...repeat for the all call-backs..]
funcs.handleEvent = sheet_handleEvent;

Then
static LWXPanelHint hints[] = { ....
XpSHEETFUNCS( ID_SHEET, &funcs ),
XpEND;

Then call:
LWXPanelFuncs.hint( xpanelid, 0, hints );

but in the SDK, what is "funcs" for the "hint", the structure itself (crash)?
one of the declared functions (crash)?

Use debugger and/or logging to some file from these call-backs to see whether they are called, and if yes, which one..
Maybe they changed parameter order, or return value, without updating LWSDK.
 
Last edited:
This is a bit different compared to my process,
I used something similar for Node editor structures,
allocating memory, working even with one or two functions
leaving the others as NULL functions
in this case the struct is passed to the node editor,
but for the xpanel, my struc is declared locally like yours
but passing the struct in the hint crashes.

Do I add that I'm in a node editor which has no choice
XPanel only andin this case the xpanel comes
from a structure too...

Denis.
 
If it crashes after supplying "one or two functions" the next step must be providing the all functions.. to see if there is change..
and debugging info (logging) in them,
to see whether they're called at all..
and then whether params they receive are right..
and so on, so on..
Normal programmer work..
 
Ok, I think I found why it failed,
we can't have NULL function here
which is a bit surprising, because all this stuff
is not always necessary also NULL functions are
possible in other structures.

Denis.
 
Make sure all functions are provided. This may change in the future, but, for now, they are required.
Also, the version should be 2.
int version; // current version is: 2
 
Make sure all functions are provided. This may change in the future, but, for now, they are required.
Also, the version should be 2.
int version; // current version is: 2

Ok, thanks, was for 2018 SDK, no other choice than version 1.

Denis.
 
Still a few questions about Xpanel Sheet,
I got a tree from a list of items, simple,
want the first item as parent and others as its children,
but I can't get collapsing/expanding on the first (0) parent item,
no tree and setting it as expanded is crashing,

but if it is set as a "dummy" parent, returning 2 for itself and its child,
this child as a parent for other children returning the total count
tree is expanding/collapsing properly.
I use getitemcount and getsubitem for hierarchy,
getIsExpanded and handleEvent for expanding.

May be not the correct way,
Is it normal? I this case how to ghost this dummy parent?

Also this works for the first column, but for a second column
the 'arrow' is still visible on the first column and children
aren't tabulated (space before the text).

Denis.
 
We can only fix crashes with version 2 in LW2019; so, make sure you are using that version. Version 1 had a number of problems regarding hierarchies in LW2018.x.
I believe only the first column can support expand/collapse.
If you have some sample code, I can better help. Opening a bug report will help facilitate answers to your questions. There are some limitations you may be experiencing.

-davevrba
 
Thanks for reply,
I got the crash on 18 & 19 (expanding item 0),
in 19, I'm experimenting for the moment, not finished,
and got all the results I exposed above.

I understand about the bug report,
but not sure for communicating then.

At least I have a perfect tree, and can select items,
but with a blank row at the top (with a trick
for erasing the dummy parent).

Denis.
 
I asked you to provide your source code couple times in other threads to no avail.
If we will be able to compile your source code, we can try to fix it, rather than plain talk in "cloud", without actually seeing it on our eyes..
Remove the all "meat", leave just XPan Sheet handling code, if "meat" should not be revealed to public.
 
I asked you to provide your source code couple times in other threads to no avail.
If we will be able to compile your source code, we can try to fix it, rather than plain talk in "cloud", without actually seeing it on our eyes..
Remove the all "meat", leave just XPan Sheet handling code, if "meat" should not be revealed to public.

Did you try to code a xpanel sheet? I mean not theorical but practical?


Denis.
 
Did you try to code a xpanel sheet? I mean not theorical but practical?

It's completely irrelevant.
If programmer writes for help on e.g. stackexchange, everybody are saying "show us your source code".
If 3D artists writes for help on 3D forum, everybody are saying "show us your mesh", "send your object", "make screen-shot".
It simply accelerates finding eventual errors.
Didn't you notice that I immediately addressed your initial issue in this thread which caused crash?
I told you in the first post of mine (2nd in this thread): " [...repeat for the all call-backs..]"...
you came up with the same conclusions after.... 12 hours later..
so you wasted all these hours, instead of simply listening to my advice since the beginning..
 
Yes I had all the callbacks, before your advice etc
wasn't the problem, but the initialization,
elsewhere we can set a callback to NULL,
for a similar structure embedding functions
which is not exactly what you meaned.
This is clearly what Dave said here,
it seems that could be fixed also in the SDK also,
you are right I'm not a normal programmer, I'm not a fan,
feel free to ban me from this community, I don't care,
I'm talking here about useless complications
and stuff compared to my common panel sheet
much limpid.


Denis.
 
There is no reason to be upset. Really. I just asked you to provide source code, so everybody can compile on their own within couple seconds, and try and see what you see..
 
There is no reason to be upset. Really. I just asked you to provide source code, so everybody can compile on their own within couple seconds, and try and see what you see..

Remember spatialquery issue in 2018,
your advices? I was all wrong?
In this one, sending code or debugging was useless.

Denis.
 
If you will press someday "Help > Submit a Bug Report" inside of Modeler or Layout, NewTek developers will say the same: "give me working source code that I can compile, test and confirm bug". That's what I heard hundred times, every time I tried to explain some issue inside of LWSDK. Without giving source code, bug report is immediately closed by them.
 
If you will press someday "Help > Submit a Bug Report" inside of Modeler or Layout, NewTek developers will say the same: "give me working source code that I can compile, test and confirm bug". That's what I heard hundred times, every time I tried to explain some issue inside of LWSDK. Without giving source code, bug report is immediately closed by them.

Sending bug report without being convinced that I can communicate myself is not an option.
Except some past specific demand from Deuce,
I never sent code, but I liked to discuss and participate to the investigations,
but I can understand this hurts the system.

Denis.
 
I will try to rewind to this topic,
may be that the internal implementation is complex,
but while my code may be wrong, I'm more about the
understanding of the mechanism.

My initial error was caused by my priority
to focus my work on a simple hierarchy,
one parent (not selectable) and children (selectable items),
no need to move, drag adding more interactivity.

I think this sheet functions look simple,
we get and give an item id (as I can see it can vary)
and/or a child index (no more than the item list indexes)
I suppose also that except for handling the functions are called successively,
getitemcount, then getsubitem, not sure about getsubtype
(type not defined or should I do?)
and the concept of -1 for Id is not clear for me,
if I return it for the first item (logically 0 id)
(my dummy) it disapears (in getsubitem).
I try the hint for top item and select without result (ref is item id?)
the primaryhighlight feature doesn't work for me.


Denis.
 
Last edited:
Back
Top