Highlighted
Absent Member.
Absent Member.
3271 views

[archive] Polar SpellChecker

[Migrated content. Thread originally posted on 10 June 2010]

I found an old sample program that used Polar Spellchecker and was able to get it to work. It's the first activex control I've used, and need to download Polar's current spellchecker software (trial version first). Is there anyone out there that currently uses it? Once I install the new trial version, how do I point the existing acyivex control to the new software? Thanks!
0 Likes
13 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

When you have installed the new activex, you should use the AxDefgen.exe to generate a new definition file (see documentation). When you recompile you app using this .def file, you should be using the new version.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

Thanks. I created the new .def file, but when I generate, I get a "Failed to Load Library Type" error. I'm using acubench.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

There is a sample of spellchecker in the sample/activex folder, just load the spellchecker.psf into your AcuBench project. Once you've installed Polar, use ActDefGen and highlight the Polar spellchecker control in the list box (see attached screenshot), and in the entry-field create Spellchecker.def. Make sure where ever you create Spellchecker.def, that your AcuBnech project can find it. You should now be able to generate, compile and execute.
🙂
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

screenshot
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

Thanks Dilbert. I was able to get that sample program working, eventually I'll need a non-trial version, so I installed the newer trila version from the polarsoftware website. I ran the Axdefgen against the new component to create my new .def file. The problem is when generationg the "spellchecker.psf" I get a "failed to load library type". I have a feeling it has to do with the new license key. When I open the screen in AcuBench I get the message "design-time license for ocx.spellchecker control missing. loading control with place holder only"
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

Since you have a new licensed spellchecker, create a new screen, in the screen component portion of AcuBench, right click on ActiveX components and then find your Polar spellchecker and select it. Now you can select it from the ActiveX components and add on to your new screen. Once you have that, copy that one from the new screen to the original screen, get the properties and events taken care of, and then delete the original one.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

Thanks! That did it.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

In the sample I do the following:
Modify SpellCheckerControl CheckText(DataEntryField-Value, " ")
giving DataEntryField-Value.

It works fine, the spellchecker software runs, but there are options that I want to turn off (uncheck). One would be ignoring words in upper case. Can I do that with a cobol statement prior to the "checktext" or do I need to change something in Polar software.

Here's the statement in the spellchecker.def file:

* CheckText
* method CheckText
METHOD, 35, @CheckText,
"BSTR" @Text, TYPE 8,
"VARIANT*" @ExitStatus, TYPE 16396
RETURNING "BSTR", TYPE 8
* IgnoreWordsInUppercase
* property IgnoreWordsInUppercase
PROPERTY-GET, 37, @IgnoreWordsInUppercase
RETURNING "boolean", TYPE 11
* IgnoreWordsInUppercase
* property IgnoreWordsInUppercase
PROPERTY-PUT, 37, @IgnoreWordsInUppercase,
"boolean (Property_Value)", TYPE 11
* IgnoreWordsWithNumbers
* property IgnoreWordsWithNumbers
PROPERTY-GET, 38, @IgnoreWordsWithNumbers
RETURNING "boolean", TYPE 11
* IgnoreWordsWithNumbers
* property IgnoreWordsWithNumbers
PROPERTY-PUT, 38, @IgnoreWordsWithNumbers,
"boolean (Property_Value)", TYPE 11
* AlwaysSuggest
* property AlwaysSuggest
PROPERTY-GET, 36, @AlwaysSuggest
RETURNING "boolean", TYPE 11
* AlwaysSuggest
* property AlwaysSuggest
PROPERTY-PUT, 36, @AlwaysSuggest,
"boolean (Property_Value)", TYPE 11
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

Ignoring Upper case is a function of the control,

property-get are INQUIRE types of properties

property-put are MODIFY types where your COBOL program can modify the control to use an additional property

PROPERTY-PUT, 37, @IgnoreWordsInUppercase,
"boolean (Property_Value)", TYPE 11

Modify SpellCheckerControl @IgnoreWordsInUppercase

I would do this before the CheckText function

You cannot change the functionality the spellchecker control unless you purchase the source from Polar and build a new ocx.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

That did it: Modify SpellCheckerControl @IgnoreWordsInUppercase ("0") turned it off.

Thanks! I really appreciate it.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Polar SpellChecker

I purchased the non-trial version of spellchecker, installed it on my development server and all worked fine. I then installed the software on my production server and moved the application and I get an "invalid handle" when opening the dictionary.

Modify SpellCheckerControl
OpenDictionary("\\onlinenfs\projetcs\SpellUS.lex")

Any ideas what could cause this? Thanks.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.