Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, August 29, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Spell Check Freezing Form
Michael Lupino
Posts: 46
 
Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Sep 09 4:28 PM
I'm experiencing an interesting issue that is occuring for some users. When we use spell check to quality the text in a field (code copies text, launches winword and spell checks text), for some users the process is freezing up and the spell check window is disappearing behind the form (appears to lockup SalesLogix).

I found a way to go back to that modal mode which appears to unlock the form. Is their anyway to set the focus to provide a cleaner user experience. e.g if they move between applications and come back to SLX, the active spell check window is displayed.

Any thoughts are appreciated?
[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Oct 09 9:01 AM
What code are you using to check the spelling. I use below. If mine is different to yours, give mine a crack and see if it makes any difference...

I call the function like so....

-------------------------------------------------------
dim result
result = SpellCheck(txtDesc.Text)

if result <> txtDesc.Text then
txtDesc.Text = SpellCheck(txtDesc.Text)
else
MsgBox "No changes made to spelling."
end if

------------------------------------------------------

Function SpellCheck(strText)
Dim strSelection
Dim strResult
Dim objWord
Dim i

strResult = ""
Set objWord = CreateObject("Word.Basic") 'DNL
objWord.AppMinimize
SpellCheck = strText
objWord.FileNewDefault
objWord.EditSelectAll
objWord.EditCut
objWord.Insert strText
objWord.StartOfDocument
objWord.ToolsSpelling
objWord.EditSelectAll

strSelection = objWord.Selection

If Mid(strSelection, Len(strSelection), 1) = chr(13) Then
strSelection = Mid(strSelection, 1, Len(strSelection) - 1)
End If

If Len(strSelection) > 1 Then
'Word strips linefeed characters (chr (10)) out of the returned text, so we have to put them back.
For i = 1 To Len(strSelection)
If Mid(strSelection, i, 1) = chr(13) Then
strResult = strResult & chr(13) & chr(10)
Else
strResult = strResult & Mid(strSelection, i, 1)
End If
Next
End If

SpellCheck = strResult

objWord.FileCloseAll 2
objWord.AppClose
Set objWord = Nothing

End Function

[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Oct 09 9:04 AM
Sorry, I mistyped something in the way I call the function.... Should be....

dim result
result = SpellCheck(txtDesc.Text)

if result <> txtDesc.Text then
txtDesc.Text = result
else
MsgBox "No changes made to spelling."
end if
[Reply][Quote]
Michael Lupino
Posts: 46
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Oct 09 9:14 AM
Thanks for providing the example. I am going to review with our developer and see if it works better.
[Reply][Quote]
Michael Lupino
Posts: 46
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Oct 09 4:09 PM
Guy,

Your code works similar to ours with the exception that it appears to open and close Word (which is nice). The problem is that while the spell check is going on, if someone moves to another application and back to SalesLogix, the application appears to lock up. It's not locked up... but The word object is running and processing the text.

Is there any way to make the application appear like its not locked up. I suggested incorporating a splash screen (form) with a refresh that says "Processing..." but even so, the application appears to look like it hung.

Any suggestions?
[Reply][Quote]
Michael Lupino
Posts: 46
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Oct 09 3:30 PM
Are their any tricks to prevent what I'm describing from occuring?

We also tried to hide the physical form entity and only display the splash screen (with a refresh) while word is running spell check. This will work until the user tabs away from the application and back to saleslogix. At that point, the screen looks like it is still frozen.

Users typically think the application is hung up and will try to quit SalesLogix.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 9:28 AM
We bring a big panel to the front of the form that says : Please wait, Processing....
Even use a progress bar if we know how many records are being processed for an update or insert.

Make the panel visible
Perform the spell check
Make the panel invisible.

[Reply][Quote]
Michael Lupino
Posts: 46
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 10:54 AM
I believe we tried the panel idea, let me confer with our developer to confirm, but I had the same thought. It appears that when we make the panel visible that says "Please Wait, Processing..." If the user moves from SLX to another application and back to SalesLogix it appears as if the application is frozen.

Do you have a better code example where the application does not appear to be frozen if the user jumps off of SLX and back to it?
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 11:44 AM
A panel will result in the same result if the application "freezes".
The problem is that the application is waiting for the Spell checker to finish, and it won't process any messages until then.

So, even with a Panel, if the spelling takes a long time, or if the Spell Checker dialog opens up, the application will indeed be "frozen".


You may need to treat this as a Training issue.
Explain to your users that if Spell check finds any issues on the Text, the Dialog will open up.
If they are in the middle of a Spell check, and SLX seems to be frozen, switch over to Word and complete the Spell check process, then switch back to SalesLogix.

[Reply][Quote]
Michael Lupino
Posts: 46
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 2:01 PM
Raul,

While I understand your reasoning and entertained that option, I don't agree for a few reasons.

I have a few hundred SLX users, to have to write an e-mail that says "When spell check is running if you switch to and open another application and move back to SalesLogix -- the application will appear to be frozen" the entire user community will look at me with three heads.

I have users with all different levels of computer experience but if the application looks frozen or says "not responding", they are going to do what experience/education has taught them, when an application is frozen, end the application. I know and you know that the application is truely not frozen.

In my particular instance, I believe the problem could be attributed to a loss of focus, an e-mail or another application that steals the active window away from SalesLogix could be causing the issue.

At the end of the day, I'm sure I'm not the only one who has complained about this behavior (why I posted here) but it sounds crazy to train the user in this manner. It also casts a negative light on the application.
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 2:32 PM
Can we make use of Hookevents in a slx global script to identify that a spellcheck event is raised in word?(i do not know if there are any events like that in word).

Just throwing out this idea just in case someone has something else to offer in this regard.

thanks!
[Reply][Quote]
Lane
Posts: 121
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 3:17 PM
Its been a while since I've addressed this but I think if you make the application instance visible (set it in the script AppObj.Visible = True) all the related issues your fighting might go away. The application will appear in the task bar, focus can be set back to it and users will "see" what the slx application is doing. Note they can screw it up too, but telling them not to close a running app is simpler than telling then you can't control it.

Also, I've always told clients to make word the editor of choice on some application thats always open (typically outlook). This pulls an active instance into memory at all times so there isn't a load/unload delay in the processing. If forced you can even start a instance on the slx startup and close at the end. Set a global variable to the word instance, its what sage does to open and hold the crystal runtime engine. I found this clears up 90% of the issues, especially if they are low on memory!
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 4:36 PM
I do a objWord.AppMinimize before running the spellcheck and there you can see the word in the taskbar. This way when users switch to another app , they can click on this word to bring the spell check dialog back.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 5:37 PM
The problem only occurs if the Spellcheck finds a potential error and brings up the Editor window.
While the window is waiting for User Input, SLX is locked. Seems as if the Form is running on a Single thread, and thus is locked until Word returns control.

That being said, the question would be how to call word so that it doesn't lock the SLX thread. So, if you can create your own Object that is Multi-threaded and somehow can Raise an Event back to SalesLogix (and that you could handle in SalesLogix), then you could do this.

Many years ago, I tinkered around building my Own Spell check (with a Custom Dictionary) and ran into similar issues. In that attempt, I was Superclassing some windows, and attaching to SLX. I do recall having some similar issues back then, not sure how I worked around it. I recall dealing with some of those issues at the Message Loop on the Superclass..... !!! (now, if I could only find that old piece of code....)

Bottom line is that you would need something that executes on a Separate Thread, but then, how do you lock the user from Navigating away on SLX? You can't have it both ways.
[Reply][Quote]
Michael Lupino
Posts: 46
 
Re: Spell Check Freezing FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 09 10:48 PM
I'm alright with locking the form, however when it looks like the application is frozen (no icons, and you see a bunch of whitespace) the user tends to freak out. I'm trying to minimize those issues.

I think I'm probably closer to 60% there with actually showing the word object in the taskbar (currently our code does not do this). I'm looking to reach the other 40% and to do so I'm alright with locking the screen provided that it doesn't look like there's a physical freeze. If the screen is drawn correctly then I've reached my objective. I'm alright with hiding the form and display some sort of informational message provided it gives the user the visual que to look for the word object. SalesLogix looks like it went out for lunch which is what I'm trying to avoid.

Thanks for all the good feedback thus far.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/29/2025 3:19:57 PM