Create a modal screen waiting in ActionScript

Hello world

First of all, this forum has provided me with some good tips on getting my first PlayBook set App World so a big thank you to everyone on BOARD and the community in general to help.

My problem

I developed my application using Flash Builder 4.5 2.5 and the BlackBerry PlayBook AIR API.

My application performs a long running operation that, via a Click eventcalls a web service and requests some data.  Currently, the application does not provide the user with all the comments and I would like to change that!

I'm relatively new to the Flash Builder and I was wondering what was the best way to run an operation like this and show a transparent "wait modal" perhaps with an indicator of the activity of the user, then that happens.

I tried to implement this in several ways (using the forms tanks etc.) but the modal never displays when the onClick event is fired.  I also looked in the background processing, but has been warned against the use of this.

Any advice would be greatly appreciated.  I am relatively new to this development environment, so my apologies if this is obvious!

Thanks in advance.

Nick

A request to a server is non-blocking, you could allow the user to continue working until the end of employment of server which you will get the reminder.  In this case, you can use the ActivityIndicator to inform the user that he has been transformed (in a passive way).  If work takes a lot of time and there is a way to query the status of the task, then a passive ProgressBar would show overall progress.  Both of these can be placed in a corner of the screen so that the user can see, but can continue to work according to the needs.

However, if the work is a blocking request in which you do not want the user to do anything until the job is done, then you want to be a modal about it (less desirable).  You can place an AlertDialog window upward with "Please wait...". "in it with no button and then close the dialog box when the work is completed.  You will need to keep a grip for the alert dialog box so that you can close with the callback event.  QNX AlertDialogs side Server and you can not change the appearance, you can build your own screen with a semi-transparent background and the ActivityIndicator or the ProgressBar inside a frame to show activity progress with modality.  Connect the modal display customized to the scene.  If you have an app bar, you may need to suspend if the user can not cross to another page in your application.

If the work is really long, I would add a features 'Cancel' in which case it's just taking too long for them because of network problems.

Hope that helps.

Tags: BlackBerry Developers

