[futurebasic] Re: [FB] The Little Spell Checker

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2006 : Group Archive : Group : All Groups

From: Bernie <fb.list@...>
Date: Mon, 17 Apr 2006 06:37:46 +0100
Jay wrote:

> Great start! Any idea why, when I go to Spelling and dbl click on a  
> correction, it dies?

Hm. Does the same here in my main app but I don't know why :-(


Max wrote:

> Maybe it's a mystery. Maybe some one else had the same problem.

This fixes the problem (my error)

'----------
toolbox fn HITextViewGetTXNObject(Handle txtView)=ptr
toolbox fn TXNSetCommandEventSupport(ptr obj,UInt32 opt)=OSStatus
dim as UInt16 item
dim as OSErr err
edit menu 2
item = fn CountMenuItems(fn GetMenuHandle(2))+2
menu 2,item,1,"Spelling"
err=fn SetMenuItemHierarchicalID(fn GetMenuHandle(2),item,100)
InsertMenu(fn NewMenu(100,""),-1)
menu 100,1,1,"Spelling…/:"
menu 100,2,1,"Check Spelling/;"
menu 100,3,1,"Check Spelling as You Type"
err=fn SetMenuItemCommandID(fn GetMenuHandle(100),1,_"shsp")
err=fn SetMenuItemCommandID(fn GetMenuHandle(100),2,_"cksp")
err=fn SetMenuItemCommandID(fn GetMenuHandle(100),3,_"aspc")
InsertMenu(fn GetMenuHandle(100),-1)
appearance window 1,"The Little Spell Checker",(69,71)-(569,321),6
appearance button 1,1,,,,,(23,23)-(477,227),912
def SetButtonTextString(1,"colour synchronise seperate neighbour ")
def SetButtonFocus(1)
err=fn TXNSetCommandEventSupport(fn HITextViewGetTXNObject(button& 
(1)),12)
do:HandleEvents:until 0
'----------

Bernie