Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Error XS0173 Type of IIF expression cannot be determined 16 Aug 2022 22:40 #23322

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1615
  • Consider this line:
    cAttachPath := Iif(Self:lEWMvalid, Self:oMailSends:oEWM:cSaveAttachmentPath, "")

    This gives:

    Error XS0173 Type of IIF expression cannot be determined because there is no implicit conversion between '?' and 'string'

    What's actually happening here is that oEWM was not declared (outcommented from converted code) within the class assigned to variable Self:oMailSends.

    I can imagine some logic in the error message but it would be a lot clearer if the compiler could directly tell that it can't find oEWM. Maybe warning XS9073? The tooltip says Undeclared.

    Dick

    Please Log in or Create an account to join the conversation.

    Error XS0173 Type of IIF expression cannot be determined 17 Aug 2022 01:19 #23325

    • Chris
    • Chris's Avatar


  • Posts: 3856
  • Hi Dick,

    What is oMailSends declrared as?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Error XS0173 Type of IIF expression cannot be determined 17 Aug 2022 12:17 #23337

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1615
  • Hello Chris,

    This is a class which opens emails.dbf, reads the account data from a setting file and more using a set of protected variables.

    In the VO version we have the class variables include oEWM which is a reference to a splitwindow in which we show the mails. This is (yet) not defined in X#. SO I just wondered why the compiler doesn't directly tell me that oEWM is unknown within this line of code.

    Dick

    Please Log in or Create an account to join the conversation.

    Last edit: by ic2.

    Error XS0173 Type of IIF expression cannot be determined 17 Aug 2022 15:56 #23340

    • Chris
    • Chris's Avatar


  • Posts: 3856
  • Hi Dick,

    I meant how is the iVar "oMailSends" itself defined? What is the exact line of code where it is declared?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Error XS0173 Type of IIF expression cannot be determined 17 Aug 2022 16:10 #23341

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1615
  • Hello Chris,

    Like this:
    oEmailForm := NewEmail{Self, oCKEmail, cFromAccount, cSendType, lEverything, cRecordList}
    oEmailForm:Show()
    
    .......
    
    Public Constructor(oCaller As MailSends, oInEmail As Chilkat.Email, cFromAccount As String, cSendType As String, lEverything As Logic, cRecordList As String) Strict Class NewMail
    InitializeComponent()
    Self:oMailSends := oCaller


    Dick

    Please Log in or Create an account to join the conversation.

    Error XS0173 Type of IIF expression cannot be determined 17 Aug 2022 16:34 #23343

    • robert
    • robert's Avatar


  • Posts: 3448
  • Dick,
    Chris wants to know how the instance variable oMailSend is defined.
    Like:
    EXPORT oMailSends as MailSends
    or
    EXPORT oMailSends as OBJECT

    If oMailSends is declared AS OBJECT then the compiler does know that oEWM is a commented out property of the MailSends class.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Error XS0173 Type of IIF expression cannot be determined 17 Aug 2022 16:55 #23344

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1615
  • Hello Robert,

    Ah, of course. Like this:

    PROTECTED oMailSends AS MailSends

    I would say the compiler should then see & tell that oEWM is not defined in MailSends.

    It's not a big deal but that error would have been a lot clearer.

    Dick

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1