Flash required to explore WidSets
The newest version of the Flash Player is required to explore WidSets. Please download and install the free Flash Player from the icon below.
After installation, refresh this page »
Does the example sound player actually work?
Does the example sound player actually work?
Does the example sound player actually work? I ran it in the dev kit, it downloaded the mp3 list, but then I got a bunch of nullpoiters.Anyone help?
Re: Does the example sound player actually work?
The emulator doesn't support playing sounds, thus you get no Player instance but a null instead as the result of getPlayer(...) method. Try it on real mobile devices and you'd better perform a null-pointer check before starting a player. There are still some problems with the relating APIs, but I'm sure they work.
Re: Does the example sound player actually work?
Thanks.Yaiba. Really helpful.
Could you help me out a little bit here?
How can I have the dev version of widset on my phone?
dev.widsets.com/dl is not working.
I'm quite new with widset developing. At the moment I'm confused about the ITEM_CHANGED event.
source:UItest example line 351
else if (action == CMD_CHANGE) {
//soft key was clicked, start editing mode
//Note that Input-component captures phone's joystick-fire event and starts
//editing mode itself
input.edit();
}
else if (action == ITEM_CHANGED && source == Component(input)) {
//editing done, save new text to store
getStore().put(STORE, Value(input.getText()));
}
In the emulator,if you push the "fire" bottom and after you finish the input and push OK, the ITEM_CHANGED event seems not triggered. I used a prompt to test this.
else if (action == ITEM_CHANGED && source == Component(input)) {
Propmpt prompt = new Prompt(null, "Action performed", null, BACK);
prompt.push();
}
The prompt does not happen.But when you click the input area directly using your mouse, the prompt happens when you finish the input and push OK.
I haven't test it on my phone because I don'thave dev widset on it.
Thanks.
ps: the input element has the initial focuse.
Re: Does the example sound player actually work?
The URL for downloading widsets is "dev.widsets.com/get".
Since there is a typo in your codes, I assume that they are not directly copied from your source file. Either copy/paste the codes or attach the source file, and we can start to find where the problem is.
Re: Does the example sound player actually work?
Thanks for the help here,Yaiba.I am trying to make a widget similar to the Wikipedia widget.It is simple. People click the widset on the dashboard,then it pops out an input area(using edit() method). The widget captures users' inputs and sends them to a web service using http_service. I am having problem of how to pop out a new shell displaying the results retrived from the webservice after people finishs inputting. I consulted the apidocs,it says when people finishs editing and pushs the SOFTKEY_OK botton,a ITEM_CHANGED event is triggered.But it does not work very well. Could you simply show me how to realise such a function(caputure the string inside the input element and then pop out a new shell displaying lets say the exact texts the user input) ? Some code would be preferable,cos I am a rookie here. :p Thanks a lot.
Re: Does the example sound player actually work?
...
Shell openWidget() {
new Input(getStyle(""), "Enter a word", "", ANY | ONE_LINE).edit();
return null;
}
...
void actionPerformed(Shell shell, Component source, int action) {
switch(action) {
case ITEM_CHANGED:
{
String word = source.getText();
lookUp(word);
return;
}
...
}
}
void lookUp(String word) {
//Connect to your server and fetch contents
...
}
...
Re: Does the example sound player actually work?
Problem solved. Many thanks. Yaiba~~
But there is a problem with my widget's UI. It looks perfect in the emulator. But it looks rather awful on my phone and in the S40 3rd simulator.
What happened?
Re: Does the example sound player actually work?
Differences between emulator and the real thing are usually because
screen resolutions are different, and that can result in problems with
- Scaled/Not-scaled resource images
- Fonts faces and sizes
- Absolutely/Relatively specified component sizes
Can you attach screenshots (taken using phone camera or something) from both screens that I could guess what is going wrong?)
/render
