Run same code for didSelectRowAtIndexPath & accessoryButtonTappedForRowWith

Is there a way to call the other method from one of this even so that I do not have to duplicate the same code in both these events?
Basically if the user taps the row or the cheveron button the same code should run,
so is there a way to trigger an event of accessoryButtonTappedForRowWithIndexPath from inside didSelectRowAtIndexPath?
TIA
Raj

The following should work:
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
[self tableView:tableView didSelectRowAtIndexPath:indexPath];
Andreas

Similar Messages

  • To use the same code for many movieclips

    Dear all.
    I am using the flash to build my personal book online. I need zoom  many movieclip, my images.
    i make the code and function perfectly. But I want to find a way to use the same function for all movieclips and so, mantaining my code clean.
    mc_01.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, Drag);
    mc_01.addEventListener(MouseEvent.MIDDLE_MOUSE_UP, unDrag);
    mc_02.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, Drag);
    mc_02.addEventListener(MouseEvent.MIDDLE_MOUSE_UP, unDrag);
    and many others....
    function Zoom(e:MouseEvent):void
            mc_01.x = 0;  //I try here for this.x but the previews movie, called "Books" is who have changed your x value.
            mc_01.y = 0;
    I
    EDIT: For untangle, the previews movie is called MyAllPhotos and then, contain all movieclips that are each movie clip is one my images

    Hi Mr Kglad.
    And when I call a property like a X position I use this["mc_"+padF(i)].x = 0;  for substitute the mc_01.x = 0 ?
    My problem realy is inside the function. Your loop add an event to my clips and direction to function Drag and UnDrag.
    But inside in this functions, I need get some informations for the clip.
    Here the code:
    function Zoom(e:MouseEvent):void  //Sorry, but the correct name my functions is Zoom and not Drag and unDrag
               var mod:Number = 50;
               mc_01.scaleX += e.delta / mod; //in this name mc what I need to use? this, parent? I try and not function.
               mc_01.scaleY += e.delta / mod;

  • Running JUnit code for EJB

    Hi,
    I have written following JUnit code for testing EJB whose jndi name is SBuySharesHome
    public class CTestCase_Default extends TestCase
         public CTestCase_Default ( String arg )
              super ( arg );
         protected updateBuyShares.SBuyShares remote_SBuyShares;
         protected void setUp () throws Exception
              * Getting InitialContext object
              Properties prop = new Properties ();
              prop.put ( Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory" );
              prop.put ( Context.PROVIDER_URL, "iiop://localhost" );
              InitialContext context = new InitialContext ( prop );
              * Creating remote interface object for Session EJB SBuyShares
              Object obj_SBuyShares = context.lookup("SBuySharesHome");
              updateBuyShares.SBuySharesHome home_SBuyShares = ( updateBuyShares.SBuySharesHome ) PortableRemoteObject.narrow ( obj_SBuyShares, updateBuyShares.SBuySharesHome.class );
              remote_SBuyShares = home_SBuyShares.create();
         * buyShares : invalidBuy
         publi void test_Default_0 () throws Throwable
              /** Scenario Element : method buyShares */
              int year = 2004;
              int customerId = 1001;
              int companyId = 1001;
              int noOfShares = 100;
              boolean ret_buyShares = remote_SBuyShares.buyShares(year, customerId, companyId, noOfShares);
    This code worked fine with WSAD 5.0 and WAS 5.0
    But above code is not running in the WSAD 5.1.2 with WAS 5.1
    It is giving following exception
    javax.naming.NamingException: The JNDI operation "lookup"on the context
    "localhost/nodes/localhost/servers/server1" with the name "null" failed.
    Please get the root cause Throwable contained in this NamingException for more information.
    Root exception is java.lang.NoClassDefFoundError: com/ibm/ejs/jts/jts/CurrentFactory
         at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4064)
         at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at SearchDAOTest.CTestCase_INOUTDTO.setUp(CTestCase_INOUTDTO.java:38)
         at junit.framework.TestCase.runBare(TestCase.java:125)
         at junit.framework.TestResult$1.protect(TestResult.java:111)
         at junit.framework.TestResult.runProtected(TestResult.java:129)
         at junit.framework.TestResult.run(TestResult.java:114)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:212)
         at junit.framework.TestSuite.run(TestSuite.java:207)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)
    I could not find this required com.ibm.ejs.jts.jts.CurrentFactory.class anywhere in the installation jar.
    Can anybody suggest some solution for this?

    Let me correct the stack trace in my previous posting, Please ignore the stack trace shown in the last posting. This is the correct stack trace
    javax.naming.NamingException: The JNDI operation "lookup"on the context
    "localhost/nodes/localhost/servers/server1" with the name "SBuySharesHome" failed.
    Please get the root cause Throwable contained in this NamingException for more information.
    Root exception is java.lang.NoClassDefFoundError: com/ibm/ejs/jts/jts/CurrentFactory
         at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4064)
         at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at SearchDAOTest.CTestCase_INOUTDTO.setUp(CTestCase_INOUTDTO.java:38)
         at junit.framework.TestCase.runBare(TestCase.java:125)
         at junit.framework.TestResult$1.protect(TestResult.java:111)
         at junit.framework.TestResult.runProtected(TestResult.java:129)
         at junit.framework.TestResult.run(TestResult.java:114)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:212)
         at junit.framework.TestSuite.run(TestSuite.java:207)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)

  • Error while running the code for watermarking

    HI,
    I am using pdf proffesional and SDK for developing my application. At the time of watermarking I am getting below mentioned error.
    An unhandled exception of type 'System.MissingMemberException' occurred in microsoft.visualbasic.dll
    Additional information: Public member 'addWatermarkFromText' on type '_ComObject' not found.
    Code for watermarking is
    Dim pdDoc As Acrobat.CAcroPDDoc
    pdDoc = CreateObject("AcroExch.PDDoc")
    If pdDoc Is Nothing Then
    MsgBox("Failed to create Acrobat PDDoc object.")
    End
    End If
    ' Open the source PDF document
    Dim rc As Integer
    rc = pdDoc.Open(SamplePDFFilePath)
    If rc <> -1 Then
    MsgBox("Failed to open PDF document " & SamplePDFFilePath)
    End
    End If
    ' Acquire the Acrobat JavaScript Object interface from the PDDoc object
    jsObj = pdDoc.GetJSObject
    ' Add a watermark from a file.
    ' function prototype:
    ' addWatermarkFromFile(cDIPath, nSourcePage, nStart, nEnd, bOnTop, bOnScreen, bOnPrint, nHorizAlign, nVertAlign, nHorizValue, nVertValue, bPercentage, nScale, bFixedPrint, nRotation, nOpacity)
    jsObj.addWatermarkFromFile(SampleImageFilePath, 0, 0, 0, True, True, True, 0, 3, 10, -10, False, 0.4, False, 0, 0.7)
    In the above code I am getting error in last line..
    Kindly help me!!!!

    is jsObj returing null?

  • QA10 User Exit to run addational code for Material Backflush

    Does anyone know if there is a User Exit for QA10 Automatic Usage Decision that will allow you to tack on additional code to complete a material backflush.  I have a batchjob that runs every 5 minutes which fires off a variant to evaluate the Inspection Results.  If all results recording are good the UD gets completed and the material is moved from QI Stock to Unrestricted.  At the same time once the UD and stock transfer is done I would like to run a User exit that will allow me to access a custom lookup table to change the material from CP14.B1 to CP14 and complete a backflush.

    Yes you are correct in saying that I want to do another Backflush once the auto UD is completed.  The scheduled job using program RQEVAI30 completes the UD and posts the material from QI Stock to Unrestricted Stock if results are good.  Once the UD is completed and the stock is posted to Unrestricted I need to find a User Exit that will allow me to write custom code to do a table lookup.  This table will also be custom development that we can use to say if material is CP14.B1 and the Insp. Lot Type is 04 then run MFBF to backflush raw material and complete movement type 309 to CP14 Material.  I just need to know if there is a User exit available that I can use once the lot evaluation is completed.

  • Same code for every state in event

    Hello.
    In my front panel there are some buttons that will give the same result each time they are pressed.
    Exactly like menu items.
    In every state of my FSM there is an event structure. Is it efficient to add a case for every menu item and buttons for every state?
    Is there a way to add this functionality in just one case structure and then make it global somehow?
    Thanks.

    duplicate, continue here!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Run a code for all records

    Dear all, please tell me how can I perform a code save for all records in ms dynamics crm 2011. (I've changed part of a code and need it work for all old records)

    Andrii thanks for your reply, but it will not work. In this case I work with a N:N connected records. I found this:
    https://rajeevpentyala.wordpress.com/2012/02/05/update-record-using-odata-and-jquery-in-crm-2011/

  • Compiling code for LPC2378 Target using LV Embedded

    Hi
    I am using LabVIEW embedded for ARM 10 and using MCB2370 evaluation board. I did my evaluation successfully but now when I tried to compile the same code for an lpc2378 target (tier 2), I am getting "Error: Application is too large for target memory. Status: Build failed."
    I am only doing serial communication using com 0 and using no other peripherals that are custumized for MCB2300 target.
    what should I do to resolve this issue?
    thanks and regards!
    Mani

    Hi scg,
    I took a look at your file and researched a little bit about your issue, I have not been so lucky with the research since most of the doceuments are related to previous versions of the software, nevertheless it is also what makes me think that the file might be corrupted or some issue related to it so and I have found some tests that you could try:
    1. Create a new FPGA file with your code on it and compile it again.
    2. Turn off the firewall and compile again 
    3. Restart the compiler Services
    Hope you might find this information helpful!
    Regards,
    S.Jimenez

  • Need UPC code for my Macbook Pro 4,1

    This is an older unit, MB166LL/A; in order to list on amazon.com, they require a UPC code which typically is only found on the box.
    I'm guessing that this would be the same code for matching models. Mine has the 2.6GHz processor, and backlit display.
    Here's the exact info via Apple Specs
    Does anyone have an old box or perhaps the correct UPC number for this excact model?
    Is there a way that SApple can provide this if not?
    Thanks!

    Phone AppleCare and order them. Alternatively, if you don't need iLife or the Apple Hardware Test, you can just use a retail Mac OS X 10.6 DVD.
    (87076)

  • Code for browsing a file in idoc

    i have used the same code for browsing a file in idoc as we use in hcsf, but when that hcsf is converted in hcsp,then that field is still editable even after i wrote
    <$if isHcsp$><$isInfoOnly=1$><$endif$>
    its urgent ..

    HCSF/HCSP code should have the < ! - - syntax, not the < $ syntax... if that your problem?

  • Req. Sample code for the Updation of Master record in MDM using Java API..

    Hi All,
    Can anyone provide me the same code for Updation of master record in MDM using Java API ??

    Hi SakthiNarayananD,
    You can additionally go through the following links to work with MDM and Java API:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49  (Java API)
    http://help.sap.com/javadocs/MDM/SP05/(Java api programs)
    https://help.sap.com/javadocs/MDM/current/index.html  (java api codes)
    http://help.sap.com/javadocs/MDM/SP06P2/index.html (Java Docs for SP06)
    Reg: Using JAVA API - Search
    Re: Retrieving Drop Down List Value using JAVA API - Lookup values
    How to retreive records from Lookuptable of type flat - Lookup Values
    Reg: MDM with webdynpro - READ,INSERT,MODIFY
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Batch code for running a find/replace all on multiple files within a source floder/directory

    What I need is a Batch source code that will open all files in a folder/directory and run a find and replace_all query within them and then save all the files.  The files were created in Illustrator and saved using the Scene7 FXG format extension.    These files will be uploaded into Scene7 as a group after the find and replace macro/query is run on the code.  The same find and replace query will be the same for all the files.  Basically this function or batch process  will save time in setting the same parameters all at one time instead of having to set the parameters individually in scene7.
    a source code sample of the find/replace module macro might be              searchString:  s7:colorvalue="#FFFFFFFF" 
                                                                                                                          replaceString: s7:colorValue="#&txtclr;"
                                                                                                                          searchWhat   "FXG document"    
                                                                                                                             searchSource:  true,
                                                                                                                        useRegularExpressions:   true
    I have no problems creating batch files within Ai and PhotoShop but I have limited programming skills in how to create source code for manuipulating documents outside of those apps or in a OS invironment.
    I could probably come up witha simple program to do what i want for one document but i get lost when dealing with multiple documents in a source folder (prolbem is,  I will be dealing with thousands of documents not 100 or less)
    If anything which Adope cloud app would work best:  Dreamweaver or Edge code   (or just use my notepad)

    What I need is a Batch source code that will open all files in a folder/directory and run a find and replace_all query within them and then save all the files.  The files were created in Illustrator and saved using the Scene7 FXG format extension.    These files will be uploaded into Scene7 as a group after the find and replace macro/query is run on the code.  The same find and replace query will be the same for all the files.  Basically this function or batch process  will save time in setting the same parameters all at one time instead of having to set the parameters individually in scene7.
    a source code sample of the find/replace module macro might be              searchString:  s7:colorvalue="#FFFFFFFF" 
                                                                                                                          replaceString: s7:colorValue="#&txtclr;"
                                                                                                                          searchWhat   "FXG document"    
                                                                                                                             searchSource:  true,
                                                                                                                        useRegularExpressions:   true
    I have no problems creating batch files within Ai and PhotoShop but I have limited programming skills in how to create source code for manuipulating documents outside of those apps or in a OS invironment.
    I could probably come up witha simple program to do what i want for one document but i get lost when dealing with multiple documents in a source folder (prolbem is,  I will be dealing with thousands of documents not 100 or less)
    If anything which Adope cloud app would work best:  Dreamweaver or Edge code   (or just use my notepad)

  • Use the same code module for several steps in the sequence

    Hello All,
      I have been trying to set up a sequence that uses the same code module for all of the steps in the sequence, but am having trouble referring back to it when I need to send it commands.  I have gotten as far as calling the VI in a new thread so that it can be run asynchronously.  I can run the simple sequence and it will indeed open the VI, and move on to the next step.  When I close the VI manually from the front panel, the sequence in TestStand completes, as expected.  So it appears that I have that much working. 
      My question is how to call the separate thread from the main sequence or other sub sequences when I need to edit the parameters.  If I insert an Action step, I am required to select a VI file, but from what I can tell, it opens a different instance of the file, and does not provide an interface with the other instance running asycronously.  My next guess was to use a Statement step, but I was not able to figure out how to configure the lookup string to call the VI parameters.  Beyond that, I'm not sure how to proceed.  Please advise.   
      My intention is to start the code module VI (asynchronously), run several different subsequences within the main sequence that call that same VI and edit it's parameters, close everything and report on the results.  If I am misunderstanding how TestStand is supposed to work, please let me know. 
    Thanks,
    GSinMN    
    Solved!
    Go to Solution.

    What I do is use a Queue to send data to the asynchronous VI.  So it can run and do whatever, but also recieve the commands from the queue.  I use an Action Engine that holds the queue reference and sends the commands.  So you really just have to call the Action Engine from your sequences.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • SCCM 2012 Reporting Code Returns Same Value For Total Number Of Required Updates Per Computer

    I'm trying to make a custom report in SCCM 2012 R2 with SQL 2012 since Microsoft took out the ability to list the number of updates needed per computer. This was in WSUS reporting but is not in SCCM reporting. I've made a custom report for this but can't
    quite get it to work. The report runs but the same value for total number of updates needed shows up for every computer. I took a query from one report and am trying to get it to run inside the select statement from another report. Here is the code as it is
    right now:
    declare @CI_ID int; select @CI_ID=CI_ID from fn_rbac_ConfigurationItems(@UserSIDs)  where CIType_ID=9 and CI_UniqueID=@AuthListID
              declare @StateID int
              select @StateID=StateID from fn_rbac_StateNames(@UserSIDs)  sn where sn.StateName=@StateName and TopicType=300
              declare @RequiredUpdateCount int
              select @RequiredUpdateCount=Count(v_StateNames.Statename) from   
    v_StateNames,   
    v_Update_ComplianceStatusAll   
    Inner Join v_R_System On (v_R_System.ResourceID = v_Update_ComplianceStatusAll.ResourceID)   
    Inner Join v_UpdateInfo On (v_UpdateInfo.CI_ID = v_Update_ComplianceStatusAll.CI_ID)   
    where   
    v_StateNames.TopicType = 500 and   
    v_StateNames.StateID = v_Update_ComplianceStatusAll.Status and   
    v_StateNames.Statename = 'Update is required'   
    Group By v_R_System.Name0
              select
                ccm.ResourceID,
                rs.Name0+isnull('.'+rs.Resource_Domain_or_Workgr0, '') as MachineName,
                rs.User_Domain0+'\'+User_Name0 as LastLoggedOnUser,
                asite.SMS_Assigned_Sites0 as AssignedSite,
                rs.Client_Version0 as ClientVersion,
    @RequiredUpdateCount as RequiredUpdates  
              from fn_rbac_ClientCollectionMembers(@UserSIDs)  ccm
              join fn_rbac_Update_ComplianceStatusAll(@UserSIDs)  cs on cs.CI_ID=@CI_ID and cs.ResourceID=ccm.ResourceID
                and (@StateID=0 and cs.Status=0 or @StateID=1 and cs.Status in (1,3) or @StateID=2 and cs.Status=2)
              join fn_rbac_R_System(@UserSIDs)  rs on rs.ResourceID = ccm.ResourceID
              left join fn_rbac_RA_System_SMSAssignedSites(@UserSIDs)  asite on asite.ResourceID = ccm.ResourceID
              where ccm.CollectionID=@CollID
              order by MachineName
    Ben JohnsonWY

    There's plenty wrong with it. It gives you no idea of how many patches each box needs. Then you have to click on each computer, click the sort arrow by the "required" column, and count the number needed. When you have hundreds of computers to work on this
    is a big deal as it's very time consuming. What's great about the view in WSUS that had this is that it listed this for you and you could sort the required column. So if have most computers needing 2 patches, you can go find the one that needs 40 and 150 (to
    over exaggerate) and put the time on them needed to see why they're so far behind. The WSUS format was quick, easy, and informative. SCCM makes getting this info a royal PITA which is why I'm (and many others) so royally peeved at MicroShaft for removing this
    functionality, but that's what we've all come to expect from MicroShaft--just like when then took the nice colorful themes out of Office 2010 and replaced them in Office 2013 with just white, gray, and a darker gray. That's super boring and actually hurts
    my eyes.
    Ben JohnsonWY

  • Same error code for two different errors

    I have a simple state machine with a few states, two of which are read ini file and read GPIB data. I also have an error handling state where I would like to handle all errors. Errors are checked for on each iteration of the loop, passed by shift register. However, I can't just unbundle the error cluster and wire the error code to a case structure because if the ini file doesn't exist (error code 7) I want to exit the program. But if I get error 7 from the gpib (Nonexistent GPIB interface) I want the program to continue running. What is the best way to track where the error is coming from so I know how to handle it when two error codes for different errors have the same error code value?
    Message Edited by for(imstuck) on 01-27-2010 03:47 PM
    CLA, LabVIEW Versions 2010-2013

    Another option is to check the existence of the file before opening the config file, then exit the program if nessecary. Relying on error codes might be a bad option.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

Maybe you are looking for