[sword-devel] Mac OSX UI

Will Thimbleby sword-devel@crosswire.org
Fri, 20 Sep 2002 11:35:02 +0100

Apologies for the late reply, I've been off camping in the Lake District 
for a week.

I'm currently using MacOS 10.1, I have a PB project that could be 
included. I do need to fix a few bugs though.

I'll d/l the current CVS and check it compiles, I compiled 1.5.3 with 
absolutely no problems.

Thanks for the responses, I got html rendering working, along with 
links, and it is really quite a nice usable program (Services are really 
cool). I'm not sure exactly how to deal with the links now ;-). How do 
the other UIs work?, I'm not able to test them at the moment. For 
instance should strongs defns pull up a new window for each? use the 
same window? or have a small attached panel to the originating window? 
With bible refs in commentaries, similar questions arise. New windows, 
with bible or with commentary. What should you do when the reference is 
something like "Isa 40:3; Mal 3:1; Mt 3:3, 11:10"?

More questions:
How do daily bible notes work?
Is there a way of checking whether bibles support options like strongs 
or headings.
Is there a digest version of this mailing list? - I've been off doings 
things for weeks over this summer and over 500 messages in my inbox when 
I get back is unmanageable.

Cheers all

When I've fixed the last few major bugs I'll upload it somewhere and let 
you know.

On Thursday, September 12, 2002, at 01:52  am, Chris Little wrote:

>> I am trying to write a simple sword GUI for MacOSX. I've quite easily
>> got a simple bible reader with search windows working. However to do
>> this I just use OSXs rtf renderer, this is very easy but gives me 
>> little
>> control. I want to do things like having clickable links for references
>> and strongs.
> Speaking of compiling on OS X... can you confirm whether current CVS can
> compile using make?  And which version of OS X are you using?  And do 
> you
> have a project for PB or whatever that you think should be included in 
> the
> standard Sword distro?


Date: Fri, 20 Sep 2002 11:12:54 +0100
Subject: NSTextStorage setAttributedString problems
Content-Type: text/plain;
Mime-Version: 1.0 (Apple Message framework v480)
From: Will Thimbleby <willThimbleby@mac.com>
To: cocoa-dev@lists.apple.com
Content-Transfer-Encoding: 7bit
In-Reply-To: <20020916050028.1983.59572.Mailman@lists.apple.com>
Message-Id: <873DF96E-CC81-11D6-8D5E-003065B2931A@mac.com>

I'm using setAttributedString on the NSTextStorage of a NSTextView so 
that I can put html into the NSTextView.

attr = [[[NSAttributedString alloc] initWithHTML:html 
documentAttributes:NULL] autorelease];
[[textBox textStorage] beginEditing];
[[textBox textStorage] setAttributedString:attr];
[[textBox textStorage] endEditing];

At the moment this is fine until the html is smaller than the one I 
replace. Then although the values for changeInLength are all ok it still 
tries to read past the size of the current data. Giving an error like:

*** NSRunStorage, _NSBlockNumberForIndex(): index (4094) beyond array 
bounds (3101)

Is there a way to sort this out?
Or Is there a better way to do this?


Will (MacOS 10.1 btw)