AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Function] ListManagerGUI v0.01 (Alpha/Preview)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
jballi



Joined: 01 Oct 2005
Posts: 318
Location: Texas, USA

PostPosted: Sun Mar 23, 2008 3:59 am    Post subject: [Function] ListManagerGUI v0.01 (Alpha/Preview) Reply with quote

Introduction
A list is a collection of items with similar characteristics. This could be a list of colors, search parameters, folder names, file extensions, etc., etc. A list without associated properties can be referred to as a simple list. From a data perspective, a simple list is the equivalent of a one-field table or a one-dimensional array. After writing my 3rd or 4th GUI for managing a simple list, I decided to develop a reusable function to do the job.

The ListManagerGUI function has 4 primary modes of operation:
  1. Edit. As the name implies, this mode is for editing a list of items.

  2. Checklist. This mode is for editing a dynamic checklist. It works the same as the Edit mode except that the list includes the check/select status. Adding the check/select status to the table breaks the rules of a simple list but I needed it and I thought others might find it useful...

  3. Select. This mode is for selecting from a list of items.

  4. Display. Ah, you've figured out the pattern... This mode is for displaying a list of items.
The mode also determines what is returned from the function. For the Edit and Checklist modes, all list items are returned. For the Select mode, only the selected items are returned. For the Display mode, nothing is returned.

The function has large number options for customizing how the list is processed and how the window looks and operates. All of the options have been documented in the script.


Screenshots



The Code
The pertinent files are as follows:The example script includes a few static examples and "Custom" option that allows you to build your own example.


Issues/Considerations/Bugs
  • Prototype/Alpha release. Since this a preview release of the function, some of the code has not been optimized and there may be some residual debug code lying around. If there is any interest, these issues will be corrected in future releases.

  • Future stuff. The source may include documentation and/or code for (possible) future options (marked as "[Future]"). These options are either 1) not coded, 2) not working, or 3) have not been fully tested. Please do not use.

  • Functions. This script calls several other functions. For testing and evaluation purposes, the source for these functions has been included in the primary script. In future releases, some of these functions will be moved to separate modules.

  • Hotkey bugs. The ListManagerGUI script includes hotkey definitions. There is a known bug with defining hotkeys with key names that are synonyms to hotkeys that are used by this script. An example of key that has a synonym: Delete and Del. In an attempt at consistency, I tried to always use the longer key name or the name that is on most keyboards. For example: Insert, Delete, and Enter instead of Ins, Del, and Return.

    Although all of the ListManagerGUI hotkeys are context sensitive, this bug will stop one of the affected hotkeys from firing. The workaround is to change the hotkey key names in your script to match the hotkeys key names in this function (or vice versa). For more information, see this post: http://www.autohotkey.com/forum/viewtopic.php?t=26477.

Final Thoughts
Although the defaults in the code will probably work fine for most, they reflect my requirements. Please feel free to modify them for your use.

I hope that someone finds this useful.

---------------------------------------------------------------------------
v0.1 (Alpha/Preview):
Original release.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3615
Location: Belgrade

PostPosted: Mon Mar 24, 2008 9:45 am    Post subject: Reply with quote

Thank you. I always liked the way you do your stuff.
_________________
Back to top
View user's profile Send private message MSN Messenger
n-l-i-d
Guest





PostPosted: Mon Mar 24, 2008 2:08 pm    Post subject: Reply with quote

Wow, I'm impressed!

Surprised

Very readable code and very extensively documented.

The fact that you even built in a check for existing Gui's up to the extent of:

"Error. All 99/100 Gui windows are already in use!"

Cool
Back to top
Tuncay



Joined: 07 Nov 2006
Posts: 383
Location: Berlin

PostPosted: Sat Mar 29, 2008 9:42 pm    Post subject: Reply with quote

Currently, I have no use for your function/library. But it is good to know that something like this is available. I reply here to let you know, that I really like how you detailed documented. Looks very good and thx.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group