Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12399

Re: IDL - how to define and call an objects default method ?

Path csiph.com!news.mixmin.net!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From "R.Wieser" <address@not.available>
Newsgroups microsoft.public.scripting.vbscript, comp.os.ms-windows.programmer.win32
Subject Re: IDL - how to define and call an objects default method ?
Date Mon, 7 Feb 2022 10:25:01 +0100
Organization Aioe.org NNTP Server
Lines 38
Message-ID <stqonn$vlf$1@gioia.aioe.org> (permalink)
References <stlrao$18ah$1@gioia.aioe.org> <11xezf8j3kybx$.1b5n7cn4g91t5$.dlg@40tude.net>
Injection-Info gioia.aioe.org; logging-data="32431"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646 Format=Flowed; Original
X-Priority 3
X-Notice Filtered by postfilter v. 0.9.2
X-Newsreader Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority Normal
Xref csiph.com microsoft.public.scripting.vbscript:12399 comp.os.ms-windows.programmer.win32:6309

Cross-posted to 2 groups.

Show key headers only | View raw


JJ,

> Property ID 0 will be the default value of an object.

Thanks.  Initially I though you just ment the first-defined one there, and 
it took me a while to realise you might have ment it literally. :-)

Though it seems that there are a few pitfalls when accessing that default :

The below won't quite do what I thought it would (only figured that out 
after displaying the "typename" of 'MyArray' :-\ ) :

MyArray = 42

I have to use

MyArray() = 42

instead.

And while

wscript.echo MyArray

now (calls the defined PropertyGet) returns its value,

wscript.echo MyArray()

throws an error.  Trying to change the IDLs PropertyGet into a method causes 
a "duplicate definition" error.   Not really funny, having to use two 
different notations for the same thing ...

Any ideas ?

Regards,
Rudy Wieser

Back to microsoft.public.scripting.vbscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

IDL - how to define and call an objects default method ? "R.Wieser" <address@not.available> - 2022-02-05 13:41 +0100
  Re: IDL - how to define and call an objects default method ? JJ <jj4public@gmail.com> - 2022-02-06 23:46 +0700
    Re: IDL - how to define and call an objects default method ? "R.Wieser" <address@not.available> - 2022-02-07 10:25 +0100
      Re: IDL - how to define and call an objects default method ? JJ <jj4public@gmail.com> - 2022-02-08 16:09 +0700
        Re: IDL - how to define and call an objects default method ? "R.Wieser" <address@not.available> - 2022-02-08 14:44 +0100
          Re: IDL - how to define and call an objects default method ? JJ <jj4public@gmail.com> - 2022-02-09 00:11 +0700
            Re: IDL - how to define and call an objects default method ? "R.Wieser" <address@not.available> - 2022-02-08 20:51 +0100
              Re: IDL - how to define and call an objects default method ? Found it. "R.Wieser" <address@not.available> - 2022-02-09 13:11 +0100

csiph-web