]> err.no Git - sope/blob - FAQ
03223e10da79dac46c6fcfb121401f14a38163c4
[sope] / FAQ
1 GNUstep Frequently Asked Questions with Answers
2 ***********************************************
3
4 Last updated 3 September 2004.  Please send corrections to
5 <gnustep-maintainer@gnu.org>. Also look at the user FAQ for more user
6 oriented questions.
7
8 Compatibility
9 =============
10
11 Is it easy to port OPENSTEP programs to GNUstep?
12 ------------------------------------------------
13
14 It is probably easy for simple programs. There are some portability
15 tools to make this easier, or rewrite the Makefiles yourself.  You will
16 also have to translate the NIB files (if there are any) to GNUstep
17 model files using the nib2gmodel program (from
18 <ftp://ftp.gnustep.org/pub/gnustep/dev-apps>).
19
20 How about porting between Cocoa and GNUstep?
21 --------------------------------------------
22
23 It's easier from GNUstep to Cocoa than Cocoa to GNUstep. Cocoa is
24 constantly changing, much faster than GNUstep could hope to keep up.
25 They have added extensions and new classes that aren't available in
26 GNUstep yet. Plus there are some other issues. If you start with Cocoa:
27
28    * Be careful with Cocoa.h includes (Use #ifndef GNUSTEP, for
29      instance)
30
31    * Do not use CoreFoundation
32
33    * Do not use Objective-C++
34
35    * Do not use Quicktime or other proprietary extension
36
37    * You need to convert .nib files (see next question  *note Tools for
38      porting::)
39
40    * Some unfinished classes include  Drawers.
41
42 Tools for porting
43 -----------------
44
45 While the programming interface should be almost transparent between
46 systems (expect for the unimplemented parts, of course), there are a
47 variety of other files and tools that are necessary for porting
48 programs.
49
50 `ni2gmodel'
51      This program coverts nib files from any system, such as Cocoa or
52      OPENSTEP to a gmodel format file. Gmodel can be read directly by
53      GNUstep or you can convert this to a more GNUstep-native gorm
54      format (using the Gorm interface modeller).
55
56 `Renaissance'
57      GNUstep Renaissance allows you to describe your user interfaces
58      (that is, the windows in your application, and the buttons, boxes,
59      textfields, etc in the windows) in simple and intuitive XML files,
60      using an open, standard format describing the logic of the
61      interface.  It has a number of advantages over the proprietary nib
62      format: portability, open standard, easy localization,
63      themeability, and intelligent autolayout.
64
65 `OpenStep2GNUConverter and nfmake'
66      Two programs that allow you to convert PB files to GNUstep
67      makefiles or compile a program on GNUstep directly from PB files.
68      They probably work only for OPENSTEP systems and are a little
69      out-of-date.
70
71 `StepTalk'
72      A portable scripting environment that lets your do scripting in
73      almost any language you like.
74
75
76 Can I transfer archived data from GNUstep to Cocoa?
77 ---------------------------------------------------
78
79 Apple's archiving format is proprietary and not documented, so this
80 poses a problem for anyone wanting to implement compatibility with it.
81 However, even if we reverse engineered the format, there are enough
82 differences between the class and ivar layouts to make this sort of
83 compatibility difficult. Not to mention the fact that we would
84 constantly have to keep up with the changes Apple made. Also Apple's
85 archiving format, as far as we know, would not be compatible between
86 different machines because of endiness issues, although GNUstep doesn't
87 have this problem.
88
89    Your best bet is to implement your own archiving format that would
90 work both with GNUstep and Cocoa. Fortunately, you don't have to start
91 from scratch, since this has been essentially done for you in the
92 nib2gmodel tool, which has an archiver that works both on GNUstep and
93 Cocoa. It might be nice to split this off into a separate project to
94 make it easier for other people to do the same thing.
95
96 Does distributed objects work between GNUstep and Cocoa?
97 --------------------------------------------------------
98
99 See the answer to the previous question (on archive compatibility) for
100 why this won't work either.
101
102 Is there an Interface Builder for GNUstep?
103 ------------------------------------------
104
105 There is an Interface Builder for GNUstep called Gorm. A lot of work
106 has been put into it and it works very well.  You can download it from
107 the ftp site or via http.  The Project Manager ProjectCenter is also
108 available.
109
110 Can I use my original NIB files?
111 --------------------------------
112
113 No - NeXT/Apple never documented their nib format, so GNUstep supports
114 both the 'gmodel' format (which stores information as text
115 (property-lists) and can therefore be edited 'by hand') and binary
116 archive format (which can be edited by Gorm).  There IS a conversion
117 tool called nib2gmodel that can be compiled under OPENSTEP to convert
118 nib files to GNUstep gmodel files.
119
120 Can one use the hybrid "Objective-C++"
121 --------------------------------------
122
123 No. at present the GNU compiler (gcc) does not support "Objective-C++".
124 Apple is interested in adding back their implementation to gcc and is
125 slowly adding parts of it to the mainline gcc implementation.
126
127 Is there a plan to support the Java/YellowBox Bindings?
128 -------------------------------------------------------
129
130 Yes. The GNustep Java library/bridge called JIGS is available now.  JIGS
131 is a free (LGPL) Java Interface for GNUstep; it can automatically wrap
132 Objective-C libraries based on GNUstep, making them accessible directly
133 to the Java programmer as if they were Java libraries. As a side effect,
134 it is also possible to use the whole engine in the reverse way: JIGS
135 provides a high level API to allow Objective-C programmers to start java
136 virtual machines inside GNUstep Objective-C code and access java objects
137 in the java virtual machine transparently, as if they were objective-C
138 objects.
139
140 What if I compile GNUstep under OPENSTEP/MacOS X?
141 -------------------------------------------------
142
143 GNUstep uses the X-windows display postscript extension.  The interface
144 to that is not the same as the interface to the OPENSTEP/MacOS-X
145 windows server.  While someone could write a backend library to provide
146 the interface, nobody has bothered to date.
147
148    You should, however, be able to use a GNUstep program with an X11
149 server running on MacOSX.
150
151 Is the Objective C API for GTK related?
152 ---------------------------------------
153
154 No.  GNUstep applications provide their GUI via the OpenStep API, which
155 provides fully object-oriented access to GUI manipulation.
156
157    The object-oriented nature of the libraries and language make it
158 much easier for new users to create their own subclasses rather than
159 simply using the supplied widgets as in other frameworks.
160
161 How about implementing parts of the Application Kit with GTK?
162 -------------------------------------------------------------
163
164 Yes and No - The GNUstep architecture provides a single,
165 platform-independent, API for handling all aspects of GUI interaction
166 (implemented in the gstep-gui library), with a backend architecture
167 that permits you to have different display models (display postscript,
168 X-windows, win32, berlin ...) while letting you use the same code for
169 printing as for displaying. Use of GTK in the frontend gui library
170 would remove some of those advantages without adding any.
171
172    That being said, a backend library could be implemented using gtk if
173 anyone wanted to do so.  Since the frontend library handles most of the
174 work involved in implementing the OpenStep API, the backend is a
175 relatively thin layer and the advantages of GTK over direct xlib or
176 win32 calls is likely to be minimal.  If/when GTK is ported to more
177 systems, a backend written using it could be a valuable asset -
178 volunteers are, as always, welcome.
179
180 Compiling and Developing
181 ========================
182
183 How can I get started programming?
184 ----------------------------------
185
186 Good question.  Read the tutorials at the GNUstep web site. Also look at
187 Apple's documentation (pointers in the Resources section on the GNUstep
188 web site.)
189
190 How can I help with GNUstep?
191 ----------------------------
192
193   1. Write/debug library code
194
195   2. Write documentation
196
197   3. Update the task list and library headers
198
199   4. Write applications
200
201    Let people know what you are doing.  Break your project up into the
202 smallest units you can.  Feed back frequent updates to the maintainers.
203 Ask questions in the discussion mailing list.
204
205    Do remember that any changes beyond a few lines of code (or
206 documentation) require a disclaimer or copyright assignment to the Free
207 Software Foundation before they can be incorporated into the project.
208 Get in touch with the maintainer of the library you are working on
209 about this.
210
211    Don't start with large-scale reorganization of anything - instead,
212 get a general idea in mind of what you want to do, and proceed as much
213 as possible with incremental changes that don't break anything - that
214 way you can make those incremental changes available to the rest of the
215 community at frequent intervals.
216
217    Don't be afraid to give up - there is no shame in finding out that
218 you have take on too large/complex a project.  It's much better to
219 'resign' and take on a smaller job than to just stop without telling
220 anyone.
221
222    Please document the code you add or change (using autogsdoc comments
223 that begin with a slash and two asterices). But PLEASE, do not copy from
224 the Apple documentation or any other copyrighted documentation.
225
226 Helping develop GNUstep
227 -----------------------
228
229 There is plenty of unimplemented stuff in the gui library and backend
230 libraries that volunteers can work on - just browse through the code
231 and see if it conforms to the documentation.
232
233    Specific tasks are noted in the developers section on the GNUstep
234 website.
235
236    Once you have coded something, you could always write a testcase and
237 documentation for it :-)
238
239 Helping document GNUstep
240 ------------------------
241
242 All class documentation is written directly in the source code itself
243 and translated using the autogsdoc program. See the source code and
244 documentation for autogsdoc for information on documenting the classes.
245
246    Newcomers could write documentation for individual classes by
247 comparing the OpenStep specification, the MacOS-X documentation, and
248 the GNUstep source.  Documentation should clearly note where individual
249 methods are specific to OpenStep, MacOS-X or are GNustep extensions.
250
251    More experienced people could write documentation on general
252 programming topics, and tutorials for new users.
253
254    Anyone willing to write documentation, either tutorials for using
255 GNUstep, or reference documentation for individual classes, should
256 either write it in gsdoc or as plain ascii text for someone else to
257 format into gsdoc.
258
259    GNUstep documentation should have copyright assigned to the Free
260 Software Foundation.
261
262 How do I update the task list?
263 ------------------------------
264
265 The task list (<http://savannah.gnu.org/pm/?group_id=99>) is supposed
266 to tell people what jobs are waiting to be done. Feel free to add to it
267 or update the tasks that are there (you need to create a login for
268 yourself first).
269
270    One job of major importance that pretty much anyone can do is to
271 look for jobs to add to the task list.  In the case of methods from the
272 OpenStep specification or the MacOS-X documentation not being present
273 in the GNUstep libraries, it is also helpful to add the method
274 prototypes to the library header files.
275
276    Send any changes or additions to <bug-gnustep@gnu.org>.
277
278    A beginner can look through the MacOS-X documentation, the OpenStep
279 specification and the GNUstep source and contribute task items.
280
281    If a class or method is in MacOS-X and OpenStep but is not in
282 GNUstep - it's a high priority TODO and should at least be added to the
283 GNUstep headers and a dummy version added to the source with a FIXME
284 comment.
285
286    If a class or method is in MacOS-X but not OpenStep or GNUstep -
287 it's a low priority TODO.  It should be added to the GNUstep headers
288 bracketed in `#ifndef STRICT_OPENSTEP'
289
290    If a class or method is in OpenStep but not in MacOS-X or GNUstep -
291 it's a low priority TODO.  It should be added to the GNUstep headers
292 bracketed in `#ifndef STRICT_MACOS_X'
293
294    There are a couple of people working on this already, so it's a good
295 idea to get in touch with Adam or Richard to coordinate efforts.
296
297 How do I start writing tests?
298 -----------------------------
299
300 You can write testcases - where the libraries fail tests, you could
301 either fix the problem, or add it to the task list.
302
303    To write testcases, you need to use anonymous CVS to install the
304 latest GNUstep snapshots you can find. Then checkout the 'tests' module
305 from CVS.  In the 'tests' directory, you will find a regression testing
306 framework.  In order to use this you will also need a recent (v 1.3.2
307 or later) copy of Guile (you can get this from a GNU ftp site) and will
308 need to check-out, built, and installed the 'guile' package from the
309 GNUstep CVS repository.
310
311 How do I start writing applications?
312 ------------------------------------
313
314 You can either look at the links on the GNUstep website for
315 applications that have been started, and email their owners to
316 volunteer to help, or you can start your own project.
317
318 How can I help with the GNUstep website?
319 ----------------------------------------
320
321 Talk to Adam Fedor <fedor@gnu.org>, the maintainer.
322
323    The GNUstep website is kept as a CVS module, but the largest portions
324 of it (the FAQ and the Documentation) are actually generated from files
325 in the individual GNUstep packages.
326
327    If you want to update the FAQ or documentation  - grab the latest
328 snapshot of the GNUstep core you can find, update it from the CVS
329 repository, and work with the contents of the appropriate documentation
330 directory.
331
332    If you want to work on other parts of the website, you can grab a
333 copy of the website via anonymous CVS. See
334 <http://savannah.gnu.org/cvs/?group_id=99> for instructions on how to
335 do that.
336
337    The main task with the website is to figure out which bits are
338 out-of-date (or wrong) and update/mark-as-outdated as required.
339
340 Why doesn't GDB support Objective-C?
341 ------------------------------------
342
343 Um, it does. As of GDB 6.0, gdb supports debugging of Objective-C code.
344
345 GNU Objective C Compiler and Runtime
346 ====================================
347
348 What is the Objective C Runtime?
349 --------------------------------
350
351 The Objective C Runtime Library provides C functions and data structures
352 required to execute an Objective C program.
353
354    The GNU Objective C Runtime Library offers everything NeXT's runtime
355 does, including Categories, Protocols, `+poseAs:', thread-safety, class
356 initialization on demand, delayed loading of classes, and
357 initialization of static instances (such as @""-style string objects).
358
359    It also has several differences over NeXT's implementation:
360
361    * GNU's runtime provides "selector-types" along with each selector;
362      NeXT's does not.  A selector-type is a string that describes the C
363      variable types for the method's return and argument values.  Among
364      other uses, selector-types is extremely helpful for fast
365      distributed objects implementations, (see GNUstep Base Library
366      Section, below).
367
368    * Many of the GNU functions have different names than their
369      corresponding NeXT functions; the GNU names conform to the GNU
370      coding standards. The GNUstep base library contains a
371      compatibility header that works with both runtimes. You should use
372      functions there or use OpenStep Foundation methods/functions
373      instead of the basic runtime functions so that you code can run
374      with either system.
375
376
377 Does it allow a mixture of Objective C and C++?
378 -----------------------------------------------
379
380 No.  See *note Can one use the hybrid "Objective-C++"::
381
382 Where can I find more information?
383 ----------------------------------
384
385 The FAQ associated with the newsgroup `comp.lang.objective-c' contains
386 more information about GNU Objective C.
387
388 GNUstep Base Library
389 ====================
390
391 What is the GNUstep Base Library?
392 ---------------------------------
393
394 The GNUstep Base Library is a library of general-purpose, non-graphical
395 Objective C objects.  For example, it includes classes for strings,
396 object collections, byte streams, typed coders, invocations,
397 notifications, notification dispatchers, moments in time, network ports,
398 remote object messaging support (distributed objects), event loops, and
399 random number generators.
400
401    It provides functionality that aims to implement the non-graphical
402 portion of the OpenStep standard (the Foundation library).
403
404 What is its current state of development?
405 -----------------------------------------
406
407 GNUstep base is currently stable and, to the best of our knowledge,
408 implements all of the OpenStep functionality (except for a few classes
409 that we feel are not useful). It also implements most all of the new
410 Cocoa classes. However we do some things, like scripting, differently,
411 so we don't implement all the Cocoa classes.
412
413 What are the features of GNU Distributed Objects?
414 -------------------------------------------------
415
416 GNU Distributed Objects has many of the features of other distributed
417 objects implementations, but, since it is free software, it can be
418 ported to platforms for which other distributed objects implementations
419 are not available.
420
421    [ NOTE: The GNU distributed object facilities have the same
422 ease-of-use as NeXT's; be warned, however, that they are not compatible
423 with each other.  They have different class hierarchies, different
424 instance variables, different method names, different implementation
425 strategies and different network message formats.  You cannot
426 communicate with a NeXT NSConnection using a GNU NSConnection.
427
428    Here are some differences between GNU distributed objects and NeXT's
429 distributed objects: NeXT NSDistantObject asks it's remote target for
430 the method encoding types and caches the results; GNU NSDistantObject
431 gets the types directly from the local GNU "typed selector" mechanism
432 if the information is known locally and only queries the remote target
433 or caching encoding types when using a method that is not known to the
434 local process.  The NSProxy for the remote root object always has name
435 and, once set, you cannot change the root object of a NSConnection; the
436 GNU Proxy for the remote root object has a target address value just
437 like all other Proxy's, and you can change the root object as many
438 times as you like. ].
439
440 GNUstep GUI Library
441 ===================
442
443 What is the GUI Library?
444 ------------------------
445
446 The GNUstep GUI Library is a library of objects useful for writing
447 graphical applications.  For example, it includes classes for drawing
448 and manipulating graphics objects on the screen: windows, menus,
449 buttons, sliders, text fields, and events.  There are also many
450 peripheral classes that offer operating-system-independent interfaces to
451 images, cursors, colors, fonts, pasteboards, printing.  There are also
452 workspace support classes such as data links, open/save panels,
453 context-dependent help, spell checking.
454
455    It provides functionality that aims to implement the `AppKit'
456 portion of the OpenStep standard.  However the implementation has been
457 written to take advantage of GNUstep enhancements wherever possible.
458
459 Explain the organization of the front- and back-ends
460 ----------------------------------------------------
461
462 The GNUstep GUI Library is divided into a front- and back-end.  The
463 front-end contains the majority of implementation, but leaves out the
464 low-level drawing and event code.  A back-end can override whatever
465 methods necessary in order to implement low-level drawing event
466 receiving.  Different back-ends will make GNUstep available on various
467 platforms.  The default GNU back-end will run on top of X Windows.
468 Other back-ends could allow GNUstep to run on OpenGL and WIN32
469 graphics/event platforms.  Much work will be saved by this clean
470 separation between front- and back-end, because it allows different
471 platforms to share the large amount of front-end code.
472
473 What is the current state of development of the front-end?
474 ----------------------------------------------------------
475
476 Many of the classes are well implemented, if not thoroughly tested.
477 See the GNUstep web sites and read status information contained in the
478 distribution for the most up-to-date information.
479
480 What is the current state of development of the back-ends?
481 ----------------------------------------------------------
482
483 There are several backends currently available:
484
485 `xlib'
486      This is the standard backend that runs on X11 and uses standard
487      xlib calls for implementing drawing. It works well, but is limited
488      in many areas due to the limitations of xlib drawing.
489
490 `art'
491      This is a very good backend that draws using the libart package and
492      freetype with near PostScript quality and functionality. At some
493      point it will become the standard.
494
495 `w32'
496      This backend works on Windows and is currently beta quality.
497
498 GNUstep DisplayGhostScript Server
499 =================================
500
501 What is the Display Ghostscript Server?
502 ---------------------------------------
503
504 It is a free implementation of a Display PostScript server based on the
505 GNU Ghostscript program developed by Aladdin Enterprises and now owned
506 by artofcode LLC.
507
508    At one point, GNUstep was using this for display purposes. However
509 the development of DGS has stopped as it is too difficult to maintain
510 and no one wanted to work on it. Now we are using other means of
511 drawing.
512
513 What is its current state of development?
514 -----------------------------------------
515
516 GNU contracted with Aladdin Enterprises to add some key features to GNU
517 Ghostscript so it could be used as a DPS server. This work has mostly
518 been done, although Aladdin did not completely finish the work that they
519 were contracted for.  (Because the work took longer than specified and
520 was not completed, Aladdin agreed to waive approximately $10,000 in
521 promised fees for the work that was actually done and delivered.)  DGS
522 works fairly well with a single context.  Alpha channel and compositing
523 currently doesn't work.
524
525 What is the relationship between the Display Ghostscript Server and X Windows?
526 ------------------------------------------------------------------------------
527
528 Display Ghostscript runs on top of X Windows.
529