Need advice to check exist of object.

Need advice to check exist of object.

Postby Horizon » Thu Jul 13, 2017 7:56 pm

Hi,

I have checked this manually.

Code: Select all  Expand view
IF VALTYPE(oSelf)="O"
    IF VALTYPE(oSelf:oParent)="O"
        IF VALTYPE(oSelf:oParent:oCargo)="O"
            IF VALTYPE(oSelf:oParent:oCargo:oMHY_Kod)="O"
                oSelf:oParent:oCargo:oMHY_Kod:SetItems(.....)
            ENDIF
        ENDIF
    ENDIF
ENDIF
 


Is there any function/method to check it another way?

Thanks,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Need advice to check exist of object.

Postby hmpaquito » Thu Jul 13, 2017 9:27 pm

Bad programming style, but running...

TRY
   oSelf:oParent:oCargo:oMHY_Kod:SetItems(.....)
END
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Need advice to check exist of object.

Postby Horizon » Fri Jul 14, 2017 9:30 am

hmpaquito wrote:Bad programming style, but running...

TRY
   oSelf:oParent:oCargo:oMHY_Kod:SetItems(.....)
END


Thanks
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 24 guests