05-21-2016, 11:09 AM
After writing plugins for eleven consecutive versions of Adobe Illustrator, it feels like CS6 has dealt me such a blow that I'm struggling to learn to walk again. Inching along with baby-steps in CORE, I've made a simple class that handles a custom About box. After copying the Skeleton project, it creates the About class just before creating the skel object:
About* myAbout = new About;
skel then calls it to do its tasks at startup, shutdown, etc., the new class installs an about menu and its own menu callback to pop up an alert-style box. That works like a champ.
Moving on to a more sophisticated dialog, I defined a simple modal dialog with a couple of widgets as shown in the tool sample, but when the callback goes to:
this->AboutMD.show();
That does nothing. Thinking I may have better luck, at least for this instance, using:
this->__Plugin->setAboutBox(&AboutMD);
My About class can't assign a value to __Plugin because it knows nothing of the skel namespace nor the skel:lugin, nor can I find any way to make use of hdi::core:lugin::instance() or SKEL_PLUG_INST to find the root plugin. skel:lugin can't set About's __Plugin pointer because because of a type difference I can't resolve. I can apparently use menu callbacks in my own classes, but I'm not so sure that'll work with dispatchers, etc.
I hope someday Hot Door will consider revising a sample project, moving some of the members and methods to one or more separate structs and classes.
About* myAbout = new About;
skel then calls it to do its tasks at startup, shutdown, etc., the new class installs an about menu and its own menu callback to pop up an alert-style box. That works like a champ.
Moving on to a more sophisticated dialog, I defined a simple modal dialog with a couple of widgets as shown in the tool sample, but when the callback goes to:
this->AboutMD.show();
That does nothing. Thinking I may have better luck, at least for this instance, using:
this->__Plugin->setAboutBox(&AboutMD);
My About class can't assign a value to __Plugin because it knows nothing of the skel namespace nor the skel:lugin, nor can I find any way to make use of hdi::core:lugin::instance() or SKEL_PLUG_INST to find the root plugin. skel:lugin can't set About's __Plugin pointer because because of a type difference I can't resolve. I can apparently use menu callbacks in my own classes, but I'm not so sure that'll work with dispatchers, etc.
I hope someday Hot Door will consider revising a sample project, moving some of the members and methods to one or more separate structs and classes.