[comp.sys.mac.hypercard] 3 HyperCard queries

meade@gauss.math.purdue.edu (Doug Meade) (09/13/89)

During the development of an HyperCard (HC) stack I have encountered several
apparent limitations of HC (or my understanding of HC).  I have been able to
temporarily resolve all of the problems, but these solutions are hardly
efficient and certainly not elegant.i
 
Question 1: How can an application (or document) be opened if it contains
a 'non-typeable' character.  For example, the name of the TeX application
created by Blue Sky is

	Textures(TM)

where (TM) is the superscripted trademark symbol.  When I enter the command

	open "File" with "Textures"

in HC, the response is "Where is Textures?" since there is no application
known by the name Textures.  (HC correctly added the appropriate path to
the Applications card of the Home stack.)

I see one solution that involves changing the name of the application to
something that can be typed.  However this seems unacceptable on the grounds
that all my existing documents that were created by Textures(TM) will not
be openable by double-clicking on the icon.  I imagine I could also make the
modifications with ResEdit, but I am really looking for a HC solution.

I would imagine that this has been previously encountered.  How have you
resolved the problem?

Question 2: Is there a simple character replacement command within HC?
I want to be able to say something like

	put replace("str1","str2",field "Name") into field Name1

I have written a couple of functions which implement such a function, but
they are e.x.t.r.e.m.e.l.y   s..l..o..w..!!

Question 3: This brings up the related issue of sharing functions between
more that one button/field without making multiple copies of the commands?
I could see a way of doing this if I could invoke a HyperTalk command that
would execute the script of a different button/field.  For example:

<Script for Button "B1">

	on MouseUp
		put 0 into n 
		repeat while n<10
			do script of button "B2"
			go to next card
			add 1 to n
		end repeat
	end MouseUp

<Script for Button "B2">

	on MouseUp
		.
		.
		.
	end MouseUp

I might also expect to use some form of the  global  command to make the
function names known to a wider scope.

Any assistance on any of these points will be greatly appreciated.  Please
send responses to: meade@math.purdue.edu  I will summarize to the net if
the interest warrants.

Thanks in advance,

Doug Meade
meade@math.purdue.edu
--


Doug Meade
meade@math.purdue.edu	<---  New e-mail address