🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17878

Re: VB question: type mismatch

#17878
From: Stu Bloom
Date: Sat, 10 May 2003 19:39
26 lines
1678 bytes

      I think scripters should turn off Option Explicit during script development.




Which goes what every authority in VB development recommends, including Microsoft. Code runs faster when objects are declared with their specific types, plus you get the advantages of Intellisense during coding.

      Many InDesign properties/method return more than one type of data




Impossible. A property or method can only return a single thing, variable or object, which has a specified type. That type can be a generic type, such as Variant or Object, but it's still a single type.

      so declaring a variable as this or that type will almost always lead to
      type mismatch errors




Not if you check the documentation and determine what the return type is when you declare and use the variable. At any event, it's better to identify the errors at compile time than run time.

Stu Bloom
Microsoft Certified Solution Developer
Technical Details
Message-ID: <1de9125c.6@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de9125c.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,2e58c5c8e33c7ae1
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-10 13:07:36 PST
From: "Stu Bloom" <stu@earlvillepost.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: VB question: type mismatch
Message-ID: <1de9125c.6@WebX.la2eafNXanI>
Date: Sat, 10 May 2003 12:39:14 -0700
References: <1de9125c.-1@WebX.la2eafNXanI>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit