Page 1 of 1 1
Topic Options
#27005 - 2002-08-13 03:32 PM IDispatch pointers
NWebster Offline
Lurker

Registered: 2002-08-13
Posts: 1
Loc: Grimsby, United Kingdom
I am a complete newcomer to Kixtart and have been running some of the example texts and have also installed KiXGUI. I am having a problem with some of the examples that use the following piece of code:-

$root = createobject("KixGUI.Desktop")
If Len($root)=0 ; KiXGUI not registered or not present
? "KiXGUI not registered"
Exit 1
EndIf

The Len statement errors with the message "IDispatch pointers not allowed in expressions"

Any ideas ?

I am probably missing something obvious.

Norman Webster

Top
#27006 - 2002-08-13 03:40 PM Re: IDispatch pointers
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Read this thread: error when checking if object was created
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#27007 - 2002-08-13 06:01 PM Re: IDispatch pointers
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
$root is an object, therefore LEN will generate an error. Use either 'IF $root' or 'IF (VARTYPE($root) & 9)' and read the thread referenced by Howard.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.052 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org