Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/05/2003 at 08:48, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.100 Platform: Windows ; Language(s) : C++ ;
--------- How do you get back the selected filename? I have a dialog (manually cretead) that shows the filename I can't find and below it the customgui_filename box, which lets me browse to the file I need. But I can't get the selected file back.
Since I couldn't find an res for the container it uses, I tried creating both a string and a filename in id 0 of the container, to see if it would fill it in. No such luck! I assume I am using the basecontainer that I pass to the addcustomgui call, but I can't figure out how to get this last step to work. Is there some sample code showing how to recover data from a custom gui (I couldn't find anything in the docs or forum)? And how do you know what variables a customgui uses?
(My previous issue with the material containers was I was using the enums I found for the material class - MATERIAL_COLOR_COLOR etc instead of CHANNEL_COLOR). Works now!
David
On 27/05/2003 at 23:53, xxxxxxxx wrote:
Normally you would do something like gui->GetData().GetValue().GetFilename(). (The datatype of FilenameCustomGui is finally documented in the latest docs...
On 28/05/2003 at 10:51, xxxxxxxx wrote:
Do not understand - the only ref I can find is:
class FilenameCustomGui : public BaseCustomGui<CUSTOMGUI_FILENAME> { FilenameCustomGui(); public:
};
define CUSTOMGUI_FILENAME 1000478
Does it actually say that is uses a single filename anywhere?
Where can I see what data element(s) that a customgui creates/uses? ---
I created it with - BaseContainer FileData; FilenameCustomGui *guiFile; guiFile = (FilenameCustomGui * )AddCustomGUI(100012,1000478,"Find File:",0,600,0,FileData);
Runs and finds file. Tried - Filename myfilename; myfilename = guiFile->getData().getValue().getFilename(); crashed. The GetValue returns the GEData.
Why is the BaseContainer empty (index 0 = nullid)? Is It just used for input settings to those guis that need them?
I also tried to preload index 0 with a filename, but it did not help, getFilename still crashed.
What am I doing wrong here?
Thanks, David
On 28/05/2003 at 11:02, xxxxxxxx wrote:
What's crashing is the getData(). Tried- TriState<GeData> myGE; myGE = guiFile->getData();
Crashes. What am I missing? GE is non-zero from the AddCustomGui call.