ajtruckle / meeting-schedule-assistant-support

Get support for Meeting Schedule Assistant.
https://www.publictalksoftware.co.uk/meeting-schedule-assistant/
5 stars 0 forks source link

Make it easier to Find speakers in the Congregations Database. #102

Open ajtruckle opened 2 months ago

ajtruckle commented 2 months ago

Is your feature request related to a problem? Please describe. In Public Talks it has a Find window:

image

The Congregations database in MSA is missing this feature. So it is tricky when you want to find a speaker, and don't know which congregation he is in.

Describe the solution you'd like I suggest that we add a Find menu item here:

image

This way we should be able to allow the user to cycle through all possible matches (in theory) and would behave in a similar way to PTS.

cengizu commented 2 months ago

Yes, that would be a very good feature!

Ideally a global search feature: MSA-Search

ajtruckle commented 2 months ago

@cengizu that is a nice idea. Although I have never used other controls in a toolbar. I am using the CMFCToolBar control and it seems that this kind of thing is possible:

https://learn.microsoft.com/en-us/cpp/mfc/walkthrough-putting-controls-on-toolbars?view=msvc-170

I am not sure if it is compatible with CDialog derived applications. We will have to investigate! 🥽

ajtruckle commented 2 months ago

@cengizu I am not sure how the mechanics of this approach would work. In Public Talks we had:

And, the scope was specific to the database in question and the type of fields in question:

I appreciate that MSA which a different set of databases to search, but we have to flesh out the logic for doing a search from a single edit box. This is why I would prefer a Find dialog where we have control over the data the user inputs and therefore know which fields to examine etc. I am open to suggestions.

ajtruckle commented 1 month ago

@cengizu Hi, have you given thought to how the GUI would be implemented for this feature? I know you mentioned a text box on the toolbar, but we do have several types of data to search:

cengizu commented 1 month ago

@ajtruckle I can only advise on the GUI, but the most important part is what will happen in the background: which databases the search function will search in and writing the appropriate algorithm for it. Determining what kind of data files to include in the search : xml, binary files etc. The last thing is to decide on the GUI implentetion. But the fact is, if you can achieve it, it will be a huge plus to MSA.

Here is how AI lays it out:

Recommended Approach If the search results are relatively simple and short (e.g., file names, IDs), use a CComboBox in the main dialog or a toolbar. If the results are more complex or require showing more details (e.g., metadata from XML or binary files), use a separate modeless dialog with a CListCtrl.

Backend Implementation for Searching Files Here’s how you can implement the backend logic:

a. Search Functionality:

  1. Reading XML Databases:

    • Use MFC's built-in XML handling classes (e.g., CMarkupor MSXML) to parse XML files.
    • When the user inputs a query, parse the XML files, and search for matches.
  2. Searching Binary Files:

    • Use standard file I/O (ifstream, CFile) to read binary files.
    • Implement a suitable search algorithm depending on the structure of your binary files.
  3. Storing and Filtering Results:

    • Store results in an array or a list (e.g., std::vector<CString>).
    • Filter results based on the input query before displaying them.
  4. Populating the UI with Results:

    • If using a CComboBox, use AddStringto populate results.
    • If using a CListCtrl, use InsertItemand SetItemTextto display details.

b. Event Handling:

Conclusion: For simpler searches: A CComboBoxdrop-down list within the main dialog works well. For complex results: A modeless dialog with a CListCtrlprovides more flexibility and a better user experience.

ajtruckle commented 1 month ago

@cengizu Thanks. I think that we should add a Search toolbar icon. This will show a Find window similar to the PTS one. But, it will have a Search Scope radio option:

We could possibly add other scopes. The window will be modeless. When it finds a match it displays the window with that entry selected.

The window becomes the parent of the Find window. So finding next entry just shows it in this window.

Closing the window will cause Find window to have main window as parent again.

We could add Search toolbar icon menu on the respective windows. This will show the Find window (if not visible) and set the scope automatically.

Hitting Find will always show first match. Hitting Find Next will iterate through the matches.

This is how I think we should do it. And the data it searches matches the fields that PTS searched. But, we would factor for new info that only MSA has that PTS didn't.

Oh, I need to decide if Congregation includes Speaker, or if it should be separate radio choice.