Renaming screens

The only internal reference that seems possible is of Screen blocks.

If you rename a screen, you also need to rename any places where you open that screen from other screens, so there's that. I'm not sure if that's what @ChrisWard was referring to or not.

Thank you @ewpatton :slight_smile:
But that should not be a problem because if anyone renames screen using that method then he can also change those references from blocks.

no, because else you might find for example a Screen1.Initialize block in Screen2

Taifun

@BeksOmega is also making it so that there is a Screen reference block for use with the open another screen block as part of her GSOC project, so that may complicate things slightly in the future.

Ideally, it would be good if we could implement renaming a screen as part of the App Inventor UI rather than playing tricks with the AIA file.

2 Likes

@BeksOmega is also making it so that there is a Screen reference block for use with the open another screen block as part of her GSOC project, so that may complicate things slightly in the future.

Hmmm, this is definitely a tricky problem, but I don't think the new block will cause any problems that you wouldn't have with trying to update the equivalent text blocks. The screen blocks are pretty dumb hehe, they just look at a dynamic list which is held on the workspace, which gets updated by the DesignToolbar.

I'll say that if you don't want to try to update the relevant blocks when a screen is renamed (which would be really tricky) the blocks do fail pretty gracefully. If they have a selected value which is no longer available (eg deleted, renamed), they mark themselves as a badBlock() so that they're visible to the user.

2 Likes

PLEASE PLEASE PLEASE Why do you paste the screen in a copy between two projects no longer works? I have a win 10 and I tried with the Firefox and Chrome browser. Please, you can add a copy button, as on Kodular, and an export of the screen .ias? (I would save a long time)

I literally do this all the time. What do you mean by not being able to copy & paste? You just have to click on the screen in where you can see all the components hold CTRL + C and then go to the other project and CTRL + V

copy a screen is not a so often used function. especially when two screen almost have same layout and codes. and we always recommend to use the layout/blocks repeatedly.

copying screens is not the way to go
if you think, you should copy a screen, then you are doing something wrong
introducing a Copy screen button in Kodular was actually a bad idea...

follow the DRY principle of programming - Don't repeat yourself
see also tip 1 here

Taifun

2 Likes