Easy random questions

1. I tried to simplify an application, change several string types in full and now, they do not appear on the screen using Add, I tried, and my conclusion is that if I want to show an int type I must convert to use Add, is that correct?

2. I was playing with private and public in simple Hello World application, I expect that if I made a public variable it would be everywhere, but this isn't... example below

SerializableAttribute public class HelloWorld extends UiApplication
{
public String stringToShow;
   
Public Shared Sub main (String [] args)
{
create a new instance of the application
and launch the application on the event thread
HelloWorld APP = new HelloWorld();
theApp.enterEventDispatcher ();
}
public HelloWorld()
{
a new screen
stringToShow = "Hello World passed String";
pushScreen (new HelloWorldScreen());
}
}

create a new screen that covers the screen, which provides
standard behavior by default for BlackBerry applications
final HelloWorldScreen class extends screen
{
public HelloWorldScreen()
{

call the constructor of the screen
Super();

Add a title to the screen
LabelField title = new LabelField ("HelloWorld example", LabelField.ELLIPSIS
| LabelField.USE_ALL_WIDTH);
setTitle (title);

Add the text "Hello World!" to the screen
Add (new RichTextField (stringToShow));
}

}

1. it depends on what you're trying to add to that, but usually you can only add objects field to the screens. Each field class, in turn, defines the types of data, with which it can operate. For example, a RichTextField knows only how to treat String objects. See the documentation of each user interface object type to use.

