Problems exporting and importing a dialogue

classic Classic list List threaded Threaded
13 messages Options
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Problems exporting and importing a dialogue

I wanted to transfer a dialogue from a text document to the live version. So I went into the test doc "organise dialogs|Edit" window and exported the dialogue, which was called "OneOff", to a file. Went into the live version, found that I had to edit a dummy dialogue before I could import the saved one, imported the file. And found that the new dialogue was called "One-Off", which had been its name some days ago.  I looked at the exported .xdl file and there's a section saying
dlg:id="One-off" 
  So I have 2 questions/comments:

1) Why is the imported file getting a different name? Alternatively, why has the exported file got an out-of-date ID?

2) Is there a way of importing a dialogue without having to edit a dummy dialogue?
Peter
anne-ology anne-ology
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

       Some thoughts -

       Whenever I want to add something to another file, I merely 'copy &
paste' -
          does this not work in your case?

       If you're attempting to upload a file where the first file still
exists,
          then the new one will either replace the original or rename
itself in order to preserve the original.

       Hoping this helps you to determine an answer to your problem,



From: ptoye <[hidden email]>
Date: Tue, Jan 3, 2017 at 6:24 AM
Subject: [libreoffice-users] Problems exporting and importing a dialogue
To: [hidden email]


I wanted to transfer a dialogue from a text document to the live version. So
I went into the test doc "organise dialogs|Edit" window and exported the
dialogue, which was called "OneOff", to a file. Went into the live version,
found that I had to edit a dummy dialogue before I could import the saved
one, imported the file. And found that the new dialogue was called
"One-Off", which had been its name some days ago.  I looked at the exported
.xdl file and there's a section saying   So I have 2 questions/comments:

1) Why is the imported file getting a different name? Alternatively, why has
the exported file got an out-of-date ID?

2) Is there a way of importing a dialogue without having to edit a dummy
dialogue?

-----
Peter

--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

I don't think you can simply copy and paste an entire dialogue. I tried it and it didn't work.
Peter
Gabriele Ponzo Gabriele Ponzo
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

What do you mean with Dialogue?

I can't understand what are you talking about :(

It may be a feature unknown to me...

Il 3 gen 2017 5:16 PM, "ptoye" <[hidden email]> ha scritto:

I don't think you can simply copy and paste an entire dialogue. I tried it
and it didn't work.



-----
Peter
--
View this message in context: http://nabble.documentfoundation.org/
Problems-exporting-and-importing-a-dialogue-tp4204239p4204267.html
Sent from the Users mailing list archive at Nabble.com.

--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-
unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted

--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Regina Henschel Regina Henschel
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

In reply to this post by ptoye
Hi Peter,

ptoye schrieb:
> I wanted to transfer a dialogue from a text document to the live version. So
> I went into the test doc "organise dialogs|Edit" window and exported the
> dialogue, which was called "OneOff"

How do you make it 'called "OneOff"'?

, to a file. Went into the live version,
> found that I had to edit a dummy dialogue before I could import the saved
> one,

The document needs to have a library (likely 'Standard') and at least
one module. Then you have an 'Import Dialog' in the toolbar in the
module in the IDE. Because you need the module anyway for the macros to
execute the dialog, first generate the module and then insert the dialog.

  imported the file. And found that the new dialogue was called
> "One-Off", which had been its name some days ago.  I looked at the exported
> .xdl file and there's a section saying   So I have 2 questions/comments:
>
> 1) Why is the imported file getting a different name? Alternatively, why has
> the exported file got an out-of-date ID?

In my tests it gets the name of the tab in the Basic-IDE as value of the
attribute 'dlg:id' and on import this value is used in the Basic-IDE as
tab name. If such tab already exists, you get the option to rename or
replace.

>
> 2) Is there a way of importing a dialogue without having to edit a dummy
> dialogue?

See above, you need a module.


BTW, I find is useful to have an own toolbar for macros. I use the commands
'Edit Macros' = .uno:BasicIDEAppear (from category Application) and name
it 'IDE'.
'LibreOffice Basic' = .uno:MacroOrganizer (from category BASIC) and name
it 'Run'
'LibreOffice Basic Macro Organizer' = .uno:MacroOrganizer (fro, category
BASIC) and name it 'Organize'
That make access quicker than via Tools > Macros.

Kind regards
Regina


--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Gordon Cooper Gordon Cooper
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

In reply to this post by Gabriele Ponzo
I am with Gabriele, do not understand the problem.

Here, We are working with moderately sized documents in several
languages. The Copy and Paste works every time. Can copy a
technical manual, with up to 170 A4 pages and nearly 100 images,
and it pastes correctly.   Slightly more difficult is pasting from an
HTML document. Everything behaves, and the format is retained,
except the internal linking for the Table of Contents. This is no great
problem. Libre Office has the function to create a new Table Of
Contents linked to the appropriate pages in the resulting  .odt.

All very easy.

Gordon
Tauranga N.Z.


On 04/01/17 12:07, Gabriele Ponzo wrote:

> What do you mean with Dialogue?
>
> I can't understand what are you talking about :(
>
> It may be a feature unknown to me...
>
> Il 3 gen 2017 5:16 PM, "ptoye" <[hidden email]> ha scritto:
>
> I don't think you can simply copy and paste an entire dialogue. I tried it
> and it didn't work.
>
>
>
> -----
> Peter
> --
> View this message in context: http://nabble.documentfoundation.org/
> Problems-exporting-and-importing-a-dialogue-tp4204239p4204267.html
> Sent from the Users mailing list archive at Nabble.com.
>
> --
> To unsubscribe e-mail to: [hidden email]
> Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-
> unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be
> deleted
>


--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

In reply to this post by Gabriele Ponzo
Gabriele,

