12-03-2009 11:22 PM - edited 12-03-2009 11:26 PM
Helllo EveryBody,
I have been stuck up in a problem,explanation:
I am using boolean buttons to change the pages of tab.
On the first tab the controls(i.e buttons) for traversing to the tab pages is given (I page of tab = MENU)
On the other tab i am implementing other processes.
It normally behaves fine but sometimes the program hangs( only the button part) like i am displaying current time on menu, so when it hangs the time is updated but the buttons wont work.
I have to restart the application for that.
any possible reasons for that? and is there any method to debu it.
Regards
Shrek
12-04-2009 12:04 AM
What sort of program structure do you use?
Do you have a Producer-Consumer-Pattern?
I think you need to give some more details.
May be this helps: Is the process on the other tab really finished?
12-04-2009 12:58 AM
Many things could be wrong, but we cannot tell without seeing some code.
Show us some code and we will tell you what the problem is! ;).
12-04-2009 01:07 AM
Hello Shrek
What do you use to change the tab page? The terminal, a local variable or a value property?
Maybe using the value property helps.
It is not a good idea to always do this because using a local variable is quicker (and the terminal the quickest). But on tab controls local variables sometimes fail to change the page. (Also other users saw this problem, see this Lava post.)
Greetings
shb
12-04-2009 01:20 AM
I have three reasons in mind for not using the tabs:
1. you want to have a wizzard like behaviour and jump one page foreward or backward
2. have a intro screen and jump from there to a couple of different process and back to the intro screen when the processes are finished
3. to have extended graphical and behavioral capabilities like for a ribbon like front panel
By the way, I had a similar problem. I had a button on a tab-structure which should allow the user to jump to the next page. This button worked only occationally. I haven't found the reason why. The program has got a producer consumer pattern. pressing this button added an element to the queue which was processed in the consumer loop. In that processing case another boolean was value signaled. This signaling was processed in the producer loop with its event structure and set the tab-structure to another page.
12-04-2009 10:33 AM
i am using local variables only.
Sorry but can't post the code, (company issues)
and i cannot replicate the code also as i dont know what is causing the problem.
If i click 2,3 buttons at a time then sometimes it hangs the buttons, so different code is executing and the front panel is showing different page, as i have a case structure for every page of tab and checking the tab page to execute the repective code.
Can the above explanation be the reason for it?
Am i doing it coreectly, or any other optimised way is there.
Regards,
Shrek
12-04-2009 10:47 AM
You've got a couple of things that are design problems.
First, you should minimize/eliminate the use of local variables.
Second, an event structure should not be placed inside a case statement. You are very wrong if you think the event structure will not fire if the opposite case is selected.
12-04-2009 10:57 AM
Hi,
The use of variables is minimal.
So how can i implement the different pages that i want to use other than tab.
Regards,
shrek
12-04-2009 11:17 AM
shrekt wrote:So how can i implement the different pages that i want to use other than tab.
12-05-2009 05:47 AM
Hi Dennis,
In your post you told that event structure should not be used in case structure.
but if i have a while in case structure and in that while i have event structure, so is it ok for designing
regards
Shrek