I will post the contents written to github.

I think the replacement from NSTextInput to NSTextInputClient can't solve this 
problem 
unless its methods are implemented appropriately.
In an opposite way, even with NSTextInput, I anticipate the appropriate 
implementation
of methods can solve it.

I'm writing a experimental code for it. But I'm in trouble.
In setMarkedText:selectedRange: , I can't convert text from a NSString to a 
factor string 
by CF>string. I got the error "Unix signal #6 (SIGABRT)".
The word works fine in insertText: .

    ! Text input
    METHOD: void insertText: id text
    [
        self window :> window
        window [
            text CF>string window user-input
        ] when
    ] ;

    METHOD: char hasMarkedText [ 0 ] ;

    METHOD: NSRange markedRange [ 0 0 <NSRange> ] ;

    METHOD: NSRange selectedRange [ 0 0 <NSRange> ] ;

!    METHOD: void setMarkedText: id text selectedRange: NSRange range [ ] ;

    METHOD: void setMarkedText: id text selectedRange: Nsrange range 
[ 
        self window :> window
        window [
! ok -->          "abc"
! ok -->          "xyz" <CFString> CF>string 
! "alien "        text class-of "%s " sprintf
            text CF>string   ! Error  Unix signal #6 (SIGABRT) 
            window world-focus user-input* drop
        ] when
] ;


--
KUSUMOTO Norio





> 2019/01/11 22:25、楠本紀雄 (KUSUMOTO Norio) <kusum...@na.rim.or.jp> のメール:
> 
> Hi John, 
> Thank you for your response.
>  
> 
>> On Jan 11, 2019, at 2:12, John Benediktsson <mrj...@gmail.com> wrote:
>> 
>> I'm not familiar with that method of text entry.  What's the best way to try 
>> it out on my macOS Mojave?  Maybe we can improve it.
>> 
>> Thanks,
>> John.
> 
> I try to explain How to try it.
> 
> 1. Add Japanese input method at:
>       System Preferences>>Keyboard>>Input Sources>>Japanese
> 
> Fig1:
> <fig1.png>
> 
> 2. Select “Hiragana” input source. 
> 
> Fig2:
> 
> <fig2.png>
> 
> 
> 3. Uncheck “Live Conversion”
> 
> Fig3:
> <fig3.png>
> 
> This action isn't necessary to know the issue, but it makes Japanese input 
> method of Mojave
> typical operation of general Japanese input methods. 
> 
> 
> 4. Type "nihonn" on a document of TextEdit.
> 
> Fig4:
> <fig4.png>
> 
> Katakana text "にほん" will be displayed with an underline. 
> 
> 
> 5. Hit Space key to convert from katakana "にほん" to kanji "日本" or another 
> kanji word.
>    ("日本" means Japan.)
> 
> Fig5:
> <fig5.png>
> 
> "にほん" will convert to a first candidate word. 
> 
> 6. If you wish to convert to another word, hit Space key again. Other 
> candidate words
>    will be displayed.
>    
> Fig6:
> <fig6.png>
> 
> 7. Select a word with Space, Up or Down key, and hit Return key.
> 
> 8. Hit Return key again to fix the word.
>    
> Fig7:
> <fig7.png>
> 
> The underline which means "unconfirmed" will disappear.
> 
> 
> This is the expected behavior.
> 
> On a lister window of Factor.app, unconfirmed words are not displayed.
> 
> 
> 
> 
> --
> KUSUMOTO Norio
> 
> 
> 



_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to