Open a new doc/docx/txt in edit mode

I do a soft, that creates a doc/docx/txt file (with qfile, open and close the file, so it's an empty file). Right after that the file is created, I invoke docs to go into edit mode to modify the file. But when open app I get this message 'this file is not a valid file .doc' but if I invoke the preview generator, it opens without any problem, what Miss me?

Here's the function that is called

void ApplicationUI::newNote( bool docx,QString name)
{
    QString recString;
    request = new InvokeRequest();
    QVariantMap meta;
    if(name.isEmpty()){
        if(docx){
            recString = "document%1.doc";
            request->setMimeType("application/msword");
        }else{
            recString = "note%1.txt";
            //request->setMimeType("text/plain");
        }

     recString=recString.arg(QDateTime::currentDateTime().toString("yyyy-M-d_hh-m-ss"));
    }
    else
        recString = name;

    QFile file (QDir::homePath()+"/Notes/"+recString);
        qDebug() << "file exists" << file.exists();
        qDebug() << "File Open" << file.open(QFile::ReadWrite);
        file.close();

    request->setTarget("sys.dxtg.stg");
    request->setFileTransferMode(FileTransferMode::CopyReadWrite);
    qDebug() << "Uri file " << QDir::homePath()+"/Notes/"+recString;

    request->setUri("file://"+ QDir::homePath()+"/Notes/"+recString);

    manager->invoke(*request);
}

Hi silajim,

You did nothing other than following what BlackBerry noted in their docs, but unfortunately the official called doc invoking Core Apps has some errors in section Documents To Go, and I never took the time to write to BlackBerry to let them know.

Fortunately, the errors are pretty obvious if you try to understand what are the target of call used.

So in your example, you want to call app "Word To Go", which is the text of Documents To Go document Manager. But, if you reduce the application that is opened from your invocation, you will notice that you call in fact "Sheet To Go", the Manager of spreadsheet of Documents To Go. Why?

Look at the target of call:
sys.dxtg.STG

'stg' here means 'Sheet To Go'. What you need to do is to replace "stg" by "wind turbines" (Word To Go).

So your code is correct, simply change the target:
sys.dxtg.WTG

I know, you followed the official docs and it says to use the target of ILI, any other said, I find the docs to be precise, most of the time and I continue to read the docs and follow their examples of code, but sometimes mistakes happen (they are written by humans after all) and I'll try to report these errors to the BlackBerry team once I had the time to test them all.

Tags: BlackBerry Developers

Similar Questions

  • Illustrator stops after I try to open a new doc.

    Hello, I recently downloaded Illustrator; However, I was able to do something with it, as it stops whenever I try to open a new document/template or open an existing file. The prompt that is displayed indicates, "Adobe Illustrator CC 2014 has stopped working.  A problem caused the program to stop working correctly. Windows (8) will close the program and notify you if a solution is available. "Given that this is probably the most wave message to solve the problems out of, and Adobe doesn't offer phone support, I need a little help.  So far, I've deleted preferences, uninstalled and reinstalled several times one unholy, and ran the program as an administrator.  All other Adobe products I downloaded work, which is even more confusing. I should mention that I use the free trial version of the creative cloud.  I was planning on finally buying a monthly subscription, but I have no reason to think that I will be any better off if I use a trial or paid version.  Everyone has faced something similar? Any advice would be helpful!  Thank you, thank you, thank you in advance!

    ginad52597762 wrote:

    and run the program as administrator.

    If an administrator account is the account you normally use on the PC?

    You simply set up the PC or is it an older account?

    User accounts may get corrupted and Illustrator is very special anything. Have you ever tried to create an expense account and use it?

    Also: is a printer connected, turned on, updated driver? Illustrator is always looking for a printer.

    Are your existing files on a network?

    Have you checked all the access privileges?

  • Is there a way to open a VI editing mode, within another VI?

    I'm looking for a way to open a VI within my application in edit mode.

    I tried to use secondary for this, but it won't let you edit the Panel before VI you opened and if you open the block diagram that it appears in a new window. I want to just be able to essentially incorporate the editable inside my application VI?

    Anyone know of a way or ideas?

    Thank you!

    Well, the Windows API has functions to set the parent of a window window. An example can be found in this thread. I don't know if this will be enough for what you're trying to accomplish.

  • Button symbol Editting Mode

    I'm new to Flash CS4 and have practiced the creation of buttons. I use a JPEG image for the real button. The image changes color and size according to state high or low State or status. Everything is exactly as I want it, but I wish now that I had would add text next to the button to inform the user that the button does when they hover over. That is my question. If I come back in button symbol editting mode, add text next to the JPG for the State of 'more '? In this way when the user will fly over that "contact us" seems out of the side of the button? Thank you!

    Create a new layer inside the button Edit mode, create keyframes for the States (above, upwards or downwards) and add text to your icon (e.g.. below).

  • altitude necessary to open the doc or txt files?

    When I try to open a .doc or .txt without having to open a word processor first program I get an error message that the elevation is necessary. I am running Windows 7 Home Premium 64-bit.

    Hello

    1. What is the brand and model of the computer?

    2. have you made changes on the computer recently?

    3. is the specific question of doc or txt files?

    4. are you able to open other files such as excel, Notepad, etc.?

    5. What is the exact error message you get while trying to open the doc or txt files?

    6. were you able to open .doc and .txt files earlier?

    Method 1.

    Appropriating the file and then try to open.

    To take ownership of a file, follow these steps:

    1.right - click on the file you want to take control and then click Properties.

    2. click on the tab Security and then click OK in the security message (if one appears).

    3. click on Advancedand then click the owner tab.

    4. in the name list, click administrator, or click the Administrators group, and then click OK.

    The administrator or the Administrators group now owns the file.

    Method 2.

    You can try disabling UAC and check.

    Turn User Account Control or disable: http://windows.microsoft.com/en-US/windows7/Turn-User-Account-Control-on-or-off

    UAC disable WARNING:

    User Account Control (UAC) can help you to prevent your computer from unauthorized changes. It works by asking permission when a task requires administrative rights, such as installing software or changing settings affecting other users. We do not recommend disable user account control. If you turn it off, you must reactivate as soon as possible.

    I hope this helps.

  • Hi, I just bought a PC and I want to start editing with it.   What should I do, cancel my account and open a new one or what?  I have the composition with my mac.

    Hi, I just bought a PC and I want to start editing with it.   What should I do, cancel my account and open a new one or what?  I have the composition with my mac

    You can have Creative Cloud installed and signed in on two computers as long as you don't use it on one at a time. Download and install as you did on the first computer, sign in to your Adobe account on the website of Adobe using your Adobe ID, download the creative application Cloud, then download the applications you want to use.

    You can download the Adobe Creative Cloud Desktop App from here:
    Creative cloud help | Creative cloud desktop.

    After installing the desktop creative cloud application, you will need to sign in with a login password and Adobe. Then you can install applications. This link provides more information and step by step instructions, if you need: CC help | Download, install, update or uninstall applications

    If you get a new computer, simply log out of creative cloud over one of the other and log on to the new.  Connect, disconnect you and | Adobe Creative Cloud desktop app

    Guinot

  • Open extensions Manager * FM, *.pdf,.doc, *.docx files in In Design?

    Open extensions Manager * FM, *.pdf,.doc, *.docx files in In Design?   How does it work? @ !

    Hello, no I'm afraid not. Extension Manager uncompresses the ZXP files as its primary role. Whatever files are located in ZXP file will be unzipped to their specified location, for example, in the folder of scripts InDesign, the office, or just everywhere where the producer of the content specified files should go.

  • I'm new on this. I edited a file on the test program and sent to my flash drive to the printer. When I open a flashdrive the toolbar to the right was still there. When someone opens this toolbar will be visible? I turn on protect.

    I'm new on this. I edited a file on the test program and sent to my flash drive to the printer. When I open a flashdrive the toolbar to the right was still there. When someone opens this toolbar will be visible? I turn on protect.

    If you apply password protection successfully, then Acrobat allow not specified changes. The fact that the toolbar is visible is not relevant. Go ahead and try to make changes yourself, and see what happens.

  • Content is unexpected when I open a new document in Word 2007 using VISTA__Cannot edit Template

    Content is unexpected when I open a new content in WORD 2007 using VISTA
    Cannot rename or delete the model
    Have you tried to Repair Word 2007 and Office 2007 reload without result

    Hello

    Check with the experts here: (re - ask your question in these groups)

    Answers - Word
    http://answers.Microsoft.com/en-us/Office/ee861096.aspx

    Answers - Office
    http://answers.Microsoft.com/en-us/Office/default.aspx

    Or

    Discussions in Word Application errors
    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Word.application.errors&lang=en&CR=us

    Office newsgroups
    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx

    and here:

    Microsoft.public.word.application.errors discussions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Word.application.errors&cat=en_us_f09268b3-8479-4cea-8037-d168d96833ac&lang=en&CR=us

    Welcome to Microsoft Discussion groups
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?GUID=1A61081E-1F66-5F7F-B5BA-04767E55A63B

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • CD: Opening a new window by default / new default Windows

    Hello

    So crowing 2 documents on 2 screens, comment do pour Configurator Louverture to a document in a new window by default

    Thank you

    How to open new windows by default 2 documents on Monitor 2?

    Thank you

    Hi mikem85848492,

    To open a pdf doc in a new window you must navigate in Edition > Preferences > select 'Général' in the Categories list and uncheck the option that reads "Documents open in the new tab in the same window" under the label of the basic tools, and then click OK.

    Close the CD player and launch it again.

    Let us know if that helps.

    Concerning

    Sarojini

  • Links from opening in new tabs?

    Since last night, every link I click opens in a new tab, and it's infuriating. I tried to copy paste on: config in my address bar and edit the browser.link.newwindow things properly but that did nothing. Someone at - it other solutions?
    Also whenever I got to a certain site (deviantart) it highlights everything on the page if I click once, and sometimes, when I type it will open a new tab or a window or try to make a bookmark, which is really weird

    Fixed by restarting my computer!

  • How can I return search box in a new tab? When I open a new tab, it is only to show the address bar.

    When I click on + to open a new tab, this tab shows only the address bar, no search box! This problem is created suddenly. Previously, this problem, when I opened a new tab it shows google search box and the address bar. Now, the address bar of the new tab worked for both page looking box and address bar.

    I followed: config process and it's worked. But, when I start my computer after a few more hours I see this problem! What can I do? Please tell me.

    I have attached a picture of your understanding.

    I wouldn't try a reinstall immediately. An ordinary reinstall often not made the changes that it would bring.

    user.js file will be a small file in your profile and contained text. If copy you and rename user . txt or user.js.txt it will be readable by any word processor, even if Notepad can open it is.

    Paste the content in your next reply. He can give us some clues as to what is happening.

    In fact the user.js file will change behavior of Firefox and you want to simply rename temporarily; instead of renaming a copy; in order to disable and see what happens.

    Just another thought the usual options used for newtabs

    • Subject: white - it's a plain blankpage, no bar to search it.
    • Subject: newtab - currently by default has a search bar and the tiles
    • topic: home - a search bar and some settings icons etc

    You can try one of these out by typing in the address bar Subject: House or whatever, (or try on: subject).

    It is has two troubleshooting steps simple which will help, but you don't seem to have tried yet.

    First, try fashion without failure of Firefox.
    For example, in now the SHIFT key when you click the icon to start Firefox

    The second interesting to try procedure is to create a new additional profile for test purposes. Which erases most of the settings and not be affected by file user.js or interfere with your existing settup. You get the choice what profile to use when you start Firefox.

  • When I opened a NEW TAB, it loads 'Bing' - no matter what I try! especially to try to change the configuration settings

    Hello

    When I opened a NEW TAB, it loads 'Bing' - no matter what I try! especially to try to change the configuration settings!

    (Note I recently installed DivX player / converter / movies.. .is this the cause?)

    Then... on desktop... .double click on Mozilla... .loads ok
    Open a new tab..it loads Bing! & I hate it!

    Ive tried;

    1.Tools - options - addons - extensions & plugins - cant see anything there?
    2. On the small address bar (top right) which allows search engines to be managed - all cleared down except google & yahoo
    3. Tools - tab mix plus options - New Tabs - Load on new tabs set to Home Page (doesnt let me change it - greyed out url (conduit.com - see 5 below)
    4. Tools - tab mix plus options - New Tabs - Load on new tabs set to new tab Page - displays the url below (5) but if I try to edit it reverts back every time
    5. If I enter "about:config" & then "browser.newtab.url" in the URL bar I get
    
    browser.newtab.url;http://search.conduit.com/?ctid=CT3321897&octid=EB_ORIGINAL_CTID&SearchSource=69&CUI=&SSPV=&Lay=1&UM=5&UP=SP88BDE404-3DB6-49C4-97F5-96A64775CC57
    
    - rightclick on the selection and type 'reset' IT WONT CHANGE
    
    please can you help me?
    

    Thank you

    Stuart

    I see no mention of the duct. com in your initial post. It is often a good indication that you will taken place unwanted software.

  • How can I stop addons to declare that they are updated whenever I have start firefox by opening a new tab for eah addon?

    After firefox updated all addons some of them has opened a new tab after restart. This tab has reported that each addon has been updated.
    But these tabs keep opening at startup, hiding my homepage and gets boring.

    I solved many of them downgrading to an older version, but I can't trouble the Tabmix more tab than guard leader here:
    http://tmp.garyr.NET/version_update2.htm?version=0.4.1.1pre.130722a
    Even without this downgrade, which in fact lead to another page that tells a different version (the one I had demoted to)

    EDIT. I wiped out the config to restore it piece by piece.
    Everything is now resolved.

  • How can I stop Firefox to return to the previous window, as soon as I open a new window?

    In recent versions of Firefox, whenever I chaque fois que j' ouvre opens a new window, as soon as the window opens, Firefox goes back to the previous window, the one that was on the screen before I opened the new window. This is very irritating and not happened in older versions of Firefox.

    Any suggestions how to solve this problem? Thank you!

    FYI, this isn't a forum threaded, so answers are displayed at the bottom...

    DOM.disable_window_flip is a true/false preference that determines whether a script in a web page is allowed to change orientation between the windows of Firefox (in general, to be in front, or pop-under by making the window from which it was opened at the front).

    By default, this preference is set to true to disable the windows around Web sites to move, but it is possible that the setting has been changed. To view/change this preference, you can use the subject: configuration preferences editor.

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the Search box that appears above the listfilter, type or paste the flip and make a pause so that the list is filtered

    (3) double-click dom.disable_window_flip to light it between true and false.

    Edit: Corrected by the post below.

Maybe you are looking for

  • something functional, but not like I want to

    This page shows not as I like so help please http://www.crush.zone

  • Home page does not load correctly

    My home page is my.yahoo.com and is listed as homepage under Options > general. This address is my custom Yahoo page. FF v. 21 (just updated yesterday) at the start of the generic version of My Yahoo begins with the URL http://my.yahoo.com/?_bc=1. So

  • I'm using firefox 9, why can't I save as image on google image?

    I'm using firefox 9, why can't I save as image on google image?

  • Cannot run recovery on Satellite P10 874 CD

    HelloGiven that I had a lot of bugs and hang up, I gave my machine SATELLITE SP10-874 to a friend to load the recovery CD for me, he asked instead the NEW WINDOWS XP PRO, so that my machine with WINDOWS HOME EDITION venus. Now I am unable to run the

  • OfficeJet Pro 8710:8710

    Just got a 8710 OfficeJet all-in-one, and when I use the scan key on the control panel of the printer, scanner, it stores the files in your My Documents folder.  Is it possible to change where he recorded at?  I know that I can change where to save t