Similar Questions

  • modal screen Push called by an event no thead

    I know it's very basic, but I'm not able to understand why I'm getting this, I use a screen to start and in the start screen, I use a background thread to perform my surgery needed to communicate with the server, once the finished background thread its task is the listener in the splash screen creates an object to the next screen and sends it to the method below.

    public void swapScreen(final TopNewsScreen _tn)
        {
            UiApplication.getUiApplication().invokeLater(new Runnable(){
                public void run()
                {
                    UiApplication.getUiApplication().popScreen();
                    UiApplication.getUiApplication().pushScreen(_tn);
                }
            });
    
        }
    

    Help of any kind is welcome

    A Y

    maghue is not correct, invokelater is the good method to use in most cases.

    the OP code seems fine. I would say to draw the exception, perhaps, there is another code that triggers the exception?
    the exception text that you pasted mentions "modal screen", but your code does not use pushModal.

    Maybe you have a Dialog.alert in your separate thread?

  • Create the home screen icon

    Dear everybody.

    How can I create a home screen icon and launch something when the user click on my icon?

    Thank you

    http://developer.BlackBerry.com/native/reference/Cascades/bb__platform__homescreen.html#function-Add...

  • How to create a splash screen

    Someone out there has a recipe to create a splash screen in the Cascades?

    My first approach was to use a NavigationPane with a timer, in which case the next page would be loaded automatically after a few seconds.

    But this means that there is a 'Back' button on that should be the first screen.

    My second approach is to simply hide the container containing the boot image and show the container containing the first screen, but now that I have an action bar at the bottom of the screen, which shows when the splash screen is visible.

    Ideally, there will be a way to replace the "BlackBerry" loading screen with a custom image. Perhaps there is a way to do it.

    In any case, if others have found a good recipe to make splash screens, I'm all ears.

    Thank you.

    OK, I thought about it. From now (July 2012) BB10 seems support only portrait splash screens, and so, if you specify a single boot screen (which is interpreted as the start of landscape screen) it gets ignored.

    Here's my writeup of how do:

    http://bb10dev.NET/document.pl?mode=display&DocumentID=935

  • I want a program starts automatically with the start-up. but only in the status bar. Now, it creates its own screen. How to do?

    Hello

    I have a program now that starts automatically at startup.  Good.

    But it creates is own screen that I have to close it on.

    How can I prevent this happening and start automatically start; but only in the status bar?

    Any help will be greatly appreciated.

    / GE

    Is that what you want to do? - http://superuser.com/questions/495185/how-can-i-make-a-program-that-runs-on-windows-startup-automatically-minimize-clo gives general information and use uTorrent for example.

    This particular program?

    More info here - http://freewindowsvistatutorials.com/makeProgramsStartMinimizedOrMaximizedInWindows7.php

  • How to create a login screen (related to the names of username/password)

    I checked some forums but has not been able to find out if this was possible:

    Create a login screen in Captivate, linked to combinations of name of user and password I entered before...

    If possible, could you give me a hint on how to achieve this?

    All the best!

    The fields are text entry areas.  You set these to validate properties tab and when you select the TEB on screen in Captivate, then a dialog box appears allowing you to enter any number of right answers.  The correct answers are your authorized user name or password.  However, the sticking point will be that you probably want a certain COMBINATION of user name and password to be accepted as correct, right?  In this situation, you must validate the entered text using conditional shares advanced.  It's a little more complex.

  • Create cell of the array in ActionScript

    Hi all. Having a small problem hope that someone has already solved.

    So I have 2 ArrayCollections with the same format but different data:

    public var santiagoPast:ArrayCollection = new ArrayCollection([)

    {Month: "Ene", fresh: 1000, Kiosco:10, Web: 256, Movil:87, No_detectado:6, Sin_informacion:10},

    ........

    {Month: "Dic", fresh: 195, Kiosco:320, Web: 100, Movil:33, No_detectado:5, Sin_informacion:5}

    ]);

    public var santiagoNow:ArrayCollection = new ArrayCollection([)

    {Month: "Ene", fresh: 800, Kiosco:10, Web: 256, Movil:87, No_detectado:6, Sin_informacion:10},

    ......

    {Month: "Apr", fresh: 600, Kiosco:78, Web: 234, Movil:78, No_detectado:32, Sin_informacion:8}

    ]);

    So, with them, I create a data graphic Multi via ActionScript. The first data: "santiagoPast" will be LineSeries and the second: "santiagoNow" will be ColumnSeries.

    So, also via ActionScript I create a checkbox for each series. In this way, the user can check or uncheck the box to show or hide this series in the chart.

    Im trying not to create a box for the ColumnSerie, but the only way that works of the ir is when I create a checkbox for all series. The code where I created the box is as follows:

    private function crearcheckbox (): void {}

    for each {(var serie:Series in linechart.series)

    combo: var checkbox = new CheckBox();

    combo. Data = series;

    combo.ID = serie.id;

    combo.Label = combo.data.yField;

    combo.addEventListener (Event.CHANGE, cambio);

    comboboxes.addChild (combo);

    }

    }

    And I tried to change for each (var serie:Series in linechart.series) for each (var serie:LineSeries in linechart.series) but does not work.

    Any ideas?

    Thanks for your time!

    He solved adding:

    for each {(var serie:Series in linechart.series)

    If (series ColumnSeries) {}

    .............

    }

    }

    simple but didn t know that

  • Tutorial to create a login screen

    Is there a good tutorial out there on the best way to create a login screen in Flex that connects to a back-end database to verify the user name and password?

    It of a ColdFusion, check this good old tutorial but still works well enough

    -Uses-ColdFusion-CFLogin-and-CFC-role-security http://www.brucephillips.Name/blog/index.cfm/2006/11/27/login-and-logout-Flex-Example-that

    I assume that you are a kind of figure, do CF queries to your DB, so it will be a piece of cake for you.

    I hope this helps.

  • Modal alert waiting for the user, click

    Hello

    I used program InDesign plugins in C++. There are modal alert with YES/NO buttons, which stops execution until the user presses one of the buttons.

    Now to my question. I know that this alert does exist here in Flex. Flex shows alert and continues with the execution of the following code. I know that there is closeHandleFunction that I should use to deal with. ActionScript is the language of piloted by events and we should use ActionScript in this regard. So my question is perhaps more hypotetical. Is very bad idea to create this category MyAlert who wait in a loop up to push the button? You know, sometimes, it would be useful to have this alert.

    Thank you

    pyso

    There is probably a better way to do this. I think that spring actionscipt provides tools to do such things, and it would be nice to be able to do it without tips...

    In any case, I was thinking about an alternative, something like this:

    private var i:int;
    
    private function lookForDisplayObjectsToRemove():void {
         for ( j:int = i ; i < whatEverYouIterateOn.lenght ; j++ ) {
              if ( /* condition to remove object here */ ) {
                   i = j;
                   var popUp:YourYesOrNoPopUp; // pop your yes or no alert here
                   popUp.displayObjectToRemove = whateverYouIterateOn[j];
                   popUp.functionOnYesClick = removeDisplayObject;
                   popUp.functionOnNoClick = lookForDisplayObjectsToRemove;
                   return;
              }
         }
    }
    
    private function removeDisplayObject( object:DisplayObject ):void {
         // remove object here
         lookForDisplayObjectsToRemove();
    }
    
  • create a home screen icon in safari

    How to create an icon on my homescreen iPad for a web page in Safari to iOS 9.1?

    I found several old descriptions, but neither share the button or the button +.

    (above the target page) gives a button "add to home screen".

    When you press the share button, there are two rows of icons. Scroll on the second row, until you see him add to the home screen icon. By default, this is the 4th one inch - AJ

  • create the modal window password

    is it possible to create an application that cannot minimize the user and that the user is unable to kill?

    I want to create a password for playbook screen that protects access to the playbook.

    Cheers!

    PS the reason im using not the native password playbook is because it seems not to be expandable / I can't access its settings by programming...

    No, it is not possible. All applications respond to shots to minimize. If you are tyring to override security methods incorporated into the PlayBook for some business activity /, I would contact RIM to see if what you're asking is possible for the future. Currently, it is not possible for the published standard PlayBook.

  • CREATE INDEXES online is waiting for the TX = 4 mode

    Hello

    I have a strange blocking problem where an INDEX CREATE LINE is waiting for a transaction that did only inserted a line in the parent table.

    Wait is mode TX = 4 (not TM locks) and I currently have it reproduced only on 11.2.0.3 and 11.2.0.4

    Easy to replicate the schema SCOTT:

    Session 1:

    SQL > set time on

    14:54:58 SQL > insert into SCOTT. Dept (DEPTNO, dname) values (50, 'test');

    1 line of creation.

    Session 2;

    14:55:24 SQL > create index test on SCOTT. EMP (ename) online;

    It's waiting ' enq: TX - line lock conflict ":"

    SQL > select sid, chain_signature from v$ wait_chains where blocker_is_valid = 'TRUE '.

    SID CHAIN_SIGNATURE

    ---------- ----------------------------------------------------------------------

    603 ' SQL * Net client message' < ='enq: TX - line lock conflict '

    While waiting to acquire the lock of transaction in mode 4:

    SQL > select * lock gv$ where sid = 603

    INST_ID SELECT ADDR KADDR SID TYPE ID1 ID2 LMODE CTIME BLOCK REQUEST

    ---------- ---------------- ---------------- ---------- ---- ---------- ---------- ---------- ---------- ---------- ----------

    1 00000006CDA05EB8 00000006CDA05F10 603 352577 0 4 0 348 2 AE

    1 00000006CDA06078 00000006CDA060D0 603 DL 779505 0 3 0 308 2

    1 00000006CD9FABE0 00000006CD9FAC38 603 DL 779505 0 3 0 308 2

    1 00007F28001F5028 00007F28001F5088 603 779505 0 2 0 308 2 TM

    1 00007F28001F5028 00007F28001F5088 603 779510 0 4 0 308 2 TM

    1 00000006CD9FA240 00000006CD9FA298 603 779505 0 4 0 308 2 OD

    1 00000006B4F26790 00000006B4F26808 589847 711499 6 0 308 2 TX 603

    1 00000006CDA0ED68 00000006CDA0EDC0 655377 996169 0 4 308 TX 603 0

    I've traced 10046 and 10704:

    broadcast message = obj 29231196672 #= 779514 tim = 1447251053634045

    ksqgtl * mode TX-000f001e-000ad97c = 4 flags = 0 x 10001 timeout = 21474836 *.

    ksqgtl: xcb = 0x6bb322528, ktcdix = 2147483647, topxcb = 0x6bb322528

    ktcipt (topxcb) = 0 x 0

    ksucti: init logon has of txn DID:

    ksqgtl:

    ksqlkdid: 0001-003F-0000AFC4

    ksudidTrace: ksqgtl

    ktcmydid(): 0001-003F-0000AFC4

    ksusesdi: 0001-003F-0000AFC3

    ksusetxn: 0001-003F-0000AFC4

    ksqcmi: TX, f001e, ad97c mode = 4 timeout = 21474836

    2015-11-11 15:11:36.566

    WAITING #140700792578680: nam ='enq: TX - line lock conflict ' ela 42932082 name = | mode = 1415053316 usn < < 16 | location = sequence 983070 = obj 711036 #= 779514 tim = 1447251096566283

    And there is nothing in V$ SESSION leader/block/line current. class obj # is EMP. current sql_id is the CREATE INDEX.

    If anyone has an idea on:

    -Why creating an index in line must wait for transactions that modified only parent table

    -How to continue the investigation

    -can or cannot reproduce in other versions

    Thanks in advance,

    Franck.

    I guess you have a constraint foreign key between emp and Dept.

    It's expected behaviours: since 11.1 any DML at one end of a referential integrity constraint translates into a mode lock 3 taken at the other end, and your phenomenon resembles a side effect of this.

    When you try to create the index online that your session must assume that the other session (holding mode 3 on the emp and dept) may have changed the emp and dept, so it must wait for the session to the commit or rollback.

    (I guess that in principle, he could walk the cancellation of the transaction see if EMP had in fact been changed - but maybe who was considered too complicated to be worth the risk to implement)

    Concerning

    Jonathan Lewis

    Updated - I just did a quick check to reproduce the effect on 11.1.0.7

    For reference - here are a few notes on modes of locking and how the application has changed over time: https://jonathanlewis.wordpress.com/2010/06/21/locks/

  • How to create pop-up screens?

    Hello, I try to recreate this Web page

    http://fkatwi.GS/#

    However, I am confused how I can create the pop-up screens that appear when you click on a navigation link.

    Also is there a way to imitate the smooth transition?

    Thank you!

    You can do this by using blank publication and then set the parameter to lightbox

  • Pointer to learn how to create the split screen?

    I am trying to create some simple split screen segments where I either two or 4 videos also share space. I moved and cropped clips and they looked good from the tool. However, when I created a final file or downloaded on youtube it looks different. Where the clips looked like they were half/half or quarter of the screen in the tool, now they are clearly not.

    Suggestions?

    Test output: http://www.youtube.com/watch?v=aTDU-fnakNw

    My first guess is an export error.  As working in a card SD sequence and the use of HD export settings.

  • Is CP5.5 - possible to create a summary screen of the quiz with all issues on one screen?

    Hello Forum members

    I was wondering if it is possible, rather than having a quiz to review where you look at a screen at once quiz questions, it is possible to create a quiz summary screen, which will provide a summary that the questions were answered incorrectly/correctly (without actually giving the user the correct answers)?

    Below is an example of what I want to achieve:

    question_summary.png

    Is this possible in CP5.5? Perhaps with stocks advanced/variables?

    Thank you very much

    Loraine

    For more information, Lilybiri has now provided a more detailed explanation of how to realize the idea of vishhere above, which can be found at:

    http://forums.Adobe.com/message/3995154#3995154

    Thank you very much

    Loraine

