Alternatives to "answer"

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Alternatives to "answer"

tbodine
Hi LiveCoders.

I'm working on my first real LC project and now I've dug myself into my first LC hole. Hoping for some advice...

I want to present user with a dialog box that is more attractive than the standard "answer" command. (Bigger type, transparent, icon buttons). I tried making a separate card in a separate stack that I could open over my mainStack card, but that is creating lots of errors now with "can't find card" messages when I use:

call processingHandler of card "Main" of stack "Top".

Basically, I want a semitransparent dialog box with two buttons to open over a mainStack card. The user's button choice needs to be returned to the mainStack script and the dlog Card closed.

Any suggestions on how to do this?

Thanks!
Tom Bodine
Reply | Threaded
Open this post in threaded view
|

Re: Alternatives to "answer"

slylabs13
Use the dialogData. You can set it to whatever you want in the "dialog" stack, and then retrieve it in your main stack. The dialogData is a global property you can set and get throughout the IDE or runtime environment.

Also make your stack modal, meaning it must be dismissed before the user can click anywhere else.

Don't call a procedure in an unopened stack (unless it's script has been inserted into the frontScript or backScript, and that still doesn't open the stack to display the card. You still have to GO to the stack to do that.)

That no workie nohow. Just go to the stack and have the openStack handler of your "dialog" stack call whatever procedure you have, or just have the openStack handler BE the procedure.

Bob


On Apr 29, 2011, at 3:37 PM, tbodine wrote:

> Hi LiveCoders.
>
> I'm working on my first real LC project and now I've dug myself into my
> first LC hole. Hoping for some advice...
>
> I want to present user with a dialog box that is more attractive than the
> standard "answer" command. (Bigger type, transparent, icon buttons). I tried
> making a separate card in a separate stack that I could open over my
> mainStack card, but that is creating lots of errors now with "can't find
> card" messages when I use:
>
> call processingHandler of card "Main" of stack "Top".
>
> Basically, I want a semitransparent dialog box with two buttons to open over
> a mainStack card. The user's button choice needs to be returned to the
> mainStack script and the dlog Card closed.
>
> Any suggestions on how to do this?
>
> Thanks!
> Tom Bodine
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Alternatives-to-answer-tp3484779p3484779.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Alternatives to "answer"

Peter Haworth-2
What Bob said.

In addition to using the dialogData to return the user's choice to you, you
can also use it to pass stuff into the dialog box, like maybe the text you
want to display to the user, the title, labels for the buttons, etc.  Use
the preOpenCard handler of the dialog stack to configure the dialog window
from the information you pass in via the dialogData

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Fri, Apr 29, 2011 at 3:51 PM, Bob Sneidar <[hidden email]> wrote:

> Use the dialogData. You can set it to whatever you want in the "dialog"
> stack, and then retrieve it in your main stack. The dialogData is a global
> property you can set and get throughout the IDE or runtime environment.
>
> Also make your stack modal, meaning it must be dismissed before the user
> can click anywhere else.
>
> Don't call a procedure in an unopened stack (unless it's script has been
> inserted into the frontScript or backScript, and that still doesn't open the
> stack to display the card. You still have to GO to the stack to do that.)
>
> That no workie nohow. Just go to the stack and have the openStack handler
> of your "dialog" stack call whatever procedure you have, or just have the
> openStack handler BE the procedure.
>
> Bob
>
>
> On Apr 29, 2011, at 3:37 PM, tbodine wrote:
>
> > Hi LiveCoders.
> >
> > I'm working on my first real LC project and now I've dug myself into my
> > first LC hole. Hoping for some advice...
> >
> > I want to present user with a dialog box that is more attractive than the
> > standard "answer" command. (Bigger type, transparent, icon buttons). I
> tried
> > making a separate card in a separate stack that I could open over my
> > mainStack card, but that is creating lots of errors now with "can't find
> > card" messages when I use:
> >
> > call processingHandler of card "Main" of stack "Top".
> >
> > Basically, I want a semitransparent dialog box with two buttons to open
> over
> > a mainStack card. The user's button choice needs to be returned to the
> > mainStack script and the dlog Card closed.
> >
> > Any suggestions on how to do this?
> >
> > Thanks!
> > Tom Bodine
> >
> >
> > --
> > View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Alternatives-to-answer-tp3484779p3484779.html
> > Sent from the Revolution - User mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Alternatives to "answer"

Richmond Mathewson-2
In reply to this post by tbodine
On 04/30/11 01:37, tbodine wrote:

> Hi LiveCoders.
>
> I'm working on my first real LC project and now I've dug myself into my
> first LC hole. Hoping for some advice...
>
> I want to present user with a dialog box that is more attractive than the
> standard "answer" command. (Bigger type, transparent, icon buttons). I tried
> making a separate card in a separate stack that I could open over my
> mainStack card, but that is creating lots of errors now with "can't find
> card" messages when I use:
>
> call processingHandler of card "Main" of stack "Top".
>
> Basically, I want a semitransparent dialog box with two buttons to open over
> a mainStack card. The user's button choice needs to be returned to the
> mainStack script and the dlog Card closed.
>
> Any suggestions on how to do this?
>
I tend to use  a semi-transparent image, either made in Livecode and
exported as a snapshot as a PNG and then reimported, or with GIMP; then
another couple of faux buttons (i.e. images) for "Yes" and "No";
just make sure that your 'answer' images are in the top layers of the
card so they don't appear peeping out from behind whatever controls you
have for functionality and/oe aesthetics on the card.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode