New topic: 

Can't get my head around this...some guidance please

<http://forums.realsoftware.com/viewtopic.php?t=47878>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        ngmp          Post subject: Can't get my head around this...some 
guidance pleasePosted: Tue May 14, 2013 11:42 am                         
Joined: Wed Jan 09, 2013 5:53 am
Posts: 18                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                simulanics          Post 
subject: Re: Can't get my head around this...some guidance pleasePosted: Tue 
May 14, 2013 2:39 pm                                 
Joined: Sun Aug 12, 2007 10:10 am
Posts: 1075
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                ngmp          Post subject: Re: 
Can't get my head around this...some guidance pleasePosted: Tue May 14, 2013 
2:51 pm                         
Joined: Wed Jan 09, 2013 5:53 am
Posts: 18                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             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to