Hot Door CORE Forum
How to add Flyout menu to panel - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Getting started (http://hotdoorcore.com/forum/forumdisplay.php?fid=6)
+--- Thread: How to add Flyout menu to panel (/showthread.php?tid=42)



How to add Flyout menu to panel - Jae - 12-10-2014

I am a new one to Hot Door CORE and try to use it to develop illustrator plug-in. I want to create a panel with flyout menu. Currently, the panel has been created, but the flyout menu can't be added to the panel. Following are the code:
Code:
std::vector<hdi::core::EntryData> docPanelFlyoutMenuItems;
    hdi::core::EntryData docPanelFlyoutMenuItem = hdi::core::EntryData("2", "Write XML", NULL, true);
    docPanelFlyoutMenuItems.push_back(
                                      hdi::core::EntryData(
                                                           "1",
                                                           "Load XML",
                                                           NULL,
                                                           true
                                                           )
                                      );
    docPanelFlyoutMenuItems.push_back(docPanelFlyoutMenuItem);
    
    
    this->__docPanelFlyout = hdi::core::Flyout(docPanelFlyoutMenuItems);
    this->__docPanel.setFlyoutMenu(this->__docPanelFlyout);

This code can be compiled, but when i start Illustrator, the error message "Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)" popped at the last line of the code.

If there some one can help me, thanks.Smile


RE: How to add Flyout menu to panel - Jae - 12-10-2014

It's there some one can help, many thanks.


RE: How to add Flyout menu to panel - garrett - 12-10-2014

Thanks for trying out CORE and submitting the sample code for this problem. I will try it out soon and get back to you.


RE: How to add Flyout menu to panel - garrett - 12-11-2014

Which platform and version of Illustrator were you using?

Never mind, the platform and version would not have mattered.

The problem here is the simple omission of the overloaded assignment operator in the Flyout class. This will be fixed in the next release of CORE.

In the meantime, the workaround is to avoid using the assignment operator with Flyout objects. Change your code to use a Flyout* if you need the variable to be a member of your class (and allocate it during post-startup), or use a local variable instead.


RE: How to add Flyout menu to panel - Jae - 12-12-2014

(12-11-2014, 10:22 PM)garrett Wrote: Which platform and version of Illustrator were you using?

Never mind, the platform and version would not have mattered.

The problem here is the simple omission of the overloaded assignment operator in the Flyout class. This will be fixed in the next release of CORE.

In the meantime, the workaround is to avoid using the assignment operator with Flyout objects. Change your code to use a Flyout* if you need the variable to be a member of your class (and allocate it during post-startup), or use a local variable instead.

Hi Garrett,

Thanks for you kindly help!


RE: How to add Flyout menu to panel - garrett - 12-15-2014

I just thought I would let you know that 0.5.7 has been released, and it addresses this problem.