clone card command

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

clone card command

Pascal-6
Hello,

Trying to make my first stack...

I want to create a new card that is  nearly the same as the one I am
in, so I use the "clone this card" command in the script of a button.
The difference is that I want that two of the fields of the new card  
are now empty.


In my trial and errors I wrote the following script to the button
"on mouseup
        clone this card
        select text of field "citation"
        delete selected text
        select text of field "commentaire"
        delete selected text
end mouseup

And I obtained an error. I corrected the script the following way
"on mouseup
        clone this card
        select text of field "citation"
        delete
        select text of field "commentaire"
        delete
end mouseup

Seems to me it should work.

But it is not, a strange phenomenom occurs :  when I click the button
with the second version the card is cloned but the script in the button
of the new card is the first version, although it is the second version
in the departure card.

Any explanation ?

I'm using Rev2.6.1 trial version on a 10.3.9X eMAc.

Oh by the way Rev keeps crashing with regularity so I have to use the
"Forcer à quitter" (dont know the english version suppose "force to
quit") item of the apple menu.

Pascal


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

RE: clone card command

MisterX
Salut Pascal

If you group your card's elements (select them and click on "group" in the
menu bar, set the group to background behavior, you just need to type Create
Card to make a new Card with the same elements as the first (make sure you
start with a stack with only one card or you might have cards that do not
have the background "placed" into them (see the revdocs for the place
command).

If it's new cards with different backgrounds you want to reproduce... then
try this script instead...

on mouseup
 clone this card
 
put empty into field "citation"
 put empty into field "commentaire"
end mouseup

you don’t need to select and delete, just put empty into the fields. Then it
works...

cheers
Xavier

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Pascal
> Sent: Tuesday, November 01, 2005 11:23 AM
> To: [hidden email]
> Subject: clone card command
>
> Hello,
>
> Trying to make my first stack...
>
> I want to create a new card that is  nearly the same as the
> one I am in, so I use the "clone this card" command in the
> script of a button.
> The difference is that I want that two of the fields of the
> new card are now empty.
>
>
> In my trial and errors I wrote the following script to the
> button "on mouseup
> clone this card
> select text of field "citation"
> delete selected text
> select text of field "commentaire"
> delete selected text
> end mouseup
>
> And I obtained an error. I corrected the script the following
> way "on mouseup
> clone this card
> select text of field "citation"
> delete
> select text of field "commentaire"
> delete
> end mouseup
>
> Seems to me it should work.
>
> But it is not, a strange phenomenom occurs :  when I click
> the button with the second version the card is cloned but the
> script in the button of the new card is the first version,
> although it is the second version in the departure card.
>
> Any explanation ?
>
> I'm using Rev2.6.1 trial version on a 10.3.9X eMAc.
>
> Oh by the way Rev keeps crashing with regularity so I have to
> use the "Forcer à quitter" (dont know the english version
> suppose "force to
> quit") item of the apple menu.
>
> Pascal
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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

Re: clone card command

Jan Schenkel
In reply to this post by Pascal-6
--- Pascal <[hidden email]> wrote:

> Hello,
>
> Trying to make my first stack...
>
> I want to create a new card that is  nearly the same
> as the one I am
> in, so I use the "clone this card" command in the
> script of a button.
> The difference is that I want that two of the fields
> of the new card  
> are now empty.
>
>
> In my trial and errors I wrote the following script
> to the button
> "on mouseup
> clone this card
> select text of field "citation"
> delete selected text
> select text of field "commentaire"
> delete selected text
> end mouseup
>
> And I obtained an error. I corrected the script the
> following way
> "on mouseup
> clone this card
> select text of field "citation"
> delete
> select text of field "commentaire"
> delete
> end mouseup
>
> Seems to me it should work.
>
> But it is not, a strange phenomenom occurs :  when I
> click the button
> with the second version the card is cloned but the
> script in the button
> of the new card is the first version, although it is
> the second version
> in the departure card.
>
> Any explanation ?
>
> I'm using Rev2.6.1 trial version on a 10.3.9X eMAc.
>
> Oh by the way Rev keeps crashing with regularity so
> I have to use the
> "Forcer à quitter" (dont know the english version
> suppose "force to
> quit") item of the apple menu.
>
> Pascal
>

Hi Pascal,

To empty a field, you don't have to select the
contents and delete them: just use:
--
  put empty into field "foobar"
--

If you're trying to make a stack with multiple cards
that have the same basic controls but where the
content of the fields is different on each card, you
should check into background groups.

Basically, you select all the controls that you want
to share, and group them (menu 'Object' > item 'Group
Selected') -- then open the 'Inspector' palette and
tick the checkbox 'Behave like a background'.

Now, when you create a new card from any card with
that background group on it, Rev will automagically
place this background group onto your new card.

Then have a look at your fields. If the 'sharedText'
property is true, then the same text will be displayed
on each card with that background.
If the same property is false, then the text of the
field differs depending on the current card. You can
control this property via the checkbox 'Share text' in
the 'Basic' panel of the 'Inspector' palette.

Labels and list fields will have the sharedText
property set to true by default, other fields will
have the sharedText property set to false by default.

As for the weird phenomenon and the frequent cra&shes,
I'm not sure what to answer you.

Hope this helped,

Jan Schenkel.

Quartam - Tools for Revolution
<http://www.quartam.com>

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


               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: clone card command

Pascal-6

I supposed there was other ways to do what I wanted and thanks for the
hints that will save me time.

Still puzzled with crashes...

Pascal


>>
>
> Hi Pascal,
>
> To empty a field, you don't have to select the
> contents and delete them: just use:
> --
>   put empty into field "foobar"
> --
>
> If you're trying to make a stack with multiple cards
> that have the same basic controls but where the
> content of the fields is different on each card, you
> should check into background groups.
>
> Basically, you select all the controls that you want
> to share, and group them (menu 'Object' > item 'Group
> Selected') -- then open the 'Inspector' palette and
> tick the checkbox 'Behave like a background'.
>
> Now, when you create a new card from any card with
> that background group on it, Rev will automagically
> place this background group onto your new card.
>
> Then have a look at your fields. If the 'sharedText'
> property is true, then the same text will be displayed
> on each card with that background.
> If the same property is false, then the text of the
> field differs depending on the current card. You can
> control this property via the checkbox 'Share text' in
> the 'Basic' panel of the 'Inspector' palette.
>
> Labels and list fields will have the sharedText
> property set to true by default, other fields will
> have the sharedText property set to false by default.
>
> As for the weird phenomenon and the frequent cra&shes,
> I'm not sure what to answer you.
>
> Hope this helped,
>
> Jan Schenkel.
>
> Quartam - Tools for Revolution
> <http://www.quartam.com>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same
> time."  (La Rochefoucauld)
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution