Deleting cards from within themselves.
John Dixon
dixonja at hotmail.co.uk
Mon Feb 16 15:41:04 EST 2015
Richmond...
It is not 'nope!'.. Eric's suggestion is on the right track
put this into a stack script :-)
global cardNo
on getridofcard
delete card ID cardNo
end getridofcard
and this in the button, you were on about in each card :-
global cardNo
on mouseUp
put the short id of this card into cardNo
send "getridofcard" to this stack in 100 millisecs
end mouseUp
> Date: Mon, 16 Feb 2015 22:36:36 +0200
> From: richmondmathewson at gmail.com
> To: use-livecode at lists.runrev.com
> Subject: Re: Deleting cards from within themselves.
>
> On 16/02/15 22:30, Eric Corbett wrote:
> > use
> >
> > send "mouseUp" to btn "DELL" of card “INPUTTER” in 1 milliseconds
> >
>
> Nope!
>
> >
> >
> > On Feb 16, 2015, at 12:02 PM, Richmond <richmondmathewson at gmail.com> wrote:
> >
> >> On 16/02/15 21:54, Roger Eller wrote:
> >>> try this:
> >>>
> >>> click at the loc of btn "DELL" of card "INPUTTER"
> >>>
> >>> ~Roger
> >> Thanks, but no joy: because that line still has to be inside a script in an object on the card
> >> to be deleted.
> >>
> >>>
> >>> On Mon, Feb 16, 2015 at 2:42 PM, Richmond <richmondmathewson at gmail.com>
> >>> wrote:
> >>>
> >>>> This CANNOT be done, as such.
> >>>>
> >>>> I am currently working up a moronically simple flashcard program for
> >>>> people to learn words in a new language.
> >>>>
> >>>> It features a card where end-users can add terms.
> >>>>
> >>>> Now, for every new term a templet card is cloned and 2 fields on the
> >>>> cloned card are filled.
> >>>>
> >>>> No rocket science round these parts!
> >>>>
> >>>> HOWEVER . . . there's always one of those . . .
> >>>>
> >>>> I want a button on each vocab. card that allows chummy to delete that card.
> >>>>
> >>>> Tried a button with this script:
> >>>>
> >>>> on mouseUp
> >>>> put the ID of this card into fld "QARD" of card "INPUTTER"
> >>>> send "mouseUp" to btn "DELL" of card "INPUTTER"
> >>>> end mouseUp
> >>>>
> >>>> where button "DELL" contains this:
> >>>>
> >>>> on mouseUp
> >>>> put fld "QARD" into QARD
> >>>> delete card ID QARD
> >>>> end mouseUp
> >>>>
> >>>> now, clicking directly on button "DELL" deletes the card . .
> >>>>
> >>>> but clicking the button on the card to be deleted does NOT delete that
> >>>> card because the script in that button
> >>>> is still active.
> >>>>
> >>>> Would be grateful for any ideas on this one.
> >>>>
> >>>> Richmond.
> >>>>
> >>>> _______________________________________________
> >>>> 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
> >>
> >> _______________________________________________
> >> 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
>
>
> _______________________________________________
> 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