file IO: which way to use?

Hello

I have the following code:

var i;
var root = blackberry.io.dir.getRootDirs ();
Alert ("root directory:" + root);
    
var dirs = blackberry.io.dir.listDirectories(root[0]);
for (i = 0; i< dirs.length;="" i++)="">
Alert (dirs [i]);
}

When I run it, it displays the directory root, like "file:///store/" and then lists the base directory.

But if I change the root of "file:///store/", it is not in the base directory.

How can I specify a path?

Sorry my mistake I have treatment root as a table when it was not. Oops!

Tags: BlackBerry Developers

Similar Questions

  • I would like a link to a file on muse. Can you tell me which way to use?

    Hello

    I'm trying to place a link in a jotform response to a pdf file that I have downloaded on my test to the Business Catalyst site. I don't know which path to use.  Is there a way to see the structure of my file?

    I'm such a nube!

    Thank you

    Laura

    A pdf file will be downloaded into their system first by default, but you have no control over this part.

  • Is there a way for the secret video files to the sansa fuze using QUICK MEDIA CONVERTER?

    Is there a way for the secret video files to the sansa fuze using QUICK MEDIA CONVERTER?

    Not really. The way final only ot add videos on the "rocket" is SMC. Rhapsody will do this also, but I don't know that its faster.

  • Failed to open all files with the extension .exe in Vista Business SP2. Dialog box appears and asks which program to use. Seems to have lost the info file assoc after virus removal.

    Failed to open all files with the extension .exe in Vista Business SP2.  Dialog box appears and asks which program to use.  Seems to have lost the info file assoc after virus removal.  Any suggestions?

    Hello

    Try the methods provided below and check if the problem persists.

    Method 1:

    Try the fix it or follow the manual for troubleshooting to solve the problem.

    When you run an .exe on a Windows XP, Windows Vista or Windows 7 computer file, the file can start another program

    http://support.Microsoft.com/kb/950505

    Note:

    The link above contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

    http://support.Microsoft.com/kb/322756

    Method 2:

    Download and run Microsoft Safety Scanner and check if the problem is caused by a Virus/Malware.

    Microsoft safety scanner

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

  • How to determine which program to use to open files and programs?

    Help!

    How can I determine which program opens a file or another program?

    I constantly get the message that xxxxx will not open this file. / Select a program to open this file/etc.

    Hi marco47,

    You want to get this prompt either if there is no program installed on the computer that opens the file type or you have not associated any program to open this type of file.

    See the link below to find out how to associate any type of file or Protocol with a program to open the file.

    Change the programs that Windows uses by default

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-which-programs-Windows-uses-by-default

    See the Microsoft article below and run the fixit tool to reset the associations of files on the computer.

    When you run an .exe on a Windows Vista-based or Windows 7 computer file, the file may start another program

    http://support.Microsoft.com/kb/950505

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Newbe to epub creation... itunes book oven will not accept encrypted files from InDesign 2014... cant find them and which fonts can use one without this problem?

    Newbe to epub creation... itunes book oven will not accept encrypted files... cant find them and which fonts can use one without this problem?

    The book oven does not accept the embedded fonts that are encrypted, even if the encryption is by the IDPF specifications.

    InDesign will not incorporate fonts unencrypted by respect for the rights of the provider of the police.

    There is no work around as I know, at least with regard to preview what will look like the fonts. If you choose not to embed the fonts then the oven should work, but then you won't be able to see what the fonts look like, no?

    What is the team of InDesign epub is simply side load the epub via dropbox or by e-mail. Two of these routes allow you to choose "open with...". "and iBooks will be one of the choices.

    Apple knows about it. I suggest that you remember that, as a customer, you are not satisfied with this behavior and asks that they go back on their decision.

    Douglas

  • What is the best way to use files recovery

    I work in FM 11 and broke FM a few times. What is the best way to use the recovery files and save them as normal files? So should I filter a window of the Explorer to "recovery" so FM don't ask me if I want to use the older recovery files? Thanks for your help.

    > What is a wash of the MIF?

    1. Save all the files of FM component .mif as MIF format.
      Save the .book as. book.MIF in the MIF format.
    2. Output FM.
      Restart FM.
    3. Open .mifs. Save as FM, replacing the old (FM probably saved files).
    4. Open the. book.MIF, re - register under .book.
      Note: do not open the. first book.MIF and then try to open the component files, or open the files binary pre - MIF.

    FM11 and 12 can have a free add-on as much as the fact in a single operation.

    Washing MIF creates new .book files and FM have syntactically correct data structures (and that may have lack of bad content). They are less likely to crash, but can still have problems.

  • I have 2 bridges. I want the configuration in the way by which I can use both the way of door simultaeously

    1st gateway is 192.168.0.200 for internet

    and another gateway is 192.168.0.254 for leased line

    I need to adjust the two entry doors by which I can use internet and access to leased lines

    where I do pay gateways in windows xp professional and how much.

    Hello

    Try these steps and check if that helps:

    a. click on start

    b. click Control Panel

    c. Select network connections.

    d. double-click the connection that you want to work with and click on the properties button to display the information related to this adapter.

    e. click TCP/IP, and then click the properties button

    f. to change TCP/IP address, enter the necessary information and click on apply.

    g. click the Advanced tab and add the gateway address.

    You can access the link that contains multiple on the gateway configuration information: http://technet.microsoft.com/en-us/library/bb878104.aspx

  • Which app to use to transfer files PC wirelesly to phone and vice versa

    Hi all

    Then, I got my new Z3 Compact and maan which a phone... In any case, we will not dwell the * beep * kissing and I would like to get into it...

    I managed to connect wirelesly to my PC and entered in the file of Commander (pre-installed app from the phone), where you can see the remote files. When you press it, you add a remote account, but here is where I got stuck. I press the remote shares, then press + to add Windows share.

    My question is, I have entries in these fields, to make it connect to my PC? I also ES File Explorer, which could help with this, but again, I have no idea how to make it work with my PC. There all the other apps out there, in addition to AirDroid, which might do the trick? I do not have AirDroid so much and thought that it would be a native solution for my problem.

    Any help would be so appreciated!

    Thanks again!

    Hello and welcome to the community! Since you are new, please make sure that you have checked our Forum.

    In order to access the files stored on your PC from the phone, you need to share the drive/folder you want to access the first. To share a drive or a folder in Windows, right click, select properties and then click the sharing tab. You can find more information here: http://windows.microsoft.com/en-us/windows-vista/share-files-and-folders-over-the-network-from-windo...

    When you then add the part to the phone, you must enter:

    'Host', which is the name of your computer (see Controlpanel-> System)

    'Action' that is what you named the shared disk/folder

    Name of user and password credentials that you have in your PC

  • Perfect way to use FXMLs

    Hey there,

    I've been coding in JavaFX for a long time now, but recently, I chose to switch from Java to build UI to FXMLs, and I'm confused of hell. Although I caught a few things like controllers, annotations initialize() and @FXML, there are still a few things that I think I'll take a wrong way to do it, so just need your suggestions.

    First lets consider a scenario where I have a BorderPane with a Menu above it.

    Now, based on Menu selection, I'm populating the left side of the BorderPane, who are my sub menu.

    Based on the selection in the left menu, I filled my centre of the BorderPane.

    Now, my approach is to create 3 files FXML i.e.

    1 home.fxml (borderpane as root and just has a menu inside)

    2 submenu.fxml (with a vbox with the buttons of submenu)

    3 view.fxml (having a gridpane with labels and the textfields)

    I have 3 controllers for each of them and in my startup method I have the following code, the MainWindow class extends the Application,

    Public MainWindow extends the Application

    {

    public static BorderPane borderPane ;

         public void start(){

              FXMLLoader loader = new FXMLLoader();
              borderPane = (BorderPane)loader.load(getClass().getResource("home.fxml"));

    }

    }

    Inside HomeController :

    On the click of each menu I call a different method, here I am just showing an example of one method :

    Public Sub handleUser()

    {

    FXMLLoader loader = new FXMLLoader();

    MainWindow.borderPane.setLeft ((BorderPane) loader.load (getClass () .getResource ("submenu.fxml")));

    }


    Inside SubMenuController :

    I similarly load the GridPane and set it on the center of the borderPane. I have different subMenus and I am showing an example of just one submenu:

    Public Sub handleUserSubMenu1()

    {

    FXMLLoader loader = new FXMLLoader();

    MainWindow.borderPane.setCenter ((BorderPane) loader.load (getClass () .getResource ("view.fxml")));

    }

    Inside ViewController,

    I have different @FXML annotations for the textFields and use them.

    Is this the correct way to use FXML? First thing is to use "public static BorderPane borderPane ; ' which I think is fair.

    I have more than a few doubts, but do not want to go step by step.

    Post edited by: abhinay_agarwal

    Big question. It would certainly help someone set up an example of this as part of the official documentation of JavaFX. (If I have time, I could create a blog somewhere, but no promises.)

    As you have noticed, exposing the BorderPane as a public static field is probably not the best approach for two reasons:

    1. it is not very easy to manage. It's probably unlikely, but if you later decide you do want to use a BorderPane at all (maybe an AnchorPane instead), it would be very difficult to change your code.

    2. your primary display is now tightly coupled to your application: cannot use the view outside your MainWindow as you would not be able to change points of view.

    My solution preferred for this type of scenario is to have the controllers for the smaller parts of the user interface expose properties that can be observed by the controller for the main part of the user interface. If your submenu controller can expose a property of the "current selected view. The home controller can quite easily to get a reference to the menu SUP command and observe this property for changes. The goal of very big when I draw these is that controllers have access to aspects of the graphic scene below the node that they control you and he do not have access to all the foregoing. I'm also trying to expose only the data from controllers, not the scene graph nodes.

    I'm not 100% clear on the Setup you describe. I don't think that you plan to load home.fxml once again in your handleUser() method, but some other fxml. But the general idea is that the selections of different menu in the menu defined in home.fxml fill the left side of the BorderPane with different submenus (represented by the buttons, if you want to have the flexibility to change that) and then different selections in these submenus should cause a different opinion to be loaded and displayed in the center of the BorderPane. (Hope this is true).

    I approach this kind of different configurations with HomeController change point of view in all parts of the BorderPane. To do this, the HomeController must have a reference to the controller for the submenu on the left, and this controller must expose a property showing what is currently selected. So I would do something like this:

    SubMenuController: features common to all the controllers menu SUP:

    public interface SubMenuController {
         public ReadOnlyObjectProperty selectedViewProperty();
         public URL getSelectedView() ;
    }
    

    HomeController:

    public class HomeController {
         private final ObjectProperty currentSubMenuController = new SimpleObjectProperty<>();
         @FXML
         private BorderPane root ; // root element of home.fxml, injected as usual with fx:id="root"
         // ...
         public void handleUser() {
              // Note I fixed you loader code, which is slightly incorrect (doesn't quite do what you think):
              FXMLLoader loader = new FXMLLoader(getClass().getResource("userSubMenu.fxml"));
              Parent userSubMenu = (Parent) loader.load();
              currentSubMenuController.set((SubMenuController)loader.getController());
              root.setLeft(userSubMenu);
         }
         // ...
    }
    

    UserSubMenuController (controller for userSubMenu):

    public class UserSubMenuController implements SubMenuController {
         private final ReadOnlyObjectWrapper selectedView = new ReadOnlyObjectWrapper<>(this, "selectedView", null);
         @Override
         public final ReadOnlyObjectProperty selectedViewProperty() {
              return selectedView.readOnlyProperty();
         }
         @Override
         public final URL getSelectedView() {
              return selectedView.get();
         }
         // handler method for selection button:
         public void handleFooSelection() {
              selectedView.set(...); // url for view you want in the center of the BorderPane
         }
    }
    

    and there will be similar controllers for each of your submenus.

    Now, you must do your HomeController abreast of changes to the selectedViewProperty() for the currently under menu. An affair can help here:

    HomeController (new):

    public class HomeController {
         // same code I showed above, plus:
         public void initialize() {
              // selectedView property of currentSubMenu:
              ObservableValue subMenuSelectedView = Bindings.select(currentSubMenuController, "selectedView");
               subMenuSelectedView.addListener(new ChangeListener() {
                   public void changed(ObservableValue obs, URL oldView, URL newView) {
                        if (newView == null) {
                             root.setCenter(null);
                        } else {
                             FXMLLoader loader = new FXMLLoader(newView);
                             Parent view = (Parent) loader.load();
                             root.setCenter(view);
                        }
                   }
              });
              // ...
         }
         // ...
    }
    

    I hope that there is enough detail here to make sense. I just typed the code here is likely to have some typos and perhaps some errors (I think I missed a few exceptions...), but it should be enough to give you some ideas.

  • Is there a way to use data formats i.e. Go Mo Ko in numbers?

    Is there a way to use data formats i.e. Go Mo Ko in numbers?

    I am trying to add the size of the library files to estimate the needs of the HD. If I had the files on my system I could just put them in a folder and the operating system would be to calculate them for me, but I don't have them yet. I have a list of files and their size in GB.

    Someone has it worked?

    I suggest the following:

    Create a second table called "convert".

    In this table, enter the first column as show (pasted here so you can copy)

    Value

    Divide by

    suffix

    0

    1

    b

    400

    1024

    Ko

    1000000

    1048576

    MB

    1000000000

    1073741824

    GB

    1000000000000

    1099511627776

    TB

    Appropriate now in the table 1 use the conversion table to change the size of the files in the format:

    "C2 = ROUND (B2÷VLOOKUP (B2, Convert::A:C, 2, 1), 2) &" "& VLOOKUP(B2,Convert::A:C,3,1)".

    It's shorthand dethrone select cell C2, then type (or copy and paste it here) the formula:

    "= ROUND (B2÷VLOOKUP (B2, Convert::A:C, 2, 1), 2) &" "& VLOOKUP(B2,Convert::A:C,3,1)".

    Select cell C2, copy

    Select cells C2 at the end of the C column, paste

  • Photos saving disk space to share images with your iPhoto or Aperture libraries.  Should which library I use to remove old photos?  If I delete old photos in iPhotos appear in pictures and vice versa?

    Should which library I use to remove old photos?  iPhoto or Photos?

    If you migrated a library iPhoto to Photos and you want to release the storage, you should remove the pictures of these two libraries.

    Related photos storage only comes out, after that the last linked file has been deleted.  If you do not use more of the iPhoto library, move it to a backup drive. Then simply delete the photos of your new photo library.

  • What is a good way to use the queues for the model of consumers/producers?

    Hi all

    I am following the model of consumers/producers to use the queue to synchronize the following process: the producer is a loop to produce a number N, I will put each number generated in a table and after each 5 numbers generated, I put the table in the queue and pass it on to the consumer. I have to wait the use by consumers of the data and it will then remove the item from queue so that producers will have the chance to produce another 5 numbers. As I put the maximum size of the queue one, I expect that the producer and the consumer turns to produce / consume all five numbers and the opportunity to another. Here is my code

    When the checkbox is false, the code will be

    For the first 5 numbers, product will generate every thing right and put it in the table, and it's going to pass the array to the quere so that the consumer will have the chance to loop through the table. I except the procude loop will continue only when the queue is available (i.e. all items are deleted), but it seems that once the consumer starts the loop loop of the product will continue (if the indicator x + 1 and x 2 will be changed to numbers). But this isn't what I want, I know there must be something wrong, but I can't say it is.

    dragondriver wrote:

    As you say in 1, sequency structure to enforce the order of execution, that's why I put it here, in this example, the simple question, I replace the complete code with increase in the number, in the real case, the first markers + 1 and + 2 must be performed in this order.

    Mikeporter says:
    1. get rid of all the structures of the sequence. None of them are nothing but apply a work order which would have been the same without them.

    So even if you delete the sequence structure, there will be a fixed & defined order and it is because LabVIEW follows the MODEL of FLOW OF DATA.

    Data flow model (more precisely in the context of LabVIEW): a block diagram node runs when it receives the required inputs. When a node is running, it produces output data and transmits data to the next node in the path of the data stream. The flow of data on the nodes determines the order of execution of the VIs and functions on the block diagram (click here for reference).

    Now in your code, just remove the sequence structure will not make you order will be going to stay the same, but you need to do some very minor changes (as thread of the error in loop, before that he go to the node "Élément Dequeue").

    Come to the main point: it's a good way to use the queue for the consumer/pmodel that?
    The model you are using (and qualifying as consumer/pmodel) is much too deviated from the original consumer/pmodel which model.

    dragondriver wrote:

    For the second, Yes, it's my fault for delete, though. I'm actually the example of model of producer/consumer design pattern, but I do not pay attention to the while loop in the part of the consumer.

    While loops (two producers & consumers) are the essential part of this architecture and cannot be deleted. You can start your code using standard model.

  • I can view is no longer the video files to the format AVCHD using Windows Media Player on my desktop

    I can view is no longer the video files to the format AVCHD using Windows Media Player on my desktop.

    I could at some point... but now all I get is audio, no video.  The files open and work on

    my laptop that also uses Windows Media Player... but for some reason now... nadda.  Seemed

    This all started when I upgraded Windows more late service CAP and also installed Real Player.

    Help!

    Hello

    • What version of Windows are you using?

    1. it is possible that you are missing the codec to play the file or it is clashing with other codec files.

    2. the link provided below lists supported by Windows Media Player file format.
    It does not list the AVCHD or. MTS files supported file format directly:
    http://support.Microsoft.com/kb/316992

    3. yet we cannot be sure at this point that the issue is due to interference with some files.

    Method 1:
    Alternatively, you can perform a restore of the system to a previous point, when the issue was not present. The System Restore tool uses points of restore to return the system files and settings to an earlier point in time. You can use it to restore the operating system to a point in time where you have not experienced the problem.

    Note: When you use System restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    To do this, there must be a restore point from the system in which the connection was successful.

    Please refer to the below of the help links on performing a system restore.
    http://Windows.Microsoft.com/en-us/Windows7/what-is-system-restore
    http://Windows.Microsoft.com/en-us/Windows7/system-restore-frequently-asked-questions

    Method 2:
    You can determine which codec was used with a specific file; read the file in the player, if possible. When the file is playing, right-click the file in the library, and then click Properties. On thefile tab, look at the Audio codec and Video codec sections.

    Then you can uninstall any installed codec and install that you need to do the job file.

    If you have several codec for the single file to work they can clash and cause problems.


    You can check the link for assistance on the issue - below

    http://Windows.Microsoft.com/en-us/Windows7/codecs-frequently-asked-questions

  • How to convert an mp3 file to a file rtext? Can I use windows media player to play mp3 and have the recigition speech to convert to text?

    Can I use windows media player to play mp3 and have the recigition speech to convert to text?

    You can get on a conversion of 70% in reading a file in Windows Media Player using something like Dragon Naturally Speaking to convert. If you set the playback speed to slow in Windows Media Player to play > play speed, you will get a better result. The best option is to download the file to an audio transcription service, but which generally costs 0, 50-1, 00 per minute of audio.

Maybe you are looking for

  • No system boot, how to access the recovery partition?

    HelloWhile messing around with win7 and xp (from vista that was preinstalled on my system), I managed to make my computer unbootable. I made the recovery discs when I came to my computer, but I left with my parents... which is be the other side of th

  • dynamically selecting active at TS2012

    TS2012 I have several configured reports (all different displayable reports), and they all generate very well (they are all on the disc where I think they should be) At the end of the run, I get the default visible displayed report showing, and top r

  • Impossible to install security software 1603,0, 0 x 000 errors

    For the last 3 weeks I tried to install Trend Micro Internet Security software. Initially the 1603 error is out of my attempt to upgrade my version 3.51 to the latest version 5. Software Trend Micro uninstalled my old version then threw a 1603 error

  • Email account hacked

    Can you please remove my old pirate email?  DDSP7550@MSN,.com as it's been hacked - changed passowrd but now appears in the language of Pakistan - cannot delete myself

  • How to defrag, optimize and recover system memory

    Dell Dimension 2400 Windows XP SP3