Maybe you are looking for

  • If I am infected with malware?

    Hello! This is my first post in the forum, but I followed the discussions since I got my MacBook and the community is very useful. I decided to create this post to ask the experts of the view. I received a phone call from the network admin at my Univ

  • How to set up intelligent control on a multimbral instrument

    Hello I'm with Kontakt multitimbral instrument inside Logic Pro X. I'm launching of the smart controls on all the midi channels to control certain parameters such as Attack, Release etc... The Smart Control pane only controls the instrument on channe

  • Structure of the event without user interface

    I tried a quick and effective solution for a structure of event that is not a case of timeout and is part of a vi that has no user interface, but I have sent configuration data to the structure of the event. Let me be more clear: I have a camera that

  • PHOTOS OF WEBCAM LIVE GALLERY MOVI MAKER

    HelloManaged to burn a movie on windows movie maker but when I click on browse in movie maker I only get those who is there, but I can't seem to get those who are in the Windows live gallery, can you please tell me how to move them movie maker in sim

  • WAP54G - Repeater mode

    Hi all! I tried to "repeat" a Lynksys WRT120N Router(ver. 1.0.01 G-mode only) using WAP54G Access Point(ver. 3.04) as repeaters. Is it possible in general because I had no luck so far? Thank you in advance! Momchil