• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: LRFilterBar and Bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LRFilterBar and Bindings


  • Subject: Re: LRFilterBar and Bindings
  • From: Michael Fey <email@hidden>
  • Date: Mon, 30 Jul 2007 08:31:22 -0400

Alright, I sent an e-mail off to Logan Rockmore (the creator of LRFilterBar). Below you'll find my question and his response:

Logan,

A friend of mine and I are working on a new app in which we'd like to incorporate LRFilterBar.

Here's the setup:
We have a Core Data application that displays produce in an NSTableView. Below this table view are two NSPopupButtons: The first popup contains three values that will never change: All Produce, Fruits, Vegetables; the second popup contains specific fruits and vegetables (apples, squash, pumpkin, etc.) and is populated through bindings in IB to an NSArrayController.


What we'd like to do is replace these two popups with one very elegant LRFilterBar:
@"All Produce", @"Fruits", @"Vegetables", @"DIVIDER", @"Apples", @"Squash", @"Pumpkin"


The issue that we're running into is that we can't seem to figure out how to bind the second half of the filter bar to the NSArrayController in the same way that we bind the NSPopupButton.

Do you have any suggestions? If it's possible to bind the LRFilterBar at all, we can just put two filter bars back to back in our nib where one is static and the other is bindings-driven, but a cleaner solution would be to have just one filter bar.

Thanks for your help and thanks for making such a great package!

Regards,
Michael Fey



Logan's Response:
Michael:

I'm glad to see you guys are interested in LRFilterBar. If you take a look at my application Assignment Planner <http:// www.assignmentplanner.com>, you can see that I'm doing pretty much what you are looking for. That is, the first items (All, Incomplete and Complete) are always there and the items after the divider are loaded dynamically, based on the courses that you add in the app.

So, it can be done. But, unfortunately, there isn't any way to do it with bindings. You'll have to go in programmatically and whenever you want the filter bar to refresh, you'll need to re-add all of the items. What I would probably suggest is modifying LRFilterBar a little bit. There's currently a removeAllItems functions, but you could easily duplicate it and create a function that removes all items after the divider. From there, you can just use addItem to append to the end of the filter bar. What I've found is that those dynamic items don't change extremely often, so doing it this way doesn't hurt functionality. I'm not sure how your design works, but maybe it's the same type of thing.

I hope that all makes sense. If you guys have any other questions, definitely let me know. And I'd love to see what you have when your done. Thanks!

Logan Rockmore

www.burgundylogan.com
email@hidden

On Jul 27, 2007, at 10:03 AM, I. Savant wrote:

On 7/27/07, Michael Fey <email@hidden> wrote:
I'm using the fantastic LRFilterBar in my application to filter the
contents of a Core Data-driven table.  The filter bar is replacing
the use of a NSPopUpButton whose contents was bound to the values
from an NSArrayController.

In the future, perhaps you could post a link to the "fantastic" source you're referring to? ;-)

  http://www.burgundylogan.com/Code/?LRFilterBar

  In any case, perhaps the question is best posed to the author?

--
I.S.

_______________________________________________

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


  • Follow-Ups:
    • Re: LRFilterBar and Bindings
      • From: Keith Duncan <email@hidden>
References: 
 >LRFilterBar and Bindings (From: Michael Fey <email@hidden>)
 >Re: LRFilterBar and Bindings (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Changing the app language
  • Next by Date: Re: LRFilterBar and Bindings
  • Previous by thread: Re: LRFilterBar and Bindings
  • Next by thread: Re: LRFilterBar and Bindings
  • Index(es):
    • Date
    • Thread