[sword-devel] Here's a quick sample of a BCB6 front-end I'm developing for personal research using CLX

Lynn Allan sword-devel@crosswire.org
Fri, 9 Apr 2004 15:04:02 -0600


Hi Martin & Jonathan,

Just my $0.02 worth ... I concur to use the wiki ... it is an incredible
collaborative tool.

And if you've got the 'neural horspower' to figure out the BCB6 .bpg's and
.bpr's, it will take you about 30 min (max) to figure out. There are several
tutorials available and a 'Sandbox' but they are almost superfluous
http://www.crosswire.org/ucgi-bin/twiki/view/Sandbox/WebHome
http://www.crosswire.org/pipermail/sword-devel/2003-December/019828.html

 It can be one of the more satisfying endeavors to have your first wiki page
revised/authored after only a surprisingly brief time. There is a tendency
to bog down because you have the feeling "it must be harder than this" or
get concerned about messing up. For me, it has been a thoroughly enjoyable
experience to work with the wiki.

Some guidance ...
Get an id here:
http://www.crosswire.org/ucgi-bin/twiki/view/TWiki/TWikiRegistration

and jump in to revise the following wiki page by incorporating the CVS info
you've picked up:
http://www.crosswire.org/ucgi-bin/twiki/view/Swordwin/GettingStarted

YOU CAN'T BREAK ANYTHING ... YOU CAN LEARN BY TRIAL AND ERROR WITH REAL
PAGES WITHOUT THE RISK OF TRASHING ANYTHING THAT YOU (OR AN ADMINISTRATOR)
CAN'T CLEAN UP EASILY.

CARPE DIEM ... VAYA CON DIOS :-)

(Gotta get my medication levels checked ... lauding the wiki has that effect
on me ... thx Martin for your efforts to have the wiki available :-)

Sharing the reason for the season,
http://learningcards.eeworks.org/EeCard01.html
Lynn A
l.allan@att.net





----- Original Message ----- 
From: "Martin Gruner" <mg.pub@gmx.net>
To: <sword-devel@crosswire.org>
Sent: Saturday, April 10, 2004 12:26 PM
Subject: Re: [sword-devel] Here's a quick sample of a BCB6 front-end I'm
developing for personal research using CLX