A Dialogue (or Dialog if you like the US spelling) is a feature of Libre Office which does not appear to be documented anywhere in the User Guides. It allows you to display a window with controls (much like a form) so that the user can interact with the document at runtime. Look in the LO help files under "Macros and programming|Guides" where there is some (but not a lot of) useful information.

I use a dialogue in Calc to allow the user to enter values which, when an "OK" button is pressed, are entered into the correct cells in a spreadsheet using macro code in LO Basic. But it's not confined to Calc - you can write a dialogue in any LO application.

HTH
Peter
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

This post was updated on .
In reply to this post by Gordon Cooper
Gordon,

I am referring specifically to a Dialog(ue), not to text within a file. See my answer to Gabriele.
Peter
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

In reply to this post by Regina Henschel
Re: Problems exporting and importing a dialogue Regina,

See my comments below.

Best regards, and a successful new year,

Peter
[hidden email]
www.ptoye.com

-------------------------
Wednesday, January 4, 2017, 12:31:35 AM, you wrote:


Hi Peter,

ptoye schrieb:
> I wanted to transfer a dialogue from a text document to the live version. So
> I went into the test doc "organise dialogs|Edit" window and exported the
> dialogue, which was called "OneOff"

How do you make it 'called "OneOff"'?
Originally I called it "One-Off" when I first created it with the Tools|Macros|Organise Dialogues menu. Later I changed it to "OneOff" by clicking on its name in the macro organiser window.



, to a file. Went into the live version,
> found that I had to edit a dummy dialogue before I could import the saved
> one,

The document needs to have a library (likely 'Standard') and at least
one module. Then you have an 'Import Dialog' in the toolbar in the
module in the IDE. Because you need the module anyway for the macros to
execute the dialog, first generate the module and then insert the dialog.
I admit that I hadn't noticed that the "Import Dialogue" was available in the macro editor as well as the Dialogue Editor.



 imported the file. And found that the new dialogue was called
> "One-Off", which had been its name some days ago.  I looked at the exported
> .xdl file and there's a section saying   So I have 2 questions/comments:
>
> 1) Why is the imported file getting a different name? Alternatively, why has
> the exported file got an out-of-date ID?

In my tests it gets the name of the tab in the Basic-IDE as value of the
attribute 'dlg:id' and on import this value is used in the Basic-IDE as
tab name. If such tab already exists, you get the option to rename or
replace.
So it seems that the dlg:id attribute isn't changed when the name is changed. This looks like a bug to me (not an important one).



>
> 2) Is there a way of importing a dialogue without having to edit a dummy
> dialogue?

See above, you need a module.


BTW, I find is useful to have an own toolbar for macros. I use the commands
'Edit Macros' = .uno:BasicIDEAppear (from category Application) and name
it 'IDE'.
'LibreOffice Basic' = .uno:MacroOrganizer (from category BASIC) and name
it 'Run'
'LibreOffice Basic Macro Organizer' = .uno:MacroOrganizer (fro, category
BASIC) and name it 'Organize'
That make access quicker than via Tools > Macros.
Thanks - I'll try this.



Kind regards
Regina

Peter
Gordon Cooper Gordon Cooper
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

In reply to this post by ptoye
Peter,

                  Understood. Thanks.

Gordon.


On 04/01/17 23:22, ptoye wrote:

> Gordon,
>
> I am referring specifically to a Dialog(ue), not to text within a file.
>
>
>
> -----
> Peter
> --
> View this message in context: http://nabble.documentfoundation.org/Problems-exporting-and-importing-a-dialogue-tp4204239p4204319.html
> Sent from the Users mailing list archive at Nabble.com.
>


--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Andreas Säger Andreas Säger
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

In reply to this post by ptoye
Importing/exporting Basic modules and dialogs is easy when you do NOT store everything in libraries named "Standard". Use the organizer to create a library with a distinct project name within a template, document or in global container "My Macros"
Move dialogs and code modules into the library.
Now you can create a simple macro extension from that library. There is an [Export] button on the "Libraries" tab of the organizer which generates a most simple oxt.
You can also import libraries directly from documents or from library directories. There is an [Import] button on the same tab. You may also import libraries from extracted extensions.
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

Re: Problems exporting and importing a dialogue Andreas,

Thanks again. Regina's comment answered my questions. I'm not sure why you say it's best to avoid the "Standard" library, though. I tend to store my dialogues and macros within the document, as they're usually specific to the document. After all, a dialogue for updating my wines database would be pretty silly in my account spreadsheet :-)

Best regards,

Peter
[hidden email]
www.ptoye.com

-------------------------
Saturday, January 7, 2017, 3:53:02 PM, you wrote:


Importing/exporting Basic modules and dialogs is easy when you do NOT store everything in libraries named "Standard". Use the organizer to create a library with a distinct project name within a template, document or in global container "My Macros"
Move dialogs and code modules into the library.
Now you can create a simple macro extension from that library. There is an [Export] button on the "Libraries" tab of the organizer which generates a most simple oxt.
You can also import libraries directly from documents or from library directories. There is an [Import] button on the same tab. You may also import libraries from extracted extensions.


If you reply to this email, your message will be added to the discussion below:
http://nabble.documentfoundation.org/Problems-exporting-and-importing-a-dialogue-tp4204239p4204605.html
To unsubscribe from Problems exporting and importing a dialogue, click here.
NAML
Peter
Andreas Säger Andreas Säger
Reply | Threaded
Open this post in threaded view
|

Re: Problems exporting and importing a dialogue

This post has NOT been accepted by the mailing list yet.
All I wanted to say is that once you give a name to your library, there are at least two built-in tools to import and export whole libraries of Basic modules with dialogs.
A third method: Ctrl+Drag&Drop in the organizer dialog copies dialogs and modules between libraries.