Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, November 27, 2024 
 
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: Window Refresh Issue
Ben
Posts: 26
 
Window Refresh IssueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Mar 07 2:25 PM
fiogf49gjkf0d
Hey everyone; I have an issue where the SLX window isn't refreshing because it is processing a script in the background.

The background: I have a tab that allows certain users to open a file and import the contents into tables in SLX. There is a progress bar on the tab which I want to show the progress as it works down through the lines of the file (cvs). The problem is that during the processing, it locks SLX - windows reports, via the SLX Title Bar, that SLX is not responding when attempting to click some other location on the screen. Oddly, if you start the process, but do not click anywhere else, you can see the bar filling up. SLX has no crashed, or caused an error - it is just terribly busy.

This isn't a huge issue because this functionality is restricted to only a few people who understand that it is truly importing the data, despite the lack of response. However, it would be nice to know how to get this working, if at all possible.

I have tried a few things like frmWhatever.Refresh but nothing seems to work. Ideas?

Thanks!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Window Refresh IssueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Mar 07 3:16 PM
fiogf49gjkf0d
The SLX equivalent to something like VB's DoEvents (which forces the app to break to process queued windows messages) is:

Application.BasicFunctions.ProcessWindowMessages


Calling this in your loop will allow SLX to remain responsive, although it will slow things down for your import.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Window Refresh IssueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Mar 07 5:08 PM
fiogf49gjkf0d
Ryan has the answer but here's some food for thought. What about creating a .NET extension in 7.0? This could possibly give your import a non-modal behavior where users can actually go about doing their business but your .NET extension is there importing in the background on whatever bandwidth it can muster.

ProcessWindowMessages will keep SLX responsive in look only though. You won't be able to go to an Account or do some other task while the import is performing. It'll just appear as if it's doing work instead of halting (which in fact it really is doing, but appearances are everything in this business).
[Reply][Quote]
Ben
Posts: 26
 
Re: Window Refresh IssueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Mar 07 8:38 AM
fiogf49gjkf0d
Hey guys, thanks for the replies (quick ones too!)

Ryan, that call works like a charm.

Jeremy, sadly, we are using SLX 6.2.6, so I do not think that option is available for me. Perhaps some other person that reads this thread can do that though. Maybe I could move it to a COM object? Moving it outside of SLX probably isn't worth the time/effort because as I mentioned previously, this functionality isn't available to the general user. There will be about two or three people, at most, that will need to run this import once a quarter - the person running it will more than likely be myself. Regardless, thanks for the thoughts and suggestions!
[Reply][Quote]
Brian Thews
Posts: 34
 
Re: Window Refresh IssueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Mar 07 12:13 PM
fiogf49gjkf0d
Jeremy, I actually just tried this (creating a .net extension in 7.0) and calling it from my vb script.
However, I found that it does the same thing. I really can't do anything within saleslogix while the .net extension is processing.
Is there something special that need to be done (start a new thread or something)?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Window Refresh IssueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Mar 07 1:15 PM
fiogf49gjkf0d
Using a .NET Extension won't do this for you automatically. However, you can start the process on another thread easily in .NET - somehting you can't do in a SLX script.

ie:

using Sage.SalesLogix.NetExtensions;
using System.Threading;
//...

public class Class1 : BaseRunnable
{
public override object Run(object[] Args)
{
Thread t = new Thread(new ThreadStart(this.myLongRunningProcess));
t.Start();
}

private void myLongRunningProcess()
{
// do a lot of processing here
}
}


Make sense?
[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 © 2024 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): 11/27/2024 6:27:31 AM