Jump to content

Issue with gui waiting for a task to complete


bourny
 Share

Recommended Posts

Hi,

I have a workflow program with a nice GUI using multiple tabs and various combo boxes with list views.  The whole thing uses a SQL database with queries in the code to populate the list view depending on what is chosen from the combo menu.  All this works great however I have discovered something that does cause me some annoyance.  If I change my mind and change the combo selection or add a filter using another one of the combo`s the new selection will not apply immediately but instead wait until the current selection has loaded and then apply the new selection.

 

Even better if I choose for an example 5 different combo selections while I am waiting for the first one to complete loading it will remember what I have chose and proceed to execute these in order.  That can become a problem If I have incorrectly selected 5 options or used my mouse wheel to accidentally select other options in the combo.

I guess there is something I can put in my code to tell the program to stop processing a list view population or another activity if a user chooses something else.  

 

any help appreciated.

 

 

 

Link to comment
Share on other sites

  • Moderators

@bourny Just exactly how did you think we were going to be able to troubleshoot your code without seeing your code? Or at least something that reproduces the issue.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

The question was more to discuss the idea of what I am doing which may be a standard way the Gui`s work.  The code is over 10k lines ling and this issue could be caused by any part of the many functions.  I can close this thread if we cannot discuss a general issue without having code attached.

I was hoping someone may say they have seen this or this is standard behaviour and you simply need to use some sort of break function or adlib function to get out of a list view populate.

i will need to create a test code to emulate what is happening and come back to the forum

Apologies.

 

Link to comment
Share on other sites

  • Moderators

bourny,

Try disabling the combo while a loading process is underway - that way you prevent multiple selection events being queued.

As to breaking into a running load function, have you read the Interrupting a running function tutorial in the Wiki? If there are no suitable breakpoints within the loading code, you could always spawn another process to do the loading and simply kill that process if no longer needed. It would complicate the code somewhat, but it should not prove overly difficult to manage.

M23

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...