> Thanks for you willingness to contribute, to help others.
> May I suggest that you use the wiki for your documentation?
>
> http://www.crosswire.org/ucgi-bin/twiki/view/Swordwin/WebHome
>
> It allows you to update your docs without loosing older content (version
> control) and does also allow for collaboration.
>
> Martin
>
> Am Freitag, 9. April 2004 17:02 schrieb Jonathan Mickelson:
> > Yes, I'm using the SWORD API.  I'm using standard sword-api calls; very
> > simple when you're back down to the basics.
> >
> > My objective publicly is to become a helpful, contributing member of
> > Crosswire and  the sword project.
> > At the moment, this means developing some simple working examples of
> > sword-api in use that can be employed by interested parties with various
> > levels of programming skills.  I want the examples to show the
> > minimalist approach to having a working program that can then be
> > enhanced, hacked, etc.  Having something working in your hands is very
> > satisfying.
> >
> > My personal objectives, for my inhouse program (PlowShare), is to
> > develop my dream bible tool considering my own goals and desires and not
> > for public release (too many support issues/questions/complaints for a
> > personal tool).  When some UI feature works real well, I'll add it to
> > the list of tips and tricks.  I greatly prefer CLX over VCL primarily
> > because CLX has an HTML widget that has made that first screen shot
> > possible with 10-15 of coding (once the development environment is setup
> > properly).
> >
> > The screen shot was to garner interest in the Sword API and this
> > "tutorial".
> >
> > The rest of this text is from a previous posting.  My preference is too
> > have some other develops from scratch also, compare notes and make sure
> > we have all the information corrected and documented for others.  So, I
> > will help you.
> > -----------
> > This thread will archive the neccesary steps to compile your own Sword
> > Project from scratch using BCB 6.0
> >
> > Later, this material will be consolidated into a tutorial.
> >
> > Create a new Borland BCB 6 project
> > [I am building a CLX project though either CLX or VCL (standard) may be
> > used. ]
> >
> > 1) modify the Project Options dialog box.
> >   TAB "Directories/Conditional"
> >
> >   Include Path =
> >        $(BCB)\include
> >        $(BCB)\include
> >        ..\..\sword\include
> >        ..\..\icu-sword\source\common
> >        ..\..\icu-sword\source\i18n
> >
> >   Library Path =
> >        $(BCB)\lib\obj
> >        $(BCB)\lib
> >        ..\..\icu-sword\as_is\borland
> >        ..\..\sword\lib
> >
> >   Conditional Defines  (VERY IMPORTANT)
> >       _DEBUG
> >       _ICU_
> >       _ICUSWORD_
> >       _USE_OLD_RW_STL
> >       U_HAVE_PLACEMENT_NEW=0
> >
> > 2) here is my simple program to display module names and descriptions on
> > a form.
> > //-------------
> > // download and install BibleCS 1.5.6.  This creates all the proper
> > production directories.
> > // download some bible modules
> > // test that BibleCS is working properly
> > //-------------
> > // Add a memo component to the form (it's under the "Standard" tab)
> > // Create Form Events for OnDestroy and OnShow
> > // judiciously use the code below putting things in their proper place
> > // compile and run
> > // the form should appear with a list of module names and descriptions
> > //-------------
> > #include <clx.h>    // used for CLX projects
> > #pragma hdrstop
> >
> > #include "MySampleProject.h"
> > #include <string>
> > #include <swmgr.h>
> > #include <swconfig.h>
> > #include <markupfiltmgr.h>
> >
> > #define WM_VERSE (WM_APP + 1995)
> > extern AnsiString startVerse;
> >
> > using namespace sword;
> >
//-------------------------------------------------------------------------
> >--
> >
> > //#pragma package(smart_init)
> > #pragma resource "*.xfm"
> >
> > SWConfig *userPrefs;
> > SWMgr *mainmgr;
> > SWConfig *optionsconf;
> >
> >
> > TForm1 *Form1;
> >
//-------------------------------------------------------------------------
> >--
> >
> > __fastcall TForm1::TForm1(TComponent* Owner)
> >
> >   : TForm(Owner)
> >
> > {
> > }
> >
//-------------------------------------------------------------------------
> >--
> >
> > void __fastcall TForm1::FormDestroy(TObject *Sender)
> > {
> >   if (mainmgr)
> >       delete mainmgr;
> >   if (userPrefs)
> >   {
> >       userPrefs->Save();
> >       delete userPrefs;
> >   }
> >   if (optionsconf)
> >       delete optionsconf;
> > }
> >
//-------------------------------------------------------------------------
> >--
> >
> > void __fastcall TForm1::FormShow(TObject *Sender)
> > {
> > //    MyLibrary = new SWMgr(0, 0, true, new
> > MarkupFilterMgr(FMT_HTMLHREF, ENC_HTML));
> >
> >   ModMap::iterator it;
> >   SWModule *MyMod;
> >
> >   optionsconf = new SWConfig("./options.conf");
> >
> >   try
> >   {
> >       mainmgr = new SWMgr(0, 0, false, new MarkupFilterMgr(FMT_RTF,
> > ENC_RTF));
> >         userPrefs = 0;
> >       mainmgr->Load();
> >
> >       userPrefs = new SWConfig("./userprefs.conf");
> >       if ((mainmgr->config) && (userPrefs))
> >       (*(mainmgr->config)) += (*userPrefs);
> >   }
> >   catch (...)
> >   {
> >       Application->Terminate();
> >   }
> >
> >   if (!mainmgr->config)
> >       Application->Terminate();
> >
> >   for (it = mainmgr->Modules.begin(); it != mainmgr->Modules.end();
it++)
> >   {
> >       MyMod = (*it).second;
> >         if (!strcmp((*it).second->Type(), "Biblical Texts"))
> >       {
> >           Memo1->Lines->Append(MyMod->Name());
> >           Memo1->Lines->Append(MyMod->Description());
> >       }
> >   }
> > }
> > //----------------
> > // End of code
> > //----------------
> >
> >
> >
> > _______________________________________________
> > sword-devel mailing list
> > sword-devel@crosswire.org
> > http://www.crosswire.org/mailman/listinfo/sword-devel
> _______________________________________________
> sword-devel mailing list
> sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel