I just tried again with drag-and-drop and it worked fine. The result was a module2 inside module1. After making the modules external this didn’t work anymore because nested modules aren’t supported for external items.
In my IDE
- Make a new desktop project
- add two modules (module1 and module2)
- add a property to module2 (untitled as integer)
then try to add module2 INTO module 1
Dragging does not work
Copy after selecting module2 from Edit menu
Then select module1 and paste:
You get a new module at app level named module22
[quote=444736:@Enric Herrera]In my IDE
- Make a new desktop project
- add two modules (module1 and module2)
- add a property to module2 (untitled as integer)
then try to add module2 INTO module 1
Dragging does not work
[/quote]
Works for me. You have to be careful that, when you do the drop, the mouse pointer is on Module1 and that a blue outline box surrounds Module1. Move the mouse very slowly.
Probably I’ve something wrong in my IDE. The same procedure, you describe, works fine if I insert a class into the module, the outline box around module1 appears and the class is moved inside, but not when I do the same with a module.
Even more The procedure works if I insert an empty module INTO another, but not if the module has any item,
Reinstall Xojo ?
Already done but the same.
Are someone using Mojave 10.14.5 and Xojo 2019 r1.1 ?
Please try
- Make a new desktop project
- add two modules (module1 and module2)
- now you are able to insert (dragging) module2 into module1 (the outline box around module1 appears) don’t do it
- add a property to module2 (untitled as integer)
- then try to add module2 INTO module 1
Dragging does not work, copy and paste either.
Make a video of what you tried with drag-and-drop and upload it.
ok, but how do you post a video here?, I tried with dropbox to place a image and do not work
From https://forum.xojo.com/38560-post-formatting-tips
[quote]Embed Image
Displays an inline image. This needs to be a direct link to an image file. Click the “image” button in the toolbar and then replace the URL.
If you are linking from Dropbox, be sure to use a “public link” and remove the “?dl=0” and replace it with “?raw=1”. Images from Flicker and other picture services that do not have a direct link do not display. Imgur is a service that seems to work well.[/quote]
I guess the same with a dropbox video, I think I have seen Norman posted a video from dropbox in other thread.
[quote=444745:@Enric Herrera]Already done but the same.
Are someone using Mojave 10.14.5 and Xojo 2019 r1.1 ?
Please try
- Make a new desktop project
- add two modules (module1 and module2)
- now you are able to insert (dragging) module2 into module1 (the outline box around module1 appears) don’t do it
- add a property to module2 (untitled as integer)
- then try to add module2 INTO module 1
Dragging does not work, copy and paste either.[/quote]
Yes, I agree this does not seem to work under 10.14.5 (on my laptop). Doing it under 10.13.6 worked OK.
Oh at last a light, I was feeling like “The fool on the hill”.
Weird, I can’t reproduce it with 10.12.6 I see the exact same issue that Enric. Even found a problem when dragging out and undo, recording right now.
This is what I did to crash Xojo:
- new project
- add module1
- selecting module1 insert another module, module 2 will be a sub module of module 1
- add a property to module 2
- drag module 2 outside of module 1
- undo the drag and drop
If you don’t add the property to module 2, you can drag module 2 out and undo without a crash.
<https://xojo.com/issue/56330> interesting that Feedback automatically added the title and message: can’t add an item to an illegal container.
It looks like for some reason adding a Property to a sub-module will make illegal to drop that module into another module even if we use Undo (Undo just force the action that we can’t do it manually).
Edit: Maybe is already reported, will try to search with that generic title.
Thanks Alberto, now I know it’s no my fault.
Enric, after reading <https://xojo.com/issue/36886> it looks like the problem is the Global scope of the property, if it is changed to Private, then there is no problem dragging/dropping or even Undo.
Anyway, the IDE should not crash.
Edit: I guess that is why Tim could do it with 10.13.6, in that machine I bet when a property is added it start as Private and on the 10.14.5 machine it is added as Global
So a submodule can’t have globals properties?, it’s a bug or is by design?
I guess by design. This is what Norman commented back in 2014:
I added information to my FB case, in my case the crash problem is that when I added a Property to Module 2 inside Module 1, the only 2 options are Protected and Private, and even when it say the Property is Protected there is no indication on the left panel. Once I clicked the scope and selected Protected again, then the left panel changed and a yellow indicator showed up, then I was able to drag off the Module 1 and Undo without a crash.
No
By design for about 15 years