THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/12/2006 at 09:00, xxxxxxxx wrote:
Cinema 4D Version: 9.6
Language(s) : C.O.F.F.E.E ;
I have a strange problem and I can't seem to find a solution for it.
I have made a dialog with quite a few parameters (20 to be exact). This worked fine till I added some more parameters. It seems, that until 21 everything is fine, but as soon as I add more, I get this error. Of course, I changed the class and dialog:dialog settings as well, so I am quite at a loss here.
I there some way to define the max number of dialog parameters?
Thanks for your help
On 11/12/2006 at 09:45, xxxxxxxx wrote:
Dialogs are unrestricted here - I have a main dialog which contains hundreds of 'parameters'.
Dialog or 'Attributes Manager'? Different beasts, I'm afraid.
Are you sure that you didn't miss something, repeat a gadget ID, miss a group terminator, etc.? Code to examine is always useful.
On 11/12/2006 at 10:45, xxxxxxxx wrote:
thank you for your prompt answer. I must admit, I am quite new to COFFEE, so maybe there is some really simple mistake, which I haven't noticed.
The dialog is for an expression tag plugin.
In the .cof file I have included the .col file in which the actual dialog is build. I have not used any enums or other files (don't quite understand them yet).
As for the structure, here is a code sniplet (don't laugh, this is quite chaotic) from the .cof file:
All variables used are globally declared.
This is from the .col file:
class dialog : GeModalDialog
If I take away the scaley- respectively the y_scale-variable/parameter, everything works like charm.
I must admit, that I don't entirely understand why I have to declare all values twice (public and dialog:dialog), but that's another problem
As for a missing group terminator - that of course happened before, but mostly the only result was a messed up dialog box without any error messages.
Maybe you have an idea, your help is greatly appreciated.
If you need the files, I can post them, too.
Thank you very much
On 11/12/2006 at 12:14, xxxxxxxx wrote:
I'd probably need to see the files as nothing of much concern can be seen in the given code.
One unrelated thing you should do after the dialog open is then check the result before setting the global variables according to the dialog variable settings:
This will let users cancel the change process and keep the original variable settings untouched.
Look forward to checking the files.
On 11/12/2006 at 13:11, xxxxxxxx wrote:
this is awefully nice of you. If you don't mind, I'd like to send the files via mail. If you do, I can also upload them to my server and post the link here.
Again, thank you very much for taking the time.
On 11/12/2006 at 20:02, xxxxxxxx wrote:
You've got mail.
On 12/12/2006 at 09:08, xxxxxxxx wrote:
Okay, I think that you were close to the problem but not quite. This doesn't look to be a limitation of the dialog, but of constructors in COFFEE. It appears that the new(class,...) can only accept 20 parameters (despite the ellipses).
Instead of using a long argument list, it may be best to use a struct to pass as argument instead. I'm emailing back with modified code attached for your examination.
ETA: It may also be possible to use another method instead of the constructor (add an InitMyDialog() to the dialog class) and provide the argument list there. Let me try that and see if the argument count is limited only to constructors or is more ubiquitous.
On 12/12/2006 at 09:58, xxxxxxxx wrote:
I just got your modified files and you really made my day! Thank you so very much for helping me out.