Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verification for the creation of an object
Message
From
09/07/2001 07:49:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/07/2001 01:19:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00528001
Message ID:
00528032
Views:
20
>Assuming we create an object, such as:
>
>
>loProcess=CREATE("UniversalThread",loServer)
>
>
>Why would there be a need to verify this:
>
>
>IF VARTYPE(loProcess)#"O"
>   *** All we can do is return...
>   WAIT WINDOW NOWAIT "Unable to create Process object..."
>   RETURN .F.
>ENDIF
>
>
>if the same program who fires those lines contains the following:
>
>
>DEFINE CLASS UniversalThread AS wwProcess
>
>
>I am wondering in which situation it could failed.

Michel,
-You might edit wwProcess subclass to return .f. in init.
-w/o editing init at all default init code checks if it has Response object or can create it and if messaging type is 'file' a valid outputfile exists or not.
loServer in chain could also fail within edited SetServerEnvironment returning .f.
Those could return an .f. from init not instantiating the UT class at all.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform