THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/09/2011 at 08:20, xxxxxxxx wrote:
Cinema 4D Version: 12
Language(s) : C++ ;
I have been using a multibutton for a while just fine. But it turns out that there also a new combobutton in R12. Which looks like the exact same thing to me.
So I go to try it out and see what the differences are. And when I use the example from the docs. It doesn't work.
Here's my working multibutton code that works just fine:
Here's the non working combobutton version written based on the docs example:
I get .res errors in C4D pointing to the first line: COMBOBUTTON MY_COMBOBUTTON
If I change the first line to: LONG MY_COMBOBUTTON then that line seems to work(no errors).
But then I get .res errors in C4D pointing to the line the first CHILDS bracket is on.
I'm copying this straight out of the example in the docs. Why does this not work?
On 02/09/2011 at 08:40, xxxxxxxx wrote:
did you define the Variables in the .str file and also in the enum in the .h file?
I use to get errors pointing to a certain line in the .res file, but normally that does not match up with where the error gets produced. So make sure, you got:
defined in those files too.
Is that already the case?
On 02/09/2011 at 09:00, xxxxxxxx wrote:
Not sure if this the reason why it isn't working for you but you missed to pass two IDs per entry, one CYCLE ID and one string ID.
From the docs
On 02/09/2011 at 09:56, xxxxxxxx wrote:
I was under the impression that those flags were optional. That's how it works with other descriptions for me anyway.
But just for the sake of ruling out as the problem. I added the second set of ID's to my .res file.
And also added them to my .str file and . h files.
My .h file:
MYBOX = 1000,
My .str file
tsimpletag "SimpleTag Expression";
MY_LINK "My Link";
MYBOX "My option box"; //the text next to the MYBOX attribute
MYSLIDER "My Slider";
MYNUMERIC "My Numeric Field";
MYTEXTBOX "My TextBox Field";
MY_COMBOBUTTON "Multiple Selection Button";
ONE "First Entry";
TWO "Second Entry";
FIRST_CHILD_TEXT "First option Text";
SECOND_CHILD_TEXT "Second Option Text";
C4D still does not like it.
When I use my tag I get a .res error pointing to the line containing :COMBOBUTTON MY_COMBOBUTTON
For some reason. I'm being forced to use LONG instead of COMBOBUTTON.
And CYCLE instead of CHILDS.
I was really just mainly wondering if they both produce the same results anyway.
It looks like they do. But since I can't get COMBOBUTTON to work. I can't see for myself.
On 02/09/2011 at 10:19, xxxxxxxx wrote:
Seems all right, except for the missing Dummy-Element in the enum (think I read somewhere, that it is needed). But I did a test too, and also can't get it working. I also searched the docs and examples and there is not a single resource using this description resource ...
On 02/09/2011 at 15:13, xxxxxxxx wrote:
I think the reason it isn't working is that according to the SDK, the COMBOBUTTON is a dialog element, and you're trying to use it in a description. Same reason as why you can't put a USERAREA element in a description, it's a dialog element.
I've tried it in a dialog and it works fine.
On 02/09/2011 at 15:49, xxxxxxxx wrote:
That sounds logical to me Steve.
*Edit - I managed to figure out how to create a res based dialog with C++ and will test the COMBOBUTTON on that.