QNXStageWebView broken for local files now?

Hi all

I try to load a string as html in a QNXStageWebView and having difficulty doing so. The code looks like this:

entryWebView = new QNXStageWebView();

entryWebView.enableCookies = true;

entryWebView.addEventListener (Event.COMPLETE, loadEntryWebView);

entryWebView.loadString (string);

It does not; I see a webView white, white window. Furthermore, entryWebView is a variable of class declared as follows:

private var entryWebView:QNXStageWebView = null;

OK, I think loadString could not be implemented. So, I try the following, I've read these tips very as a solution to need to load local files. Now, because this is a dynamic content, I would have to save an html file and then load it. Obviously not a long term solution, but good enough, until that loadString works.

entryWebView = new QNXStageWebView();

entryWebView.enableCookies = true;

entryWebView.addEventListener (Event.COMPLETE, loadEntryWebView);

entryWebView.loadURL (File.applicationDirectory.nativePath + "upploadare");

When the file is of course named upploadare and stored in the src folder in my project.

This will display an error message in the web view, which reads: error. The browser doesn't know how to manage this web page. Try again.

I think that HTML in my file may be malformed. Yet any html I try, this same error pops up.

Just to make sure that I do everything else right, I check if the entryWebView will be responsible for google based on the url. He does.

What I am doing wrong?

Thanks in advance.

EDIT: Tried again a thing. I specified an invalid path and the same error message as above is received.

I currently have the same problem during the test with loadString(), so I decided to find the source of the problem with the loadURL() and local files.

As you have discovered, QNXStageWebView can't handle app: or app-storage: URL.  For local stuff, therefore, give him a file: URL.

