Re: NSComboBox list is incorrect size on first dropdown
Re: NSComboBox list is incorrect size on first dropdown
- Subject: Re: NSComboBox list is incorrect size on first dropdown
- From: Ken Ferry <email@hidden>
- Date: Tue, 25 Nov 2008 10:20:44 -0800
I think you would like to hear that this delegate call can be forced
to work, but wishing won't make it so.
There are any number if ways to do it earlier, most of which are only
known to you since you know your app design. You could keep the combo
box up to date, you could use a datasource and invalidate the combo
box data when the data changes which would be cheap even if common,
you could override a mouse down method, you could bind the combo box
-- I don't know your app. Just not as late as this delegate method.
-Ken
On Nov 25, 2008, at 9:35 AM, Russ <email@hidden> wrote:
Ha ha, pretty funny. As if I even had a NIB. The items in the list
are the names of objects the user has created, so it changes all the
time, including with each undo and redo. So I load it when it pops
up. Anything else?
----- Original Message ----
From: Ken Ferry <email@hidden>
To: Russ <email@hidden>
Sent: Tuesday, November 25, 2008 12:11:21 PM
Subject: Re: NSComboBox list is incorrect size on first dropdown
The workaround would be to do the work less lazily, like at -
awakeFromNib time.
-Ken
On Nov 25, 2008, at 8:30 AM, Russ <email@hidden> wrote:
I'm assuming you have replicated this now with a test case? (in
which case I'll skip assembling the example).
Is there any workaround? Switching to data source maybe? This is a
64-bit version of a commercial app being prepped, I'm hoping to get
to beta very soon and maybe release before the end of this year. I
don't want to have to place a Snow-only label on it, bad for my
sales. If necessary I'll make it a known issue, but it's a little
silly. Thanks.
----- Original Message ----
From: Ken Ferry <email@hidden>
To: Russ <email@hidden>
Cc: email@hidden
Sent: Tuesday, November 25, 2008 11:01:18 AM
Subject: Re: NSComboBox list is incorrect size on first dropdown
Um, nevermind, wrong OS for the fix. Heh heh!
This will be fixed in 10.6. In 10.5 and earlier, that's just too
late, sorry!
-Ken
On Tue, Nov 25, 2008 at 7:54 AM, Ken Ferry <email@hidden>
wrote:
I cannot reproduce this in a test app. The behavior was changed for
10.5 - before that comboBoxWillPopUp was too late to modify anything
impacting the drop down position of the combo box.
What OS are you on?
If you could file a bug with a test app, that would be very helpful.
-Ken
Cocoa Frameworks
On Tue, Nov 25, 2008 at 7:31 AM, Russ <email@hidden> wrote:
I have an NSComboBox whose contents (internal list) gets loaded
dynamically during the comboBoxWillPopUp notification. It is
created with setNumberOfVisibleItems:9 and
setHasVerticalScroller:YES. The first time the button is clicked,
there is a removeAllItems and then the items are loaded in (over
100 of them) but the drop-down list that appears is only a single
item tall and the scrollbar area is present, but plain gray with
no scrollbar. All the items are present --- you can click inside
the dropdown and then drag up or down to scroll through the list
--- but you wouldn't know this from the single-item-high dropdown
and disabled scrollbar. If one of the items is selected, that is
the one shown in the single-line-high dropdown area. I can read
back numberOfVisibleItems and hasVerticalScroller and they are
correct, but what appears does not reflect these values.
The SECOND time you click the button, the dropdown comes up the
proper height and the scrollbar is present and active.
I've tried a bunch of things inside the notification routine to
try to convince it to do the right thing during the first
dropdown -- calling noteNumberOfItemsChanged, re-calling
setNumberOfVisibleItems and setHasVerticalScroller but with no
effect.
How can I convince NSComboBox to do the right thing? Thanks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the
list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden