Nice work. Here is the way to get rid of "Warning: Cannot prove that 'result' 
is initialized:

1\. Declares mWhichButton as _wCommandID_ type and do the necessary 
modification. 
    
    
    wMyMsgBox = ref object of wFrame
      mWhichButton: wCommandID
    
    ...
    listRuturn: seq[wCommandID] = @[]
    
    
    Run

2\. In proc show(), return wId(self.mWhichButton). 
    
    
    proc show(self: wMyMsgBox): wId {.inline, discardable.} =
      self.showModal()
      return wId(self.mWhichButton)
    
    
    Run

3\. That's all.

In wNim, command ID/control ID/menu ID are the type called **wCommandID**. 
However, we often need to use **enum** to declare the command ID. So convert 
enum to wCommandID (and of course, int to wCommandID) in wNim is automatic by a 
public converter.

Your show() proc returns a **wId** type (it in fact the enum type), so you need 
to convert it from wCommandID back to wId. 

Reply via email to