Update SplineCustomGui does not work!?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/12/2008 at 16:26, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:      
    Language(s) :     C++  ;

    ---------
        Hi!

    I have a problem with the SplineCustomGui gadget. Does anyone of you know what I've forgot? I want to insert a knot.
    When I insert the knot by code after the gadget was created - everything is all right.

    If I insert the knot later, e.g. with a button, the knot is not visible until I click with the right mouse button in the gadget area.
    Is there another "update" method which I forgot to sent?

    Does work:

    > <code>
    > class test : public GeDialog {
    >      private:
    >           SplineCustomGui *spline_gadget;
    >           
    >      public:
    >           Bool CreateLayout(void)
    >           {
    >                spline_gadget = (SplineCustomGui* )AddCustomGui(1001, CUSTOMGUI_SPLINE, "ok", 0, 100, 100, BaseContainer());
    >                spline_gadget->GetSplineData()->InsertKnot(0, 0, 0);
    >                spline_gadget->Redraw();
    >                
    >                AddButton(1002, 0, 150, 15, "click");
    >           }
    >      
    > </code>

    Does not work:

    > <code>
    > class test : public GeDialog {
    >      private:
    >           SplineCustomGui *spline_gadget;
    >           
    >      public:
    >           Bool CreateLayout(void)
    >           {
    >                spline_gadget = (SplineCustomGui* )AddCustomGui(1001, CUSTOMGUI_SPLINE, "ok", 0, 100, 100, BaseContainer());
    >                AddButton(1002, 0, 150, 15, "click");
    >           }
    >           Bool Command(LONG id, const BaseContainer& msg)
    >           {
    >                if(id==1002)
    >                {
    >                     /* no method of SplineCustomGui works. I have to use the right mouse click to update the gadget */
    > spline_gadget->GetSplineData()->InsertKnot(0, 0, 0);
    >                     spline_gadget->Redraw();
    >                }
    >                return TRUE;
    >           }
    > }
    > </code>

    Thanks a lot. :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/12/2008 at 19:04, xxxxxxxx wrote:

    Is Command with the id actually ever called? If you haven't checked already, you should GePrint() to see if you even get there.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/12/2008 at 23:11, xxxxxxxx wrote:

    Yes it will be called - checked with a breakpoint.

    The new knot will be insert in the gadget, but its not visible until I click with the right mouse button into the gadget (maybe the right mouse button sends the correct "Update" message.)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/12/2008 at 23:33, xxxxxxxx wrote:

    Maybe you need to call xxx.Message(MSG_CHANGE) + EventAdd() to get the change realized. Things may change for the 'object' but are not realized generally until the change propagates through the C4D system. Message, EventAdd, DrawViews, GeSyncMessage are the main contributors to this realization.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/12/2008 at 09:40, xxxxxxxx wrote:

    kuroyume0161: thanks, but I can't find out what I have to send to the element :-(

    Matthias, can you help?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/12/2008 at 12:06, xxxxxxxx wrote:

    Have you looked at this:

    http://www.plugincafe.com/forum/display_topic_threads.asp?ForumID=4&TopicID;=1537&PagePosition;=164


Log in to reply