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

"We can only wait from within a task" when calling LrTasks.execute?

Guest
May 31, 2010 May 31, 2010

I'm trying to write a plug-in that lives off the Library menu and calls out to an external application to do various activities based on the selected images in the library. I've got my dialog designed, am able to detect what images are selected, and am successfully building up the command line to the application I want to call.

Unfortunately, my call to LrTasks.execute results in the following error when run:

"We can only wait from within a task".

All the samples I've found in the forum don't seem to be doing anything special, they just call LrTasks.execute(commandLine). Can someone help me understand what I'm missing here?

Thanks!

Neil

TOPICS
SDK
1.7K
Translate
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
Participant ,
Jun 12, 2010 Jun 12, 2010

LrTasks.execute is a blocking call, so it must be used only within LrTasks.startAsyncTask or LrTasks.startAsyncTaskWithoutErrorHandler (LR3 only)

Translate
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
LEGEND ,
Jun 12, 2010 Jun 12, 2010
LATEST

There's been some changes under the hood - I've had to wrap a couple things in a task that didn't used to require it. I'm guessing this is one of those kinds of things.

Rob

Translate
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