[comp.sys.mac.hypercard] a new button is called "New Button"

moore@cs.washington.edu (Charles Moore) (02/16/90)

In article <46@exodus.Eng.Sun.COM>, woodard@troll.sun.com (Mike &) writes:
> 
> Also, is there a way to specify a newly created object?
> How can I name, or otherwise talk about something thats
> brand new?
> 
> doMenu "New Button"
> set the name of button ??? to "junk"

When you create a new button it's name is initially set to "New Button".
Thus, the command you want is:

set the name of button "New Button" to "junk"

Something similar should work for new cards and new fields.

Charles

rieman@boulder.Colorado.EDU (John Rieman) (02/17/90)

In article <10752@june.cs.washington.edu> moore@cs.washington.edu (Charles Moore) writes:
>In article <46@exodus.Eng.Sun.COM>, woodard@troll.sun.com (Mike &) writes:
>> 
>> Also, is there a way to specify a newly created object?
>> How can I name, or otherwise talk about something thats
>> brand new? ...
>
>When you create a new button it's name is initially set to "New Button".
>Thus, the command you want is:
>
>set the name of button "New Button" to "junk"
> ...

Safer is:

  set the name of card button the number of card buttons to "junk"

That way you'll always get the most recent button.  With "New Button" 
you might get an earlier button that you hadn't renamed.  Works for
fields too, of course.

-john
rieman@boulder.colorado.edu
U. of Colo.

gall@yunexus.UUCP (Norm Gall) (02/17/90)

rieman@boulder.Colorado.EDU (John Rieman) writes:

| In article <10752@june.cs.washington.edu> moore@cs.washington.edu (Charles Moore) writes:
| >In article <46@exodus.Eng.Sun.COM>, woodard@troll.sun.com (Mike &) writes:
| >> 
| >> Also, is there a way to specify a newly created object?
| >> How can I name, or otherwise talk about something thats
| >> brand new? ...
| >
| >When you create a new button it's name is initially set to "New Button".
| >Thus, the command you want is:
| >
| >set the name of button "New Button" to "junk"
| > ...

| Safer is:

|   set the name of card button the number of card buttons to "junk"

How about:

set the name of last cd btn to junk

nrg
-- 
"The  mythology  of the  language   machine  is  the   mythology  of a
technologically advanced society which has not yet  come to terms with
its own linguistic self-awareness."  			  -- R. Harris

martin@m2.csc.ti.com (Steven Martin) (02/17/90)

In article <17048@boulder.Colorado.EDU> rieman@boulder.Colorado.EDU (John Rieman) writes:
>In article <10752@june.cs.washington.edu> moore@cs.washington.edu (Charles Moore) writes:
>>In article <46@exodus.Eng.Sun.COM>, woodard@troll.sun.com (Mike &) writes:
>>> 
>>> Also, is there a way to specify a newly created object?
>>set the name of button "New Button" to "junk"
>Safer is:
>  set the name of card button the number of card buttons to "junk"

Shorter is:

  set the name of last card button to "junk"

Steve Martin            USENET: {ctvax,im4u,texsun,rice}!ti-csl!martin
                        ARPANET: SMARTIN@CSC.TI.COM  COMPUSERVE: 72727,1471
                        GENIE: S.MARTIN8    PHONE: (214)-995-0387, 404-1061
I'll have four whole fried chickens and a Coke. -Jake Blues