[sword-devel] 1.5.3 on OSX

Nathan Youngman sword-devel@crosswire.org
Sat, 30 Mar 2002 11:00:36 -0700


Dave,

Thanks - I'm not to familiar with UNIX yet - sure is nice to have it 
there though (things like Apache and PHP come installed with OS X btw 
:-).

>  > Started on a Cocoa "lookup" application, but so far I'm just
>>  populating the modules and books drop-downs.
>
>Too cool.  I'm so happy and excited to see someone finally taking this
>project on.  I can't wait till we get CVS up and running again so that
>we can get this project in there and get a collaborative effort started.
>
>I do kind of wish you'd chosen to use Carbon since I wouldn't have to
>learn Objective C to help out, but beggars can't be choosers. :)

Carbon would have the benefit of supporting OS 8.6 - 9.x users. But 
it's an old C API - it must faster to do cool things in Cocoa. In a 
few lines of code we can save text snippets out to PDF, for example. 
There is also a chapter on "making a wordprocessor in 15 minutes" 
which could be useful for notes and stuff. Spell checking, rulers, 
all that stuff is built in and easy to implement.

Objective-C is pretty weird when you first look at it (scared me away 
at first), but it actually doesn't take very long to learn.

>>Just this
>  > public sbook struct thing, which I have yet to look into. Any samples
>>  of how to do this? (I'm sure there is... somewhere).
>
>It's always a good idea to rip off other people's code.  Check out the
>GnomeSword or BibleTime code from their respective tarballs or the
>BibleCS code in apps/windoze/CBuilder5/BibleCS.  And be sure to look
>through the API docs in the docs directory (though they might be a
>little out of date).  This is my cop out answer since I don't know the
>real answer.  Maybe someone else who knows will answer.

Yah - looking through other app code would be the way to go. I was 
hoping there were some smaller examples because that's a lot a code 
to go through to find out what I want.

Mainly though, I'm just wondering if I should be using sbook **books 
from a VerseKey object.

>  > Grabbed a few different modules and noticed that the book names are
>>  always English even for German and French texts. Guess the
>>  application has to take care of this itself?
>
>Yes and no.  The Bibles themselves have no clue what any book is called.
>They just know them by number.  The default locale is English so
>everything is in English by default.  The way book names have been
>handled by frontends in the past is to allow users to select a locale
>and then present all book names in that locale.  So a user who selects
>the German locale would see English Bibles with German book names.
>
>However, Bibles' .conf files do contain language ids.  If you set the
>locale for the Bible to its own language id, it would use that language
>if a locale is available and otherwise default to English.  I think the
>frontends should probably at least offer this as an optional behavior.

I'm wondering because there are those builtin_books[] arrays that I'm 
guessing always contain English. So then it would be up to my app to 
use setBooks() and get the right books data out from the **books 
pointer? I'm not sure... but it seems that learning the Sword API is 
going to be the most difficult thing.

- n8

-- 
Nathan Youngman
E-mail: sword at nathany.com
Web: http://nathany.com