• 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: I think I have found a big bug in NSBrowser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I think I have found a big bug in NSBrowser


  • Subject: Re: I think I have found a big bug in NSBrowser
  • From: Andre <email@hidden>
  • Date: Mon, 30 Jan 2006 17:53:52 -0800

 Hamish Allan wrote:

I think, PF4, basically, a one man job (using NSBrowser subclass I believe) blows the whole "finder team" to bits. But, thats MHO.

I looked at PF a year or two ago and thought it had rather a bloated feel to it. But I recently downloaded PF4 and it was much better than I remembered it. I'm not sure whether it's me or PF that's changed! I still don't really understand why it implements its own terminal, console, etc.
Its definitely PF. Its quite nimble now, I use it much more than the finder myself. Its just very elegant and clean (once I got rid of some icons on the toolbar).
I think it implements the console so one can operate on paths etc and drag it to the console, I've used it a few times with subversion, which has been a huge time saver.


I'm thinking about just ditching NSBrowser all together. If I had time, I would use NSTableColumns and or even NSTableViews, so I can sort the content of the browser,in each column. Also, handling the bindings my self, I can set the representedObject and the objectValue of the cells... currently NSBrowser doesn't set the represented object.... if I had time anyways...

I've never really understood what the purpose of the represented object was -- it certainly doesn't seem to have much point when bindings are used. Being able to sort browser columns would be nice, but I don't think that NSTableHeaderView/Cell would be a very good fit for it. Have you considered an NSOutlineView?
Yea, I want to implement both actually. I use the representedObject to choose what icon I'm gonna display in the browser. Depending on the underlying object, or one of its values, I can grab the appropriate icon. The trouble is that the value binding is just for display, and thats all that is set in the cell. So how to get the object it represents is a puzzle.

The way I did it was, a very bad thing to do, but was to bind to a category made to NSObject that wrapped the pointer to the underlying object in an NSValue. - (NSValue *)selfAddress; So then in the browser delegate, I check the objectValue, extract the pointer from the valye, reset the object value (string title) of the cell from the pointed to object, then set the object value of the cell from the pointer, then get the icon. So from the outside, it looks like I have the represented object value, but actually its just hiding in the value binding! Not something I'm "happy" about having to do though....


Best wishes, Hamish


Andre email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: I think I have found a big bug in NSBrowser
      • From: Hamish Allan <email@hidden>
References: 
 >Re: I think I have found a big bug in NSBrowser (From: Hamish Allan <email@hidden>)
 >Re: I think I have found a big bug in NSBrowser (From: Andre <email@hidden>)
 >Re: I think I have found a big bug in NSBrowser (From: Hamish Allan <email@hidden>)
 >Re: I think I have found a big bug in NSBrowser (From: Andre <email@hidden>)
 >Re: I think I have found a big bug in NSBrowser (From: Hamish Allan <email@hidden>)
 >Re: I think I have found a big bug in NSBrowser (From: Andre <email@hidden>)
 >Re: I think I have found a big bug in NSBrowser (From: Hamish Allan <email@hidden>)

  • Prev by Date: Re: Strange resizing issue with NSView
  • Next by Date: Re: Strange resizing issue with NSView
  • Previous by thread: Re: I think I have found a big bug in NSBrowser
  • Next by thread: Re: I think I have found a big bug in NSBrowser
  • Index(es):
    • Date
    • Thread