void frmContactEditorVendor::SetEditorMode(bool EditMode)
{
+
// Set if the editor is adding or editing an address.
// FALSE = Add
// TRUE = Edit
striter = VendorListElementPtr->find(VendorListIndex);
- if (striter->first == VendorListIndex){
+ if (striter->first == VendorListIndex &&
+ striter != VendorListElementPtr->end()){
strValue = striter->second;
striter = VendorListPtr->find(VendorListIndex);
- if (striter->first == VendorListIndex){
+ if (striter->first == VendorListIndex &&
+ striter != VendorListPtr->end()){
strValue = striter->second;
void frmContactEditorVendor::ProcessAction( wxCommandEvent& event )
{
+ // Process action.
+
if (EditorMode == FALSE){
wxString strValue;
wxListCtrl *VendorListCtrl,
int VendorIndex )
{
-
+ // Setup the pointers.
+
VendorListPtr = VendorList;
VendorListPENPtr = VendorListPEN;
VendorListElementPtr = VendorListElement;
void frmContactEditorVendor::CloseWindow( wxCommandEvent& event )
{
+
+ // Close the window.
+
this->Close();
+
}