A couple of graphic object questions

Jan Schenkel janschenkel at yahoo.com
Mon Jan 12 07:43:03 EST 2004


--- Doug Lerner <doug at webcrossing.com> wrote:
> On 1/12/04 9:24 PM, "Jan Schenkel"
> <janschenkel at yahoo.com> wrote:
> > 
> > When an object is created, the engine will send a
> > message : 'newField' for fields, 'newGraphic' for
> > graphics, etc.
> 
> When it does that, how can I reference the "new
> graphic"?
> 

Either as 'graphic -1', or you can check 'the target'
on newGraphic -- that should give you the name of the
graphic that was just created.
You can trap the newGraphic message in the card script
for example, and do your thing from there.

> > 
> > As for a convenient list : you can address
> graphics by
> > number, so to get a list of their long IDs, you
> would
> > do something like.
> > --
> > repeat with i = 1 to the number of graphics
> > put the long id of graphic i & return after \
> >     tLongIDList
> > end repeat
> > --
> > 
> 
> Is the "number of graphics" the number of graphics
> on a card?
> 

Indeed, if you don't specify any further, the engine
assumes you want the number of graphics on the current
card of the current stack.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


More information about the use-livecode mailing list