Geoff,

You can easily do what you suggested in Question 3. All you need to do is
build another stack to modify mod.app. This stack could have a field and a
button that work as follows:

- User types the new text for testProperty into the field, called "Property
value"
- Button has the script:

on mouseUp
  set the textProperty of stack "mod.app" to the text of fld "Property
value"
  save stack "mod.app"
end mouseUp

Type some text into field "Property value" and click the button. Now open
stack mod.app and click the button. The new textProperty value should appear
in the field. It's really that simple.

The only caveat (and on rereading your message, I guess this is where your
difficulty lies) is that mod.app cannot be a standalone (.EXE) stack, so it
would need to be distributed with an EXE file to start it up, or rebuilt as
a standalone after the modifications are made. But I don't think your
customers would be able to build standalones themselves without a licensed
copy of Metacard, which leaves you back at having your customer distribute
two files -- one of which is a standalone that doesn't have to do anything
but open the customized stack. Why is it a problem for your customers to
distribute two files instead of one?

Regards,
Marni

> Not quite--I don't want my user to have to give _his/her_ 
> user two files. 
> Here's a more concrete example. (Again, apologies, since I 
> obviously have 
> yet to make this clear)
> 
> I just created a small stack with one button, one field, and 
> one custom 
> property.
> 
> The custom property, called "testProperty," contained the 
> text, "This is 
> the really the text to modify"  --that's not a typo in this email, I 
> actually typed it that way in the property by accident.
> 
> The button's script was,
> 
> on mouseUp
>   put the testProperty of this stack into fld 1
> end mouseUp
> 
> I built the stack into an application, Mod.app. When I ran 
> Mod.app and 
> clicked the button, the text, "This is the really the text to 
> modify," 
> appeared in the field. I quit.
> 
> I then opened the application with BBEdit, and searched for the text, 
> "This is the really the text to modify." When I found it, I 
> changed it 
> to, "This is some dangerous text to modify." (note the identical 
> character length)
> 
> I saved Mod.app out of BBEdit, and quit BBEdit.
> 
> I ran Mod.app, and clicked the button. Voila! the field 
> contained "This 
> is some dangerous text to modify."
> 
> My questions are:
> 
> 1. Is this dangerous? (obviously, yes)
> 2. Is there a way to write another MetaCard application to do 
> this? (also 
> obviously, yes--a MetaCard application could do the same 
> thing I did with 
> BBEdit--the file can be read/written as binary if necessary)
> 3. Is there a better way to do this with a MetaCard 
> application? In other 
> words, is it possible with a MetaCard application to do this with 
> something like,
> 
> Set the testProperty of application "Mod.app" to "This is 
> some dangerous 
> text to modify."
> 
> I'm assuming the answer to 3 is no.
> 4. If I write an application to go in and hack the string, as 
> in 2, does 
> the string have to stay the same length? (my guess would be yes, but 
> obviously this is dependant on MetaCard's internal data 
> structures, and 
> so is more of a question for Kevin or Scott)
> 
> Thanks
> 
> 
> 
> Geoff Canyon
> [EMAIL PROTECTED]
> Your child can learn to read using the classics of children's 
> literature.
> Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>
> 
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.

Reply via email to