Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Hi Noel

So are you trigering these events and running the macros to populate a form from two separate 
tables?

Alex


On Sunday 06 Apr 2014 00:13:31 Marion & Noel Lodge wrote:
Hi,

Sorry I've been slow to respond to all your posts.  It has taken me a while
to sort out what I think is happening.

Fernand, thanks for your code suggestion.  I pasted it into the start of my
macros and the Wait() statement worked perfectly.  Then I incorporated it
into my Init macro and discovered that none of my Wait() statements
worked.  The same applied to the AccName macro.  I was really puzzled and
probably spent longer than I should have on the problem, but I felt I
really needed an answer.  Finally, through much trial and error I found
which macros Wait() worked in and which it didn't.  My testing was not
exhaustive, but it seems that Wait() doesn't work in any macro that is
called from one of the Form's events.  When I got back to reading my
emails, I discovered that Andrew was predicting that this might be the
case!

Then it occurred to me that, rather than use separate text files for
printing out the Now() values, if I used just one file, it would give me
the order of processing, and the exact times would not be so important.  So
I did that and also added System Ticks / 1000.  The result was as follows -

Init 1.  05/04/2014 23:20:37  43421.801
Init 2.  05/04/2014 23:20:37  43421.801
Init 3.  05/04/2014 23:20:37  43421.817
Init 4.  05/04/2014 23:20:37  43421.833
Init 5.  05/04/2014 23:20:37  43421.848
Init 6.  05/04/2014 23:20:40  43424.36
Init 7.  05/04/2014 23:20:40  43424.375
Name 1.  05/04/2014 23:20:40  43424.625
Name 2.  05/04/2014 23:20:40  43424.625
Name 3.  05/04/2014 23:20:40  43424.625

This demonstrates that macro Init ran before macro Name.

From this, and a number of other tests I ran, I believe that -
1.  Macros are always processed serially on a first come first served basis.
2.  If macro A calls macro B, then Macro A waits until macro B has
completed before the remaining code of macro A is processed.

These were the conclusions that I was hoping for.  As well, I now have a
mechanism for checking out other timing situations where I'm not sure what
is going on.

So thank you all for your input - it has been an interesting journey!

Noel
--
Noel Lodge
lodgemn@gmail.com

PS Alex, Yes you are right - the account name needs to be fetched from
another table.



-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.