Index: /extensions/pLoader/trunk/src/Uploader/GUI/DlgCommon.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/DlgCommon.pm	(revision 5565)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/DlgCommon.pm	(revision 5566)
@@ -40,14 +40,14 @@
     # to connect the right event handler to each control
     my $ctrl_handlers = {
-        'Wx::SpinCtrl' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_SPINCTRL( $ctrl, $ctrl, sub { $self->OnSpinCtrl(@_) } ); },
         'Wx::TextCtrl' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_TEXT( $ctrl, $ctrl, sub { $self->OnTextCtrl(@_) } ); },
-        'Wx::Choice' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_CHOICE( $ctrl, $ctrl, sub { $self->OnChoice(@_) } ); },
+        'Wx::Choice'   => sub { my ( $ctrl ) = @_; Wx::Event::EVT_CHOICE( $ctrl, $ctrl, sub { $self->OnChoice(@_) } ); },
         'Wx::RadioBox' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_RADIOBOX( $ctrl, $ctrl, sub { $self->OnRadioBox(@_) } ); },
         'Wx::CheckBox' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_CHECKBOX( $ctrl, $ctrl, sub { $self->OnCheckBox(@_) } ); },
-        'Wx::DatePickerCtrl' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_DATE_CHANGED( $ctrl, $ctrl, sub { $self->OnDatePicker(@_) } ); },
+        'Wx::SpinCtrl' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_SPINCTRL( $ctrl, $ctrl, sub { $self->OnSpinCtrl(@_) } ); },
         'Wx::ComboBox' => sub { my ( $ctrl ) = @_;
                               Wx::Event::EVT_COMBOBOX( $ctrl, $ctrl, sub { $self->OnComboBox(@_) } );
                               Wx::Event::EVT_TEXT( $ctrl, $ctrl, sub { $self->OnComboBoxText(@_) } );
                           },
