Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7183833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:04:36+00:00 2026-05-28T18:04:36+00:00

I have a Flex panel, in InDesign, from which I drag an URL. If

  • 0

I have a Flex panel, in InDesign, from which I drag an URL. If I drop this URL on a text editor or a web browser, it works. But when I try to drop it on my InDesign document, it’s a little bit harder.

I have implemented a subclass of CDragDropTargetFlavorHelper. The drop works perfectly on Windows. But on mac, I have problems in the method CouldAcceptTypes :

DragDrop::TargetResponse AutocatDNDCustomFlavorHelper::CouldAcceptTypes(const  DragDropTarget* target, DataObjectIterator* dataIter, const IDragDropSource* fromSource,  const IDragDropController* controller) const
{
    if (0 != dataIter && 0 != target)
    {

        DataExchangeResponse response = dataIter->FlavorExistsWithPriorityInAllObjects(kURLDExternalFlavor);
        if (response.CanDo())
        {
            ...
        }
    }
}

The problem is that response.canDo() answers kTrue on Windows, but kFalse on Mac. I tried to explore the content of dataIter, but a call on dataIter->First() returns nil. I tried a controller->GetItemCount(), which returns 1. But if I try a controller->GetDragItem(1), I get a nil pointer. I have the impress there is no item. Though, the drop works on another app than InDesign, as I said.

Is it a problem of internalization ? Or something else ? It let me dry.

Thanks in advance

————————– EDIT ———————————–
I solved this problem, but discovered another one. The flavor sent by the flex panel has been changed, so that it’s a text flavor instead of an URL flavor. My method couldAcceptType works now :

DragDrop::TargetResponse AutocatDNDCustomFlavorHelper::CouldAcceptTypes(const DragDropTarget* target, DataObjectIterator* dataIter, const IDragDropSource* fromSource, const IDragDropController* controller) const
{
    if (0 != dataIter && 0 != target)
    {
        // Check for URL Flavor in the drag
        DataExchangeResponse response = dataIter->FlavorExistsWithPriorityInAllObjects(kTEXTExternalFlavor);
        if (response.CanDo())
            {
                return DragDrop::TargetResponse(response, DragDrop::kDropWillCopy);
            }
    }
    return DragDrop::kWontAcceptTargetResponse;
}

The problem is now in the ProcessDragDropCommand method. Here is the code :

ErrorCode AutocatDNDCustomFlavorHelper::ProcessDragDropCommand(IDragDropTarget* target, IDragDropController* controller, DragDrop::eCommandType action)
{
    // retrieve drop data
    IPMDataObject* dragDataObject = controller->GetDragItem(1);
    uint32 dataSize = dragDataObject->GetSizeOfFlavorData(kTEXTExternalFlavor) ;
    ...
}

The problem is the IMPDataObject I get is nil. There is no item in the controller. However, there were items in the CouldAcceptTypes method, in the DataObjectIterator. So, where are my items ?

I tried using a custom CDataExchangeHandlerFor, but could not really understand what its usage was for. It didn’t work anyway.

Has anyone an idea ?

Regards,
Rémi

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:04:37+00:00Added an answer on May 28, 2026 at 6:04 pm

    The problem is the argument of the GetDragItem. It is 1 on PC. It is a strange value on Mac (something like 719853). The only dirty solution I found is doing a memcpy from the object retrieved drom the dataIter in the CouldAcceptTypes method, and use it in the ProcessDragDropCommand method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a panel component on my flex application. This component has a click
I have a portlet. Inside of this portlet I have Flex application that displays
I have a Flex application that calls a function which searches a large document
I am trying my first flex application. And have a problems adding data from
We have a Flex 3 application of which the main .swf is running in
We have Flex applications that connect to our ASP.NET 3.5 Web Applications and usually
I have a Flex 4 spark Panel I'm popping up through the PopUpManager, but
I have Flex 4 application in which I have one component as top layer
I have a mapping application written in a flex/flash app. This app is used
I have a flex UI which communicates with server using spring blazeds. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.