2. this question is really not on Java, programming of BlackBerry. Members of the public are not 'everywhere', but they are "available everywhere." The example you posted does not work because stringToShow is an instance of the HelloWorld class variable, but you don't have an instance of HelloWorld to work with when you try to use stringToShow in HelloWorldScreen. There are many ways to change your code to something that works. Here is a sample.

  • First of all, you could modify the constructor of HelloWorldScreen to take a string parameter of the string to display (whereby cases you don't need to make it public in HelloWorld, but you need to change the call to the new HelloWorldScreen().
  • Second, you could make stringToShow a static variable of the HelloWorld class. You can get without going through an instance of HelloWorld using the syntax HelloWorld.stringToShow (basically, it's a global variable).
  • Thirdly, within the HelloWorldScreen constructor you could catch an instance of HelloWorld to get to the instance variable:
HelloWorld app = (HelloWorld) UiApplication.getApplication();// ...add(new RichTextField(app.stringToShow));

There are many other ways, but this should give you an idea of some possibilities.

It will be useful.

Tags: BlackBerry Developers

Similar Questions

  • The title of the TOC for the random question slides

    I want to create a quiz that randomly pulls a pool of questions.  I think I know how to do that (rightly), but when I do, the table of contents is only show (title "Slide") the name/title of the question slide to chance itself, which is not really give any useful information.  I wonder if there is a way to show rather the title of the question which is selected (and present) of the random question slide.  This, in my opinion, would be much more useful to users taking the quiz.  Is there a known way to get there?  Thank you!

    Capture.PNG

    Project files cannot be attached to these messages in the forum.

    Lilybiri has already answered your question.  The table of contents only shows the name of the random Question slide and can't give you the name of the slide of the random quiz question slide that is picked up from the Question pool when running dynamically.

    Essentially the Random Question slide is just a placeholder.

    However, I think that your idea of being able to have the selected slide display its name in the table of contents if you wish has some merit.  Then I suggest that you connect to an enhancement with Adobe for this request.  You never know...

  • Captivate 5 quiz - random question pool

    I use Captivat 5 quiz with 17 questions in a Question pool to be randomized, if I wan the quiz for showing 10 of the 17 questions randomly, how can be done?  Help, please!

    Hello

    You can add 20 question to your question and then go into ' Quiz > Question Slide > select at random 'Question' and type '10' in the text box.» Select your pool of the Question and it will insert 10 random questions from the question pool you have created.

    Kind regards

    MILIN

  • 6 - Random question slides after restarting lesson of Captivate

    Hi all

    We have a project that includes several random Question slides.  After the failure, we restart the project again.  When the learner reach the Quiz, they are presented with the same questions. Is there a way to force the randomisations again?

    TIA - Vijay

    When you say "restart the project again" Summers - you referring to the revival of the entire module, or just take the Quiz on the Quiz results slide?

    If only resume the quiz on the button on the slide of questionnaire results, all you see are the same questions.  For a chance to see different random questions, you must raise all of the module.

  • Pre-test: random question bypass

    Hello

    We were asked to do pre for a course, but with random questions to stop collusion

    Is there a work around?

    Renovator rgds

    Is not possible out of the box with the functionality of pre-test now available. In previous versions, I used question slides custom for this questions that I created using standard objects, where the score has not added to the total of the Quiz but stored in a user variable. But you have no question randomly either, so no possible. Don't see a workaround solution, unless you do not have to report to an LMS. Any questions at random, you have to use the normal question slides. It is possible to keep the score of the 'test' in a separate user variable, making decisions as branching based on this variable, create a slide of score as well for the pre-test and test but what a statement to an LMS that all quiz slides will be considered part of a Quiz and the score will be the total of all the slides in quiz score.

    Lilybiri

  • Random questions

    Can you do a question randomized after that it was created as a regular matter?

    I mean that the entire purpose of the pools in question must deliver random questions.  As long as you have more than one question in a question pool, it will never deliver random questions.

    So by moving the questions in a pool, you do not change the operation of the pool. You simply configure these questions to be available for selection when any slide question randomized in your project is set to shoot this pool questions.

    If you have a question randomized into your project slide, to shoot a question to the group, he will choose one of the questions in this pool to display.  If there is another question randomized in the same quiz put slide out of a pool, he will choose another question.  Captivate will not repeat the same question.

  • Connection with random questions

    Captivate newbie here...

    I am creating a Jeopardy-style quiz in Captivate 3 using random questions that are contained in separate categories for each category of question. The game board is on slide 2, and it has 20 transparent buttons with the 'jump to slide' actions, pointing to a question slide randomly. Random question slides have a "submit" button and a back button, which I intend to provoke a jump behind the game board. The branching tree shows an arrow (black) navigation on slide 2 to each slide of the question and each question slide shows "go to slide 2" actions for success and failure.

    I had hoped that the jump to the game board would be automatic after the user answers the question, but it is not. The previous button on each slide should be used to return to the game board, but sometimes it takes the user to the previous slides, with their questions already answered, and the user must hit the back button several times to return to the game board.

    I used the game Jeopardy downloadable example from this site as a source of inspiration, but it is not really a quiz. In this document, the user enters no answer; Instead, the answer is presented by a rollover.

    So I guess the question is, can use you navigation with random question slides?

    Hi ImagineerBill and welcome to our community

    As you have seen, Captivate is not too bright allowing slides to Question which will be presented in an order any. I know this probably sounds contrary to the work of slides question how randomly. But listen to me please.

    Captivate normally moves from slide to slide in a linear way. This introduces a problem if you want to branch back to a quiz.

    The answer to your real question of ' can you branch from Random Questions ', is that you can. But you should consider how the branch will operate and how this may affect the rating.

    We see a similar problem broke out when you want to have a common slide with many links that can be launched. Often, the person is anxious as the original slide is up to, visited slide is marked somehow as having been opened. And as you have seen, this is exactly how the Jeopardy game. It works by exploiting a bug/feature/callit you want with Captivate. This is the characteristic of a blade retaining the moused State when you have a bearing on it which is associated with a box click object. Because the slide is presenting the reversal as if you were still positioning the mouse over it, it shows the destination has been visited.

    To be honest, I don't know that there is a solution for what you are looking for. Unless you could build the random slides as a series to answer in a specific order, but the random question presents until exhaust you the pool.

    See you soon... Rick

  • Convert to the Question pool random questions?

    We update a course, we developed the year last (before Captivate 3). This year we want to apply 'Question pool random questions' Captivate 3 in this course. Is there a way to create the pool of question (s) in this existing quiz, and then add the year issues last to them without entering again each question in the Question Pool Manager?

    Thanks for the tips!

    Hi Jan

    Sure thing. Simply convert the project from version 1 or 2 at a draft of version 3. Then set a Question Pool. Once you have done that, switch to the storyboard table display. Select the question slides you want to add to the pool and right-click. You should be presented with an option to add the slide selected in the pool.

    Once you have moved the question to a pool slides, you would then insert slides of Random pointing to the pool.

    See you soon... Rick

  • easy transfer question

    Hi all

    Have a question: thought I was easy windows xp to xp with the transfer program, but it was actually easy transfer from xp migration to windows 7.  I restored the computer and finally everything is being updated.  Then I discovered that xp version of the simple transfer would not open the file (actually wouldn't even find it).  I realized then that the program did not look the same even so I went out and downloaded the other version which is the the xp to windows 7, but unfortunately, it is not the possibility of plain old NEW computer.  Which makes sense since I am running xp pro again.

    So, I'm stuck with the wrong file and cannot restore the files I need.

    Anyone got any ideas?

    Thanks advance.

    Linda

    Have a question: thought I was easy windows xp to xp with the transfer program, but it was actually easy transfer from xp migration to windows 7.  I restored the computer and finally everything is being updated.  Then I discovered that xp version of the simple transfer would not open the file (actually wouldn't even find it).  I realized then that the program did not look the same even so I went out and downloaded the other version which is the the xp to windows 7, but unfortunately, it is not the possibility of plain old NEW computer.  Which makes sense since I am running xp pro again.

    So, I'm stuck with the wrong file and cannot restore the files I need.

    Anyone got any ideas?

    Thanks advance.

    Linda

    So basically - you export all your files from XP (before either layout of the XP machine and installation of Windows 7 or Windows XP machine has also been deleted / is not available for you now?) using the files and Settings Transfer Wizard (F.a.S.T.) and you should now import into Windows 7 , but it uses the Wizard Windows Easy Transfer (W.E.T.) - which is a different technology.  You realized the mistake (should have downloaded and used W.E.T. on the Windows XP - and if you still have access to the said machine in the same condition it was when you used F.a.S.T. on that, you could always) and I wonder if it is possible to get at least your files off the Windows XP image exported F.a.S.T.?
     
    This can help:
    http://WindowsXP.MVPs.org/fast.htm

  • Software Simulation lines random question on slides

    I work in Captivate 9 and I have a few slides in my project which are software simulation slides.  I used the slide button to start the software simulation.  When I saw my software simulation in Captivate in HTML5, it looks great.  When I post for others to look at the ReviewMyElearning, there are random lines that go through the slides.  I tried recording on different browsers and even on another computer, and nothing has worked.  These lines went away after I re-recorded, but are back once again after I cleared my cache for an unrelated question.   These lines randomly through the slides of simulation are only on the last few slides, and are in the same place on each of the relevant slides.

    Help please!

    You can check the preferences of project size and quality settings? Don't forget to uncheck the option "Advanced project Compression" and the "compress SWF file. Then publish again and check if the problem is still there.

  • Randomized Questions Quiz in CP7: "back" button turns on

    I checked my on input and output fields. Don't know why, but the back of my random quiz question buttons to proceed. Very strange. Is there a setting that I need to check?

    It is worth noting that the back button is clearly not the forward button... enabled in properties.

    Also, I have need of the student to reanswer this question until he succeeds, while the question remains answered.

    Who sets turning (excluding the current branch). Beyond strange...

  • Easy Handcursor question

    Hello. I have an easy question for anyone who can answer. I don't really know actionscript (or any type of code), but I have this simple piece of code, and I just want the mouse in the handcursor when anywhere on the document is wriggle over.

    How should I modify this code to make it happen? Thanks in advance.

    script.PNG

    Use the buttonMode property:

    movieClip_1.buttonMode = true;

  • How can I publish a module with random questions (and question pool) in a single swf file?

    Hiya,

    What I need is questions randomly in a learning module all exported from captivate 4 in a single swf file, what I get is the swf file and a SWF of pool, is it possible to integrate the pool in the same module/file?

    There will be a place somewhere on the LMS where the SWF file is stored.  But the question pool to get SWFs in the same location would be more trouble that it's worth.

    Some providers of LMS simply not allowing for the fact that training may require more than one file to run it.  They have designed their systems with PowerPoint and PDF or MS Word in mind, all cases where one file is all you need.  These MOVIES are more like content management systems than modern learning management systems.

    If your LMS insists that it cannot operate in this way, then you may need to forget the question pools.

    But I think that you will have even greater problems.  You will wait get marking and follow-up of the results of this LMS for this internship?

    You be obviously NOT use SCORM as publishing option because SCORM still requires JavaScript code to implement the API that allows communication between the LMS and the module course.  Using rather AICC?  Output of Captivate, same AICC requires Javascript, so you need more than the SWF file.

  • Captivate 5: reading random Questions in a Quiz

    Hi all

    I know it is possible to mix the answers to a quiz, but is it possible to mix the issues? I would like to mix my questions so that users are presented with quiz questions in a random order.

    Thank you!

    Brittany

    Next, you will have the chance would be to use the Question Pools and have many questions of variation.  Change the order of questions is not really effective.  Change the real issues is a much better way to test participant knowledge.

  • Not displaying flash of random Questions and security settings do not

    Hey people,

    I created a Captivate 4 project with 3 water slides and a pool of about 70 questions question in which I am firing randomly into. I use IE7 and Flash 10. Publication in Flash 10. If I publish or display in the preview in a web browser, the project launches, plays the first 3 slides and then turns off when the first question should appear. Note: the summary of the project AND publish the project as a .exe launch and display all questions correctly. It ends up being a flash security problem. I went on the site of adobe and via the Adobe Flash Player Security Manager"I walked into the hand. SWF generated by captivate the file as a trust and then re-directed the published captivate project and it ran correctly. It is ... what should I do to put in place my project or flash so I can't do this for each new project that I deploy? I don't want to have users to have to go in and add what I deploy as an approved file. It's also a little confused as to why the first three slides played and he stopped the questions... seems as if she is not a file of confidence, that it wouldn't work at all.

    Thanks for any help!

    Chris

    Hello again

    I think I might investigate a temporary web server to host on until things are ready. This is where it will help.

    Providing files to end users, if you copy files on you end up having to explain how to save files. Then have to walk them by setting the Flash security so they can watch properly. It becomes just a pain in the kazoo.

    If you can find a space on the server, you simply download the content and provide a link for users to view the content.

    Other than that, if you are insistent that the copy is the way to fly, I might suggest that you establish a place known where you want everyone else to copy their files. Perhaps C:\TestFolder. Then provide some instructions on how to configure the file with Flash less stringent security. Thence forward, anything that they copy in the file should need no adjustment of security.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

Maybe you are looking for