John_Miller@mindlink.UUCP (John Miller) (03/21/91)
How does HyperCard handle file pathnames under A/UX, in its "Look For ..." values and in its file handling commands. Does it use the Macintosh ":" specification or does it use the UNIX "/" specification? The sample code in Tech Note #238 (Getting a Full Pathname) checks whether A/UX is running and, if so, switches, to the "/" separator. Yet, I notice that Tech Note #229 (A/UX 2.0 Compatibility Guidelines) states "If you must generate a full or relative pathname, it is best to use a colon as a pathname delimiter because this reduces the chance of ambiguity." I have to parse filenames that are hard-coded in scripts (which in many cases would lean to ":" separators) or generated by HyperCard (ask and answer, the long name of stacks, etc.) ______________________________________________________________________ John Miller (604) 433-1795 Symplex Systems AppleLink (rarely) CDA0461 Burnaby, British Columbia Fax: (604) 430-8516 Canada usenet: john_miller@mindlink.uucp Macintosh Consulting and Software Development ______________________________________________________________________
jkc@Apple.COM (John Kevin Calhoun) (03/24/91)
In article <5223@mindlink.UUCP> John_Miller@mindlink.UUCP (John Miller) writes: >How does HyperCard handle file pathnames under A/UX, in its >"Look For ..." values and in its file handling commands. Does >it use the Macintosh ":" specification or does it use the >UNIX "/" specification? Whenever HyperCard generates a pathname, it uses colons as separators. Therefore, when you use the ask and answer commands, or when you evaluate the value of word 2 of the long name of this stack or line n of the stacks you'll always get a pathname delimited by colons. These pathnames present no problem under A/UX, because the A/UX file manager understands them in the same way the Macintosh file manager does. >I notice that Tech Note #229 (A/UX 2.0 Compatibility Guidelines) states >"If you must generate a full or relative pathname, it is best to use a >colon as a pathname delimiter because this reduces the chance of ambiguity." This is a good guideline, given that A/UX understands both colon-delimited and slash-delimited pathnames while the Mac OS understands only the colon-delimited ones. I can imagine a pathname stored in a file -- a HyperCard stack or an MPW worksheet, for instance -- that's shared by machines running either OS. However, when you run HyperCard under A/UX, you can use pathnames delimited by slashes, if you want, in commands that can take pathnames, such as go, open, close, and picture. HyperCard's internal smarts about pathnames will work just as well. Kevin Calhoun HyperCard Team Apple Computer, Inc.