[sword-devel] Windows CE: find page

Troy A. Griffitts sword-devel@crosswire.org
Tue, 03 Feb 2004 10:53:52 -0800


Johan Gorter wrote:

> Thanks for pointing me to the screenshots. These ideas are pretty good.
> I am a bit critical though in the choice of the options that this
> application offers. I think that it would be more useful to give the
> user the option to specify which part of the bible to search than do
> regular expressions or case-sensitive searches. But I can be wrong here
> of course. 

Nope, you are probably correct.  I can't think of the last time I did a 
regex or case-sensitive search on the Z.


I was thinking of the following options:
> 
> Search:
> - whole bible
> - this testament
> - this book

In the Windows frontend, we allow defining of custom ranges and save 
them in a .conf.  We supply a series of predefined ranges in the .conf 
file upon install.  I don't think we need a facility to let the user 
define their own range, but we could use the same code for reading the 
predefined ranges as in the windows frontend.  Here is what we ship.

[CustomRanges]
Gospels=Mat-John
History=Jos-Est
Letters/Epistles=Rom-Jude
Moses/Pentateuch/Torah=Gen-Deu
New Testament=mat-rev
Old Testament=gen-mal
Paul's Epistles=Rom-Phile;Heb
Poetry and Wisdom=Job-Song; Lam
Prophets=Isa-Mal

And having a few hardcoded 'logical' definitions, like 'Current Book' is 
a great idea, as well.

What do you think?


> And maybe offer the 'multi word' and 'exact phrase' options. Do these
> options sound likely to be used, and can the api fulfill this?

Yes, the api has support for all of these options.


> What I also wanted to ask is if there is an alternative way to load a
> whole chapter. The verse-by-verse approach is very slow

I suspect this is not the speed issue.  Have you tried turning Strong's 
numbers on?  You will notice the speed greatly degrades.  Having 
Strong's numbers ON actually improves the speed of the engine code. 
(The numbers are always in the text.  Turning them OFF requires 
stripping them out).  My suspision is that the display in the HTML 
control is the speed problem.  I would suggest testing this by changing 
the final line that populates the HTML control with a small string:

-		addHtml(htmlControl, text.c_str());
+		addHtml(htmlControl, L"Test String");


  and, for
> example, paragraph-ends are omitted.

Paragraph ends should not be omitted.  If there is a paragraph break in 
the text, there should be HTML tags that represent these.


  If you know of a way to upgrade
> this, please feel free to do so.

I only see a speed problem on my end where there are a number of links 
in the text.  I was thinking of a few ways to improve this:

a) only show strongs/morph on the current verse (and maybe previous/next 
verse-- so 3 verses).

b) show less than 1 chapter at a time

I can't think of anything else offhand right now.  Keep me posted if you 
have any ideas.


> We are making some good progress. Do you think it is time to start
> designing a little website?

yes!  I hope we can release something public with version 1.5.8 of our 
engine, which should be in a month or so.  Before releasing, I would 
personally like to add support for all 4 types of books we support: 
Bibles (already done), Commentaries (very simple, just only show current 
verse, not the whole chapter), Lexicon, and General Books.

The last 2 will require a little thinking.  They are easier to display 
(only the current entry, don't need to iterate and build the display 
text), but the navigation may be a little harder.  In qpsword, we have 
this concept:

a navigation key control.

When displaying a Bible or commentary, this is the Book/Chapter/Verse 
controls.  I like your navigation better.  It's much easier to jump to a 
location with your navigator-- I think because it display the entire 
domain for each subsection, all on the screen.

When displaying a lexicon, this is a simple edit box that does an 
incremental lookup as you type.

When displaying a general book, it is a 'path' textbox, with an expand 
button.. e.g. [Topic 3/Chapter 1/Section V/][*]
If the [*] button is pressed, a tree control is displayed that shows the 
book's table of contents and lets the user navigate and select a new 
location.

This seems like a lot of work, but for me, it would be straightforward 
to implement if I could have the UI designed and functional.  If I had 
the controls in place, and an example of how to populate/respond to the 
controls, I should be able to hook them up to the engine with no problems.

I understand that you want this to be a basic reading application.  I 
would like to honor this desire and not show any of these controls if 
these types of books are not installed.  I'll try to keep the interface 
only as cluttered as required for the books that are installed.

Looking forward to hearing your thoughts.

	-Troy.


> 
> In His grace,
> 
> Johan
> 
> PS: The problems I described in my last mail were due to me forgetting
> to update the sword lib as well. Sorry about that. Everything works
> fine, even the sword.conf.
> 
> -----Original Message-----
> From: sword-devel-admin@crosswire.org
> [mailto:sword-devel-admin@crosswire.org] On Behalf Of Troy A. Griffitts
> Sent: 02 February 2004 10:42
> To: sword-devel@crosswire.org
> Subject: Re: [sword-devel] New Test, CE: strongs, morph, footnotes
> 
> 
> Johan,
> 	Have you seen the OPIE handheld application?  Maybe the
> screenshots 
> might give you some idea on how you want to lay out the find dialog box.
> 
>   We splitscreen and use the remaining text display in the top half to 
> show the results.
> 
> http://www.crosswire.org/qpsword/#ss
> 
>    I think it works out nice, but please design it how you'd like.  If 
> you get the shell done with some sample results added, I can hook the UI
> 
> up the to real search code in sword.  I'm just really bad with knowing 
> how the windows controls are designed and populated.
> 
> 		-Troy.
> 
> 
> 
> Johan Gorter wrote:
> 
>>Troy,
>>
>>I got the same problem with the version checked out from CVS. I solved
> 
> 
>>it by passing the '\program files\sword\books\' to the constructor of 
>>SWMgr. I do not see how it should work otherwise. The sword.conf file 
>>should probably do this, but I do not see where this file gets loaded 
>>anywhere.
>>
>>Hope this helps,
>>
>>Johan
>>
>>-----Original Message-----
>>From: sword-devel-admin@crosswire.org 
>>[mailto:sword-devel-admin@crosswire.org] On Behalf Of Troy A. 
>>Griffitts
>>Sent: Saturday, January 31, 2004 09:23
>>To: sword-devel@crosswire.org
>>Subject: Re: [sword-devel] New Test, CE: strongs, morph, footnotes
>>
>>
>>I have all my books stored on SD mem, so my directories look something
>>like:
>>
>>\SD Card\mods.d\kjv.conf
>>\SD Card\modules\texts\ztext\kjv\...
>>
>>Hope this helps.  Basically just unzip the raw module download 
>>packages
>>(maintaining their directory structure) to either the root of the
> 
> memory
> 
>>card, or the \Program Files\sword\books\
>>
>>Don't forget to restart the app as stated in last email.
>>
>>Hope this helps,
>>		-Troy.
>>
>>
>>
>>Dan Bertles wrote:
>>
>>
>>>Troy,
>>>
>>>Haven't been able to get storage card to work.  Do I store modules in
>>>separate directories on the storage card or at the root.
>>>
>>>Do I create/copy kjv.conf to that directory or do I refer to the path
>>>in a mods.conf or a kjv.conf in the mods.d directory?
>>>
>>>Thanks for your help.
>>>
>>>Dan
>>>
>>>-----Original Message-----
>>>From: sword-devel-admin@crosswire.org
>>>[mailto:sword-devel-admin@crosswire.org] On Behalf Of Troy A. 
>>>Griffitts
>>>Sent: Tuesday, January 27, 2004 2:02 AM
>>>To: sword-devel@crosswire.org
>>>Subject: [sword-devel] New Test, CE: strongs, morph, footnotes
>>>
>>>
>>>Added very basic support for display of Strong's, Morph, and Footnotes
> 
> 
>>>in a simple message box.  It uses StripText right now, but we probably
>>
>>
>>>should use RenderText and display in an HTML control.  But... it works
>>
>>
>>>ok right now. :)  Also added an additional AugmentPath= to the .conf
>>>file.  It seems my device uses "\SD Card" as the mount point whereas 
>>>another device I tried the other day uses "\Memory Card".  They're
>>
>>both
>>
>>
>>>in there now.
>>>
>>>http://crosswire.org/~scribe/swordce.zip
>>>
>>>
>>>	-Troy.
>>>
>>>
>>>
>>>Troy A. Griffitts wrote:
>>>
>>>
>>>
>>>>Well, sorry to announce new packages twice so soon.  I've redone the
>>>>utf8->utf16 converters and we seem to get greek now.  Hebrew doesn't
>>>>seem to work yet, but it might be a font issue.  I'm taking a break 
>>>>now.
>>>>
>>>>  Blessings,
>>>>      -Troy.
>>>>
>>>>http://crosswire.org/~scribe/swordce.zip
>>>>
>>>>Troy A. Griffitts wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>One more that should fix the last bug better, and also adds a popup
>>>>>menu for toggle of simple options like Strong's, etc.
>>>>>
>>>>>http://crosswire.org/~scribe/swordce.zip
>>>>>
>>>>>Dan, be sure you're copying BOTH the sword.dll and the gui.exe from
>>>>>the .zip over your old files, and be sure you stop the process from 
>>>>>running on your device BEFORE attempting to overwrite:
>>>>>
>>>>>Start|Settings|System|Memory|Running Programs|*SwRd|Stop
>>>>>
>>>>>Hope this helps; keep me posted,
>>>>>  -Troy.
>>>>>
>>>>>
>>>>>
>>>>>Dan Bertles wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Troy,
>>>>>>
>>>>>>It acts exactly the same as before.  NASB works fine, KJV is 
>>>>>>invisible.
>>>>>>
>>>>>>Dan
>>>>>>
>>>>>>-----Original Message-----
>>>>>>From: sword-devel-admin@crosswire.org 
>>>>>>[mailto:sword-devel-admin@crosswire.org] On Behalf Of Troy A. 
>>>>>>Griffitts
>>>>>>Sent: Friday, January 23, 2004 10:10 PM
>>>>>>To: sword-devel@crosswire.org
>>>>>>Subject: Re: [sword-devel] New Test: Windows CE interface
>>>>>>
>>>>>>
>>>>>>Ok guys, I have a new CE binary ready for testing.  Did some
>>>>>>debugging on the KJV that indeed wasn't showing up, and found that
>>>
>>>we
>>>
>>>
>>>
>>>>>>were returning null occasionally from XMLTag::getName() -- must 
>>>>>>have
>>>
>>>
>>>>>>invalid markup.  So, we must check for .getName() == null first 
>>>>>>before sending it to strcmp.
>>>>>>
>>>>>>http://crosswire.org/~scribe/swordce.zip
>>>>>>
>>>>>>Anyway, the sword libs have been updated and the KJV seems to work 
>>>>>>ok now for me.
>>>>>>
>>>>>>I think we still have a problem with UTF-16.  I'll try to have a 
>>>>>>look at
>>>>>>
>>>>>>our UTF8 to UTF16 filters soon and see if we can get things 
>>>>>>resolved.  I
>>>>>>
>>>>>>figured out that you can specify the font in the HTML source 
>>>>>>stylesheet,
>>>>>>
>>>>>>so there is a line commented out that hardcodes code2000 in there.
>>>>>>Maybe we can make the font selectable for individual modules.
>>>>>>
>>>>>>Well, try it out and let us know.  If you're programming, be sure 
>>>>>>to
>>
>>
>>>>>>update both the sword and swordreader cvs modules.
>>>>>>
>>>>>>  God's blessings,
>>>>>>      -Troy A. Griffitts.
>>>>>>
>>>>>>
>>>>>>
>>>>>>Dan Bertles wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Troy,
>>>>>>>
>>>>>>>Ok, I followed everything religiously, without my quirks of trying
>>>>>>>to maintain old file structures.  This build won't read KJV where
>>>
>>>it
>>>
>>>
>>>
>>>>>>>would before.  Note: the KJV does have notes that showed in 
>>>>>>>italics.  It reads the NASB module fine.
>>>>>>>
>>>>>>>Program Files\sword\books has 3 subdirectories (mods.d, nasb and
>>>>>>>kjv)
>>>>>>>
>>>>>>>mods.d has 3 files (nasb.conf, kjv.conf and globals.conf)
>>>>>>>
>>>>>>>I need the datapath statement in each modules conf file for them 
>>>>>>>to
>>
>>
>>>>>>>work.
>>>>>>>
>>>>>>>The globals.conf file is empty?
>>>>>>>
>>>>>>>Thoughts?
>>>>>>>
>>>>>>>Dan
>>>>>>>
>>>>>>>P.S. http://palmtops.about.com/library/bltips9.htm says to install
>>>>>>>fonts:
>>>>>>>
>>>>>>>Tip: To install new fonts on you iPaq,  copy the true type font 
>>>>>>>file
>>>>>>
>>>>>>>from you desktop windows\fonts directory into your iPaq's
>>>>>>
>>>>>>
>>>>>>>windows\fonts directory.
>>>>>>>
>>>>>>>Ipaqs are supposed to handle Unicode already.
>>>>>>>
>>>>>>>
>>>>>>>-----Original Message-----
>>>>>>>From: sword-devel-admin@crosswire.org
>>>>>>>[mailto:sword-devel-admin@crosswire.org] On Behalf Of Troy A.
>>>
>>>Griffitts
>>>
>>>
>>>
>>>>>>>Sent: Wednesday, January 21, 2004 1:01 PM
>>>>>>>To: sword-devel@crosswire.org
>>>>>>>Subject: Re: [sword-devel] Windows CE interface
>>>>>>>
>>>>>>>
>>>>>>>Dan,
>>>>>>>  Yeah, the layout has changed now that we use the SWORD library 
>>>>>>>defaults.  Also, it's not the same as the windows frontend.  I 
>>>>>>>have
>>>
>>>
>>>>>>>books placed in the 'books' folder now, so sword.conf will be used
> 
> 
>>>>>>>to find them AND books on SD/MMC cards.  If you read the 
>>>>>>>INSTALL.txt in
>>>>>>
>>>>>>
>>>>>>
>>>>>>the
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>zip file, it will explain the preferred layout, and the .zip file 
>>>>>>>contains the correct subdirectories, so you should unzip it and
>>>>>>
>>>>>>
>>>>>>
>>>>>>preserve
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>directories.
>>>>>>>
>>>>>>>  What you show below includes a few workarounds that should not
>>>>>>
>>>>>>
>>>>>>
>>>>>>be
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>necessary any longer.  So, I would recommend removing \Program
>>>>>>>Files\sword and starting over with the zip file (and reading the
>>>>>>>INSTALL.txt)
>>>>>>>
>>>>>>>  Also, I can't confirm that these modules actually work.  I've
>>>>>>
>>>>>>
>>>>>>
>>>>>>tried
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>BHS, ASV, and WHNU, and all seem to lookup fine.  I still have 
>>>>>>>font
>>
>>
>>>>>>>issues, but for the ASV, I get readable text, and the other 2 I 
>>>>>>>get
>>>>>>
>>>>>>
>>>>>>
>>>>>>the
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>correct number of [] boxes :)  Hoping someone can tell me how to 
>>>>>>>use other fonts on CE.
>>>>>>>
>>>>>>>
>>>>>>>  Hope this helps.  Keep me posted on your progress,
>>>>>>>      -Troy.
>>>>>>>
>>>>>>>
>>>>>>>D. Bertles wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Troy,
>>>>>>>>
>>>>>>>>I can't get this version to find the modules.
>>>>>>>>
>>>>>>>>My mods.conf contains:
>>>>>>>>[NASB]
>>>>>>>>DataPath=modules/texts/ztext/nasb/
>>>>>>>>...
>>>>>>>>
>>>>>>>>[KJV]
>>>>>>>>DataPath=modules/texts/ztext/kjv/
>>>>>>>>...
>>>>>>>>
>>>>>>>>sword.conf contains:
>>>>>>>>[Install]
>>>>>>>>DataPath=/Program Files/sword/modules
>>>>>>>>
>>>>>>>>The build before this one works fine, but not this one.  I tried 
>>>>>>>>to maintain the directory structure for the Windows version.
>>>>>>>>
>>>>>>>>Dan
>>>>>>>>
>>>>>>>>Quoting "Troy A. Griffitts" <scribe@crosswire.org>:
>>>>>>>>
>>>>>>>>For anyone interested, I feel I am at a good solid point for
>>>>>>>>supporting the latest SWORD engine on CE.
>>>>>>>>
>>>>>>>>All my changes are checked in if anyone wants to play.
>>>>>>>>
>>>>>>>>Here's a build for testers:
>>>>>>>>
>>>>>>>>http://crosswire.org/~scribe/swordce.zip
>>>>>>>>
>>>>>>>>There are install instructions in the zip file.
>>>>>>>>
>>>>>>>>Books should be recognized from SD/MMC cards now, as well.
>>>>>>>>
>>>>>>>>  Thanks for all the great work and effort people have put into
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>this,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>so
>>>>>>>>far!  Hoping developers with better CE UI development skills than
>>>>>>>>me will make this a really cool application!  Johan, thank you so
> 
> 
>>>>>>>>much!
>>>>>>>>
>>>>>>>>  -Troy.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>Johan Gorter wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>Hello all,
>>>>>>>>>
>>>>>>>>>I have just made some progress on the windows CE user interface 
>>>>>>>>>for sword. The text is now displayed through the built-in 
>>>>>>>>>browser, so
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>it can
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>do some more layout-things. I have made a screen shot for 
>>>>>>>>>everyone
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>who
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>is interested to see what the program looks like right now. (and
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>what an
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>IPAQ looks like)
>>>>>>>>>
>>>>>>>>>http://home.student.utwente.nl/j.gorter/SwordReader/
>>>>>>>>>
>>>>>>>>>I have a question about the thml filters:
>>>>>>>>>
>>>>>>>>>I use the thmlhtml filter to generate the HTML to display. How 
>>>>>>>>>can
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>I get
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>the html formatted in such a way that the notes disappear (or 
>>>>>>>>>move somehow), that red words of Christ are turned on (when 
>>>>>>>>>available),
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>and
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>that other features (for example centered text in songs) are 
>>>>>>>>>also
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>shown?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>I hope someone can help me out here.
>>>>>>>>>
>>>>>>>>>My (and I have faith it is also His) planning on the rest of the
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>project
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>is like this:
>>>>>>>>>
>>>>>>>>>version 0.5 - The first version that I emailed to the list 
>>>>>>>>>version 0.6 - The update version that I sent version 0.7 - this 
>>>>>>>>>version (Source and compiled version in
>>>>>>>>>http://ozy.student.utwente.nl/~drsoong/SwordReader0.7.zip)
>>>>>>>>>version 0.8 - The find page implemented
>>>>>>>>>version 0.9 - The first real beta version: downloadable from a
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>webpage,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>a normal installer, an about screen, etc
>>>>>>>>>
>>>>>>>>>Greetings from the Netherlands,
>>>>>>>>>
>>>>>>>>>Johan
>>>>>>>>>
>>>>>>>>>_______________________________________________
>>>>>>>>>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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>_______________________________________________
>>>>>>>>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
>>>>>>>
>>>>>>>_______________________________________________
>>>>>>>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
>>>>>>
>>>>>>_______________________________________________
>>>>>>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
>>>>
>>>>
>>>>_______________________________________________
>>>>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
>>>
>>>_______________________________________________
>>>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
> 
> 
> 
> 
> 
> _______________________________________________
> sword-devel mailing list
> sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel