+1

CAPS Apps help

Lcdrgreg 11 years ago updated by icahill (Administrator) 11 years ago 3
Talking to Adam last nite about a problem we are having with the innovation celebration app. For the Bios of the candidates, he thought a text template would be the way to go. He said you could give us an example. Also in another app we are doing game play where the student goes through a pager and clicks whether a contestant lived or died in the Quantrills raid. Could you give me an example of how wire can determine which page of the pager we are on to give the appropriate alert (ie Good Job! for correct and Better Luck on the next one! for incorrect.) Thanks
There is a snippet of a texttemplate on the tutorials page: https://studio.rarewire.com/wordpress... it will require that you create the HTML yourself for the bios.

As for a pager, you can use an object property called 'page' to determine the page of the pager you are currently on. So if your pager is set to paginate, then you can run an action that has a series of if statements which say:

<action name="click-yes">
<if lhs="[object:PAGERALIAS.page]" operator="eq" rhs="1">
<alert message="Good Job">
</if>
<if lhs="[object:PAGERALIAS.page]" operator="eq" rhs="2">
<alert message="Bad Choice">
</if>
</action>
<action name="click-no">
<if lhs="[object:PAGERALIAS.page]" operator="eq" rhs="1">
<alert message="Bad Choice">
</if>
<if lhs="[object:PAGERALIAS.page]" operator="eq" rhs="2">
<alert message="Good Job">
</if>
</action>
Thanks looks great. On the snippet for using html. I created my html file in dreamweaver using a lot of what you had on the snippet. I loaded it and all the wire into my app. I can see that it created something but cannot see my text. There are shadows top and bottom that move with scrolling. Can this be on a panel and if it is, how would the wire look different?
texttemplates can only be instantiated on a web view using a web tag.