Article View: adobe.scripting.indesign
Article #17880Re: VB question: type mismatch
From: maxdunn
Date: Sat, 10 May 2003 21:21
Date: Sat, 10 May 2003 21:21
13 lines
2368 bytes
2368 bytes
Are they also scared of Hungarian notation? I get sick of seeing "my" at the beginning of every variable name in examples, it seems redundant and silly (I'd prefer "o", "obj", "v", etc. if you're going to use the same prefix for everything). But perhaps the "my" prefix introduces the concept of a variable? I would think the best solution to the "to Dim or not to Dim" question would be: (1) For advanced discussion, technical documentation, include a VB example, using Option Explicit. (2) For introductory discussion, bare-bones examples, use VB Script examples. I think in any substantive document, i.e. documentation, you would definitely want both an Option Explicit VB example and a VB Script example. Declaring objects in VB helps those of us coming to InDesign from a programming perspective learn the InDesign objects more quickly and gives us a better understanding of the InDesign object model. Strongly typed VB is a nice middle ground between C++ and VB Script. I would think any company, even a graphic arts company, who maintains a code base for automating InDesign on a Windows platform, would want to use Option Explicit VB over VB Script (or VB without using "Dim"). And certainly for a company doing this VB makes more sense than C++, as it is infinitely easier to find someone to update/maintain VB code than C++. Graphic artists should think long term: copy the silly "Dim bit" for now and figure it out later. Then their code will scale. The most important skill for a graphic artist starting out scripting is copy and paste.
Technical Details
Message-ID:
<1de9125c.8@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<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 14:37:39 PST From: maxdunn <maxdunn@siliconpublishing.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.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.8@WebX.la2eafNXanI> Date: Sat, 10 May 2003 14:21:58 -0700 References: <1de9125c.-1@WebX.la2eafNXanI> Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit