home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- Path: sparky!uunet!nwnexus!tbenedic
- From: Tom Benedict <tbenedic@halcyon.com>
- Subject: Re: ItemDelimiter property in HC 2.1
- Message-ID: <oNTiwB1w165w@halcyon.com>
- Originator: bbs@halcyon.com
- Sender: sso@nwnexus.WA.COM (System Security Officer)
- Organization: The 23:00 News and Mail Service
- References: <1992Dec28.140110.16639@vax5.cit.cornell.edu>
- Date: Tue, 29 Dec 1992 01:50:59 GMT
- Lines: 30
-
- vry@vax5.cit.cornell.edu writes:
-
- > Does anyone out there know about the ItemDelimiter property in HC 2.1?
- > Someone told me it existed, but I haven't been able to find any documentation
- > on it, and it sounds like something I could really use. If you know about it
- > then please e-mail me at vry@cornella.cit.cornell.edu. Thanks.
- >
- > Victor Chavarria
-
- You can use the itemDelimiter property in HyperCard 2.1 to specify, for
- the duration of the handler, the character that HyperCard should
- recognize as delimiting the 'item' chunk.
- this means that you can parse a short file name out of the long path name
- "My Disk:HyperCard 2.1:My Stacks:theStackName" with the following
- function:
- function shortFileName str
- set itemDelimiter to ":"
- get last item of str
- set itemDelimiter to comma
- return it
- end shortFileName
-
- Note that even though the itemDelimiter is reset to comma on idle, I
- explicitly set it back to comma within the function because the handler
- which calls shortFileName may do some item manipulation that expects
- comma delmited chunks.
-
- the itemDelimiter property is very useful.
-
- Tom Benedict
-