Hiding & unhiding items on push of a button

Hello,
hope any one could help...
I have a Form with some items there...
for some purpose I want to make a button and when it will be pressed for the first time, it hides one item say 'A' and unhide second item 'B' (which was first not visible)..
and when the button is pressed again for the second time it then hides item 'B' and unhides item 'A' and this process continues on every push with both items hiding and unhiding on alternate push of the button..
For this i wrote the following coding on when button pressed trigger
:GLOBAL.DUMMY := GET_ITEM_PROPERTY('A',VISIBLE);
:GLOBAL.DUMMY := GET_ITEM_PROPERTY('B',VISIBLE);
IF      
:GLOBAL.DUMMY = 'B PROPERTY_TRUE' AND
:GLOBAL.DUMMY = 'A PROPERTY_FALSE'
THEN
SET_ITEM_PROPERTY('B',VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('A',VISIBLE,PROPERTY_TRUE);
ELSE
SET_ITEM_PROPERTY('B',VISIBLE,PROPERTY_TRUE);
SET_ITEM_PROPERTY('A',VISIBLE,PROPERTY_FALSE);
END IF;
this coding succesfully hides 'A' and unhides item 'B' on the first push but nothing happens when I press the button again...as i said above I wnat it to unhide 'A' and and hide 'B' on the second push and then this process follow with items 'A' and 'B' hide and unhide respectively on alternate pushes...
I would be grateful if some one helps me in solving this problem..
regards,
Sonali.

Look to see what value is returned by GET_ITEM_PROPERTY('B',VISIBLE). I doubt very much that it's 'B PROPERTY_TRUE'.
Furthermore, your second call overwrites the prior value in DUMMY so your IF statement is never going to be true....
...particularly in view of the the fact that you are testing for one variable to simultaneously be two different values. This is not Boolean Logic as we know it.
Your code works the first time because it executes the ELSE branch, but it will execute IF branch.
Be a smartie - never call your variables DUMMY.
Cheers, APC

Similar Messages

  • Dynamic Push of a Button.....Help?

    Hello,
    I am trying to achive something that is I believe possible in some way but unable to figure out how, as yet..
    I am sure some Gurus here would have solution for it..
    I have a Push Button and on WHEN-BUTTON-PRESSED trigger, I decrease the value of an item from the previous value by one i.e. :ITEM_A_VALUE - 1
    So on each seperate push of the button te value is decreased one by one
    For example the value in item is 2000
      so,     2000 - 1    ====>    on first push of the button
              1999 - 1    ====>    on 2nd push of the button
              1998 - 1    ====>    on 3rd push of the button
              1997 - 1    ====>    on 4th push of the button
              1996 - 1    ====>    on 5th push of the button
    and so on..my problem is that, to reduce the value to 5 points, I have to press the button five times. this is not what i want. I want a dynamic functionality..I want to push the button once and while holidng the left mouse button (when-mouse-down) i want the values to reduce one by one automitically as soon as i keep the left mouse button down (or pushed).
    can this be achaived in Forms 6i
    does any kind of timer is needed here??
    I would appreciate if some one helps me to do this...
    best wishes
    regards
    Asim.

    I found mouse-triggers so unpredictable in Forms6i C/S that after we migrated some Forms 3.0 forms to Forms6i using Kumaran (which used When-Mouse-Move/Enter/Leave for sure and IIRC Down and Up too), I ended-up forcing our application into what we called "single-form mode" where the main form would use only CALL_FORM, preventing the user from having two (additional) unsuspended forms open simultaneously. We found that mouse triggers in an open/inactive state would fire during mouse events in other open/active forms, and debugging this was horrible.
    Even now in 10gR2, I see inconsistent behavior with the mouse triggers that still fire. I created two quick test forms; you may want to try this too and see if you see the same behavior.
    Form mouse1.fmb: I created a control block manually with one item and let the layout wizard do it's thing (all defaults). I set canvas/window sizes to 200x100. I then saved it and copied to mouse2.fmb. Still in mouse1.fmb, I added a When-New-Form-Instance to do an OPEN_FORM('mouse2') and set Window1 title to Mouse1 for easy identification.
    Form mouse2.fmb: I added six form-level When-Mouse-xxxx triggers (all except doubleclick); each having a single line of code to display the form/trigger name. Finally, I set Window1 title to Mouse2 for easy identification.
    1. I run mouse1 and it opens mouse2 underneath itself. I dragged mouse1 by the title bar over to the side so it doesn't overlap mouse2, release it and then move the mouse around over both forms. No triggers have fired yet.
    2. I do a mouse click on mouse2 in the empty canvas area (click and release). Only When-Mouse-Down fires, and form mouse1 remains active.
    3. I do it again. This time only When-Mouse-Up fires, and form mouse1 remains active.
    4. Now, repeated clicks on mouse 2 keep the same behavior: only When-Mouse-Down fires, and form mouse1 remains active.
    5. Click on mouse2 title bar. It becomes active and only When-Mouse-Down fires.
    6. Click on mouse1 title bar. It becomes active.
    7. Click on mouse2 title bar. It becomes active, but no triggers fire.
    8. Click on mouse2 canvas. If fires When-Mouse-Down/Up/Click. Repeated clicks repeat the same behavior.
    9. Click on mouse1 canvas. It becomes active.
    10. Click on mouse 2 canvas (seemingly a repeat of step 2). This time, it fires When-Mouse-Down and When-Mouse-Up, and form mouse1 remains active.
    11. Click again. Only When-Mouse-Down fires.
    If you've repeated this exercise, you can see for yourself that it is going to be very difficult to predict when/how code you might write in when-mouse down/up/click triggers is going to fire. And when-enter/leave/move never fired once.
    I use when-mouse-doubleclick often (it's our standard way to invoke an LOV for our mouse-lovers). But I will avoid all other mouse triggers like the plague. And I would like to see Oracle not just de-support them, but remove them from the trigger LOV and have their presence cause systax errors in version 11. That's my 2 cents.

  • Prevent push the same button twice

    Hi all! I have a button that performs a specific function .All I would like to do is prevent the user to push the same button twice. I tried already to include a 'disable button' built in function but it can't work from within.
    Any ideas?

    I would set the button to be disabled before you call your function, but I suppose it doesn't matter. You need to change those navigable properties on the button to NO. You cannot change the Enabled status of the button if it is the current item. Keyboard Navigable and Mouse Navigate should both be set to NO.

  • My iphone 4s will not allow me to open any apps that I have downloaded. I have tried a few things but still will not allow me to open. Shows they are open once pushing the home button twice. Please help!

    My iphone 4s will not allow me to open applcations that I have downloaded. I have tried a few things but still will not allow me to open. Shows they are open once pushing the home button twice. Please help!

    Pressing the Home button twice does not show you what apps are running. It shows you what apps were recently used.
    Download a free app from the App Store. Once it downloads, your other apps should work properly again.

  • I bought a movie on my iPad. When it was stopped, by the cover pic/description, I pushed a small button thinking it was to finishing downloading but it deleted it. Now it says can't redownload and something about 90 days?? Help!! Just paid $20 bucks :(

    I downloaded Monsters Inc for my son for a car ride. It kept stopping towards the end with like 10min left. So I stopped it, went to the screen where you can choose to play it (where the movie pic and description are). I pushed the small butt on to the right of the pic, thought it was like iCloud or finish downloading, something along those lines. Well, it deleted it! In iTunes, when I push he iCloud button next to it because it shows I purchased it, it says something about already bought this and can't download to same Apple ID for 90 days, it says cancel or transfer. Even when I click transfer it didn't help. Please help!!!!! Just paid $20 for this!
    Oh it was under my husbands Apple ID too, if that matters. He uses that for his iPhone and the iPad.

    you can let apple know here
    http://www.apple.com/feedback/appletv.html
    and you can look here
    http://www.ebay.com/bhp/vhs-player

  • I accidentally pushed the cloud button next to a song that I didn't want and now I can't delete it... How do I delete it?

    I accidentally pushed the cloud button next to a song that I didn't want and now I can't delete it... How do I delete it?

    Hello Placencio,
    The song can be deleted by swiping the song, then tapping 'Delete.'
    iPad User Guide For iOS 7 Software
    http://manuals.info.apple.com/MANUALS/1000/MA1595/en_US/ipad_user_guide.pdf
    Cheers,
    Allen

  • IPhone 4s looks shut down all the time.especially when the 3g is on.in the forums its said to push the use button and the power button at the same time.the people calling me cannot reach at my phone.what should i do ?

    my phone looks like offline all the time.its all about me to notice that its offline.then i have to push the main button and the power button together to open it.then the apple sign comes on the screen and the phone turns online.but i cannot receive the information of who called me at the time that my iphone 4s turned offline by itself.i cannot receive messages at all.what can i do now ? i sent the phone to the service and they just told me that they installed the current version.but i guess nothing happened.its doing the same thing again.i cannot use my iphone.
    From Turkiye.

    I've tried all those.But nothing works.The phone seems to be shut down.But it is not.When i get it out of my pocket, for example to call someone, i touch to main button but nothing happens.I solve it by pushing the power button and the main button together just for a couple of seconds, as its said so in the forums.
    also, people told me that they were calling me, my phone was ringing but i didnt answer?...i checked it for millions of times, it seems to be shut down, but its normally not.then i push the buttons together and the apple sign comes on the screen.it searches for the network.and it works.
    but i do not see any calls, texts anything.but for the others, they say my phone seems to be workin.
    I thought it was 'cause of the 3G is switched on but when I turn 3G off, it does the same thing.it seems to be offline all the time.

  • My mac pro wont start. I push the power button and I get a click sound. A few seconds later another click sound and that it.

    My mac pro wont start. I push the power button and I get a click sound. A few seconds later another click sound and that it. I've tried different power plugs. Going direct into the wall, through a power strip. By iteslf, with other devices plugged in. I removed hard drives, and some RAM, and nothing. Sometimes it would not turn on, and then some minutes later it works. So its was sparatic, but now its been the same situation for three days where it wont turn on.
    I'm guessing power supply, but I wanted to see if anyone had a similar expereince and what the solution was, before I drag this beast to my local Apple store and have them look at it. Its a real pain to get it there and back and I want to be armed with some info for them. I already dragged this to them when it first started to do this, and of course it started up just fine for them. And you know if it works for the Genius then theres nothing wrong with. No matter what you explain to them.
    I figure if anyone had a the same problem and was able to resolve it, I can relate that experience to the Genius even if it start up for them.
    Thanks

    Try a SMC Reset using the extended method:
    Remove the AC power cord.
    Press the power-on button. [This drains the stored charge from the power supply]
    wait a quarter minute.
    Restore the power cord, being certain to JAM it into the socket, as the big block of rubber inhibits proper seating.
    wait a quarter minute
    attempt to power on.
    If no joy, examine the button battery half-hidden behind the graphics card. Remove it to measure the Voltage. A new battery should not cost over US$5, and measures a little over 3 Volts. BR-2032 is used in garage door opener controls and car door locks controls. The geeks at Radio Shack can measure it for you.

  • Right now my ipod is set on 'music'. When I push the menu button, it will not go back to the main menu's, but I can still go to all the music and play it.

    Right now my ipod classic is set on 'music'. When I push the munu button, it will not go back to the main menus, but it will still go forward and select and play music normally. I tried resetting it by holding the menu and center buttons until the apple logo appeared, but the problem is still there.

    If your battery level is low, recharge it first for at least 2 hours, preferably 4 hours.
    After the Apple Logo, you release the buttons, what do you see on the iPod screen? (language selection?)
    Have a nice day!

  • Aperture 3 shuts down every time I try to use it after only using it for one minute. Aperture closes then a pop up screen asks if I want to reopen Aperture. If somrone at Aperture didn't keep pushing a stop button for it to close,it wouldn't need to ask t

    Aperture 3 shuts down every time I try to use it after only using it for one minute. Aperture closes then a pop up screen asks if I want to reopen Aperture. If somrone at Aperture didn't keep pushing a stop button for it to close,Apple wouldn't need to ask the stupid question"Do you want to reopen Aperture?" to begin with. Anyone out there having the same annoying problem?? I like Aperture or used to anyway,but if this nonsense continues, I will be forced to buy some other editor besides "No hanging fruit - Adobe photoshop CS5" or "I don't like you so I'm shutting down - Aperture".

    Hello,
    sorry to hear about your troubles, but we will need to have more technical information about your problem to be able to help you:
    There may be several reasons that can cause Aperture to crash on start up:
    You may have imported an image (or video) in an encoding that Aperture does not support, or that is larger than 2 GB, or that is corrupted and Aperture cannot process it
    Your Aperture Library or Preferences may have been corrupted
    Or you are having a system wide problem with your machine.
    Or you may simple be running out of disk space.
    It would help, if you could post the crash log from your last crash. Also, more details on your Aperture Library: Is it managed or references? how large is it? Is it on your system drive or on an external drive?
    What have you done, shortly before the trouble started? Have you imported new images or videos? Did you install any plug-ins or any new software, lile Final Cut?
    Try, if you can get Aperture to launch, if you defer the generation of Previews: Hold down the SHIFT-key immediately after you start Aperture to prevent preview generation for that session. If a damaged image in your library is preventing normal opening, this may allow you to start Aperture. If this succeeds, try to identify the broken image or video among the images you recently imported and remove it from the library.
    Regards
    Léonie
    Don't you think your user name is a little bit tactless in an Apple provided forum?

  • TS1717 when trying to download podcasts to my ipod I get an error message that the download was interupted and to pust the get button to continue.  The same message happens every time I push the get button.

    When trying to download podcasts to my ipod I get an error message that says the download was interupted and to push get button to resume.  When I push the get button the same thing happens again and again.  It never completes the download.  What do I do?

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    See "Firefox hangs when you quit it":
    *https://support.mozilla.com/kb/Firefox+hangs
    See also:
    *https://support.mozilla.com/kb/Firefox+is+already+running+but+is+not+responding
    *http://kb.mozillazine.org/Profile_in_use

  • Imac 27" Intel Core 7 CPU. Screen goes black and will not respond except with a push of power button. Second monitor connected via displayport continues to display fine. Apply Store did full hardware scan and all is fine. Did clean wipe from Mavrick back

    Imac 27" Intel Core7  CPU 16 Gig RAM. Screen goes black and will not respond except with a push of power button. Second monitor connected via displayport continues to display fine. Apply Store did full hardware diagnostic and all is fine. Did clean wipe from Mavrick back to Mountain Lion but problem remains. Apple Store can do no more.

    I did some more digging, it appears to be a backlight problem only. I can see the screen very dimly if I use a bright flashlight in a very dark room. It also seems to run ok if the brightness is turned down a LOT.
    So I'm thinking this is a LED driver board issue or the display itself. I'll open it up and check the connection between the two and see if I can get any more clues. At least I can use it somewhat now by dimming the display significantly...

  • Trying to connect my iphone 4 to my home wifi network! my android phone gives me the option of pushing the arrows button on my router and on my android phone but cannot find the "push the arrows button" option on my iphone 4. is this option available???

    trying to connect my iphone 4 to my home wifi network! my android phone gives me the option of pushing the arrows button on my router and on my android phone but cannot find the "push the arrows button" option on my iphone 4. is this option available?? and if so, where is it located???

    No such option on an iPhone.  Just go to Settings>wifi, tap the name (SSID) of your your home network from the list, then when prompted, enter the password.

  • My MacBook Pro won't go beyond a white screen, after I pushed the restart button. How can I get it to a login? I have routinely backed it up, but don't know how to bring that up, nor if I have a boot file on that external disk. Help!

    My MacBook Pro won't go beyond a white screen, after I pushed the restart button. How can I get it to a login? I have routinely backed it up, but don't know how to bring that up, nor if I have a boot file on that external disk. Help!

    Take each of these steps that you haven't already tried. Stop when the problem is resolved.
    To restart an unresponsive computer, press and hold the power button for a few seconds until the power shuts off, then release, wait a few more seconds, and press it again briefly.
    Step 1
    The first step in dealing with a startup failure is to secure the data. If you want to preserve the contents of the startup drive, and you don't already have at least one current backup, you must try to back up now, before you do anything else. It may or may not be possible. If you don't care about the data that has changed since the last backup, you can skip this step.
    There are several ways to back up a Mac that is unable to start. You need an external hard drive to hold the backup data.
    a. Start up from the Recovery partition, or from a local Time Machine backup volume (option key at startup.) When the OS X Utilities screen appears, launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.” The article refers to starting up from a DVD, but the procedure in Recovery mode is the same. You don't need a DVD if you're running OS X 10.7 or later.
    b. If Step 1a fails because of disk errors, and no other Mac is available, then you may be able to salvage some of your files by copying them in the Finder. If you already have an external drive with OS X installed, start up from it. Otherwise, if you have Internet access, follow the instructions on this page to prepare the external drive and install OS X on it. You'll use the Recovery installer, rather than downloading it from the App Store.
    c. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, start the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    d. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.
    Step 2
    If the startup process stops at a blank gray screen with no Apple logo or spinning "daisy wheel," then the startup volume may be full. If you had previously seen warnings of low disk space, this is almost certainly the case. You might be able to start up in safe mode even though you can't start up normally. Otherwise, start up from an external drive, or else use the technique in Step 1b, 1c, or 1d to mount the internal drive and delete some files. According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation.
    Step 3
    Sometimes a startup failure can be resolved by resetting the NVRAM.
    Step 4
    If a desktop Mac hangs at a plain gray screen with a movable cursor, the keyboard may not be recognized. Press and hold the button on the side of an Apple wireless keyboard to make it discoverable. If need be, replace or recharge the batteries. If you're using a USB keyboard connected to a hub, connect it to a built-in port.
    Step 5
    If there's a built-in optical drive, a disc may be stuck in it. Follow these instructions to eject it.
    Step 6
    Press and hold the power button until the power shuts off. Disconnect all wired peripherals except those needed to start up, and remove all aftermarket expansion cards. Use a different keyboard and/or mouse, if those devices are wired. If you can start up now, one of the devices you disconnected, or a combination of them, is causing the problem. Finding out which one is a process of elimination.
    Step 7
    If you've started from an external storage device, make sure that the internal startup volume is selected in the Startup Disk pane of System Preferences.
    Start up in safe mode. Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Post for further instructions.
    Safe mode is much slower to start and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know the login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    When you start up in safe mode, it's normal to see a dark gray progress bar on a light gray background. If the progress bar gets stuck for more than a few minutes, or if the system shuts down automatically while the progress bar is displayed, the startup volume is corrupt and the drive is probably malfunctioning. In that case, go to Step 11. If you ever have another problem with the drive, replace it immediately.
    If you can start and log in in safe mode, empty the Trash, and then open the Finder Info window on the startup volume ("Macintosh HD," unless you gave it a different name.) Check that you have at least 9 GB of available space, as shown in the window. If you don't, copy as many files as necessary to another volume (not another folder on the same volume) and delete the originals. Deletion isn't complete until you empty the Trash again. Do this until the available space is more than 9 GB. Then restart as usual (i.e., not in safe mode.)
    If the startup process hangs again, the problem is likely caused by a third-party system modification that you installed. Post for further instructions.
    Step 8
    Launch Disk Utility in Recovery mode (see Step 1.) Select the startup volume, then run Repair Disk. If any problems are found, repeat until clear. If Disk Utility reports that the volume can't be repaired, the drive has malfunctioned and should be replaced. You might choose to tolerate one such malfunction in the life of the drive. In that case, erase the volume and restore from a backup. If the same thing ever happens again, replace the drive immediately.
    This is one of the rare situations in which you should also run Repair Permissions, ignoring the false warnings it may produce. Look for the line "Permissions repair complete" at the end of the output. Then restart as usual.
    Step 9
    If the startup device is an aftermarket SSD, it may need a firmware update and/or a forced "garbage collection." Instructions for doing this with a Crucial-branded SSD were posted here. Some of those instructions may apply to other brands of SSD, but you should check with the vendor's tech support.  
    Step 10
    Reinstall the OS. If the Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade.
    Step 11
    Do as in Step 9, but this time erase the startup volume in Disk Utility before installing. The system should automatically restart into the Setup Assistant. Follow the prompts to transfer the data from a Time Machine or other backup.
    Step 12
    This step applies only to models that have a logic-board ("PRAM") battery: all Mac Pro's and some others (not current models.) Both desktop and portable Macs used to have such a battery. The logic-board battery, if there is one, is separate from the main battery of a portable. A dead logic-board battery can cause a startup failure. Typically the failure will be preceded by loss of the settings for the startup disk and system clock. See the user manual for replacement instructions. You may have to take the machine to a service provider to have the battery replaced.
    Step 13
    If you get this far, you're probably dealing with a hardware fault. Make a "Genius" appointment at an Apple Store, or go to another authorized service provider.

  • I accidentally pushed the power button of my macbookpro... it restarted but doesnt open... what appears now is a flashing FOLDER logo with a QUESTION MARK on it.. can someboby help me to fix this?

    i accidentally pushed the power button of my macbookpro... it restarted but doesnt open... what appears now is a flashing FOLDER logo with a QUESTION MARK on it.. can someboby help me to fix this?

    (Assuming you don't have a firmware boot lock set)
    First easy step...
    1. Shut down the computer if it's on (hold the power button down... until it shuts off)
    2. Press the power button
    3. Immediately press AND hold the Option key ASAP
         Hold until drive option images appear in a single row across the screen. Typically most people running 10.7 or 10.8 will see 2 drive options to boot from: the main volume they usually boot from, and a recovery volume. If your main volume pops up. Use the cursor or arrow keys to highlight/select the main volume and press enter. That should boot your main volume. Let me know what you get from this point... I'll give you more as you go along.

Maybe you are looking for

  • How to share iPhoto library among users on same iMac without using an external drive?

    How can I share my iPhoto library with another user on the same iMac for use with iCloud. I do not want to use an external drive. Thanks

  • How much performance can I get from my macbook?

    It's older then 2,5 years but still quite good for my needs. It has a 2.16 GHz Core 2 Duo and I never use all the CPU, it has 2GB 667MHz DDR2 SDRAM and I use it all. I am not using all the 120 GB of 5400 rpm HDD but I use it often and I feel how much

  • Oracle v.7.3.4.4 support

    Is Oracle v.7.3.4.4 is still supported by Oracle? I've been looking around the Oracle website and it appears that Oracle v.7.3.4 is supported, but I see there's a v.7.3.4.5 patch level. I'm wondering if you have to be at this latest patch level to be

  • User status for Service Issue{for particular Sales order} in CRM

    Hi Experts, I've an issue related to the User status in CRM. I've a Sales Order and I'm creating a service issue for it in CRM. For the service issue number has some user status and I want to know from where it is coming. Is there any configuration i

  • Avoiding hard coding of Font and Signature Path in RTF

    Hi All, I have to create a check printing program and this requires MICR font and signatures. right now i have provided the URL for signature in RTF and path where my font is kept. The issue is everytime i am migrating my code from one instance to ot