UIButton control array and getting action to fire

I've got a screen with several buttons (like the Stocks App's time period buttons) I put them into a control array and can get them to draw just as I want to on a page.
My problem is, I can't get any buttons in the control array to fire and call the action method for the button(s). The event doesn't get triggered. If I take the buttons out of the array, they'll fire fine, but I'm trying to write some compact code.
Am I doing something wrong, or is this by design?
Here's some code from my init:
for (int i = 0; i < 7; i++)
UIButton *actionButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
actionButton.frame = CGRectMake(0.0, 0.0, 35, 20);
[actionButton setBackgroundColor:[UIColor redColor]];
[actionButton setAlpha:.05];
[actionButton addTarget:self action:@selector(actionButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[actionButton addTarget:self action:@selector(actionButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[actionButton setEnabled:YES];
[actionButtons addObject:actionButton];
[actionButton release];
}

I see I didn't cut and paste in that last post very well. But I'm revisiting this issue and I'm still stuck!
Let me restate my question:
If I create UIButton on my UIView, I can set the action and tie it to a method, using code like this:
[actionButton addTarget:self action:@selector(actionButtonAction:) forControlEvents:UIControlEventTouchUpInside]
-Creating the UIButton - easy to do
-Adding Action to the button - easy to do
-Getting the method to trigger from an action on the button - easy to do.
That's Great!
I however, want to create an array of UIButtons:
Creating the Array of UIButtons - easy to do
Adding Actions to each button before I add it to the array - easy to do
Getting the method to trigger from an action on the button in the array - *I'm lost!*
The event just doesn't fire. Is it because the button is in an array? Help!

Similar Messages

  • In 10g can we dump control file and get SCN info.

    Hi,
    I have a question can any one help me on this.
    In 9.2.0.5 we could dump the control file and get the SCN using the command :
    alter session set events 'immediate trace name CONTROLF level 10';
    In 10.1.0.4.0 the output of the dump has changed and we do not get the SCN. or any of the following information :
    DATABASE ENTRY
    CHECKPOINT PROGRESS RECORDS
    EXTENDED DATABASE ENTRY
    REDO THREAD RECORDS
    LOG FILE RECORDS
    DATA FILE RECORDS
    RMAN CONFIGURATION RECORDS
    LOG FILE HISTORY RECORDS
    OFFLINE RANGE RECORDS
    ARCHIVED LOG RECORDS
    BACKUP SET RECORDS
    BACKUP PIECE RECORDS
    BACKUP DATAFILE RECORDS
    Can I get similar output in 10g as 9i ?
    with regards,
    Dilip.

    Hi.
    What are you trying to achieve here? If you just want the current SCN, you can get it using one of these:
    SQL> select current_scn from v$database;
    CURRENT_SCN
    8058824527
    1 row selected.
    SQL>or
    SQL> select dbms_flashback.get_system_change_number from dual;
    GET_SYSTEM_CHANGE_NUMBER
                  8079317404
    1 row selected.
    SQL>Cheers
    Tim...

  • Control array of callback functions?

    Apologies for my basic question.
    I am experimenting with control arrays and so far am able to collect data in string controls that are inside control arrays.  Works well.  Naturally, none of these controls need callback functions.
    Now I have need of some momentary command buttons in a control array as well.  So my question is, should I use a single callback function for all of the button controls in that single array?  And if so, how do I go about identifying which element in the control array called the function?  From reading on the forums, it seems as if use of the callback data parameter might get me there.
    Just wanted to ask before I get off track.  Thanks!
    Solved!
    Go to Solution.

    Yes, callbackData can be of help in such a situation, but if you can limit to switch on array index to discriminate what to do your button callback could be something on this line:
    int CVICALLBACK BtnAttayCallback (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
    int handle, index;
    switch (event) {
    case EVENT_COMMIT:
    handle = GetCtrlArrayFromResourceID (panel, control);
    GetCtrlArrayIndex (handle, panel, control, &index);
    switch (index) {
    // Your code here
    return 0;
     (No CVI install here so I cannot test it: double check the code but it should reasonably work)
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Can not update PO via update_po api and getting error in Budgetary Control

    Hi all,
    I am trying to update PO by calling update_PO API. I am trying to follow the manual but am getting an error and can't update the PO. Here is the code:
    declare
    l_result NUMBER;
    l_api_errors apps.po_api_errors_rec_type;
    l_version_no NUMBER := 0;
    l_po_header_id po_headers_all.po_header_id%TYPE;
    l_po_original_amount NUMBER;
    v_po_updated_price NUMBER;
    l_oracle_promised_date DATE;
    v_vendor_site_id po_headers_all.vendor_site_id%TYPE;
    l_vendor_site_code po_vendor_sites_all.vendor_site_code%TYPE;
    l_return_status VARCHAR2 (2000);
         v_error_message VARCHAR2(2000);
    BEGIN
    l_version_no := 0;
    l_po_header_id := 0;
    v_po_updated_price := 0;
    v_error_message := NULL;
    BEGIN
    SELECT revision_num, po_header_id, vendor_site_id
    INTO l_version_no, l_po_header_id, v_vendor_site_id
    FROM po_headers_all
    WHERE segment1 = '*****' --<PO#>
    AND type_lookup_code = 'STANDARD';
    END;
    dbms_output.put_line('l_version_no is ' ||l_version_no);
    --Getting 0 here          
    BEGIN
              l_result := PO_CHANGE_API1_S.record_acceptance(
                        x_po_number => '****', --PO#
                        x_release_number => null,
                        x_revision_number =>l_version_no,
                        x_action => 'NEW',
                        x_action_date => null,
                        x_employee_id => 1359,
                        x_accepted_flag => 'Y',
                        x_acceptance_lookup_code => 'ACCEPT WITH CHANGES',
                        x_note => 'All valid',
                        x_interface_type => 'APITEST',
                        x_transaction_id => null,
                        version => '1.0');
              dbms_output.put_line('Record Acceptance l_result is '||l_result);
    --Getting 1 here. Success.
    l_result :=
    po_change_api1_s.update_po
    (x_po_number => '****', --PO#
    x_release_number => NULL,
    x_revision_number => l_version_no,
    x_line_number => 1,
    x_shipment_number => NULL,
    new_quantity => 10,
    new_price => NULL,
    new_promised_date => NULL,
    launch_approvals_flag => 'Y',
    update_source => NULL,
    VERSION => '1.0',
    x_override_date => NULL,
    x_api_errors => l_api_errors,
    p_buyer_name => NULL
    EXCEPTION
    WHEN OTHERS
    THEN
    dbms_output.put_line('error is ' ||SQLERRM);
    END;
    dbms_output.put_line('l_result is '||l_result);
    --Getting 0 here.... Failure
    IF (l_result <> 1)
    THEN
    FOR i IN 1 .. l_api_errors.MESSAGE_TEXT.COUNT
    LOOP
    v_error_message :=
    v_error_message
    || ' '
    || l_api_errors.MESSAGE_TEXT (i);
    END LOOP;
    END IF;
    COMMIT;
    END;
    Final error message is:
    Supplier site is either exempt from CCR registration or has not been added to agency vendor. Procedure PSA_FUNDS_CHECKER_PKG.glxfck returns an error without any details to the calling procedure PO_ENCUMBRANCE_POSTPROCESSING.execute_gl_call. Please contact your support representative. Your Budgetary Control action completed with exceptions. DO_UNRESERVE-100: User-Defined Exception
    Cause: A SQL error has occurred in DO_UNRESERVE. The SQL error is User-Defined Exception.
    Action: Take note of both this error number and the actions you were trying to perform. Contact your system administrator for further assistance.
    Your Budgetary Control action completed with exceptions.
    Please let me know what can be the croblem here. I can not find anything here on this issue. Please help.
    Thanks.

    Can you review these notes, may help you.
    R12: Funds Check Error 'PSA_BC_XLA_PUB.Budgetary_Control Returns an Error' for Purchase Orders and Requisitions When Federal Financial is Installed [ID 1292042.1]
    Procedure PSA_BC_XLA_PUB.Budgetary_Control Returns an Error Due To "XLA_AP_TECHNICAL_ERROR" [ID 950385.1]
    Fund Check Is Failing - Procedure PSA_BC_XLA_PUB.Budgetary_Control Returns An Error [ID 1338545.1]
    Error: PSA_BC_XLA_PUB.Budgetary_Control When Approving A Project Related PO [ID 1319065.1]
    Procedure Psa_bc_xla_pub.Budgetary_control Returns An Error For Autocreated Blanket Release [ID 751635.1]

  • Another control is blocking the control. Please make the blocked control visible and retry the action

    I am trying to click on a Hyperlink in div tag , but I keep getting this error message:
    Another control is blocking the control. Please make the blocked control visible and retry the action.
    What could it be?  Nothing is blocking it  at all.

    Check your html to see whether any controls are inadvertantly floating over the top of your hyperlink.
    I would also use firebug (F12 in ie or chrome) to highlight the boundaries of each control on your page so you can track it down easily.
    If using chrome you can right click on the page and select Inspect element.
    This should help you find the cause of the issue:)

  • All the xml and arrays are getting NULL Problem

    Hello guys
    I am working on a project which uses xml loading, e4x and array manipulation extensively, and it was going good but now I got stuck on a strange problem.  Whole code was fine and application was working and responding in a desired way, but then mystourisly it stopped working and started to retun NULL values to almost all the actionscript (internal) Arrays and XML varibales.
    Now Whenever i load xml file and assign the loaded values to internal xml variables, internal values get only NULL instead of data.
    Same is the situation with Arrays, I created some components in mxml, and when i passed them to arrays by reference, code gets compiled successfully, but again Array has only null values [that code was working fine too]
    I am wondering if Adobe Flex did a silenced update or something similar and it is the result of that things !
    I am using Adobe Flex 3.2 with SDK 3.3 on windows Vista Ultimate.
    Please check this attached project, Import it and see if you face the same problem
    Thanks
    Link to Problem Project
    http://isolatedperson.googlepages.com/problemXperiment.zip
    Problem Screenshot
    http://isolatedperson.googlepages.com/xmlissue.JPG

    Use HTTPService to load the data. You'll have fewer problems.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application creationComplete="dataSvc.send();"
      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
         <mx:Script>
              <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.rpc.events.ResultEvent;
                [Bindable] private var xlc:XMLListCollection;
                   private function loadXML(evt:ResultEvent):void{
                    xlc =  new XMLListCollection(evt.result.individual.@id as XMLList);
              ]]>
         </mx:Script>
         <mx:HTTPService resultFormat="e4x" result="loadXML(event)" url="alirazaTree.xml" id="dataSvc"/>
         <mx:ComboBox id="cbx" dataProvider="{xlc}"/>
    </mx:Application>

  • How can i set action on UITaBar and get event from that

    Hi All,
    I m doing one apps in which i have to add three UITabBarItem and this is UITabBarSystemItem.
    Now i cannot understand that how can i set action and get event from the?
    And how can i set various views on three tab bar item.
    I have to use UITabBar means i have to use UINavigationController+UITabBar
    My code id
    tabBar =[[UITabBar alloc] initWithFrame:CGRectMake(0,370,320,50)];
    tabBar.backgroundColor =[UIColor blackColor];
    UITabBarItem *search =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemSearch tag:0];
    UITabBarItem *recents =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemRecents tag:1];
    UITabBarItem *favorites =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorit es tag:2];
    tabBar.items =[[NSArray arrayWithObjects:search,recents,favorites, nil] retain];
    tabBar.selectedItem = search;
    [myView addSubview:tabBar];
    [tabBar release];
    I add a action:
    UITabBarItem *search =[[UITabBarItem alloc] InitWithTabBarSystemItem:UITabBarSystemItemSearch tag:0 action:@selector(select:)];
    So it error: Warning -no'InitWithTabBarSystemItem:tag:action:' method fount
    So any can help me regarding it?

    Thanks RickMaddy very much.
    I read and do with sample at the View Controller Programming Guide . But when run it only view TabBar with title but haven't got any TabBarItem on it. I searched a few example about TabBar and i did, but i want do a form with a button then press on button it view a form with 2 TabBarItem on TabBar and press each TabBarItem will show correlative form page 1, page 2.
    UITabBarController *tabBarControl = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
    tabBarControl.title = @"Tab bar";
    ViewControl1 *view1 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl1" bundle:nil] autorelease];
    ViewControl1 *view2 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl2" bundle:nil] autorelease];
    tabBarControl.viewControllers = [NSArray arrayWithObjects:view1,view2,nil];
    [self.navigationController pushViewController:tabBarControl animated:YES];

  • I am using Photoshop CS5 on a new iMac with a wireless keyboard.  I used to be able to hit F11 to perform a custom sharpening action but now the F11 key is the volume control key and I have tried everything to disable or switch the volume key. I have also

    I am using Photoshop CS5 on a new iMac with a wireless keyboard.  I used to be able to hit F11 to perform a custom sharpening action but now the F11 key is the volume control key and I have tried everything to disable or switch the volume key. I have also tried assigning other function keys to initiate the action. Is there a simple solution to this? What am I missing?

    Try unmounting the volume on your iMac using Disk Utility. Then mount it again. You may need to reboot the laptop or relaunch its Finder process (using the Force Quit window) after remounting the drive on your iMac. Remember that no process may be accessing any files on the drive you plan to unmount, or the unmount will fail. Unmounting and remounting an external drive on my iMac made it become visible on my MacBook Pro after it had disappeared.

  • I want to create an array that goes into a case structure where each element in the array is an individual case and gets done in order

    I want to create an array that goes into a case structure where each element in the array is an individual case and gets done in order. Any ideas, I've been playing with the idea but have had no luck, is this even possible?

    Hi,
    Please check it out the attached Vi.. Is this you need?
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney
    Attachments:
    Event.vi ‏11 KB

  • How to get the index of a pressed button in control array?

    Greetings,
    I have 3 parallel arrays--one containing buttons and the other two containing string indicators.  I'd like to be able to push a button and get the values in the other arrays.  How can this be done?
    (P.S.  Illustrations are great and most welcome, but I do not have Labview on this computer, so I would appreciate it in jpg or screenshots if possible.)
    Thank you!
    Solved!
    Go to Solution.

    Here's what I had in mind. Modify as needed.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ButtonArray.vi ‏14 KB
    ButtonArray.png ‏11 KB

  • Problem in adding "TableLayoutPanel" control array type functionality on windows form dynamically using drag and drop

    Environment: -
     (Application Machine)
    OS Name             : -
    Microsoft Windows 7 Professional/XP SP2/SP3            
    OS Bit Version      : -
    32 Bit                     
    Application Name: - Designer.exe                                  
    IDE                  
        : - Visual Studio 2008                        
    EXE Application development: -
    VB. Net
    Application Type: -
    Application “Designer.exe” was designed in vb6.0 and now, it has been upgraded to Visual Studio 2008 and it works properly.
    Product Description: -
                 We have an application Designer.exe, which is used for designing “Forms”.
    It has menu option with following option like Panel, Text Box, Combo Box, Button etc. We drag any of this menu items and place it to form.
    Requirement: -
    We have
    critical requirement in product. In Designer.exe, we need to align form margin, while we increase or decrease window. And for that we have searched that 
     “TableLayoutPanel” components can be helpful.
    Problem description: -
    Earlier code was in vb6.0, now it has upgraded to Visual Studio 2008. In vb6.0, we have used control array for memory utilization with Combo Box, Group Box, and Text
    Box etc.
    But, for alignment we have to use “TableLayoutPanel”
    control array type functionality on form.
    Code Snippet: - For earlier designing component e.g. Frame
    'Required by the Windows Form Designer
    Public WithEvents Frame1 As Microsoft.VisualBasic.Compatibility.VB6.GroupBoxArray
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.components = New System.ComponentModel.Container
    Me.Frame1 = New Microsoft.VisualBasic.Compatibility.VB6.GroupBoxArray(Me.components)
    CType(Me.Frame1, System.ComponentModel.ISupportInitialize).BeginInit()
    . Kindly suggest approach for implementing requirement.
    Kindly help us to complete the requirement. I will be really
    thankful for any assistance.

    Hi S.P Singh,
    Welcome to MSDN.
    I am afraid that as Renee Culver said, these forums donot support VB6, you could refer to this thread:
    Where to post your VB 6 questions
    You could consider posting this issue in these forums below:
    These forums do not support Visual Basic 6, however there are many third-party support sites that do. If you have a VB6-related question please visit these popular forums:
    VB Forums
    VB City
    Thanks for your understanding.
    Best Regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I lost my library and backups to a fire but had my Itouch with me , how do i get my "stuff" off my ITouch to my new library ???

    I lost my itunes library and backups to a fire but had my Ipod Touch with me, how do I get my "stuff" off
    my ITouch to my new computer and new Itunes library ?????

    Connect iPod to PC
    Ignore iTunes prompt to sync.
    Find ipod device in 'My computer'
    Open the ipod drive and click on ORGANIZE. Then folder and search options tab. Then View and Show hidden files and folders. (You may have done this before)
    A folder called "ipod_control" should appear. Open it
    Within this folder there should be another "ipod_control" folder. Open that too.
    Copy and paste everything in this folder to a folder in "My Music", name it so you can recognize it.
    Return to iTunes, then go to  File -> Add folder to libary.
    Find that folder you pasted to my music. Highlight it and press select.
    Wait. iTunes will recognise the code of the files and begin importing it all to your libary.
    Thats it! Your files are moved. ^_^
    (PS. you may want to look over them as some of the code will not have been translated, but if you recognise the songs then it should not be a problem.)

  • The control click and external mouse right click no longer works when copying and pasting album art within itunes. Ex. Hit get info for one song to paste to the rest, copying the artwork wont work when it used to.

    The control click and external mouse right click no longer works when copying and pasting album art within itunes. Ex. Hit get info for one song to paste to the rest, copying the artwork wont work when it used to.

    Hello there, Teworsham90.
    The following Knowledge Base article reviews the process of adding artwork to content in your iTunes Library:
    iTunes: How to add artwork to songs and videos in your library
    http://support.apple.com/kb/HT1409
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • Fel: 0x8004010F: ZebraMapiCopySession::CreateMobileMeMessageStore: CreateMessageService failed   This is what i get when i try to activate contacts in the icloud control panel and no contacs are syncronised..... iPhone 3GS, Windows 7

    Fel: 0x8004010F: ZebraMapiCopySession::CreateMobileMeMessageStore: CreateMessageService failed
    This is what i get when i try to activate contacts in the icloud control panel and no contacs are syncronised.....
    iPhone 3GS, Windows 7

    After much some reasearch I fixed this problem for my problem computer.  I have two computers running Windows 7 64-bit, one working with iCloud contact/calendar sync and the other getting this "0x8004010F: ZebraMapiCopySession::CreateMobileMeMessageStore: CreateMessageService failed" error (when you look at the report data to Apple).
    So when I compared my system to a working system, I found that there was a difference in the bit-named DLL used by iCloud.
    Go to Outlook, File, Options, Add-Ins and in the Active Application Add-ins section highlight "iCloud Outlook Addin".  You'll find the DLL name there.
    On my working computer, it was APLZOD6432.DLL, while on my problem computer it was APLZOD32.DLL.  Ah ha!  Its trying to setup Outlook 64 with a 32-bit iCloud DLL.  Or so I thought.
    I looked for a 64-bit specific install for iCloud.  Nope, iCloud 1.1 is for both.  Hmmm...
    I thought I had installed Office 2010 64-bit on my problem computer, but apparently I installed 32-bit.  I was able to confirm this by going into Outook, File and Help.  Under "About Microsoft Outlook" it said 32-bit.  Checking the working computer, it was showing 64-bit Outlook.
    So this also brought another thought to my mind.  Maybe the problem is because I installed the iCloud control panel before I installed Office 2010.    That said, I uninstalled iCloud Control Panel (Add/Remove Programs), and re-installed it from the manual download page http://support.apple.com/kb/DL1455 and tried contact syncing again.  It worked!
    Then I went to check the DLL in use.  It was APLZOD32.DLL.  So perhaps iCloud sets up for 64-bit Office when no office is installed on Windows 7 64-bit and breaks when you install 32-bit.  Or there is a part of iCloud install that needs to be done with Office installed.  Either way, I'm happy to have the issue fixed.  Leaving the 32-bit Office there for now. 

  • HT3140 put a date 1970 june 27 . and now the whole system is out of control i cant get to internet cannot change date and time  always when i opened system preferences stays in a waiting mode but doesnt show any opcion don t know what to do and i just bou

    put a date 1970 june 27 . and now the whole system is out of control i cant get to internet cannot change date and time  always when i opened system preferences stays in a waiting mode but doesnt show any opcion don t know what to do and i just bought this computer

    It may well be a driver issue but considering the loading: Xorg trying to load different drivers is somewhat normal. @cafe you can see that these are autoconfigured by X above the loading in the log:
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched intel as autoconfigured driver 0
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched intel as autoconfigured driver 1
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched modesetting as autoconfigured driver 2
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched fbdev as autoconfigured driver 3
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched vesa as autoconfigured driver 4
    As long as one of the drivers gets loaded, which it apparently does the failing of the others is fine.
    Was there an update maybe ?

Maybe you are looking for

  • How can add partner at the time of PO creation

    The requirement is to add an extra partner in the Purchase Order header Partner tab at the time of PO creation itself. The PO is being posted through Idoc. A custom function module has been maintained as inbound processing FM and it calls BAPI_PO_CRE

  • How do you recover a hard drive?

    I have a MacBook Pro that is two years old. I tried to start the laptop and it hung up on the gray screen with the apple icon.  So I inserted the snow leopard install cd and I was able to start the computer and gain access the utilities. I tried the

  • Will DDE, ORA_FFI & OLE2 packages work in Forms 10g

    Hi All, Will the function's and procedure's of the packages DDE, ORA_FFI and OLE2 work in Oracle Forms 10g, when running the forms as Client-Server (Two Tier). Regards, Prasad.

  • Dashboard hangs up, widgets show but do not function

    Dashboard suddenly quit responding.  I can get the Widgets windows to show on screen, but the widgets do not work.  Activity Monitor shows is as Not Responding and using essentially 99.9% of CPU.  Any idea what's going on here?

  • Problem with function, need to return a very large number

    I have a function that is used to derive a number by using a defined algorithm. We have tested it many times in our 'development' region and it works. We moved it to our 'UAT' region and now the function is giving an error. The data is the same in bo