Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) LE background color different depending on Value (Read 3022 times)
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: LE background color different depending on Val
Reply #15 - Jun 1st, 2009 at 1:53pm
Print Post Print Post  
Good Morning lksseven,
Please send your design files (DSR & DDT) to support@lantica.com so that we can help you resolve this issue.
  
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: LE background color different depending on Val
Reply #16 - Jun 1st, 2009 at 6:10pm
Print Post Print Post  
Hi Ben,

will send them this afternoon.

Thank you!

Larry
  

Larry
Back to top
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: LE background color different depending on Val
Reply #17 - Jun 1st, 2009 at 8:35pm
Print Post Print Post  
Larry,
We have received your files and we have started looking into your issue.


From what we are seeing in our testing here, you have multiple uses of #Include "sbasic_include.sbas"  throughout your programming. This can cause the compilation time when you first open your application to increase (which may cause Sesame to appear locked up). We found that after 5-7 minutes of compiling your programming the forms finished loading and were usable. Try removing the include statement from all of your programmed events and then add #Include "sbasic_include.sbas" in the Global Code section of your programming. The include statement does not need to appear anywhere else in your programming.
  
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: LE background color different depending on Val
Reply #18 - Jun 1st, 2009 at 9:17pm
Print Post Print Post  
Ben,  thanks!  Didn't know better, but now I do.  I'll make the changes tonight.

Larry
  

Larry
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: LE background color different depending on Val
Reply #19 - Jun 2nd, 2009 at 12:09am
Print Post Print Post  
Ben,

I removed #Include "sbasic_include.sbas" from all events and added it to Global Code for each form.

the forms load MUCH faster.

Unfortunately, any code in the ItemQty:ShockednDraw event still makes the Order screen appear to freeze/lockup.  So I /*  */  the code in the OnDraw event screen, reloaded, and the Order screen still was frozen/locked.  So I deleted the OnDraw event altogether, and then everything worked fine.

What do I try next?
  

Larry
Back to top
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: LE background color different depending on Val
Reply #20 - Jun 2nd, 2009 at 4:10pm
Print Post Print Post  
Try the following in your ItemQty :: On Draw event. Removing the ForceRedraw() statements will at the very least decrease some of the load time and slowdowns that you were seeing in the subform.

Code
Select All
If @FormViewType("SOLines") = FORM_VIEW_TYPE_TABLE
     {
	 RGBColor(ItemUoM, -1, -1, -1, 255, 255, 0)
     }
	else
	  {
	    RGBColor(ItemUoM, -1, -1, -1, 255, 255, 255)
	  }

    If @ToNumber(ItemQty) < 0
     {
	 RGBColor(ItemQty, -1, -1, -1, 255, 255, 0)
     }

	 else
	   {
	     RGBColor(ItemQty, -1, -1, -1, 255, 255, 255)
	   }
 

  
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: LE background color different depending on Val
Reply #21 - Jun 2nd, 2009 at 6:24pm
Print Post Print Post  
Ben,

Good morning!

I used the following code in ItemQty::OnDraw, and it froze/locked - sesame.exe was using 50% of CPU.

SOLines!ItemQty::OnDraw

// if table view (for printing purposes) and ItemQty is a negative number, then
// I want the ItemQty background to be yellow FOR only that line item that is a
// negative number, otherwise I want the background to be white

If (@FormViewType("SOLines") = FORM_VIEW_TYPE_TABLE) and (@ToNumber(ItemQty) < 0)
  {
    RGBColor(ItemQty, -1, -1, -1, 255, 255, 0)
  }

    else
     {
     RGBColor(ItemQty, -1, -1, -1, 255, 255, 255)
     }
  

Larry
Back to top
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: LE background color different depending on Val
Reply #22 - Jun 2nd, 2009 at 6:36pm
Print Post Print Post  
Can you provide us some general information about your machine. General specs like the RAM, Processor, Operating System, etc.

How long do you let Sesame sit when it appears to be locked up before you tell windows to end the task?

  
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: LE background color different depending on Val
Reply #23 - Jun 2nd, 2009 at 8:58pm
Print Post Print Post  
Lenovo W700 laptop (2 months old), Intel Core 2 Duo CPU T9400 @ 2.53GHz.
3gb RAM, WinXP Pro, service pak 3.   My 'in operation' Sesame server is also Lenovo Tower, M57model, about 8 months old, 3gb RAM, WinXP Pro, ServPak3.
   
