07-02-2008 11:49 AM
Geoff, I don't mean to be obtuse but I didn't understand some of your questions.
"I'd like to know that a single statment can reliable return the "real" current list - the list the USER thinks of as "current"."
I would use ContactListPlus.ACTAPP.ApplicationState.CurrentContactList. This list is updated by the ACT UI. It has been 100% reliable for me in Contact List Plus thru 4 version of ACT!. When have you found this list to be unreliable? Why would the user think 'his/her' list is different then this internal list?
The CurrentContactList , CurrentGroupList, and CurrentCompanyList will be nothing until the view is initiated. By defeult, these views are buffered on startup. I have not found any other times that these lists are nothing.
I use the CurrentContactListChanged Event to track the current contact list. I am almost positive that the CurrentContactList is bound directly to the dataGrid on the Contact List view. ( ATC programmers type guys... is that a true statement?)
So whatever appears on that Contact List view is in the CurrentContactList object. BTW- The CurrentContactList is actually a virtual lists with only the Contact.ID field populated from the SQL query. When the GridRow control becomes visible on the list then the rest of the fields are pulled from the SWL server and the grid cells are populated or when editing the contact.
On startup I would add the handler
AddHandler ACTAPP.CurrentContactListChanged, AddressOf ACTAPP_CurrentContactListChanged
The whenever the user invokes any ACT UI that changes the CurrentContactList this routing is called.
Private Sub ACTAPP_CurrentContactListChanged() Dim cContact As Act.Framework.Contacts.Contact '------------------------------------------ ' Check for the meaning of nothingness '------------------------------------------ IF not ContactListPlus.ACTAPP.ApplicationState.CurrentContactList is nothing For Each cContact In ContactListPlus.ACTAPP.ApplicationState.CurrentContactList ' new doo foo code Next else Throw New ExceptionCustom.ACTObjectIsNull("ACT CurrentContactList object is null.") endif End Sub
Hope this helps
-- jim durkin
07-02-2008 12:13 PM
I guess its time to close this thread. Everyone else seems to experience the ApplicationState.CurrentContactList as always providing a reliable list of the "current lookup". So, i must have been doing something funky that left me with unreliable results. I'll let it rest unless and until a user reports similar behavior in the future, and I have more up-to-date code and experience to look at.
Thanks everyone for your insights and help!
Good night, moon!