• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

drag text into document -plugin development

Community Beginner ,
Aug 23, 2020 Aug 23, 2020

Copy link to clipboard

Copied

Hello,

I am trying to drag a text into document, i have the below code for this but its not working, please help!

 

InterfacePtr<IDataExchangeHandler> ourHandler(DNDController->QueryHandler(kTEXTFlavor));
if (ourHandler==nil)
{
    ASSERT_FAIL("Handler nil for our flavor?");
break;
}

if (ourHandler->IsEmpty() == kFalse)
{
ourHandler->Clear();
}

DNDController->SetSourceHandler(ourHandler);

PMString newPageItem("Hello There");

 

InterfacePtr<IStringData> stringData(ourHandler , UseDefaultIID());

stringData->Set(newPageItem);
InterfacePtr<IPMDataObject> item(DNDController->AddDragItem(1));


PMFlavorFlags flavorFlags = 0;

item->PromiseFlavor(kTEXTFlavor, flavorFlags);
result = kTrue;

TOPICS
SDK

Views

135

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation