+1
Є відповідь
Is it possible to delete an object from an action?
Hello, I have been having issues with the function in rarewire. I am currently able to delete panels, but I cannot delete objects made from a class. Here is the code:
The class that the object is being created from is "Row-Holder" and is the child of a panel that has an "onswipeleft" action that calls "Change-Page" and from there it deletes the object, and one panel.
Thank you for your help,
Ryan
<wire>
<classes>
<class name="Row-Holder">
<panel name="Row1" width="104%" height="25%" ypos="3%">
<image name="Circle" source="images/Circle.png" xpos="4.25%"></image>
<image name="Face" source="images/Face.png" xpos="29.25%"></image>
<image name="Line" source="images/Line.png" xpos="54.25%"></image>
<image name="X" source="images/X.png" xpos="79.25%"></image>
</panel>
<panel name="Row2" width="104%" height="25%" ypos="28%">
<image name="Circle" source="images/Circle.png" xpos="4.25%"></image>
<image name="Face" source="images/Face.png" xpos="29.25%"></image>
<image name="Line" source="images/Line.png" xpos="54.25%"></image>
<image name="X" source="images/X.png" xpos="79.25%"></image>
</panel>
<panel name="Row3" width="104%" height="25%" ypos="53%">
<image name="Circle" source="images/Circle.png" xpos="4.25%"></image>
<image name="Face" source="images/Face.png" xpos="29.25%"></image>
<image name="Line" source="images/Line.png" xpos="54.25%"></image>
<image name="X" source="images/X.png" xpos="79.25%"></image>
</panel>
<panel name="Row4" width="104%" height="25%" ypos="78%">
<image name="Circle" source="images/Circle.png" xpos="4.25%"></image>
<image name="Face" source="images/Face.png" xpos="29.25%"></image>
<image name="Line" source="images/Line.png" xpos="54.25%"></image>
<image name="X" source="images/X.png" xpos="79.25%"></image>
</panel>
</class>
</classes>
<main>
<panel name="background" alias="BACKGROUND" width="100%" height="100%" align="center" background="#ffffff">
<!--Top part that says "partcipating restaurants" -->
<panel name="Restaurants" alias="RESTAURANTS" width="100%" height="25%" align="center">
<text name="Restaurant_Text" width="100%" height="100%" alignment="center" font="helvetica" size="50" color="#000000" text="Participating Restaurants"></text>
</panel>
<!-- Help button for sending more resturants to C3 data base -->
<panel name="Help" alias="HELP" width="50%" height="25%" align="center" ypos="85%" onclickup="SendRestaurant">
<image name="HelpButton" source="images/Add_Button.png" width="100%" height="100%" alignment="center"></image>
</panel>
<panel name="Holder" alias="HOLDER" width="50%" height="50%" align="center" valign="center" background="#1b1632" alpha=".75" onswipeleft="Change-Page">
<object class="Row-Holder" name="picture" alias="PICTURE"></object>
</panel>
</panel>
</main>
<actions>
<action name="SendRestaurant">
<alert title="MyAlter" message="Click"></alert>
</action>
<action name="Change-Page">
<delete target="PICTURES"></delete>
<delete target="HELP"></delete>
<alert title="SWIPE" message="You SWIPED ME"></alert>
</action>
</actions>
</wire>
The class that the object is being created from is "Row-Holder" and is the child of a panel that has an "onswipeleft" action that calls "Change-Page" and from there it deletes the object, and one panel.
Thank you for your help,
Ryan
Служба підтримки клієнтів працює на UserEcho
You can't assign an alias to an object tag, only from within the class.