Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    LONG Cycle (combobox)

    SDK Help
    0
    3
    322
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 29/10/2015 at 06:47, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hello, i wondering why my Long cycle never change value ever i click on on it. And how did you get the value of it inside your code ?

      BOOL & cie i do this  tag->GetData()->GetBool(NAME_OF_MY_BOOL_IN_H_FILE); inside my execute code ? (i'm working on a tag plugin)

      but i didn't found the solution for LONG ...

      Maybe with messages ? Or maybe i should use GetDParameter() and SetDParameter().

      Thanks for any help

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 30/10/2015 at 07:24, xxxxxxxx wrote:

        Hi,

        it's hard to tell, why the combobox doesn't react on user interaction without seeing any of your code and how you set it up. One reason I could imagine, if there's only one value assigned to the combobox, so there's nothing to choose from.
        In order to get/set values to the combobox, you simply use GetInt32()/SetInt32(). The reason, why it's still called LONG in resource files has historic reasons. With Cinema 4D R15 a more clear and precise naming of datatypes took place, since then the API functions Get-/SetLong() are called Get-/SetInt32().

        While this actually has nothing to do with Cinema 4D, one reason for this change is, that the C-types long and int are not really defined in their width (number of bits). On 32-Bit systems this was still easy and everybody seemed to have agreed, that they are 32-Bit wide (at least on x86 with Windows, OS X and Linux). But with the introduction of 64-Bit wide x86 processors, the developers of the various operating systems (and compilers) did choose different roads and the width of int and long types was suddenly different. I guess, one could blame Kernighan and Ritchie for this inconsistency...

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 02/11/2015 at 04:41, xxxxxxxx wrote:

          Hi andreas,

          You're very helped me on this, If you do that for everyones you shouldn't sleep a lot ^^

          I found my error. I didn't provide values In my .h file because i said to myself : I not useful, it is the LONG who send me back value not the ELEMENT inside... Bad move !

          It work like this for .res file :

            
          LONG ACTION_NAME  
          {      
          SCALE_H;   
          ANIM OFF;  
            CYCLE  
            {  
                FIRST;  
                SECOND;  
            }  
          }  
          

          In .h file :

            
          ACTION_NAME          = 1103,  
            FIRST                    = 1104,  
            SECOND               = 1105,  
          

          And in .str table file :

            
          ACTION_NAME            "How is the woman ?";  
            FIRST                      "dressed";  
            SECOND                  "naked";  
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post