Source language: Translate to:

Math Question

General questions about NeoBook

Moderator: Neosoft Support

Math Question

Postby RHORHO1 » Thu Jul 21, 2016 2:31 pm

All. New user. Trying to do a simple calculation using variables generated by several TrackBars. I need the answer to show up in a rectangle on the page.

Here is my attempt at the equation:

Math "([TrackBar1]+[TrackBar2]+[TrackBar3]+[TrackBar4]+[TrackBar5]+[TrackBar6]+[TrackBar7]+[TrackBar8]+[TrackBar9]+[TrackBar10]+[TrackBar13]+[TrackBar14])/((6-[TrackBar11])+(6-[TrackBar12]))" "2" "[ISE1]"

The equation is assigned to an Action in a Text Entry box.

When run, nothing shows up in the Text Entry Box.

Can anyone advise? Thanks.
RHORHO1
 
Posts: 2
Joined: Sat Jul 09, 2016 6:22 am

Re: Math Question

Postby Gaev » Thu Jul 21, 2016 2:57 pm

RHORHO1:

I need the answer to show up in a rectangle on the page.

Rectangles do not have ability to display text ... you might want to try using a Text Box ... have its content be the variable [ISE1].

The equation is assigned to an Action in a Text Entry box.

Are you assigning it to the Text Change action ? ... if so, the command will not be serviced until you make a change to its content.

When run, nothing shows up in the Text Entry Box.

Why would it show up in the TextEntry Box ? ... is [ISE1] the variable associated with this box ?

Math "([TrackBar1]+[TrackBar2]+[TrackBar3]+[TrackBar4]+[TrackBar5]+[TrackBar6]+[TrackBar7]+[TrackBar8]+[TrackBar9]+[TrackBar10]+[TrackBar13]+[TrackBar14])/((6-[TrackBar11])+(6-[TrackBar12]))" "2" "[ISE1]"

Once you decide where you want the result to show up ... and what triggers this calculation ... place this command before the Math command (to verify that it is being triggered) ...
Code: Select all
AlertBox "Before Math" "[ISE1]

... and this command after the Math command (to see what the result was) ...
Code: Select all
AlertBox "After Math" "[ISE1]


Once you can verify that the command is being triggered ... and the value is as expected ... you just have to make sure the variable's contents are shown in a Text Box
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Math Question

Postby RHORHO1 » Thu Jul 21, 2016 3:08 pm

Thanks, Gaev. I'll try your suggestions.
RHORHO1
 
Posts: 2
Joined: Sat Jul 09, 2016 6:22 am


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron