Page 1 of 1 1
Topic Options
#101084 - 2003-05-18 04:36 AM weird stuff with object's vartypename()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure why this seems weird to me but got stuck with it while playing with win installer object.

here is the test code:
code:
"KIX :" @kix ?
$any_object=CreateObject("kixtart.forms")
vartypename("some") ?
vartypename(CreateObject("kixtart.forms")) ?
vartypename($any_object.button) ?

which has a result of:
quote:
KIX :4.21 Release Candidate 2
String
Empty

and crash bung bang!
"error missing required" ...blaah blaah... "on line 5"

is this weird or am I weird?
or both?
_________________________
!

download KiXnet

Top
#101085 - 2003-05-18 04:41 AM Re: weird stuff with object's vartypename()
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You can't call a method or property of an undefined object.

-2147221005 Invalid class stringString

on $any_object=CreateObject("kixtart.forms")

[ 18. May 2003, 04:44: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#101086 - 2003-05-18 04:51 AM Re: weird stuff with object's vartypename()
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Try: $any_object=CreateObject("kixtart.form") without the "s".
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#101087 - 2003-05-18 04:58 AM Re: weird stuff with object's vartypename()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sorry, typo.
code indeed should be:
code:
"KIX :" @kix ?
$any_object=CreateObject("kixtart.form")
vartypename("some") ?
vartypename(CreateObject("kixtart.form")) ?
vartypename($any_object.button) ?

and results accordingly:
quote:

KIX :4.21 Release Candidate 2
String
Object
_

crash bang bung.
_________________________
!

download KiXnet

Top
#101088 - 2003-05-18 07:44 AM Re: weird stuff with object's vartypename()
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
code:
"KIX :" @kix ?
$any_object=CreateObject("kixtart.form")
vartypename("some") ?
vartypename(CreateObject("kixtart.form")) ?
vartypename($any_object.button) ?

Gives me:
KIX :4.21
String
Object

ERROR : invalid method/function call: missing ')'!
Script: C:\temp\test.kix
Line : 5

code:
"KIX :" @kix ?
$any_object=CreateObject("kixtart.form")
vartypename("some") ?
vartypename(CreateObject("kixtart.form")) ?
vartypename(($any_object.button)) ?

Gives me:
KIX :4.21
String
Object
Object

Top
#101089 - 2003-05-19 12:21 AM Re: weird stuff with object's vartypename()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes.
it didn't ask for ()
it complained as if there was missing bracket at the end or something.

and the weirdness comes that all other vartypes can be thrown to vartypename directly but object gives crashbang.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

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

Generated in 0.057 seconds in which 0.028 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