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 …
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?
[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
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 …
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.
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 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.