09-26-2011 04:11 PM
Which version of the WebWorks SDK are you using?
I don't know really where to go from here.. if you used my exact code, I tried this on the same build for the same phone. ![]()
09-27-2011 04:19 AM
Hi Tim,
I created the same picker application from Blackberry SDK andsame exception is also coming with this.
Is there anything wrong with my device that it is not populating the FilePicker? Please let me know ![]()
Following is the code
import net.rim.device.api.ui.UiApplication;
public class MyApp extends UiApplication
{
public static void main(String[] args)
{
MyApp theApp = new MyApp();
theApp.enterEventDispatcher();
}
public MyApp()
{
pushScreen(new FilePickScreen());
}
}
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.picker.FilePicker;
public class FilePickScreen extends MainScreen {
public FilePickScreen()
{
setTitle("File Picker Sample");
add(new LabelField("Trying File Picker"));
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
FilePicker fp = FilePicker.getInstance();
FilePickListener fileListener = new FilePickListener();
fp.setListener(fileListener);
fp.show();
}
});
}
}
class FilePickListener implements FilePicker.Listener
{
public void selectionDone(String str)
{
Dialog.alert("You selected " + str);
}
}
09-27-2011 11:12 AM
Jerome had mentioned some problems with File Picker on OS 6 in the past. The weird part is that when I load the same build that you are using on the device it works without any issues.
Maybe reach out to him to see if he has been able to reproduce your issue.
09-28-2011 07:55 AM
Hi Tim,
Thanks for looking in my problem so deep.
I found one thread discussing same problem of FilePicker and following is the link
http://supportforums.blackberry.com/t5/Java-Develo
Further, One of its post said that the following is a workaround though it is not a neat one
Right now I have used the above workaround and was able to do it successfully but still need the FilePicker as it is the best way.
Can you share me the Jerome profile/link as I was not able to found him.
Thanks again.
09-28-2011 09:27 AM
Jerome is JCarty on the forums.. you can try reaching out via a PM.
If I knew which OS versions had a problem then I could encorporate the work around into my extension... Is there a specific exception that is thrown on the FilePicker Java API that I could trap and then provide the work around dialog?
09-28-2011 09:36 AM
09-28-2011 09:45 AM
09-28-2011 09:49 AM
I do not know if you are wrong or not.... your delving into depths that I'm not familiar with ![]()
09-28-2011 11:13 AM