Re: Any NSView (subclasss drawing) Layout Persistence Frameworks around?
Re: Any NSView (subclasss drawing) Layout Persistence Frameworks around?
- Subject: Re: Any NSView (subclasss drawing) Layout Persistence Frameworks around?
- From: Andre <email@hidden>
- Date: Mon, 7 Nov 2005 00:28:38 -0800
Am 07.11.2005 um 01:15 schrieb Andre:
Its because what I am drawing is not necessarily sub-views in a
custom view, but pure drawing of data that has arbitrary
representation,
so I just need pure layout of those "items" even if they are not
NSView or NSResponder objects, or even NSCell.
You'll always need at least one NSView to print in Cocoa. So I'd
personally just bite the bullet and write a few typical views and
some dynamic code that can print, say, any dictionary based on
layout information from a .plist file. Write that once and make it
flexible enough and then you'll never have to write it again.
And if you're in a generous mood, put it under a BSD or MIT
license so we freeloaders can also use it ;-)
Yea, I'm thinking of just putting it together and doing just that.
Its really annoying work, and I think it would definitely take a
burden off
of other devs who are writing custom views...
Something as simple as NSTextTable has usefull functionality, but
it only works within an NSTextView...
Something like an NSMatrix with columns and rows that could span
and also have some smarts about them...
Well, another thought would be to write some code that turns your
data into HTML and then use a WebView to print. Though there may be
some problems if you need images etc. and they're not files you can
refer to in your IMG tags. Not to mention it feels rather wasteful
to take binary data, build HTML from that just to have WebCore
parse that and turn it into a second copy of binary data again.
Yea, I was thinking the same thing, and decided against it.
What I would like to do, if I had time, would be to use a subset of
CSS layout, add some hooks for custom logic, and
I could describe my custom layout from a CSS file, then I could
change layout without 'coding' and style without fix-and-continue...
I'm thinking, things like repetitions (like WORepitition etc) would
be really useful because to print out a list, would require
no custom code, just layout, input text out of an array controller,
specify the key, and thats it...
I really really like webobjects, as you can see!
Basically, though, what I think would be the best, is a sort of
coredata for view/custom view layout.
Basically, XML files with layout/drawing commands built in, then,
just like coredata, all that is needed is
custom code to specialize behavior... (I can hope for 10.5...)
_______________________________________________
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