Task Manager shows sesame.exe using anywhere from 33mb to 66mb memory (but it doesn't seem to cannibalize more and more memory, as it was when I had #Include "sbasic_include.sbas" strewn throughout my events like a drunken sailor) , and about 50% of the CPU utilization.  I only let it go for 30 to 45 seconds or so (the time it takes me to walk outside and howl and walk back in again - haha) before killing it with Task manager.
  

Larry
Back to top
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: LE background color different depending on Val
Reply #24 - Jun 2nd, 2009 at 9:03pm
Print Post Print Post  
Try letting it work for 5-10 minutes just to see if it picks back up and finishes loading.

We can also setup a GoToMeeting session if you like so that we can take a look at what it is doing on your machine. To schedule a meeting, email us at support@lantica.com with a time that will work for you (between 9AM and 5PM EST).
« Last Edit: Jun 3rd, 2009 at 1:18pm by Ben »  
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: LE background color different depending on Val
Reply #25 - Jun 2nd, 2009 at 11:39pm
Print Post Print Post  
85% breakthrough ....

I was having a nagging issue of several workstations getting sbasic runtime error messages when printing sales orders.  I was starting to suspect that these two users were blowing through the screen so quick that the code wasn't keeping up.  Couple that with your very welcome suggestion that I put #Include "sbasic_include.sbas" only in Global Code (which meant that the app loaded so much quicker) and I got to thinking ... I have Just In Time Compilation set to ON for all of my workstations because the other way was horrendously slow loading the app (due to my ignorance about #Include "sbasic_include.sbas" overuse).  So, with the vastly increased load speeds, I decided to switch off Just In Time Compilation .... I did so this evening before leaving the office (including my laptop), and the runtime errors stopped popping up.

So when I set up just now to follow your directions and let computer run for 5 or 10 minutes to see if it would finally load (having coded an OnDraw event), the app loaded with ease - no lockup, no freeze, no problem!
     So, it seems that OnDraw does not like Just In Time Compilation (at least in my app).

The other 15% yet to go ..... while the app works, the code itself did not - it does not change the background color - in tableview - of ItemQty if ItemQty is a negative number.  Where is my code off?
  

Larry
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: LE background color different depending on Val
Reply #26 - Jun 3rd, 2009 at 12:07am
Print Post Print Post  
lksseven wrote on Jun 2nd, 2009 at 11:39pm:
The other 15% yet to go ..... while the app works, the code itself did not - it does not change the background color - in tableview - of ItemQty if ItemQty is a negative number.  Where is my code off?

That part might not be you. Let us check it out. It may be a side effect of something we fixed in a previous version.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: LE background color different depending on Val
Reply #27 - Jun 3rd, 2009 at 2:13am
Print Post Print Post  
oki dokie.  Will wait to hear.

While I was waiting, I noticed something bizarre.  I turned off Just In Time Compilation for the above reasons.  But with JIT off, upon clicking Orders (or its subform SOLines) from Application Menu, which presents the 'search/update Orders' tab.  If I hit F10 to find all records, it says 'so results returned from query'.  If I then click 'Clear Search Criteria' from Command Menu on that tab, and then hit F10, it finds all of my records.  But if I then press F7 and enter a specific search criteria (a client id, for example) it says 'no results returned from query'.

     If I change my sesame.ini file back to Just In Time Compilation: ON, then Orders and SOLines performs normally, with an initial F10 returning all of my records, F7 and specific search criteria returning correct results.

The other 6 or 7 databases in this app perform normally in both settings of Just In Time Compilation.  It's only Orders and SOLines (with which I was having the initial issue of OnDraw).

What could I have done to the code (or could it have been something I've done) that would cause Orders and SOLines to act normally with JIT on, but be on the fritz with JIT off ?  
       
Two more observations:
1)  with JIT off, when in SOLines form, I click on Simple Search, leave criteria blank and click Accept.  It finds all my records (now it's in Update mode).  If I go to the last record and then continue to press F10, it just keeps creating new blank records.
       But if JIT is on, and I go to the last record in SOLines form, and press F10, it only allows me to create one blank record.

2)  with JIT off, once I get to the Orders or SOLines form in 'search/update tab, I can't escape that tab by hitting ESC key.  I have to click 'close tab' button on Command menu
« Last Edit: Jun 3rd, 2009 at 4:42pm by lksseven »  

Larry
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print