Unfortunately, when you use File.applicationDirectory as basis (whether by incorrectly simply concatenating ' / upploadare ' or properly using resolvePath ("file.html)), the prefix of the url that is stuck in there rest app.:

What you are doing by entering the nativePath are a start, but you're going to all this trouble, technically.  This is not to say it won't work in your particular case... just that it might not work always and there are a few alternatives that are safer.

It is not because the URLS are encoded, while native paths are not.  When you use either one, you will probably run in disorders whenever you have special characters, such as spaces.

Here's a safe alternative.  Use File.applicationDirectory.resolvePath ('file.html') to get an app: refer to the file, and then take the native path and use it to construct a new file object:

var appPath:File = File.applicationDirectory.resolvePath('file.html');
var filePath:File = new File(appPath.nativePath);
webView.loadURL(filePath.url);
// Note: use  of "new File()" and filePath.url

Another option is to find the relative path to the current directory of the application when it runs.  To do this, you must do this:

// in your constructorNativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);

// use current dir from event, and PB-specific relative path
private function onInvoke(e:InvokeEvent):void {
    var path:File = e.currentDirectory.resolvePath('app/air/file.html');
    webView.loadUrl(path.url);
}

I don't like it, because it depends on currently undocumented (except available to sandbox of Elena post) where the file would be.

As it turns out, however, there is another approach, you might like: ;-)

var content:String = "

test page

"; webView.loadStringWithBase(content, '');

Well Yes, you guessed it.  Although loadString() fails for reasons unknown, using the above and any base (none that I tried, including an empty string) seems to work.  Yay for me!

Tags: BlackBerry Developers

Similar Questions

  • I have a panasonic G3 camera and already use 3 years lightroom for raw files, now I bought a new G7 and he can't read raw files in lightroom, to me terrible, that I update lr to 5.7

    I have a panasonic G3 camera and already use 3 years lightroom for raw files, now I bought a new G7 and he can't read raw files in lightroom, to me terrible, that I update lr to 5.7

    Move the discussion to Photoshop Lightroom

  • The drive letter for the files on my external drive does not match the designated letter MyWindowsApp, after briefly changing pots

    On my Windows 7 laptop, I briefly moved an external hard drive to a USB port to another and then back.

    The reader is referred to as F, as it was originally, but since the temporary move the path for some files now show that E.

    I went to disk management and confirmed that the drive is detected as F.

    This disrupts programs such as Adobe Premiere Elements. It always hurts new information loaded in the disc I load that is in F, but the said path E. The file is clearly on record.

    Hello

    I see that, after changing the port, the drive letter for the external drive has changed. I'll help you with this problem.

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

    2. what security software is installed on the computer?

    You can follow these steps to assign a letter to the external drive and check if that helps.

    1 - click on 'Start' button.

    2-right-click on "Computer" in the list that appears.

    Option 3 - Select the 'manage '. If a warning appears asking for your permission to continue, click on the OK"" button.

    4 - Choose "Disk management" in the left column of the computer management window. Find the USB in the list that appears in the gray bottom of the center column.

    5-click right on the part of the screen that represents the USB key, and then click the option "letter of change of road and railways.

    6 button - click on the 'change' in the window that opens.

    7. ensure that the radio button to "assign the following drive letter:" is selected. To the right of the present is a drop-down list with the drive letters currently not assigned to all of the drives on your local system. If you are not on a network, choose the drive letter you want for your USB key and then click on the OK"" button.

    8 - click on the 'yes' button in the confirmation box that appears.

    Refer.

    Change, add, or remove a drive letter: http://windows.microsoft.com/en-US/windows7/Change-add-or-remove-a-drive-letter

    I hope this helps.

  • URI format for shared local files

    Firefox uses this format to access shared files on a LAN... file:///host/path for example file:///computername/sharename/MyDocs/filename.txt.

    This format is different from the standard form file://host/path that is used on other browsers, such Windows, Chrome.

    This means Firefox doesn't gives me access to shared files when I coded in standard format URI in my local HTML documents. Why is Firefox different or non-standard.

    Hi seebee, file:///host/path apparently is the standard form for a unc path:

    "It's five slashes - two for the Protocol, one to indicate the root of the file system, and then two more to indicate the beginning of the name of the server.
    https://StackOverflow.com/questions/5317834/workaround-for-href-file-in-Firefox

    It is also explained in this bug since 2001: https://bugzilla.mozilla.org/show_bug.cgi?id=66194#c8

  • Actions by different default for local vs remote files

    I put the default action for documents for automatic download, I want to keep.
    Is it possible to have different behaviors for local links (file:/foo.pdf), namely opens automatically (for example, using a plugin) instead of 'download' of their new?

    I ask this because I generate a local html file to easily navigate and organize my growing collection of scientific articles, which are stored locally.

    I solved for the moment by creating two different profiles with the corresponding actions of the file. Of course this isn't the best solution, because I need to keep the two instances of the browser running, and I need to use the appropriate forum for local vs navigation remote

  • Block 10 FireFox accesses local files the same source in Ajax? Chrome for this, but the workaround is - disable-web-security.

    I have a few Ajax in a test program that is accessing a local file. It worked well until I updated to Firefox 10. 10 Firefox blocks access to local files, even if they have the same source location? Chrome has this problem but I can overcome it by launching Chrome with the "-disable-web-security" option. Is there a similar to Firefox 10 option?

    A good place to ask for advice on web development is to the 'Web Standards Development/evangelism' MozillaZine forum.

    Aid to this forum are better informed on issues related to web development.

    You must register on MozillaZine forum site to post in this forum.

  • I downloaded the 2 files for CS4, but now I can´t install it how can I do?

    I downloaded the 2 files for CS4, but now I can´t install it how can I do?

    One of the files must be an exe file.  Run that file and it must extract the information from the other file and install it.

  • Pages showing "in miniature" (only for Firefox only, remote files) Chrome and local files is displayed correctly.

    Hello, all. I have a real headache, here. I hope someone can help.

    When I use "Preview in browser" (set to FIrefox) all pages of the site appear at the size you want (1280w x different heights). (Firefox is, of course, display of local files). But when I visit your site on the web (remote server files display) the pages are all pretty small, about half the size, width, and height. It drives me crazy. I am quite sure, this is the same code page, and it is the same browser (Firefox), how this could happen? Chrome displays the site very well, if local or remote files are being viewed. The site is http://spareplanetdesign.com (design of clothes, NOT of Web design. Of course, I'm not qualified for web design, lol)

    Many thanks if you can resolve this problem before my head explodes!

    Thank you, Ben. That solved, more or less

    What was going on, it was Firefox "remembers" the zoom last level used when displaying a particular url. I must have zoomed out at some point, while displaying the web url, so that FF will always display this url with zoom back. ' ' As 'Preview in browser' is a different url (a local file path), he was "known" and displays a (normal) different zoom level. "I'm a little embarrassed to do not understand that, as a first step, but I'll leave this thread cancelled, just in case anyone else has experienced this' problem '.

  • local files from a deleted account IMAP still take place, can I just delete them?

    I ran a use of disk Analyzer on my c:\ drive which was full. Although not a major contributor, I've always found that an old account of work, where I am no longer employed, still has his record in C:\Users\MyUserName\AppData\Roaming\Thunderbird\Profiles\rd4y3dca.default\ImapMail\ and takes about 1.5 GB.

    I deleted the account in Thunderbird when I left and discover that now these local files. Can - I just delete them without further ADO, or am I obliged to take certain actions of Thunderbird to avoid screwing up too?

    Thanks for your time, Niles

    the reason why the imap e-mail account is still in the profile is - some people accidentally remove and then e-mail accounts must restore the account, so he is always kept as a just in case you need to restore.

    If you are sure that you don't need any emails stored in imap e-mail account can access the e-mail account folder and delete the account manually.

    you will need make folders and hidden files visible:

    You probably always use the same profile, is that the 'account name 'mail you must remove.
    To go directly to:
    Close Thunderbird.

    C:\Users\MyUserName\AppData\Roaming\Thunderbird\Profiles\rd4y3dca.default\ImapMail\ mail account name
    

    OR through Thunderbird:
    Help > troubleshooting information
    Click on the view file"" button.
    a new window opens to display your content profile folder name.

    Close Thunderbird now - this is important.

    Click the folder «ImapMail»
    You should see all your imap e-mail accounts.
    Delete the account that you don't need.

    Restart Thunderbird.

  • Help, please! I can't find my emails in my local files!

    I recently had problems with my computer that required it to go repair. I backed up all my files and the repair shop was able to fix my computer without losing any files. My local files were stored on my c: drive which, due to repair, is now my e:drive (Techno will know what I mean). I had to download Mozilla Thunderbird again and now my local files have disappeared. I located the profile on my e:drive and used that path for files the. BUT it does not display one of my old messages. I'm desperate to sort what I need your emails for work. Can someone advise me on how to solve this problem?

    I am sure that no data has been lost. I don't know how access to this or to implement. Any help would be appreciated!

    Ok.
    More important, close Thunderbird
    Open the new profile folder (menu help > troubleshooting information > show the profile button if you don't know where he is and then close Thunderbird)
    Open the folder mail. (you will see a folder "local Folders")
    Open the old profile folder and open the folder mail again.

    Now copy the old files to the new files overwrite them files needed to replace the new with the old.

    Open Thunderbird. Now, you need to reset the path of the local folders.

    If the above fails, you can copy the entire folder the old appdata to the new Thunderbird. But who will replace all new messages, so you will need to register externally in Thunderbird before you do such a thing. so you can reimport the

  • Save the contents of local files on hard drive

    Periodically, I get a warning that my mailbox is almost full. Emails, I want to keep have been in various folders named by category, under which, in my view, are called local folders (see doc "Send files" attached).
    If I understand correctly, these files contribute to the quota allowed in my email box.
    I want to record these files on my hardrive so I can easily access their content at will, thus freeing up space on my server of the ISP.
    Is it achievable, please?
    I still use Windows XP sp3 if that's relevant.

    In Thunderbird
    The IMAP folders show a remote view of the folders from the server.
    You subscribe to view these folders.
    Message headers are downloaded, and when you choose to read an email, it is downloaded in a temporary cache.
    These e-mails are kept on the server.
    If you pass in "Offline Mode", you won't be able to read them.

    If you sychronisé subscriber records, a copy of the file is downloaded and stored in your Thunderbird profile as a mbox file.
    These files synchronized constantly updated to show what is on the server, if you delete or move an email in Thunderbird records, it is also updated on the server.
    These e-mails are on your computer and the server, but they synchronize.
    If you pass in "Offline Mode", you will be able to read because a copy in your profile folder.

    As the server tells you that your quota is nearly full, it is referring to any email in any folder on the server. So it is also any email in your email IMAP account folders.

    How to keep a copy on your computer and be able to remove emails on the server:
    You "sync" all your folders subscribed to get a copy of your profile.

    Info on imap folder synchronization.

    When the synchronization is complete, go to "Offline Mode" to stop synchronization further these records.

    How to switch Mode offline:
    Click on the blue screen 2 icon bottom left in the status bar. In offline mode, it will be 2 black screen icon.

    Create a backup of your profile - for security reasons:
    Store the backup outside of Thunderbird.
    You can create a folder on your desktop called "Backup to" for them.

    Into account the Local folder:
    Create a few folders named suitablly in 'Local folders' ready to receive emails.
    Move all the emails that you want to delete the server, IMAP folders in these new folders in the account of "local folders".
    Check that they have moved correctly by selecting view emails randomly.
    When you are sure that you have a copy in the local files, delete some emails from the imap folder and double-check that you can still read in local folders, if everything is ok then delete the emails in the IMAP folder.

    When emails are safe in local folders.
    Compact all folders.
    File > Compact folders.
    Wait for compacting.
    then go back to online mode.

    How to switch Mode online:
    Click on the black screen 2 icon bottom left in the status bar. When online it will change 2 blue screen icon.

    Imap folder will be synchronize with the server.

    Now connect to the Web Server e-mail account using a browser.
    check records to ensure that the emails have been deleted on the server.

    If you have a gmail account:
    Also check the "All messages" folder because it is gmails archive and keep a copy of everything. Make sure that you don't delete emails you don't want or have a copy your local folders of Thunderbird - that removing this folder will remove e-mail messages in other folders.

    Hope this information resolves your situation.

  • Cannot change 'Open with' binding for webloc files

    Since Friday, I can't change the bindings from the webloc files. It was (by default) Firefox, now it's "Simulator (Watch) .app" as shown below:

    Also, as shown in the previous picture, sometimes some files are selected to be opened by another application (either Safari.app either Simulator.app but never Firefox). This behavior changes each time I have reset the launch Services database.

    When I try to change the default link back to Firefox, I had two error messages. The first says:

    Then, when I press OK, I get this redundant error message:

    All the webloc files I checked read permissions in writing for me and read permission for the rest. This problem occurs with the former "webloc" links as well as newly created (as in the example above). In addition, for some reason, all the webloc files now have "hide extension" selected in the Info Panel (again Finder shows the extension).

    I tried to reset the launch Services database by using the following command:

    /System/Library/frameworks/CoreServices.Framework/versions/A/frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister-tuer - r-domain local - domain-domain user system; Killall Finder

    It changed nothing.

    I only have this problem with the webloc files, I have no problem changing the default binding to other types of files.

    Any suggestion?

    What happens if do change in the preferences of the browsers.

    Firefox > Preferences > General

  • Is no longer able to follow links to local files.

    In previous versions of firefox (28 and earlier) I was able to follow the links of local file with white list in the preferences of the user of the file as described here: http://kb.mozillazine.org/Links_to_local_pages_do_not_work

    This feature has stopped working with the update.

    Update of information added by a moderator of the forum

    I Note

    In order to meet the demands of the business users, the localfilelinks policy has been restored with Firefox 30. This allows users to follow links on a webpage (http:// or https://) local filesystem (file:///) especially on the company's internal applications. For now, Firefox Beta or the extension of fileuri caps created by a developer of Mozilla can be used to get around this restriction.

    mentions caps-fileuri extension, but this seems to have been deleted. Is no longer in https://addons.mozilla.org/firefox/addon/caps-fileuri/ (original can be https://bugzilla.mozilla.org/attachment.cgi?id=8415447 )

    Also note that a question perhaps is currently open

    The prefs ' ability ' breakup is bug 995943.

    Bobby Holley is working on an extension of this bug which could solve the problem.

  • Local file sharing

    OK, so here's what I do need Windows to:

    I have 3 users on my personal computer, an admin accounts that I use for maintenance and other tasks and 2 'regular use' limited accounts.

    I want full file among all 3 of my user accounts for some files, but without the option "share on the network" because I don't want any remote access. I can not put everything just in the "shared documents" folder because there are too many files that I want shared, and I need them arranged exactly as they are--on another partition of my hard drive, so not in C: at all.

    How can I get there?

    Thank you!

    The read-only attribute is not applicable to records in the NT as XP operating systems. And to make sure that I understand perfectly you - these files are not in my limited user Documents, Yes? If this is correct, we will make a folder on this separate data partition and calling something useful like 'Shared work' or similar. Now go to control panel > Folder Options > view tab and uncheck "use Simple file sharing". Apply/OK outside.

    Now, put yourself in the shared working folder and right-click on it. Click sharing and security, and then on the Shared tab click "shared." Use a common name "SharedWork" without a space. Let it be shared at all. Click the permissions tab and give all permissions for all the world. "Everyone" means all the user accounts on the local system. MS - MVP - Elephant Boy computers - don't panic!

  • Windows 7 extract from order for zip files

    The extraction option isn't here for a zip file, I just downloaded and tried to open it. Also, when I tried to open the zip file, the default program to open a zip file is now Windows Photo. How can I reset the default zip files to open Windows Explorer, and how do I retrieve the extract function? The proposed solution on the forum for users of Vista is having this problem applies to WIndows 7? Thank you!

    Hello

    1st 3 here should you fix up (reference to Vista also applies to Windows 7)

    How to restore Vista built-in ZIP files Support
    http://www.Vistax64.com/tutorials/65254-zip-file-support-restore.html
    How to enable or disable the files compressed in Vista
    http://www.Vistax64.com/tutorials/93827-zip-file-compressed-folders.html
    Restore the Type Associations by default Vista file extensions
    http://www.Vistax64.com/tutorials/233243-default-file-type-associations-restore.html

    ---------------------------------

    How Unassociate a Type of Extension file in Vista - and a utility to help
    http://www.Vistax64.com/tutorials/91920-unassociate-file-extention-type.html
    Restore and return the file Association in Windows Vista if Original
    http://www.mydigitallife.info/2008/06/22/restore-and-reset-file-association-in-Windows-Vista-back-to-original-default/

    Reset and Fix Broken Windows Vista file Ext and Type Associations (include EXE, COM, SYS, ZIP, LNK,
    Folder, drive)
    http://www.mydigitallife.info/2008/06/22/reset-and-fix-broken-Windows-Vista-file-ext-and-type-associations-include-exe-com-sys-zip-lnk-folder-drive/

    For Windows Vista file association problems
    http://www.Winhelponline.com/articles/105/1/file-association-fixes-for-Windows-Vista.html

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

Maybe you are looking for

  • U940 PSU6VA satellite - wireless connectivity problems

    _ * My specifications: * _* Model: * Toshiba Ultrabook (Satellite PSU6VA - 00S 002 U940)* Operating system: * Windows 8.1 x 64 (upgrade of Windows 8 x 64)* Wireless adapter: * Intel Centrino Wireless - N 2200* Wireless adapter driver version: * 15.10

  • iBooks only opens in the version 9.2.1

    After you add PDFs to iBooks via iTunes, iBooks will be more open on my iPad mini 4.

  • How to partition a hard drive for a B50-70 for Linux? No problem with that?

    Hello How to partition a hard drive for a B50-70? I want to install Linux and keep Windows 8.1 also. This will affect the software factory example: back up hard drive function, OKR? Problems partitioning B50 of the 1970s? Is it acquisitions have 8.1

  • DX2 - suddenly affected by problems of WIFI connectivity

    Suddenly, I have WIFI connectivity problems on my DX2. The phone previously connected without any problem to my router which is secured by WPA/WPA2 PSK. What is happening is this: the phone scans all the available wifi networks, search my router and

  • 15 - f211wm: f211wm USB driver for win 7

    I have a f211wm hp delivered 15 with 10 windows and has since been charged with windows 7. I need the USB drivers as none of my USB ports are working. I've looked everywhere and said that since the laptop is with windows 10 it won't work with 7. I kn