COMBOBUTTON vs. MULTIBUTTON
-
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:
User Information:
Cinema 4D Version: 12
Platform:
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:
LONG MY_COMBOBUTTON { CYCLE { ONE; TWO; } }
Here's the non working combobutton version written based on the docs example:
COMBOBUTTON MY_COMBOBUTTON { CHILDS { ONE; TWO; } }
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?
-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/09/2011 at 08:40, xxxxxxxx wrote:
Hy there,
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:
MY_COMBOBUTTON ONE TWO
defined in those files too.
Is that already the case?
Cheers,
maxx -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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
COMBOBUTTON MY_COMBO_ID { SCALE_H; CHILDS { FIRST_CHILD_ID, FIRST_CHILD_TEXT; SECOND_CHILD_ID, SECOND_CHILD_TEXT; } }
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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.COMBOBUTTON MY_COMBOBUTTON { CHILDS { ONE, FIRST_CHILD_TEXT; TWO, SECOND_CHILD_TEXT; } }
My .h file:
#ifndef _tsimpletag_H_ #define _tsimpletag_H_ enum { MYBOX = 1000, MY_LINK, BUTTON1, BUTTON2, MYSLIDER, MYNUMERIC, MYTEXTBOX, MY_COMBOBUTTON, ONE, TWO, FIRST_CHILD_TEXT, SECOND_CHILD_TEXT, }; #endif
My .str file
STRINGTABLE Tsimpletag { tsimpletag "SimpleTag Expression"; MY_LINK "My Link"; MYBOX "My option box"; //the text next to the MYBOX attribute BUTTON1 "Button1"; BUTTON2 "Button2"; 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_COMBOBUTTONFor 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.-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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 ...
Cheers,
maxx -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/09/2011 at 15:49, xxxxxxxx wrote:
Doh!
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.
Thanks,
-ScottA