Page 1 of 2 12 LastLast
Results 1 to 15 of 27

Thread: XPan Sheet

  1. #1
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966

    XPan Sheet

    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.

  2. #2
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,884
    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 by Sensei; 01-15-2019 at 12:28 PM.

  3. #3
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    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.

  4. #4
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,884
    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..

  5. #5
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    No I said struct, not function one by one,
    exactly like your '&funcs'


    Denis.

  6. #6
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    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.

  7. #7
    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

  8. #8
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    Quote Originally Posted by dvrba View Post
    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.

  9. #9
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    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.

  10. #10
    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

  11. #11
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    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.

  12. #12
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,884
    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.

  13. #13
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    Quote Originally Posted by Sensei View Post
    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.

  14. #14
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,884
    Quote Originally Posted by dpont View Post
    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..

  15. #15
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,966
    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.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •