• 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: [ANN] NSTableView Assistant
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] NSTableView Assistant


  • Subject: Re: [ANN] NSTableView Assistant
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Sun, 15 Jun 2003 13:54:36 +0200

At 17:16 Uhr -0700 14.06.2003, Chris Meyer wrote:
After a quick use I noticed the following items:

- importing from a Nib file may contain multiple tables; it might be nice to give the user the choice of which table for which to generate the code.

That's already on the To-Do list (TODO.txt) :-)

- some column names might not be valid objective-c names (i.e. "Date-time"); the user might want to edit the mapping of column names to method names

Since I'm using key-value coding in this implementation of NSTV-Assistant, I thought this was a valid assumption to make. Also, I'm not reading the column titles from the arrays, but rather the column identifier, which the developer can choose freely. Thus I simply didn't have a need for it.

However, source is freely available and included with the wizard, so feel free to modify the code to allow remapping from column identifiers to arbitrary method/variable names.

- the 'item' have code for NSCoding (old style and keyed, of course) and NSCopying; the power really starts to show if it does this!

That sounds like a very useful addition! I'll put it on my list.

- the table could easily implement (optionally) default methods for dragging/dropping rows and a variety of other things (double clicking, etc.)

I'd completely forgotten about that. Now it's on the list.

- an even more radical thought is that this entire thing could be done with NO generated code; only a library and a generic nibbed-object that handled the fields (more on this)

I hadn't actually thought about this, but having had a peek at an IB-Palette yesterday, I can see that this would be pretty feasible to implement.

IMHO Apple should add a nibbed object for tables on arrays to the framework. I'm pretty surprised already why you can't simply instantiate an NSButtonCell in IB and connect it to a column's dataCell outlet. That would already make half of the assistant's code unnecessary.

Ideally tools like this shouldn't contain any editable code for the user; yet the user should be able to customize any aspect of things.

Yes, I agree that would be cool. Especially since right now I always forget to copy my testing code that creates a couple new items into the table view delegate, and thus it is lost whenever I re-generate the table with the assistant. I also thought about writing a simple parser that's at least able to fish user-defined methods out of the code, but a dedicated class would probably simplify things a lot. Much like the List Manager with its built-in storage was much easier to use for simple uses than the Data Browser...

The wizard then would be concerned with connecting user specific actions to the fields of that item, similar to how IB connects outlets and targets. But the table wizard could have a whole bunch of default behavior for the common cases so a user might not have to do any specific coding.

Sounds nice, though I'm not quite sure how one would code that. Is there a way to keep a reference to an object and an action to be called on it in my hand-written class? In a way that IB recognizes it and lets me connect that just like it works for NSButtons and NSMenus?

Ideally in the end you end up with a wizard that can generate AND EDIT your items that fit within a table view. There are a ton of extensions to this idea such as support for undo, hooking up the items to a database, handling outline views, etc.

Outline views shouldn't be too hard to add to the NSTV-Assistant, but I haven't yet had the opportunity to familiarize myself with undo as implemented in Cocoa, and database support is probably a little beyond my current needs. However, anyone who is up to the challenge, feel free to add that to the wizard.

Also, I've never used EO framework so I might just be describing that; I kind of get the feeling that it is something along those lines already. Anyone with experience care to comment?

I'd really be interested as well. What is EOF? Why is it so sorely missed among old-timers?

In any case, any chance of putting this up on Source Forge? I might be interesting in contributing a couple of more ideas to it (of course Source Forge and .nib files aren't the happiest bedfellows unfortunately).

I don't have the time at hand to start a Source Forge project for the wizard, but I thought about starting an SF project for all kinds of nice little wizards for Cocoa programming when some of my work is finished. I definitely won't object if someone else starts an SF project. Right now I'm content with accepting the changes, re-integrating them manually and offering them for download on my web site, though. And after all, the code is GPLed.

Did I mention PB's CVS integration is lacking a little on the "getting it running" part? I hope that's a PB3 feature we'll see improved upon for WWDC.

--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Callbacks in C libraries
  • Next by Date: Re: [ANN] NSTableView Assistant
  • Previous by thread: Re: [ANN] NSTableView Assistant
  • Next by thread: Really confused about "bounds" and "frames".
  • Index(es):
    • Date
    • Thread