Using groups as custom dialogs: a solution for Mac, PC and iOS
Chipp Walters
chipp at chipp.com
Sat Jul 9 04:20:22 EDT 2011
Here's one for you, Dick..
In the above mentioned stack there's this part of a script, which is used to
pass the function params onto a handler:
*if* the paramcount = 0 *then*
*send* "initMe" to tObj
*else*
*repeat* with x=1 to the paramcount
*put* "param(" &x& ")," after tParams
*end* *repeat*
*delete* last char of tParams
*put* "send " "e&"initMe " & tParams "e& " to tObj" into tDo
*do* tDo
*end* *if*
*
*
*Is there a way to do this without having to 'do' the script?*
On Sat, Jul 9, 2011 at 3:07 AM, Dick Kriesel <dick.kriesel at mail.com> wrote:
> As an example, suppose your function takes a default color.
>
> on mouseUp
> local tString = "green"
> set the backcolor of grc "test" to value("altAnswerColor(tString)",long id
> of stack "altAnswerColor")
> -- or equivalently:
> set the backcolor of grc "test" to value("altAnswerColor(" & quote &
> "green" & quote & )",long id of stack "altAnswerColor")
> end color1
>
> Does that answer your question, Chipp?
>
> -- Dick
>
>
> On Jul 8, 2011, at 10:57 PM, Chipp Walters wrote:
>
> > Cool, Dick! How would one pass quoted vars to that thing?
> >
> > On Sat, Jul 9, 2011 at 12:54 AM, Dick Kriesel <dick.kriesel at mail.com>
> wrote:
> >
> >> On Jul 8, 2011, at 4:17 PM, Chipp Walters wrote:
> >>
> >>> on mouseUp
> >>> start using stack "altAnswerColor"
> >>> get altAnswerColor()
> >>> set the backcolor of grc "test" to it
> >>> stop using stack "altAnswerColor"
> >>> end mouseUp
> >>>
> >>> Sure, two extra lines,
> >>
> >>
> >> Want to use fewer lines, Chipp? How about this?
> >>
> >> on mouseUp
> >> set the backcolor of grc "test" to value("altAnswerColor()",long id of
> >> stack "altAnswerColor")
> >> end mouseUp
> >>
> >> -- Dick
> >>
> >>
> >> _______________________________________________
> >> 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
> >>
> >
> >
> >
> > --
> > Chipp Walters
> > CEO, Shafer Walters Group, Inc.
> > _______________________________________________
> > 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
>
--
Chipp Walters
CEO, Shafer Walters Group, Inc.
More information about the use-livecode
mailing list