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

Bug: Combo boxes completely broken?

LEGEND ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

It appears that combo boxes don't work at all, ignoring any input the user types:

local LrDialogs = import 'LrDialogs'
local LrView = import 'LrView'
local f = LrView.osFactory()

local combo = f:combo_box {value = 1, items = {1, 2, 3}}
LrDialogs.presentModalDialog {title = "Test", contents = combo}
LrDialogs.message (combo.value)

Am I missing something obvious?  I tried the example in the SDK Guide on page 101, and that doesn't seem to work either. This would explain why validation of combo boxes doesn't work:

http://forums.adobe.com/thread/673170?tstart=0

TOPICS
SDK

Views

1.8K

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
LEGEND ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

I'm not having any such problems. Probably you need to bind the value to a property instead of specifying a fixed value.

Votes

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
LEGEND ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

Probably you need to bind the value to a property instead of specifying a fixed value.


Hmm, here's a version binding to a property, and it still doesnt work:

local LrBinding = import 'LrBinding'
local LrDialogs = import 'LrDialogs'
local LrFunctionContext = import 'LrFunctionContext'
local LrView = import 'LrView'
local f = LrView.osFactory()

LrFunctionContext.callWithContext ("test", function (context)
    local prop = LrBinding.makePropertyTable (context)
    LrDialogs.presentModalDialog {title = "Test",
        contents = f:combo_box {bind_to_object = prop,
            value = LrView.bind ("value"), items = {"1", "2", "3"}}}
    LrDialogs.message (prop.value)
    end)

When you select an item from the menu, that gets displayed in the message dialog, but any value you type in isn't.

I'm not having any such problems.

I wonder what's different.  Does the code above work on your machine?  Which platform?  I'm on Windows 7 32-bit. Note that the example on page 101 of the SDK Guide doesn't work for me either.

Does one of your published plugins use combo boxes within presentModalDialog ()?  If so, I could download it and see if it works properly on my config.

Votes

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
LEGEND ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

John,

That code works fine for me: win7/64 - I can enter a value of "4" and it will be displayed after clicking OK.

DevAdjust has combo boxes if you want to try it.

Rob

Votes

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
LEGEND ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

Hmm, the combo boxes in DevAdjust don't work on my config.  Here's what I did:

1. File > Plug-in Extras > DevAdjust

2. Adjustments | New Presets | Combos

3. In the first combo box, type "Tone Curve - Darks", enter 5.00 as the value

4. Save As Preset, use the filename "Test1"

5. Examine the contents of Test1.lua -- it's empty.

6. Repeat, but instead of typing, use the drop-down to select "Tone Curve - Darks".

7. The contents of Test1.lua are no longer empty.

I'm stuck.  I wonder if this is specific to my config or to Windows 7 32-bit?

Anyone else with Windows 7 32-bit who could run the simple test code above?

Votes

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
LEGEND ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

Chet? - You still with us Mr. Drarvik? - Any body else havin' problems with combo boxes on win7/32 ?

Votes

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
LEGEND ,
Aug 21, 2010 Aug 21, 2010

Copy link to clipboard

Copied

Combo boxes no longer working for me! - I have the same problem as you now John (selected values are fine but text entries are not being committed to the property value). Only thing I can think of thats changed for me is Lr3.0 -> Lr3.2RC, but all of my plugins that use combo-boxes are broken!

Adobe - please fix this ASAP, eh?

John - I'm going to go submit this via "the form" too - how you coming with it?

Rob

Votes

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
LEGEND ,
Aug 21, 2010 Aug 21, 2010

Copy link to clipboard

Copied

I've just had to design without them.

Votes

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
LEGEND ,
Aug 21, 2010 Aug 21, 2010

Copy link to clipboard

Copied

Is there not some way to force commit using a technique similar to the one you showed me/us for hiding the default button in a modal dialog box? i.e. shuffling through the bits and pieces tied to the combo_box control to find the text that's not being commited, and then "latching" on to it?

Rob

Votes

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
LEGEND ,
Aug 21, 2010 Aug 21, 2010

Copy link to clipboard

Copied

Is there not some way to force commit using a technique similar to the one you showed me/us for hiding the default button in a modal dialog box? i.e. shuffling through the bits and pieces tied to the combo_box control to find the text that's not being commited, and then "latching" on to it?

My guess is that would be a lot harder than my hack of setting the enabled property of the OK button.  By dumping out the entire structure of a control, it was relatively easy to find the OK button and set a property, but I'm not sure what might be involved in trying to fix the combo-box bug.

Votes

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
LEGEND ,
Aug 21, 2010 Aug 21, 2010

Copy link to clipboard

Copied

John,

I gave it a whack, but came up short.

I tried dumping everything and then looking for the entered value but its not in there. My guess is that there is some kind of missing link between the control and Lightroom such that by the time the dialog box is dismissed the value has already been discarded.

So did you code a combo-box emulation or do you just do without combo boxes altogether?

Weird it was working for me, and then not. And, nobody else has chimed in on this thread either - does that mean its working for everybody else?, or that it isn't?, nobody uses the text-field aspect of combo-boxs?... I haven't had any of my plugin users complain, but I'm not sure what to make of that.

Blah, blah, blah,

Rob

Votes

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
LEGEND ,
Aug 22, 2010 Aug 22, 2010

Copy link to clipboard

Copied

John,

Two things:

1. I implemented a make-shift combo-box emulation thingy if you're interested.

2. I discovered that if you hit the tab key until the combo box comes back into focus, the value will be committed as it should. Not that we could expect our users to do that - but it may be a clue.

Chet Drarvik

Chet Drarvik

Chet Drarvik

Chet Drarvik

Chet Drarvik

Chet Drarvik

Chet Drarvik

Chet Drarvik

- Are we going to have to work-around this bug after Lr3.2 final is released too? - Or can we count on a fix??

Rob

Votes

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
LEGEND ,
Aug 22, 2010 Aug 22, 2010

Copy link to clipboard

Copied

I hereby request everyone who reads this to try this test plugin and report results.

http://www.robcole.com/_temp/ComboBoxBugTest_LrPlugin.zip

I would really like to know how widespread is the problem.

John had it since day 1, I didn't and now I do...

Anybody else?

Rob

Votes

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
LEGEND ,
Aug 22, 2010 Aug 22, 2010

Copy link to clipboard

Copied

Since I first encountered the bug, I moved from Windows 7 32-bit to Windows 7 64-bit (on a brand-new computer), and the bug still occurs.  Your handy test fails.

Votes

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
LEGEND ,
Aug 22, 2010 Aug 22, 2010

Copy link to clipboard

Copied

LATEST

Jeffrey Friedl is going to deliver that test plugin directly to contacts he has at Adobe (I don't have any such contacts, but I am acquainted with Jeffrey and I sent him the test plugin). So, if they don't do anything it won't be because they didn't know about the problem...

Votes

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