Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27

Thread: XPan Sheet

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

  2. #17
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,055
    Quote Originally Posted by Sensei View Post
    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.

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

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

  5. #20
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,055
    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 by dpont; 02-01-2019 at 02:21 AM.

  6. #21
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,055
    Quote Originally Posted by dpont View Post
    ...I try the hint for top item and select without result (ref is item id?)..
    I experienced also something weird
    with this in hint
    XpSHEETTOPITEM( ID_BUFF, 1 ),
    XpSHEETSELECT( ID_BUFF, 1),
    no result in sheet but this does inhibit the following
    XpBUTNOTIFY(...)

    Denis.
    Last edited by dpont; 02-01-2019 at 10:13 AM.

  7. #22
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,901
    XpSHEETTOPITEM() requires reference (i.e. LWXPanelSheetItemRef) not index.

    XpSHEETSELECT() requires three parameters, not two.

    Are you using C++ or C?
    In C++ you should make class SheetEntry {} with dynamic-list (getCount(),getByIndex()). If getCount()==0, entry is leaf, otherwise it's branch. Return C++ object pointer as LWXPanelSheetItemRef.

  8. #23
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,055
    Yes for ref, I tried it first, no difference,
    but I found XpSHEETSELECT(cid,x)?
    x: 0-not selected; 1-selected; -1-toggle selection
    of course this is not sufficient for initialysing a selection.
    but this is probably why this corrupts the hint
    Initialysing a selection isn't usefull for me.


    Whatever the way you manage your item list,
    as I said for experimenting my tree is simple, a single list is enough
    first my parent, then children
    I may be wrong but I don't think that making our own node structure
    like for classic panel is necessary.
    But I don't exclude thart I missed an important element in this setup.

    getitemcount()
    first return all
    other 0
    getitemsub()
    returning a ref based on the child index (the parent is child 0)
    not using subitemtype (?)
    doesn't work at the first level0
    (I can't post the visual result, but the parent has an Arrow
    set as collapsed, then children not justified, probably not correctly defined)

    but at the second
    getitemcount()
    first return 2
    second return other including itself
    other 0
    getitemsub()
    return child as ref for first
    return child+2 for for second
    returning a ref based on the child index
    thats works but annoying.



    Denis.
    Last edited by dpont; 02-02-2019 at 01:18 AM.

  9. #24
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,901
    Oh, I see where is discrepancy..

    In LWSDK we have:

    XpSHEETSELECT( ctlID, ref, state )
    Set the selection state of a particular item in a sheet control. Each row is assoicated with an reference to an item. The state determines if the item is not selected (0), selected (1), or toggled (-1). If the ref is NULL, then all items are affected.

    but in includes there is:

    /* (state, [0+]LWXPanelSheetItemRef) Selection state of an optional list of items (no items implies All items). x: 0-not selected; 1-selected; -1-toggle selection */
    #define XPTAG_SHEET_SELECT XpHTAG(378,2,1)
    #define XpSHEETSELECT(cid,x) XPTAG_SHEET_SELECT, XpH(cid), XpH(x)


    So header file mismatch what is documentation..

    Three args in LWSDK, two args in includes..

  10. #25
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,901
    Quote Originally Posted by dpont View Post
    I experienced also something weird
    with this in hint
    XpSHEETTOPITEM( ID_BUFF, 1 ),
    XpSHEETSELECT( ID_BUFF, NULL, 1),
    no result in sheet but this does inhibit the following
    XpBUTNOTIFY(...)
    Modify header file in includes to:

    #define XpSHEETSELECT(cid,ref,x) XPTAG_SHEET_SELECT, XpH(cid), XpH(ref), XpH(x)

    and try again..

  11. #26
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,055
    XpSHEETTOPITEM( ID_BUFF, (LWXPanelSheetItemRef)1 ),
    XpSHEETSELECT( ID_BUFF, (LWXPanelSheetItemRef)2, 1),

    No effect and the second one still corrupting the hint.
    But this is facultative for me,
    the mouse selection works.

    Denis.

  12. #27
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,055
    Finally I will use
    a single list of items in a sheet without hierarchy,
    works well in both version 1 & 2,
    this is enough for a gain of space in the panel.

    Thanks for help,
    Denis.

Page 2 of 2 FirstFirst 12

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
  •