AW: how to shorten a case structure?

Tiemo Hollmann TB toolbook at kestner.de
Mon Jun 6 08:55:20 EDT 2011


Is it really that easy? As I thought - the obvious...
Thanks
Tiemo

> -----Ursprüngliche Nachricht-----
> Von: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] Im Auftrag von John Dixon
> Gesendet: Montag, 6. Juni 2011 14:22
> An: use-livecode at lists.runrev.com
> Betreff: RE: how to shorten a case structure?
> 
> 
> on mouseUp
>    put "foo" & random(3) into myVar
>    put (last char of myVar) into whichOne
> 
>    switch whichOne
>       case whichOne
>          put "myFunction" && whichOne
>          break
> 
>    end switch
> end mouseUp
> 
> Maybe ?....
> 
> 
> > From: toolbook at kestner.de
> > To: use-livecode at lists.runrev.com
> > Subject: how to shorten a case structure?
> > Date: Mon, 6 Jun 2011 14:14:12 +0200
> >
> > Hi,
> >
> > I just don't know if I don't see the obvious, or if this is the only way
to
> > go.
> >
> > I have a switch structure, which looks in a shot form like this:
> >
> > Switch myVar
> >
> > case "foo1"
> >
> > myFunction 1
> >
> > case "foo2"
> >
> > myFunction 2
> >
> > etc.
> >
> >
> >
> > very regular 1 to 1, 2 to 2. Is there a way, with "do." or something
like
> > that, to shorten it up to one single case with a variable?
> >
> > Thanks
> >
> > Tiemo
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
subscription
> preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list