Why in COM, set smth true, stays true even after System.exit?

I am using "Jacob" to do COM calls. When I alter the "ShowAll" property of Word.Application and I set it to true, it will then forever be true even if I exit the application AND quit the word application. If I set it to false, the same thing happens, it will always be so. The code to call/set this is:
(NOTE: This uses classes I made to wrap the Dispatch calls)
Word wordApp = new Word();
Documents docs = wordApp.getDocuments();
Document doc = docs.open("D:\\JavaProjects\\Test.doc");
//GET VIEW
View wordView = wordApp.getActiveWindow().getView();
//PRINT THE VIEW PROPERTIES
System.out.println("Show All: " + wordApp.getActiveWindow().getView().isShowAll());
System.out.println("Show Paragraphs: " + wordApp.getActiveWindow().getView().isShowParagraphs());
//SET THE VIEW PROPERTIES
wordView.setShowAll(false);
wordView.setShowParagraphs(true);
//PRINT THEM AGAIN
System.out.println("Show All: " + wordApp.getActiveWindow().getView().isShowAll());
System.out.println("Show Paragraphs: " + wordApp.getActiveWindow().getView().isShowParagraphs());
doc.close(Document.DO_NOT_SAVE);
wordApp.quit(new Variant[] {});
System.exit(0);The actual Dispatch calls are:
//NO IDEA WHY THIS IS, BUT SHOWALL = TRUE IS -1, AND FALSE IS 0
private final static int SHOW_ALL_TRUE = -1;
private final static int SHOW_ALL_FALSE = 0;
/** SETSHOWPARAGRAPHS **
* Sets the property (boolean) ShowParagraphs.
public void setShowParagraphs(boolean showParagraphs)
     Dispatch.put(this, "ShowParagraphs", new Boolean(showParagraphs));
/** ISSHOWPARAGRAPHS **
* Returns Boolean of whether or not this is set to show paragraphs.
public boolean isShowParagraphs()
     return getBooleanValue(Dispatch.get(this, "ShowParagraphs"));
private boolean getBooleanValue(Variant variantBoolean)
     //MAKE IT AN INTEGER AND GET ITS int VALUE
     int intVariant = new Integer(variantBoolean.toString()).intValue();
     //RETURN IF IS SHOW ALL
     return (intVariant == View.SHOW_ALL_TRUE);
}I'm wondering if the problem is that I get back either -1 or 0 and if maybe that means something else?

1: Properties persistence is not a DEFECT but a FEATURE . It was implemented in MS Word so users could change MS word WITHOUT HAVING TO DO IT EACH TIME THEY START IT UP.
2: Don't you intialise all your variables in your code after you instanciated them ? I am sure you do so and therefore the persitence feature you described should not be annoying you at all. It is not necessary to intialise variables in the BASIC langage but that does not mean you should not do it.
3: (-1) was chosen arbitrary by Microsoft as the TRUE value for Boolean datatype and 0 the value for FALSE when they designed Visual Basic. This is not a problem if you write code properly
I recommend you test bool variable in any langages using the following test:
(myBool <> 0)
HAVE A THINK ABOUT IT
Finally,
you need to understand what you are working with before you complain about it.
Argument for Argument sake is not good and if you think MS word is a bad program just don't use it. go and write your own word processor in JAVA.
GOOD LUCK
I WISH TO APOLOGISE FOR ANY POSSIBLE SPELLING OR GRAMMATICAL MISTAKES I COULD HAVE MADE IN THIS REPLY. ENGLISH NOT BEING MY FIRST LANGUAGE.

Similar Messages

  • Why does the print cue window stay open even after job is done?

    In Tiger, and every other version of OSX I have any recollection of using, the printer window opens to display what's in the cue when you select to print something. Once printing is done, this cue closes. Since installing Leopard, everytime we print from our iMac, MacBook or MBP, the print cue window stays open indefinitely after the job is done, requiring a manual closing of the window. I can't for the life of me fathom what benefit this brings or who would want this. Is this part of Leopard or a problem with our install? Something I can turn off?

    If you control-click (or right click) on the open printer queue in the Dock you can choose to have it auto close once the spool file is sent.
    As to why this is necessary in Leopard, well I haven't seen a good enough answer to date...
    PaHu

  • Why should i set  global_name=*'TRUE'*

    if I create public database link its should be TRUE, What's the logic here ?
    SQL>show parameter global_name;
    NAME TYPE VALUE
    global_names boolean FALSE
    SQL>create public database link mydba connect to scott identified by tiger using 'ORCL';
    Database link created.
    SQL> select * from emp@mydba
    select count(*) from emp@mydba;
    COUNT(*)
    14
    Even i set global_name='FALSE' i can create public database link. then
    why should i set global_name=*'TRUE'*

    >
    if I create public database link its should be TRUE, What's the logic here ?
    >
    Says who? That isn't true at all. You don't have to see it to TRUE
    >
    Even i set global_name='FALSE' i can create public database link. then
    why should i set global_name=*'TRUE'*
    >
    You do NOT have to set it to true but you can if you want your links to have the same name as the DB they connect to.
    http://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams088.htm
    See the Database Reference
    >
    GLOBAL_NAMES specifies whether a database link is required to have the same name as the database to which it connects.
    If the value of GLOBAL_NAMES is false, then no check is performed. If you use or plan to use distributed processing, then Oracle recommends that you set this parameter to true to ensure the use of consistent naming conventions for databases and links in a networked environment.
    >
    The CREATE DATABASE LINK section of the SQL Language Doc tells you what that setting means.
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_5005.htm
    >
    If the value of the GLOBAL_NAMES initialization parameter is TRUE, then the database link must have the same name as the database to which it connects. If the value of GLOBAL_NAMES is FALSE, and if you have changed the global name of the database, then you can specify the global name.
    >
    If global_name is TRUE then, as the doc says, 'the database link must have the same name as the database to which it connection.

  • When I try to edit preferences iTunes for Windows locks up.  I have only one user.  This is true even after a reboot.

    When I try to edit preferences iTunes for Windows locks up.  I have only one user.  This is true even after a reboot.

    Hello MF7642,
    Thank you for contacting Apple Support Communities.
    You can use this article to troubleshoot your issues with iTunes.
    iTunes: Missing folder or incorrect permissions may prevent authorization
    http://support.apple.com/kb/TS1277
    Regards,
    Jeff D.

  • Why can't I use effects on camera even after I upgraded to 5.1?

    Why can't I use effects on camera even after I upgraded to 5.1?

    What effects are you referring to?

  • Why is my iphone 4 not turning on, even after hours of charge?

    Why is my iphone 4 not turning on even after hours of charge?

    Try holding both the home and power buttons at the same time until the Apple boot logo appears. If it doesn't appear after 15 seconds, this probably won't work.

  • Why wont the contextual menu for imovie appear even after I've turned on advanced tools?

    why wont the contextual menu for imovie appear even after I've turned on advanced tools?

    Hi
    And You are doing it right
    • draging a clip ontop of other clip in Project - or -
    • ctrl-click on clip in Project
    If it's not that - then my wild Guess is that the iMovie Pref file got corrupted.
    • TEST - Easy by creating a new User Account / Log into this / re-try iMovie - if it now works then I would trash the pref. file
    Yours Bengt W

  • Why is the Lightroom preview folder so big, even after purging the 1:1 previews?

    1:1 or full-size previews take up a large amount of HD space, often many 10's of GB's. This is why building them on demand is an alternative to building them up front, and why you have options for auto or manually purging them. That said, it may not always be possible to delete 1:1 previews - more later. 
    Standard-sized previews are based on the pixel size option you chose in Catalog Settings. You have 4 choices: 1024, 1440, 1680 and 2048. If all you want is standard-sized then choose a size equal to or greater than your screen size. Lr also builds smaller versions at the same time. These are used for the thumbnail, 1:2, 1:3 and 1:4 zoom levels. Adobe call this the "preview pyramid". 
    1:1 previews will not be deleted unless your chosen standard-sized preview is less than half the size of the full-sized preview. For example, you have images with pixel dimensions of 3072 by 2048 pixels (6MP camera such as Canon 10D) and have selected 1680 pixels for standard-sized previews. Since a 1680 pixel preview is more than half the size of the original the full-sized preview will be kept, even after using the purge 1:1 preview command. Had you chosen 1440 pixel for standard-sized previews then the full-sized would have been purged (i.e. 3072/2=1536, which is greater than 1440). Now take the example of a larger camera, say a 8MP camera such as the Canon 1DMKII with an image size of 3504 by 2336 pixels. With the standard-sized set at 1680 pixels the full-size will again be purged (i.e. 3504/2=1752 pixels, which is greater than 1680 pixels). 
    Another thing worth mentioning - Lightroom will usually delay purging previews for deleted images until after the application has been closed and reopened, even then it might take a few minutes to clear the purged previews. The idea here is to ensure the previews don't get deleted whilst there's still a chance that they may be needed (e.g. you removed images by mistake then use Undo command to reinstate them). 
    Hopefully above explains why Lightroom doesn't behave as you expect. If it makes your head spin, think how much mine spun when writing it.

    The chance of an answer is inversely proportional to the length of the posting. ;)
    You do not indicate what your preview setting was while you accumulated a 12Gb preview folder. Nor do you indicate how many images are in your catalog.
    Given your screen size of 1280 (laptp?) I would set the preview size to 1440 since this is still far less than half of your D3 images.
    Cropping - I'll safely guess - has no effect on your preview size choices.
    I confess that preview sizing and purging is confusing. I avoid the confusion by shouting "more disk, mama".

  • IPAD Screen Stays Black even after reset.

    Hello
    I have a case similar to the one posted by darKnghtV  on Jun 24, 2012 10:12 AM related to screen stays Black.
    after I have stopped using the device for 3 days, I came back and the screen came back on. I reset the device to factory setting and it has been working fine for two days.
    how can I confirm if the issue is a hardware or software?
    if the device is defective, how can I exhaust the screen to show the issue again so I can take it to the service center?
    Regards

    I have done this few times.
    however I had to use screen shot, view the image from  my PC to have the unit reset to factory setting. even after that screen wouldn’t start.
    when I took it in the car and it was a hot day, I reach the work shop and the unit was really worm, screen came back on and it did not go black again for the past three days.
    what is puzzling me, was it fixed after the reset and it is a software issue, or is it a hardware ?

  • Can't set Firefox as default browser even after following steps in Firefox support

    Can't set Firefox as my default browser even after following the steps outlined in Firefox support. Operating Firefox on Snow Leopard with Windows 7 running under Parallels. Clicking on links in emails, etc. always opens IE 8 in Windows instead of Firefox on the Mac
    == This happened ==
    Every time Firefox opened
    == About a week ago

    I had the same problem, I just forgot how to fix it. I did it once a while ago but just recently the problem had returned. The first link in vineelreddyp's post solved the problem for me.
    Just as an FYI for people, when OSX does software updates it includes Safari updates. When it completes a Safari update it resets all the Safari settings (they recently upgraded to Safari 5.0), including default browser.
    So anyway, FYI about that. ;-)

  • Spell Check Box stays up even after sending mail.

    Lion truly has some bugs. More annoyances, which is what bugs are I guess. I noticed that in Mail now, after you hit send and cycle through all the spell check changes, the spell check box remains open, even after you've sent the email off. I know it's just one click to close it, but it makes you think the mail didn't get sent. It's so more official when everything just closes up, you know? Am I being too picky here?

    yep same here, my spell check box stays open - any fixes?

  • My external hard drive stays on even after I turn off my iMac. Why?

    New 24” iMac (see below)
    I have connected my 800 Firewire LaCie 500 Gigabyte external hard drive and it works fine. However, it doesn't turn off after I have turned off my iMac! I used Tiger before this and the very same LaCie external drive always turned off (its blue light would go off).
    I am sure that my iMac is Off and is not actually still On.
    Please advise, because I am not sure what could happen to my LaCie hard drive if it stays on constantly.
    As for the iMac, since the instructions mention turning if off, I figure that turning it off is not harmful. Various people at the Apple Store have told me that keeping the iMac on 24 hours a day is not detrimental to the machine but I am old fashioned, I guess...... with that old fashioned paranoia about letting machines stay on all day. If I am wrong, please tell me.
    ~ Lorna in Southern California

    Dear Dennis at LaCie support: Thank you so much for your reply. I did what you said and did indeed discover that when I unplug the LaCie 500 gig hard drive from my iMac, the hard drive turns off, which proves that there is powering still sent through the FireWire bus. It did not turn off with Tiger on my older iMac (the round white semi-circular base iMac).
    BTW: I also have a LaCie 125 gig external hard drive bought several years ago. I am assuming that it has a FireWire which is rated at that 400 rather than the 800 that my 500 gig hd has. Am I right? If yes, then I will look for the cord that matches that hd. I hope that LaCie prints the number on the cord because if not, I will have a hard time.
    I do see that on the new 24“ Intel iMac, the 800 port is the one farthest to the right in the back of the iMac, and the 400 port is to the left of it.
    Wish me luck. I still have to figure out how I will use the 125 gig. I am now using the 500 gig for the Time Machine backups and the .Mac Backup. Also, other of the usual.
    Thank you again,, Dennis. Makes me glad I bought La Cie hard drives.
    I hope that the smaller one doesn't fritz up on me, since I bought it several years ago.
    ~ Lorna in Southern California

  • Xperia Z1s headset stays connected even after unplug

    HI There,
    After i update my Xperia z1s to kit kat 4.4.2 version my head set problem started after someday.
    The problem is
    When I unplug my headset from xperia z1s, it stays connected and i got notification 'please unplug your headphone to get sound from speaker'.
    I found many articles for this headset bug.
    http://www.xperiablog.net/2013/09/22/xperia-z1-suffering-with-headset-bug/
    http://tech.siliconaddict.in/2014/02/non-functional-headphones-on-Sony-Xperia-Ultra-here-comes-the-s...
    Can any one have this issue?
    If you have any solution please help.
    Thanks 

    Never had that Problem but ill try to help you
    1. Did you put the phone in water? If not ignore this
    2. Restart your phone > Plug in the headset > unplug headset . Does it still happens?
    3. Go into safe Mode and does that happen?
    I hope i helped

  • File stays locked even after host instance restart

    Hello All,
    We have a custom adapter build over File Adapter. The extra things done by the adapter are sorting and archiving of file.
    We have 2 BizTalk servers to receive the input files.
    The file extension is change to .inprogress when it is being worked upon by the adapter.
    The issue is that sometimes the file that comes on the file location gets locked i.e it stays in .inprogress status and is not processed further even if host instances of both the receive servers are stopped. If we try to rename the file we keep getting
    an error that the file is being worked upon by some program.
    Please suggest what to do.

    --We have 2 BizTalk servers to receive the input files.---
    It happened due to 2 BizTalk servers.
    Try to rename from command prompt (DOS) using admin access or try to move the file inside some other folder. 
    Regards
    Suman

  • Why won't firefox open on my computer even after I re-installed it

    I use firefox all the time and as of yesterday it has stopped openeing on my computer. So, I uninstalled and re-installed it and still nothing. I don't understand why the browser won't open. Please help me solve this problem!

    Post on the Microsoft Mac forums since it's their softawre you're having issues with: http://answers.microsoft.com/en-us/mac

Maybe you are looking for

  • Report does not return all data in SSRS

    Hello All I have been developing a report in SSRS, and i have a few filters applied to it. The only thing that i have in the Query that brings everything to my main dataset is the Date filter. @startDate, @endDate. When i run the query in Management

  • Abap memory question

    hi,guys,i did a example to test the difference between sap memory and abap memory,the result that i did program zmemory1 is : 1111  2223, but the question is when i did program zmemory2 alone,the result is the same,why i can get test2 with import sta

  • JTable header drag + Synth

    Hi! I'm having a very annoying issue with JTable under Synth LAF. I've configured everything I could find about JTable and still I'm having a white rectangles instead of normal table headers when I try to rearrange columns by dragging. Does anybody h

  • I guess I need help just using this forum. What happened to the question I just asked? Where do I find the answers? And finally, why do I need to select a new name every time I need information?

    The tutorial seems to assume you want to catalog everything on your camera/card.  I want to be able to download my day's shooting so I can browse through them on my computer to decide what to save, what to delete, what to catalog, etc. I'm not oppose

  • Forms 6i update row by row

    dear sirs, i have form with the folllowing items item1, item2,item_result 100 20 80 80 10 70 70 10 60 you will find that 1- item_result = item1 - item2 2- the value of item_result will go to item1 that is mean item1 is the second row = item_result i