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