Interface objects copy and paste

1,307 views
Skip to first unread message

Ethan Hon

unread,
May 4, 2016, 9:24:27 PM5/4/16
to App Inventor Open Source Development
As Lasith-Niro raised in issue #726

I made 6 to 7 apps using MIT appinventor. So I faced this problem.In design view developer can't copy and paste objects.

After all the designer is like an editor. So copy and paste can be very handy for users.

We may need to think about:
  1. Do we want to copy components within one screen? Across multiple screens? Across projects (or apps)?
  2. Should the related blocks be copied too?
  3. How should we handle the involved files? e.g. How should we handle the background image if a button is copied?
  4. What can/cannot be copied? Obviously, the screen can't be. But are there other candidates that can't be copied either?
  5. Should we implement it as a menu option on the component or support it from cmd/ctrl + c?

Tu AN Huynh Van

unread,
Jun 26, 2016, 9:08:20 AM6/26/16
to App Inventor Open Source Development
Hi AI Developers

Thanks Mr. Ethan Hon & Mr. Lasith Niro for starting the discussion about this issue which I often face as I guide my students, especially who transited from Scratch to AppInventor 2.

According to what I observed so far in creating more than twenty apps, I hope to answer some of the mentioned questions. Honestly speaking, I don't have any background in native Android App development, so I can only answer from a users' point of view

1. The ability to copy components and paste them in one screen is the most useful of all since it's currently very tedious to drag in many same components. The issue of changing the properties of many components with the same type and look can be addressed by coding the blocks, so this is not too much of an issue.

2. The duplication of related blocks doesn't seem possible because the event and action blocks can come from different components. This is object-oriented programming paradigm unlike Scratch, so it doesn't make sense to duplicate related blocks when duplicating components.

3. This question actually is quite simple to answer especially when all background images properties of various components can share the same file in appInventor. When copying a component with image property, we just need to set the backgroundImage or Picture or Image properties to the same file name which is stored in the media (or asset folder) when the file is first uploaded.

4. Without  a developer background, I can't really understand why we can't copy screen. Except for storage and some hardware-related components like the camera, bluetooth, barcode-scanner, etc., I can't really think of any components that shouldn't be copied.

5. Both are desirable actually. 

Besides that, I hope to add in the request for automatic renaming prompt when the component is copied.

Thanks so much for reading my comments. Any suggestion or further discussion is appreciated.

Ethan Hon

unread,
Jun 27, 2016, 2:19:41 AM6/27/16
to App Inventor Open Source Development

Thanks Mr. Ethan Hon & Mr. Lasith Niro for starting the discussion about this issue which I often face as I guide my students, especially who transited from Scratch to AppInventor 2.

According to what I observed so far in creating more than twenty apps, I hope to answer some of the mentioned questions. Honestly speaking, I don't have any background in native Android App development, so I can only answer from a users' point of view

Don't worry. The feedback from users is as important as from developers and after all, it's for users.
 
1. The ability to copy components and paste them in one screen is the most useful of all since it's currently very tedious to drag in many same components. The issue of changing the properties of many components with the same type and look can be addressed by coding the blocks, so this is not too much of an issue.

This can serve as the starting point.
 
2. The duplication of related blocks doesn't seem possible because the event and action blocks can come from different components. This is object-oriented programming paradigm unlike Scratch, so it doesn't make sense to duplicate related blocks when duplicating components.

Right, also, users should not worry about the blocks when they are editing in the designer. I just raised it for the sake of discussion
 
3. This question actually is quite simple to answer especially when all background images properties of various components can share the same file in appInventor. When copying a component with image property, we just need to set the backgroundImage or Picture or Image properties to the same file name which is stored in the media (or asset folder) when the file is first uploaded.

I agree.

4. Without  a developer background, I can't really understand why we can't copy screen. Except for storage and some hardware-related components like the camera, bluetooth, barcode-scanner, etc., I can't really think of any components that shouldn't be copied.

I raised because some components (like the ones you listed) are supposed to be unique in one screen (or even the whole project). They should not be copied so we need to know which.

5. Both are desirable actually. 

Of coz (LOL). But the thing is, one can be much trickier than the other to implement. Menu option is easier because it simply makes one duplicate and pastes it right away. cmd/ctrl + c may require a clipboard which allows users to copy as many times as they want but only the last one can be pasted. Its session also needs to be maintained, i.e. how long should we keep the copied component. To make things worse, users may select multiple components at a time before hitting cmd/ctrl + c.
 
Besides that, I hope to add in the request for automatic renaming prompt when the component is copied.

This quite depends on question 5. This feature is easier to integrate for menu option.

bianca...@gmail.com

unread,
Dec 21, 2017, 2:12:32 PM12/21/17
to App Inventor Open Source Development
+1 for me: I think this feature is needed and would be awesome to have asap. If well implemented it will solve all problems even those pointed out by both Niro and Huynh.

Proposal to evaluate by Mit AI developer team:
What about to add just a button under Components List, near to existing Rename and Delete buttons that behaves as follows:
(the Components List is the tree view- like panel of the AI IDE positioned at the right side of the window, near the Properties panel. As tree view like panel it has or can have more and more tree levels, like a directory tree view)


  1. If the user selects a component and pushes the button Duplicate that component is duplicated in the same level of the Components list with all its own actual properties (not the default properties but the actual properties even those set up by the user, but the name that has to be changed adding to it Copy 1, Copy 2, etc... as needed);
  2. If the users selects a more high level let's say a tree branch all that tree branch is duplicated with all components and properties in it, as above specified;
  3. If the users selects the Screen everything in it is duplicated as above.
  4. One more thing to evaluate would be to show to the user a dialog that allows to choose how deeply the copy has to be made. For example some options in it will allow or not to copy customized or default properties of each component and n sub-levels of the tree branch...

Here there is an image of the button: it is just graphically added:


Reply all
Reply to author
Forward
0 new messages