Re: Dynamically Generating GUI forms from an XML file?
Re: Dynamically Generating GUI forms from an XML file?
- Subject: Re: Dynamically Generating GUI forms from an XML file?
- From: Chris Hanson <email@hidden>
- Date: Tue, 18 Nov 2003 22:46:17 -0600
On Nov 18, 2003, at 9:11 PM, email@hidden wrote:
Hi, I was wondering, is there an easy way to generate GUI forms from
an XML file?
You should be able to just read the data in the XML file and
instantiate controls as you go. Then use -[NSView addSubview:] to put
them in a view. You'll also want to use -[NSControl sizeToFit] (or
something equivalent) to size each control you instantiate, and you'll
have to lay out the controls yourself after adding them.
Another thing you can do is write a custom NSView subclass that
implements something along the lines of Java's layout managers. That
way, you can let an instance of this class do appropriate layout in its
-addSubview: method.
The GNUstep Renaissance framework will do some of this already. It's
LGPL, and it builds on Mac OS X rather easily using either Project
Builder or Xcode. GNUstep is at <
http://www.gnustep.org/> and a
Project Builder 2.1 project file that builds Renaissance as a framework
is available from my web site at
<
http://alpha.bdistributed.com/~cmh/Renaissance.pbproj.gnutar.gz> (same
license terms as Renaissance itself).
-- Chris
--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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.