Skip to first unread message

Horst Schulze

unread,
Mar 10, 2019, 3:14:56 PM3/10/19
to MIT App Inventor Forum
Hi,
before using appmerger i have to renaime my screen1 or to send the layout to another screen.
I have two apps. In Screen1 there is a layout in Screen2 not.
So I download the .aia, change name to .zip, ans then copying the srm and bky into a folder, changing the name Screen1 to Screen11, Screen2 to Screen1, Screen11 to Screen2.
In the files I changed the name to the filename.
#|
$JSON
{"authURL":["ai2.appinventor.mit.edu"],"YaVersion":"176","Source":"Form","Properties":{"$Name":"Screen2","$Type":"Form","$Version":"24","AboutScreen":"UNeueKasse","AppName":"UNeueKasse","Title":"Uhasibu neue Kasse","Uuid":"0","$Components":[{"$Name":"HorizontalArrangement3","$Type":"HorizontalArrangement","$Version":"3","W....

Then I recopied the files into the .zip file and renaming it.
But - after importing and trying to open I get an internal error.

I think I made all following the instructions somewhere here.
So are these informations also outdated? Or what is going wrong?

Horst

R. Allen

unread,
Mar 10, 2019, 3:40:10 PM3/10/19
to MIT App Inventor Forum
Horst,

I think I was having a similar problem.  I modified one of my two projects by doing the following:
  1. Copy Screen1.scm and .bky to a new file foo.scm and foo.bky
  2. Add the new files back to the .zip file
  3. Change back to .aia
  4. Import new project back into AI2
  5. Modify Screen1 so that all it does is have a button that switches to my new screen "foo"
  6. Export project back out to .aia file
Then I tried to merge the two projects, this time checking everything except the Screen1 from the modified project.  I got to the point where I was asked to save the file, and then it gave me an "Invalid file name" error message.  I could not figure out what file name it was complaining about, so I abandoned using the tool.  I decided to try it manually starting with what I had above.

Here are the steps I took:
  1. Export the other project you want to merge to .aia file
  2. Rename both project files to .zip
  3. Unzip both to their own folder
  4. Using a compare/merge tool (Beyond Compare 3), I moved the asset files and .scm and .bky files from the modified project above (except those for Screen1) into the base project's asset and src folders
  5. Go into the base project's .zip file and delete the "asset" and "src" folders
  6. Copy the "asset" and "src" folders from the unzipped base project (where we copied the files from the modified project) into the base project .zip file
  7. Rename base project .zip file to .aia
  8. Import into AI2, and it worked!
I hope I didn't leave anything out, and I hope you are able to do what I did above to manually merge your projects.

Regards,

Rob
Message has been deleted
Message has been deleted
Message has been deleted

Horst Schulze

unread,
Mar 11, 2019, 5:42:29 AM3/11/19
to MIT App Inventor Forum
Oh (deleted)
I now made new layout on screen2 After this i found out that I cannot rename screen2 too.

Horst Schulze

unread,
Mar 11, 2019, 6:45:22 AM3/11/19
to MIT App Inventor Forum
Renaming Screen1 gives an error.

So for all how it worked:

having a project containing Screen1 and Screen2 an one block in each.
Wanting to rename Screen1

  1. download the aia
  2. make a copy of it
  3. rename it from .aia to .zip (or open with 7-zip)
  4. go to the folder src... containing .bky and .scm files
  5. And now- not renaming but copying Screen1 files
  6. renaming the copy
  7. changing in newname.scm {"$Name":"newname"
  8. same in newname.bky replace oldname with newname
After that I got the old screen1 I have to clean manually and a new screen: Newname

Taifun

unread,
Mar 11, 2019, 9:39:03 AM3/11/19
to MIT App Inventor Forum
After that I got the old screen1 I have to clean manually and a new screen: Newname
screen names are case sensitive, so the correct name of your screen would be newname

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.        

Horst Schulze

unread,
Mar 11, 2019, 11:37:12 AM3/11/19
to MIT App Inventor Forum
correct. In fact my screen has another name.

Evan Patton

unread,
Mar 11, 2019, 4:58:02 PM3/11/19
to MIT App Inventor Forum
Note that there are also a number of project-specific properties on Screen1. If you're going to rename Screen1, you should move the Screen1-specific properties to the new Screen1.

Regards.
Evan
Reply all
Reply to author
Forward
0 new messages