Cannot compile BB Widget with JavaScript Custom Extension
Hello:
I have came across the entire video creating a Javascript Extension customized for BB Widgets and made my own. I made some functions available and named my main package as 'rgpackage' and this is where all of my classes.
After that, I just exported to a JAD/JAR file (just like the video says).
Open Web plug-ins, BlackBerry (v2.0.0.201003191451 - 33) and a new project of Widget of BB.
A new ext folder appeared and I dragged my JAR/JAD file in this folder.
Went to the file config.xml by default BB Widget Config Editor and added functionality. Mine appeared in the list, so I double clicked it.
Everything is fine now. Add the code to my main index.html file to test my extension.
When press the 'Run' button, my widget has started to compile (and also the extension) and this message keeps appearing (and I can't get rid of it... at least I do not know how and what could happen):
[INFO] Compilation of widget
C:\Users\Andy\AppData\Local\Temp\widgetGen.3461070221272448531372.tmp\blackberry\web\widget\autogen\WidgetConfigAutoGen.Java:27: package rgpackage does not exist
_widgetExtensions.addElement (rgpackage again. RGPhotoTakerExtension());
Please help as I cannot move with the development because of this error (weird?).
Thank you in advance.
Andy
Trying to get this to work finally found the problem.
Anyone for reference:
During the export of JAR file, the 'resources and Export Java source files' option should be selected instead of "Export generated resources and class files". In my Eclipse, the last of them has been selected by default.
Unfortunately, the video tutorial is not clear on this point. Anyway, you can see in the video that the correct option is selected, but because it is not mentioned, it can be confusing as it dawned on me.
But now, everything works as expected. Finally!
I thank everyone.
Andy
Tags: BlackBerry Developers
Similar Questions
-
I have a form in which the user enters several lines of data as well as additional information on these data. I would like finally to export data, so I can manipulate the Excel. This is possible because javascript (or otherwise)? Here is an example of what I mean.
The form of a table in which the user enters each of the names of his friend, their favorite color and their age. I want the name of the specific friend linked to their favorite color and age so when I export to excel I can see how many friends has the user whose favorite color is red.
If the form data would be as follows:
Friend1name
Friend2name
Friend3name
Friend1color
Friend2color
Friend3color
Friend1age
Friend2age
Friend3age
When I export the data as entered above, the results of each field in another column.
Anyone has any ideas for that?
It is possible with JavaScript. You can write the data to the JavaScript console and then copy & paste into Excel, or write to a file as an attachment (aka data object) and export it. Here's a sample script that writes the field data in the JavaScript console:
Table of domain names
Invoke the var = ['Friend1name', 'Friend2name', 'Friend3name', 'Friend1color', 'Friend2color', 'Friend3color', 'Friend1age', 'Friend2age', 'Friend3age'];
Browse the fields and write the field values in the console
for (var i = 0; i)< afields.length;="" i="" +="1)">
Console.println (getField(aFields[i]).valueAsString);
}
Display console
Console.Show ();
You can place this code in the mouse event to the top of a button and click the button to run it. This last line of code displays the console and you will be able to copy & paste the data.
-
Publication and display locally a captivate with javascript project custom
Hi all
Ive had a problem that I can not work.
I started working with javascript, so when I want to listen to excerpts of the document, I use F12, which works correctly.
Also, when I use captivate to publish my projects directly on my site it works fine also.
However when I publish locally, when I go to view the output, javascript does not seem to load.
Pretty funny. The same file when downloaded on my site and then seen it works fine.
What is the cause? And I can do to fix this?
Concerning
Mathew
Mathew, you must add the location of publication record as a trusted location in your Flash Global security settings.
Google for info on Flash Global Security.
-
Cannot see/Run JCarousel with FireFox
Cannot see/run JCarousel with Firefox.
I am able to see the main image and the images over the primary image line; but the javascript code which changes at each successive image does not work.
I can't run any JCarousel with FireFox. National Geographic is just one example of the most recent which does not work.
You have quite a few extensions you installed that can cause problems like that (Adblock Plus, Ghostery).
Start Firefox in Firefox to solve the issues in Safe Mode to check if one of your modules is causing your problem (switch to the DEFAULT theme: Tools > Modules > themes).
- Makes no changes on the start safe mode window.
See the extensions, themes and problems of hardware acceleration to resolve common troubleshooting Firefox problems and troubleshooting questions with plugins like Flash or Java to solve common Firefox problems
- If you have many extensions then you first activate half test extensions that half the problem.
Continue to divide the bad half that still has the question until you find that one is causing it.
-
LabWindows/CVI cannot compile a simple code
Hi all!
It's looks funny but LabWindows/CVI-9.1.0(427) cannot compile a simple C code
XML.h
void f();
XML.c
#include 'xml.h.
typedef struct
{
int bar;} foo;
void f()
{
int Baz = 0;
If (!) Baz) baz = 1;
foop foo;
return;
}It's not a bug, you make a statement block to a variable foop which is not allowed in the standard ANSI C89.
You can activate the C99 extensions with a pragma if you want this to work in CVI 9.1
Menchar
-
How to add a button with Javascript library
Hello
I am using Captivate 5.5 to create a template.
In the files that will be created by using this template, we will add a button that executes a Javascript script. Now my question is, given that this button will be used across multiple slides in the file, I can add this button (with the Javascript code) to the library? We currently create manually everytime.
We do not have a programmer on our team, so that we cannot create the widget. Is there another way?
Thanks for your help.
Anthony
Why do you need to remove the slide?
I have a white blank slide at the beginning of all my modules of Captivate. There are some issues that appear to be avoided if the first slide has nothing about it. You don't have to do this very long slide. Usually mine are just a second, in the long term.
-
Can Hello anyone help?
After you configure Subversion in Dreamweaver, I get this error again!
SVN: 155021 #. You cannot update this file with the help of Dreamweaver Subversion integration because a new Subversion client application on your machine has made updates to the file Subversion meta data. For more information about this issue, see http://www.adobe.com/go/dw_svn_en.
even after following the instructions http://www.Adobe.com/go/dw_svn_en Download the extension, python change the var in windows to say «;» C:\Python26'
with & without quotes, with or without; before C
command > comparability of Subversion to get the following error "the Conversion process has failed. Please make sure you have Python installed and you check Python PATH parameter'
I managed to get all the files after the installation, I locked, unlocked and commit a file to test fact so that was all works well, the only part I'm not retrieves the latest version, this is because Subversion is 1.6.2 and dreamweaver must revert to the version 1.4.5 on local to work, the compile someone at - it an idea what to try next in order to make it work?
Just a reminder!
- I configure Subversion through guidelines on http://help.Adobe.com/en_US/Dreamweaver/10.0_Using/WS80FE60AC-15F8-45a2-842E-52D29F540FED. html
- I managed to get the latest SVN version
- Lock, unlock and commit a file
- Installed Python in C:\Python26 change the path in windows system properties > advanced > Environment Variables > system variables > New > Python =; C:\Python26 also C:\Python26
- I also tried the same thing in the User Variables
- Installed the extension DW Subversion compatibility
Tried to run the compatibly with the command > Subversion comparability in DW
Welcome any suggestion to solve this?
Hello
There has been a lot of problems using svn with dw, and I know many people who have stopped trying to operate correctly.
As much as I know dw will not work with newer versions of svn (over 1.5), and even then, there are a lot of problems, a possible solution is to try subweaver (at- http://code.google.com/p/subweaver/ ), as this has solved some of the problems associated with the use of tsvn dw environment.
PZ
-
I have emails with attachments with a .pps extension. Although I installed PowerPoint Viewer, I can not even open them, I get the message: the file does not have a program associated with it for performing this action. Create an association in the set Associations in the control panel. I think I could do it, but still could not open the file.
Thank you
original title: attachments
Hello
You should probably set the accociation for the PowerPoint Viewer .pps file.
Cannot open. PPS directly from Windows Mail or Windows Live Mail attachments
http://www.Winhelponline.com/blog/unable-to-open-PPS-ppt-from-Windows-mail-or-WLM/You must have installed from Microsoft Office PowerPoint or the PowerPoint Viewer.
PowerPoint Viewer - free
http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=13View a presentation without PowerPoint 2010
http://Office.Microsoft.com/en-us/PowerPoint-Help/view-a-presentation-without-PowerPoint-2010-HA102000544.aspxMicrosoft Office - PowerPoint
http://Office.Microsoft.com/en-us/PowerPoint/Another free option is OpenOffice - Impress
OpenOffice - free
http://www.OpenOffice.org/Open and save a PowerPoint file
http://wiki.Services.OpenOffice.org/wiki/documentation/OOoAuthors_User_Manual/Impress_Guide/Opening_and_saving_a_PowerPoint_file--------------------------------------------------------------------------------------------------
If you have PowerPoint, you may need to reset the associations so PowerPoint automatically opens files.
How to set default Associations for a program in Windows 7
http://www.SevenForums.com/tutorials/2630-default-programs-set-programs-default-associations.htmlRestore the Type Associations by default Windows 7 file Extension
http://www.SevenForums.com/tutorials/19449-default-file-type-associations-restore.htmlHow Unassociate a Type of Extension file in Vista and a utility to help (Windows 7 too)
http://www.Vistax64.com/tutorials/91920-unassociate-file-extention-type.htmlHow to change the default program opens a file Type in Windows 7 http://www.sevenforums.com/tutorials/12196-open-change-default-program.html
How to associate a file Type or protocol default program in Windows 7
http://www.SevenForums.com/tutorials/9154-default-programs-associate-file-type-Protocol.html
How to show or hide the Extensions of types of files in Windows 7
http://www.SevenForums.com/tutorials/10570-file-extensions-hide-show.html#post101629===============================================
Windows Live Solution Center - HotMail - HotMail Forums Solutions
http://windowslivehelp.com/
Hotmail - Forums
http://windowslivehelp.com/forums.aspx?ProductID=1Hotmail - Solutions
http://windowslivehelp.com/solutions.aspx?ProductID=1How to contact Windows Live Hotmail Support
http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htmWindows Live Hotmail Top issues and Support information
http://support.Microsoft.com/kb/316659/en-us-------------------
Windows Live Mail Forums
http://www.windowslivehelp.com/forums.aspx?ProductID=15Windows Live Solutions
http://www.windowslivehelp.com/solutions.aspx?ProductID=15Windows Live Solution Center
http://www.windowslivehelp.com/I hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
I want to customize my desktop icons to make it easier to read. When I right click, select Change icon, select Browse, I see all the icons I want to use. I downloaded a custom on the internet and saved on my desktop icon, but I don't know how to replace the old icon by this news.
Tried to drag on the old icon without success.
Hi Larry,
Thanks for posting your query in Microsoft Community.
I understand from your description, that you cannot change the folder icon with a custom icon uploaded to the Internet.
I'll be happy to help you. This problem could be caused because you may not have selected the right path or the location of the file that you downloaded or the downloaded file may be damaged or does not work or does not exist.
I suggest to follow the steps below and we update on the State of the question.
I recommend you to check or find the location of the file or path where exactly you downloaded and to check whether the file is actually present in the location and also check the file is fully downloaded and work very well.
a. Subsequently, navigate to the folder that you change the icon and right-click on the folder.
b. click Properties, click the Customize tab, click change icon, and click Browse.
c. Select the correct path inside the menu drop-down or enter the correct path manually from the exact location of the downloaded file.
d. open the file downloaded for the icon, choose the name of the file and click Open to select the file, and check to see if it helps you.
If the problem persists, then I suggest you to download the file once more on the Internet and save it in a new folder and check the issue.
For reference:
How to change the default icons for folders in Windows XP:
http://support.Microsoft.com/kb/310192
For all windows questions do not hesitate to contact us and we will be happy to help you.
-
Customers able to avoid paying shipping with Javascript disabled
A customer has reported customers in full case without paying shipping costs. The site uses USPS to calculate shipping costs.
The following code is used in the basket of a user to calculate shipping costs {tag_shippingoptions, false, ShipToSingleCountry, US, false, false}
I spent a test with Javascript disabled command and has been able to bypass the selection of one of the values of shipment required as a result of no value showing actually. Is there a job recommended around this option to prevent users from manipulating the system to avoid shipping charges?
Thank you!
You can hide the payment button if javascript is disabled, and replace it with a message that javascript must be activated at the cash register. Not the best solution, but it works.
-
Can I add javascript customized to the generated Web page of Muse?
I assess the ability of Muse and would like to know: can I insert javascript customized to the generated Web page of Muse?
Our site desktop and mobile needs to communicate with the back-end web service via REST and have front end JSON data visually. But I can't find any instructions in Muse, is he able to do these things?
Where can I find a complete reference manual for all the function but not fractional files video only?
It is not documented as it would be a custom implementation, but you can go ahead and test the appeal of the order through REST using javascript.
Personally not tried but it should work.
Thank you
Sanjit
-
How can I redirect a URL with JavaScript submit in Adobe LiveCycle
How can I redirect a specific URL with JavaScript on submit in Adobe LiveCycle?
I already have the code in place where the submit event is managed and just need specific code to do the redirect.
Standard type asp.net redirects as
Windows.Location.Replace (http://myURL.com);
do not work.
Any help would be appreciated.
To be able to redirect a Web site with a "submit" button, you must have a custom submit button and insert the following line:
app.launchURL ("www.url.com");
-
How to continue rendering of the transition with the custom dialog box open
Hello
I'm working on a plugin for some transitions custom (currently for CS6/CC on Windows).
I use a custom dialog (hasCustomDialog in PiPL) during the esSetup box to define the transition parameters. While the dialog box is open, first execution is suspended until the dialog box is closed.
The problem is, if I'm fiddling with the settings I do not see the changes in the program monitor and I don't get any comment first.
I tried to make the dialog non-blocking, but then first did not executives when I changed something in the dialog box.
Anyone know if it is possible to maintain the dialogue and still have first actively updating the display?
Kind regards
Philipp Stelzer
But I want to keep the dialog box open to see the changes directly without opening the dialog box whenever I want to change a value. Is this possible with a custom dialog?
It is not the case. But using the AE API with extensions of the transition, you should be able to achieve the same thing, with the effect controls panel, containing all your effects settings.
-
Replace the message "No Items Found" with Javascript
On this page http://www.sedonamagoretreat.org/test in the second box "Program Dates" in the sidebar on the right, I'm trying to set up a script that I found to replace the "No items found" message with a custom html file.
The javascript is here: http://www.sedonamagoretreat.org/js/no-items-found.js and here is the html file that is used to replace the message: http://www.sedonamagoretreat.org/prog-dates-alternate-content.
I'm sure this is an easy fix and I'm just on something... suggestions to get this script working are welcome - thanks!
Linda
Well Yes, it's easy to fix. You are the javascript file requires jQuery is working properly and in the HEAD of your page or the page template you load the '/js/no-items-found.js' before calling jQuery. Just move this SCRIPT reference in your page or your page template to the bottom of line to make AFTER the dismissal of javascript jQuery.
Once correct you this error, it seems that the script is a not can prepare to deal with multiple instances of your web applications list.
-
Alternate slides with JavaScript (or advanced Actions)?
I was wondering if someone out there with the knowledge of JavaScript could help me a little...
A colleague came to me with a question about randomization of the slides. We work in Captivate 5.5. The slides are all part of a quiz (but aren't question slides). They have a click box. The idea is that if the user clicks on the box (or off the beaten track), it shows a good (or bad) legend and then jumps to a random slide (new). If the user manages at the end of the slide without selecting anything, their time is running out and they get fried to a random slide and it is regarded as an incorrect answer. The user should see all of the slides in random order, with no recurrence.
I created a tip Action, integrating the widget of random number, and it works. My problem is that the project has 50 blades, and I'm not sure it is very feasible with advanced Actions. As it is, my test with 3 random slides is an action with 4 conditional statements, so I'm not really looking to create one for 50 slides. (I don't know even if Captivate would be able to handle this).
Is there a way (judging) to achieve with JavaScript instead? My vague idea based on my very limited knowledge of programming is:
- on enter first Captivate slide, create the array of random slides - 1 slide numbers (because cpCmndGotoSlide index starts at 0)
so if I had a project where I wanted to shoot random slides 3-8, the would be [2, 3, 4, 5, 6, 7] - Shuffle/random table
- set up a variable called slideviews = 0 to keep track of how many slides have been seen (and so which item in the table to move to the next randomly)
- Create a function that I'm going to run when I want to access a random slide (whether at the end of a slide or in the success or failure of a click on a square)
something like... If slideviews < array.length, cpCmndGotoSlide = array [slideviews]; slideviews ++; Another thing, cpCmndGotoSlide is 8 (jump at the end of the slides)
Of course, this lack of things (like the proper syntax and things needed to communicate with captivate)... but is sound logic? Is there a better way to do it?
Come to think of it, the table and the slideviews variable should be saved if we wanted it works with bookmarking... I think that this project will be SCORM 1.2 LMS System.
It would be nice to have a variable user I can access within the Captivate project and I can put in a legend to show the script #. Something like scenario = slideviews (I know that's not the syntax, reading series of JavaScript of Jim Leichliter on CaptivateDev.com, but that's the basic idea.)
Anyway, pointers would be very useful! Thank you.
Edit: I played a little bit; for randomization, I found a code online, and then I wrote something that automatically creates a table and a function for the jump to a slide randomly. Here's what I have so far (not tested in Captivate yet):
var objCP = document.Captivate; var randomNumbers = []; // The following creates the values for the array: 3 to 52. // I want to randomize slides 4-53, using cpCmndGotoSlide (index starting at 0) to jump to them for(i=3; i<53; i++) { randomNumbers[i-3] = i; } var n = randomNumbers.length; var tempArr = []; for (i = 0; i < n-1; i++ ) { // The following line removes one random element from arr // and pushes it onto tempArr tempArr.push(randomNumbers.splice(Math.floor(Math.random()*randomNumbers.length),1)[0]); } // Push the remaining item onto tempArr tempArr.push(randomNumbers[0]); randomNumbers=tempArr; var slideViews = 0; var randomSlide = function() { if (slideViews < 50) { objCP.cpEISetValue("cpCmndGotoSlide", randomNumbers[slideViews]); slideViews++; objCP.cpEISetValue("scenarioNumber", slideViews); } //after all the slides have been seen, jump to the final results slide else { objCP.cpEISetValue("cpCmndGotoSlide", 53); } };
I doubt it will work off the bat, but maybe this is a beginning?
I managed to get things working, so I thought I'd post my (probably a little unwieldy and inefficient) code in case people come across this thread and want a starting point:
var objCP = document. Captivate;
var randomNumbers = [];
var slideViews = 0;
CVS var = 0;shuffle var = {function (array)}
var m = array.length, t, j;
so that {(m)
j = Math.floor (Math.random () * m-);
t = array [m];
table [m] = array [j];
table [j] = t;
}
};var jumpSlide = function() {}
If (slideViews < randomNumbers.length) {}
objCP.cpEISetValue ('cpCmndGotoSlide', randomNumbers [slideViews]-1);
slideViews ++;
objCP.cpEISetValue ('scenarioNumber', slideViews);
}
else {}
objCP.cpEISetValue ('cpCmndGotoSlide', 52);
}
};var randomSlide = function() {}
If (g_objAPI.LMSGetValue ('cmi.comments') = ") {}
for (i = 3; i < 53; i ++) {}
randomNumbers [i-3] = i;
}
Shuffle (randomNumbers);
g_objAPI.LMSSetValue ('cmi.comments', randomNumbers);
resume ++;
jumpSlide();
}
ElseIf (resume = 0) {}
randomNumbers = g_objAPI.LMSGetValue('cmi.comments').split(',');
slideViews = objCP.cpEIGetValue ('scenarioNumber');
resume ++;
jumpSlide();
}
else {}
jumpSlide();
}
};The random slide order is stored in cmi.comments, and the position in the sequence is stored in a Captivate variable called scenarioNumber. I could have stored the two variables of Captivate in cmi.suspend_data, but in the end, I liked being able to see the numbers when considering the SCORM data. To work around problems with initialization, I made the creation/restoration of the part of random numbers of the function which climbs to a slide randomly, so nothing is actually executed when entering the first slide.
- on enter first Captivate slide, create the array of random slides - 1 slide numbers (because cpCmndGotoSlide index starts at 0)
Maybe you are looking for
-
Apple has access to my bank accounts?
Hello I registered my Amex card with iPay. Now, every time I use my Amex card by sliding it to the point of sale, I get notification from my iPhone. This means that Apple knows all my transactions? How does he know that I use my card? Thank you.
-
Photosmart C4599 with windows XP and 7 networking
I recently added a computer portable 64-bit windows 7 to my home wireless network connected to my hp photosmart printer. Now when I try to print from my other computer laptop windows vista or windows xp to office, both of which printed perfectly pre
-
Keyboard not working does not correctly earns 10
Hello I have an Aspier 5332 OS 10 pro windows, the keyboard does not work properly. Working scroll not working, mouse pad moves the cursor, but listen to select something opens the context menu . It just doesn't feel good. Selection of stuff, feels t
-
Is it possible to use my serial key to get a replacement installation disc.
Using the serial number to get a new CD
-
I want to print different playlists that I use in Media Player 11, but there is no print option in Media Player See you soonWakdos