Effect of button-pressed() instruction in existing programs

Post Reply
Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Effect of button-pressed() instruction in existing programs

Post by Henko »

Good morning mr.K.,
Before i download version 5.5, i would like to know how existing programs using buttons will react on the modification in the button-pressed command.

So far, pressing a button would set kind of internal flag. This "flag" would be "unset" by the first button-pressed() met. In this way, pressing a button is a precisely defined one time action.

Is is true that pressing a button is now changed to an undefined number of actions, depending on the duration of the pressing (and the program structure)?

If that is so, i fear for most of my programs that use buttons.
Please take my fears away :shock:

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Effect of button-pressed() instruction in existing programs

Post by Mr. Kibernetik »

Good morning Henko!

Now it reacts on button press (as function name states) instead of button release (as it was previously). Because button pressing moment is much more important than button releasing moment.
All the rest did not change. It is a one-time action and it does not depend on any duration.

Also it can be useful to participate in beta testing to check what is going to happen in near future and to prevent bad things from happening :geek:

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: Effect of button-pressed() instruction in existing programs

Post by Henko »

Thank you. That's quite a relief.
As for beta-testing, i have an attitude of "wait and see". I would do it if i were the only beta-tester, but you already have one or two, one of which uses sB very intensively. ;)

Operator
Posts: 138
Joined: Mon May 06, 2013 5:52 am

Re: Effect of button-pressed() instruction in existing programs

Post by Operator »

As one out of x Beta Testers of sB 5.5 I
can confirm the touch button behaviour.
It will just toggle the status from 0 to 1
and then back to 0 when touched
(not released) and even if you keep the
touch it will stay 0.

I reactivated an old (not posted) snippet,
the circle will move only by a touch and
one has to release the touch and touch
again (and so on...) for a continues move
of the circle ...
Attachments
image.jpg
image.jpg (42.63 KiB) Viewed 1413 times

Post Reply