"toggleLocalHierarchy" button?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Test results of Scintilla MBCS

Blair McGlashan-4
"Howard Oh" <[hidden email]> wrote in message
news:[hidden email]...
> Comes with Dolphin 6 that is.  I've not tried your version yet.
>
> sci sciGetCodePage   answers 0.

So if you run with just the attached patch, and the 1.67 Scintilla release
currently distributed with Dolphin (i.e. without Chris' modifications), does
it significantly improve your code editing experience?

Regards

Blair

---------------------
KernelLibrary methodsFor!

getACP
 "Invoke the GetACP() function of the module wrapped by the receiver.
 Helpstring: Retrieves the current ANSI code-page identifier for the system

  UINT __stdcall GetACP();"

 <stdcall: dword GetACP>
 ^self invalidCall! !
!KernelLibrary categoriesFor: #getACP!**auto generated**!public! !

!SmalltalkWorkspace methodsFor!

applyOptions
 "Private - Apply the class options to the receiver"

 view backcolor
  ifNotNil: [:color | color isDefault ifTrue: [view backcolor: self class
defaultBackcolor]].
 view font: self class actualFont.
 view wordWrap: self class wordWrap.
 view tabWidth: self class defaultTabWidth.
 "textStyles are initialized to class setting by default, but parent
presenter might have
 replaced them. N.B. If you blow up here, its because you are trying to use
a non-Scintilla
 view with SmalltalkWorkspace. This is no longer supported."
 view textStyles: self textStyles.
 view wordChars: (Character byteCharacterSet
    select: [:each | (Compiler isAValidIdentifierChar: each) or: [each ==
$:]]).
 self hasSmalltalkStyler ifFalse: [self isAutoCompletionEnabled: false].
 view isAutoCompletionCaseInsensitive: self class
isAutoCompletionCaseInsensitive.
 "This has no effect, since we takeover insertion of the completed word, but
it's a useful
 way to store the flag on a per-instance basis"
 view isAutoCompletionTruncating: self class isAutoCompletionTruncating.
 view maxCompletionListHeight: 10.
 view maxCompletionListWidth: 40.
 self areVariableTipsEnabled ifTrue: [view isBackgroundDwellEnabled: true].
 "#2137"
 view sciSetCodePage: KernelLibrary default getACP! !
!SmalltalkWorkspace categoriesFor: #applyOptions!operations!options!private!
!


Reply | Threaded
Open this post in threaded view
|

Re: Test results of Scintilla MBCS

Howard Oh
Blair,

Yes!! Significant improvement there is!

Before the #appleOptions patch, korean string were breaking while
editing. But now its quite statable if it is delimited by the quotation
marks(').  Without them,  it breaks as before. Is this because of
intellisense feature masses up? I use workspace like a notepad; listing
ToDo's into it.  But with D6, I have to quote them like strings, not a
big problem though. :-)

Thank you for helping me with this problem.

But still, can't compare to D4's korean(RichEdit of MS).  That one is
perfect.

Best Regards
Howard


Reply | Threaded
Open this post in threaded view
|

Re: Test results of Scintilla MBCS

Chris Uppal-3
Howard,

> But now its quite statable if it is delimited by the quotation
> marks(').  Without them,  it breaks as before. Is this because of
> intellisense feature masses up? I use workspace like a notepad; listing
> ToDo's into it.  But with D6, I have to quote them like strings, not a
> big problem though. :-)

You could try using the Workspace=>options menu to turn off autocompletion
and/or code colouring.  Alternatively use Workspace=>options=>text to do
roughly the same thing.

Won't help when you want to mix Korean and Smalltalk code, though.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Test results of Scintilla MBCS

Howard Oh
Chris,

Here's your results again.

Workspace=>option=>autocompletion  ...  Still Breaks if quotation mark
is not there
Workspace=>option=>text  ...  Doesn't break without quotaion mark. BUT,
backspace key(or delete key) breaks letters

I guess #applyOptions doesn't seems to be effective when Language
option is set to 'text'.

Should place this line somewhere... view sciSetCodePage: KernelLibrary
default getACP.

Thanks anyway.
I'm very impressed by how you deal with problems.

Best Regards,
Howard


Reply | Threaded
Open this post in threaded view
|

Re: Test results of Scintilla MBCS

Howard Oh
Folks,

ChanHong and I've repeatedly tested extending Chris's test cases and
acquired clearer picture.
We summerized the series of test results to a  symtom vs cure list.
Fortunately, all the factors looks independent to each other. They do
not have interrelationship.

SYMPTOM 1: MBCS string breaking by copy&paste from or to a notepad(or
to workspace) ...

CURE 1:
    User Preference => Workspace => defaultFont
        a. Select proper script from the font dialog's combo box
        b. Select font face name that supports the language. (Arial is
a bad choice.)


SYMPTOM 2: MBCS letter breaking to half by backspace or delete key hit

CURE 2:
     Call ScintellaView>>sciCodePage: <proper value>


SYMPTOM 3: Walkback occurs while typing an MBCS string.

CURE 3:
    Do not call ScintellaView>>codePage: #utf8


SYMPTOM 4: MBCS string looks broken when typing it with keyboard

CURE 4-a:
    Disable Syntax Coloring for entire document broken-look-free proof.
(It is indirectly related to "Langauge=>Text". Which means
Language=>Smalltalk is ok unless Syntax Coloring is turned on.)
    (Note that all the already broken MBCS in the workspace revives to
show correctly right after the Syntax Coloring is disabled.)
CURE 4-b:
    Use quotation marks (single-  or double- ) to surround MBCS string.


- 1,2,3,4 are independent.


Hope this can help discovering solution.

Best Regards,
Howard


Reply | Threaded
Open this post in threaded view
|

Re: Test results of Scintilla MBCS

ChanHong Kim
Howard Oh wrote the Important Problem about Korean Letter(Hangeul) in
this thread,
I have prepared movie presentation to introduce these situation and
screenshot.

Please refer following movie file:
http://www.box.net/public/static/v2zk3qid5z.wmv

This movie clip introduce Hangeul(Korean Character) problem in Dolphin
X6.

I hope that this movie help OA and our community members to find out
the solution.


Reply | Threaded
Open this post in threaded view
|

Re: Test results of Scintilla MBCS

Blair McGlashan-4
"ChanHong Kim" <[hidden email]> wrote in message
news:[hidden email]...

> Howard Oh wrote the Important Problem about Korean Letter(Hangeul) in
> this thread,
> I have prepared movie presentation to introduce these situation and
> screenshot.
>
> Please refer following movie file:
> http://www.box.net/public/static/v2zk3qid5z.wmv
>
> This movie clip introduce Hangeul(Korean Character) problem in Dolphin
> X6.
>
> I hope that this movie help OA and our community members to find out
> the solution.
>

Thank you for taking the time to do this - it clearly involved some effort.

We'd like to do the best we reasonably can to improve your experience in the
next minor release (the next patch level will be a minor release).
Considering each of the 4 items you discuss:

1: Choice of default font.
I think the best we can do here at this time is to explain on the welcome
page that users of multi-byte languages may want to change the default
workspace font. I'm open to suggestions for a way that this can be improved
in a generic and testable way though.

2: MBCS letter broken by delete/backspace
We are minded to include the previously posted patch, although we need to be
sure this doesn't cause problems in some other locales.

3: Walkback with #utf8 code page setting
We don't think that satisfactory support for #utf8 would be possible without
proper support for multi-byte strings. This is not going to be changed in a
minor release as it is a major undertaking.

4: Multi-byte string typed into workspace may be broken
This is caused by some of the initial characters being treated as valid
identifier characters, causing them to be styled differently from other
characters which are not identified as letters. Scintilla considers parts of
a multi-byte character to be different characters if the styles are not the
consistent.

In relation to this one, the best we would expect is that the non-english
characters would all be treated as invalid (and styled in the invalid
character style, the default for which is red). The workspaces are designed
to support the ANSI Smalltalk language, and this allows only the 26 letters
of the English alphabet in upper or lower case and the underscore character
to be used in identifiers and unary/keyword selectors. The fix here is to
change the in-image lexical analyser so that it is as strict as the Dolphin
compiler. Even this fix you will still only be able to use non-English
characters in strings and comments, not in the code itself, but it should
prevent the characters from being broken up.

Thanks again

Blair


12