Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Jul 22, 2017 3:31 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Can't get my head around this...some guidance please
PostPosted: Tue May 14, 2013 11:42 am 
Offline

Joined: Wed Jan 09, 2013 5:53 am
Posts: 25
Hi all

I have encountered (for me at least) a wierd issue. I have an app which, when the build function allows (see an earlier post), works fine as an exe and debug run with one strange exception.

I have a routine which tabulates a given list box in a format which can be printed, saved or exported (as an csv for instance). I can call this routine for 3 separate tables. The listbox, titles etc are passed to the method (which is in a module) and a table is drawn using google api in an htmlviewer box. 2 calls to the routine work perfectly and produce a new window with the table and a couple of pushbuttons to either filter out certain parts of the table and to close the window. The table is automatically written to file in html for htmlviewer loading and for portability. No problem at at. With the 3rd call however everything works (i.e. the table is written, html file is saved (and can be opened fine) and the necessary code generated, but I lose control of the window displaying the table. i.e. nothing other than moving the whole window or closing via the top right (X) close is functioning. The pushbuttons do not close or filter, the textarea is filled in with code but the scrollbars are not functioning at all.

The only difference between the 3rd call to the first two is that the 3rd call is called from a window with an htmlviewer already open (which is showing a pie or bar chart of the data). For every chart generated the data is sent to a "history listbox" which is the source of the offending table. As I say, the table is, indeed, generated but the functionality of the the controls on the table display window seem to be deactivated.

I have tried, closing the chart htmlviewer box before sending the data to the module to reopen a fresh htmlviewer. indeed, I've tried everything obvious like renaming the viewers, step functioning the whole routine, changing the sequence of calls to the module - nothing helps and I cannot see what is happening here.

So I am simply asking for guidance in how to debug the problem not a solution per se...I just don't know how to go about finding out what's going on. I am loathe re-write the code as it took ages to get working with google api but am resigning myself to having to do that but I thought you guys might be able to help me look for things which I don't know about. How would you go about searching for the issue?

I am a newbie when it comes to object orientated or event driven software having learnt my programming with basic/fortran/pascal etc i.e. number crunching languages so this may be a trivial issue but I am totally at a loss as to where to look now and how to go about looking for the issue.

Help please !!!! .......


Thanks

Nick


Top
 Profile  
Reply with quote  
 Post subject: Re: Can't get my head around this...some guidance please
PostPosted: Tue May 14, 2013 2:39 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
You have a function that is looping which locks up the cpu utilization of the application. When you have a processor intensive operation, a Thread can be used to run the operation in a separate "process"(literally thread)..which will leave your application usable while the operation is being performed. If you need one-on-one help, I'd be glad to lend the time.

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
 Post subject: Re: Can't get my head around this...some guidance please
PostPosted: Tue May 14, 2013 2:51 pm 
Offline

Joined: Wed Jan 09, 2013 5:53 am
Posts: 25
Hi Mathew

Thanks for your answer...

Actually the cpu sits at 98% idle and is doing nothing other than processing normal processes.

However I have found a solution (though I do not know why this should work). If I set the work window containing the charts to .visible=false then I regain control of the table window and when closing the table window I make the chart window visible again. So it seems like a conflict with the other visible (now not visible) htmlviewer on a different window. Well at least that has sorted the problem but it is v inelegant and clumsy imo and, frankly, I do not understand why it makes such a huge difference in my app. I would have never thought of it intuitively unless forced to through a process of trial and error in debugging

Again thanks for taking the time to answer

I note you've done quite a lot with google api (maps I think)...I reckon its great stuff so thanks for putting me onto it though getting deprecated quite fast (at least some of the charting stuff is). Easy way to add charts and graphics to realstudio apps


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group