I have 2 radio buttons in a page, I don't know why the states of the 2 radio buttons are set to 1 or 0 at the same time, which are checked in 'pageLeave' function, even if only 1 button is selected. Here is the function for the page. Please help. Thanks in advance.
unction OptionServerClient
nsDialogs::Create /NOUNLOAD 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
${NSD_CreateGroupBox} 0u 13u 85% 45% "Please select one of the following installation options:"
Pop $0
!define NSD_ADD_STYLE ${WS_GROUP}
${NSD_CreateRadioButton} 10 25u 40% 12u "&Server"
Pop $RadioButtonServer
${NSD_AddStyle} $RadioButtonServer ${WS_GROUP}
MessageBox MB_OK "$$RadioButtonServer_State=$RadioButtonServer_State $$RadioButtonClient_State=$RadioButtonClient_State$\n"
${If} $RadioButtonClient_State != 1
SendMessage $RadioButtonServer ${BM_SETCHECK} ${BST_CHECKED} 0
${EndIf}
${NSD_CreateRadioButton} 10 45u 40% 12u "&Client"
Pop $RadioButtonClient
${NSD_AddStyle} $RadioButtonClient ${WS_GROUP}
; ${NSD_SetState} $RadioButtonClient ${BST_UNCHECKED}
# alternative for the above ${If}:
#${NSD_SetState} $Checkbox_State
nsDialogs::Show
FunctionEnd
Function OptionServerClientPageLeave
${NSD_GetState} $RadioButtonServer $RadioButtonServer_State
${NSD_GetState} $RadioButtonServer $RadioButtonClient_State
MessageBox MB_OK "$RadioButtonServer_State - $RadioButtonClient_State$\n"
FunctionEnd