+        'Wx::DatePickerCtrl' => sub { my ( $ctrl ) = @_; Wx::Event::EVT_DATE_CHANGED( $ctrl, $ctrl, sub { $self->OnDatePicker(@_) } ); },
         'Uploader::GUI::wxCategoryTreeCtrl' => sub { my ( $ctrl ) = @_;
                                                    Wx::Event::EVT_TREE_SEL_CHANGED(
@@ -101,9 +101,9 @@
 
     # text changed by user, not selection
-    if( -1 eq $ctrl->GetSelection){
+    if( $ctrl->GetValue ne $ctrl->GetStringSelection){
        my $id = $ctrl->GetId;
         # change the property value
         $self->properties->{$id}->{value}->(
-            $event->GetString
+            $ctrl->GetValue
         ) if exists $self->properties->{$id}->{value};
 
@@ -116,85 +116,4 @@
 
 
-# what does happen when the text changes
-sub OnTextCtrl {
-    my ( $self, $ctrl, $event ) = @_;
-    
-    my $id = $ctrl->GetId;
-    # change the property value
-    $self->properties->{$id}->{value}->(
-        $event->GetString
-    ) if exists $self->properties->{$id}->{value};
-
-    # exec the callback
-    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
-        $self->properties->{$id}->{frame_callback};    
-    
-}
-
-sub OnSpinCtrl {
-    my ( $self, $ctrl, $event ) = @_;
-    
-    my $id = $ctrl->GetId;
-    # change the property value
-    $self->properties->{$id}->{value}->(
-        $event->GetInt
-    ) if exists $self->properties->{$id}->{value};
-
-    # exec the callback
-    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
-        $self->properties->{$id}->{frame_callback};    
-    
-    $event->Skip;
-}
-
-sub OnRadioBox {
-    my ( $self, $ctrl, $event ) = @_;
-    
-    my $id = $ctrl->GetId;
-
-    # if a preprocess value is required
-    my $value = $event->GetSelection;
-    $value = $self->properties->{$id}->{pre_process}->( $value ) if exists
-        $self->properties->{$id}->{pre_process};    
-    # change the property value. use the index selection
-    $self->properties->{$id}->{selection}->(
-        $value
-    ) if exists $self->properties->{$id}->{selection};
-
-    # exec the callback
-    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
-        $self->properties->{$id}->{frame_callback};    
-    
-    $event->Skip;
-
-}
-
-sub OnChoice {
-    my ( $self, $ctrl, $event ) = @_;
-    
-    my $id = $ctrl->GetId;
-
-    # if a preprocess value is required
-    my $value = exists $self->properties->{$id}->{string_selection} ? $event->GetString : $event->GetSelection;
-    $value = $self->properties->{$id}->{pre_process}->( $value ) if exists
-        $self->properties->{$id}->{pre_process};    
-    # change the property value. use the index selection
-    $self->properties->{$id}->{selection}->(
-        $value
-    ) if exists $self->properties->{$id}->{selection};
-
-    # change the property value. use the string
-    $self->properties->{$id}->{string_selection}->(
-        $value
-    ) if exists $self->properties->{$id}->{string_selection};
-
-    # exec the callback
-    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
-        $self->properties->{$id}->{frame_callback};    
-    
-    $event->Skip;
-}
-
-
 sub OnComboBox {
     my ( $self, $ctrl, $event ) = @_;
@@ -205,5 +124,5 @@
         if exists $self->properties->{$id}->{multi_selection_mode};
 
-    my $selection = exists $self->properties->{$id}->{string_selection} ? $event->GetString : $event->GetSelection;
+    my $selection = exists $self->properties->{$id}->{string_selection} ? $ctrl->GetValue : $ctrl->GetSelection;
 
     my $value = $self->properties->{$id}->{pre_process}->( $selection ) if exists
@@ -224,4 +143,85 @@
     $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
         $self->properties->{$id}->{frame_callback};    
+}
+
+
+# what does happen when the text changes
+sub OnTextCtrl {
+    my ( $self, $ctrl, $event ) = @_;
+    
+    my $id = $ctrl->GetId;
+    # change the property value
+    $self->properties->{$id}->{value}->(
+        $event->GetString
+    ) if exists $self->properties->{$id}->{value};
+
+    # exec the callback
+    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
+        $self->properties->{$id}->{frame_callback};    
+    
+}
+
+sub OnSpinCtrl {
+    my ( $self, $ctrl, $event ) = @_;
+    
+    my $id = $ctrl->GetId;
+    # change the property value
+    $self->properties->{$id}->{value}->(
+        $event->GetInt
+    ) if exists $self->properties->{$id}->{value};
+
+    # exec the callback
+    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
+        $self->properties->{$id}->{frame_callback};    
+    
+    $event->Skip;
+}
+
+sub OnRadioBox {
+    my ( $self, $ctrl, $event ) = @_;
+    
+    my $id = $ctrl->GetId;
+
+    # if a preprocess value is required
+    my $value = $event->GetSelection;
+    $value = $self->properties->{$id}->{pre_process}->( $value ) if exists
+        $self->properties->{$id}->{pre_process};    
+    # change the property value. use the index selection
+    $self->properties->{$id}->{selection}->(
+        $value
+    ) if exists $self->properties->{$id}->{selection};
+
+    # exec the callback
+    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
+        $self->properties->{$id}->{frame_callback};    
+    
+    $event->Skip;
+
+}
+
+sub OnChoice {
+    my ( $self, $ctrl, $event ) = @_;
+    
+    my $id = $ctrl->GetId;
+
+    # if a preprocess value is required
+    my $value = exists $self->properties->{$id}->{string_selection} ? $event->GetString : $event->GetSelection;
+    $value = $self->properties->{$id}->{pre_process}->( $value ) if exists
+        $self->properties->{$id}->{pre_process};    
+    # change the property value. use the index selection
+    $self->properties->{$id}->{selection}->(
+        $value
+    ) if exists $self->properties->{$id}->{selection};
+
+    # change the property value. use the string
+    $self->properties->{$id}->{string_selection}->(
+        $value
+    ) if exists $self->properties->{$id}->{string_selection};
+
+    # exec the callback
+    $self->properties->{$id}->{frame_callback}->($self, $ctrl, $event) if exists
+        $self->properties->{$id}->{frame_callback};    
+    
+    $event->Skip;
 }
 
