External Items not saved?!?

Hello, i would like to share code among different projects and found the section in the handbook dealing with external items as well as several postst here dealing with different issues relating to external items.

My problem is that when i turn a module into an external item using the context menu, i’m not prompted to select a location to save it. When i close and reopen the project, all those modules appear in the branch ‘shared modules’, but that’s it … Dragging such a module to another project inserts it also as a shared module but changes are not passed along …

What could i be doing wrong?

Thanks for your replies!

I know that you can’t have the two projects open at the same time, but other than that it should work.
Are you using Windows, OSX or Linux?

Windows …
Like i said, i never get the prompt to save the module …

Works here. Windows 7 64bit. When i right click a module and select “make external”, it prompts me for a location.
Are you using a licensed product, or the free ide?

Licensed pro running on Win 8 64 …
I did find out that i can save a class externally and then the little arrow appears which was described in the documentation. Can you make a regular module external too or just classes?

I made a module external. I’m not on Windows 8 though, but on Windows 7.
Maybe you need to file a bug report in feedback.

[quote=29673:@Dirk Cleenwerck]I know that you can’t have the two projects open at the same time, but other than that it should work.
Are you using Windows, OSX or Linux?[/quote]
You certainly can have more than one project open at once :stuck_out_tongue:

Don’t bother having 2 text projects open though and you want to save your changes in each - that really causes xojo problems and only one gets saved and the other becomes a pseudo clone

I know that we can have more than one project open, but as far as I know, trying to edit code in the same external from two projects at the same time will not work.
Let’s say I open two projects that use the same external. Then having the two projects open, I edit code in the external in the first project and then look at the external’s code in the second project, I will not see the changes I just did in the first project. Then when I change code in the second project and try to save, it’s anybody’s guess what will happen.

Unless that got fixed, but I haven’t seen that as fixed anywhere.

I installed xojo on windows xp and have the same problem. I simply do not see the ‘save here’ dialog when i turn a module into a shared one. Am i missing an additional setting somewhere?

What i can do is the following:

Create a class, insert modules, ‘save externally’
Drag saved class into another project
Save externally again into the same file
Changes to class in second project appear in first project when i open it

But this isn’t in anywhere near what’s described in the help …

Do you mean methods? I don’t see a way to add a module to a class?
I also see no way to make a shared module.

Sorry, spent too much time in VBA … Yes, i mean methods, not modules …

You can’t export methods, only project items (ActiveX component, class, class interface, container control, file type set, menu bar, module, report, toolbar, window). Items can have event handlers, methods, properties, constants, contain controls…
Right click the class and export it, then open a new project and drag the file from windows explorer to that project whilst holding shift+control. Drop the file on the project whilst still holding shift+control and you should have an external reference in the new project.

Alright, then that’s what i’ll have to do … thanks for clarifying that!!! :slight_smile:

Why not simply put all your methods (you wish to “export”) into a module and then export the module? That’s what I do for all my listbox methods, chart routines etc. Sorry if I’ve misunderstood though

Well check out the sample attached to 28978.
Open both projects and edit the method in Class1.
I have dual monitors so I put one project on one & the other on the other monitor.
Edit one switch to the other edit it repeat.
I’m not seeing a problem.

I just tried with the attached project and I do have the problem.
I"'m using Windows 7 64 bit.
Steps:

  1. unzip the downloaded file
  2. open both projects
  3. edit method untitiled in class1 of project1 to say msgbox '“Hello world 1”
  4. look in project 2 at method untiltled of project2. it still says msgbox “Hello world”

Strangely enough this seems to be related to the files.
When I do this

  1. unzip the downloaded file
  2. open both projects
  3. save both projects
  4. open both projects again
  5. edit method untitiled in class1 of project1 to say msgbox '“Hello world 1”
  6. look in project 2 at method untiltled of project2. it now says msgbox “Hello world 1”

So saving the files seems to have an impact on whether or not the ide know that this is the same external file.

I was one of the people moaning about the external module code not saving, but it has been fixed in Xojo 2013r2 as far as I can see on the Mac side. I share lots of modules, windows, etc, but try not to have the same external open in two projects at the same time.