Kio4_Move Extension doesnt place button where I left it

Im at my desk now. should be here all day unless im called away for service work

Im going to try real buttons, I think there was a difficulty in getting a component id for them but, ill work until i hit a whammie

You do not need ids, just make a button component list and work with that.

1 Like

can I add comments that are not erased when clearing Do It text?

Not sure I understand what you mean ?

Anyway, herewith a revised canvas/sprite method
canvasSpritePositioningV2.aia (21.1 KB)

You enter the text (multiline) before you 'create' a sprite, otherwise you get the hint text.
Turn on the menu to generate a menu when you click a sprite (turn off menu after use)

  • Delete clears the sprite for later re-use
  • Edit allows to change the displayed text

Credits to Jerin Jacob (component2Image) and Kevinkun (Regex) for their extensions

thank you !

When I add comments to my blocks to explain what they do etc, and the DO IT



I'm pretty sure the answer is no. if you clear the DO IT results, the comments also clear

Use a variable block with text above your action block.

2 Likes

Called to work. Ill be gone a few hours
Thank you again!

@Kevin_Kesler , I have put an example with real buttons in:

I'm testing this extension, there may be bugs.

@Juan_Antonio Thank you!
I finally made it back to my desk. gonna try to make some headway.




The last button in my list is moved whenever I click on another button

I downloaded a fresh copy of the Ki04_Move Extension, and that seems to help.

When using an Any Button Clicked event, take care to wrap its innards with a test for notAlreadyHandled, to allow other more specific button Click events to work outside of this
generic logic.

Your Screen must have other buttons that you DON'T want to move when you click them, right?

thank you , i have a test if in list. removed for debugging

Im not sure if i have syntax right but i have it there.

Still experiencing bugs. buttons move, and buttons glitch back into place , but they are not positioned correctly on refresh.





This app works with not issues. I THINK I'm doing exactly the same thing within my complete app. maybe I'm still moving faster than the file can be written??

I'm going to try to trigger the file writing only when that VA is set to invisible or some other event happens, Only storing the position in the variables until.

Rather than writing to file after Kio4_move1.position block, I added a button to write file manually.
Pressing the save button after positioning prevents most of the hiccups.

there is still a small glitch: the buttons all shift about 10 pixels left or right when I write, then read the file, and they shift opposite direction on the next write, read.

It toggles back and forth and I can manage with that, by hitting the save button twice, but still a glitch.

part of my issues have been narrowed down. in another area of my blocks, i have a timer that initiates a use of some of the global variables used in this area.

i set the timerenabled to false with the initiation of a move, and i set it to true after i manually save the file, in order to prevent a double access of the variable.
it is relaying the same information, so i cannot simply use a different variable.

Rooster35.aia (165.8 KB)



@Juan_Antonio

Ive combed through my blocks a few times and ive gotten better results but I still have this issue

I get different display results depending on where at in my blocks i call for move. I believe that it is time aggravated.

2 videos show the call to move in 2 different blocks. 1 when i initialize my configuration, 2 when i initialize a virtual screen.

they initially appear in incorrect locations. they have xy coordinates on them that are copies of the xy used to set them using SET COMPONENT.

calling the initializebuttons procedure a second time AFTER A DELAY places them correctly. I tried to call the procedure back to back , getting the same results as 1 call only.

@TIMAI2 can i create a pause within a FOR EACH block to allow time for the routine to complete?

You can introduce a "pause" by using a clock timer and a counter, iterating over a list of things that have to be actioned, doing one at a time using the counter to advance through the list.

1 Like