How can I (neatly) control mouse click events in a multi-dimensional array?

Hello everyone!
     I have a question regarding the use of mouse clicks events in a multi-dimensional array (or a "2D" array as we refer to them in Java and C++).
Background
     I have an array of objects each with a corresponding mouse click event. Each object is stored at a location ranging from [0][0] to [5][8] (hence a 9 x 6 grid) and has the specific column and row number associated with it as well (i.e. tile [2][4] has a row number of 2 and a column number of 4, even though it is on the third row, fifth column). Upon each mouse click, the tile that is selected is stored in a temporary array. The array is cleared if a tile is clicked that does not share a column or row value equal to, minus or plus 1 with the currently targeted tile (i.e. clicking tile [1][1] will clear the array if there aren't any tiles stored that have the row/column number
[0][0], [0][1], [0][2],
[1][0], [1][1], [1][2],
[2][0], [2][1], [2][2]
or any contiguous column/row with another tile stored in the array, meaning that the newly clicked tile only needs to be sharing a border with one of the tiles in the temp array but not necessarily with the last tile stored).
Question
     What is a clean, tidy way of programming this in AS3? Here are a couple portions of my code (although the mouse click event isn't finished/working correctly):
  public function tileClick(e:MouseEvent):void
   var tile:Object = e.currentTarget;
   tileSelect.push(uint(tile.currentFrameLabel));
   selectArr.push(tile);
   if (tile.select.visible == false)
    tile.select.visible = true;
   else
    tile.select.visible = false;
   for (var i:uint = 0; i < selectArr.length; i++)
    if ((tile.rowN == selectArr[i].rowN - 1) ||
     (tile.rowN == selectArr[i].rowN) ||
     (tile.rowN == selectArr[i].rowN + 1))
     if ((tile.colN == selectArr[i].colN - 1) ||
     (tile.colN == selectArr[i].colN) ||
     (tile.colN == selectArr[i].colN + 1))
      trace("jackpot!" + i);
    else
     for (var ii:uint = 0; ii < 1; ii++)
      for (var iii:uint = 0; iii < selectArr.length; iii++)
       selectArr[iii].select.visible = false;
      selectArr = [];
      trace("Err!");

Andrei1,
     So are you saying that if I, rather than assigning a uint to the column and row number for each tile, just assigned a string to each one in the form "#_#" then I could actually just assign the "adjacent" array directly to it instead of using a generic object to hold those values? In this case, my click event would simply check the indexes, one at a time, of all tiles currently stored in my "selectArr" array against the column/row string in the currently selected tile. Am I correct so far? If I am then let's say that "selectArr" is currently holding five tile coordinates (the user has clicked on five adjacent tiles thus far) and a sixth one is being evaluated now:
Current "selectArr" values:
       1_0
       1_1, 2_1, 3_1
              2_2
New tile clicked:
       1_0
       1_1, 2_1, 3_1
              2_2
              2_3
Coordinate search:
       1_-1
0_0, 1_0, 2_0, 3_0
0_1, 1_1, 2_1, 3_1, 4_1
       1_2, 2_2, 3_2
              2_3
     Essentially what is happening here is that the new tile is checking all four coordinates/indexes belonging to each of the five tiles stored in the "selectArr" array as it tries to find a match for one of its own (which it does for the tile at coordinate 2_2). Thus the new tile at coordinate 2_3 would be marked as valid and added to the "selectArr" array as we wait for the next tile to be clicked and validated. Is this correct?

Similar Messages

  • How can i implement a mouse listener event on jtable cell?

    I create JTable using a resultset,at the end of each row i add an image using JLabel(set imageicon of the JLabel).
    i want to track the event when user click on that image.
    What can i do for that?.
    I tried by implementing mouseListener interface for the JLabel but it's not working properly.

    Hi,
    Add MouseListener to the JTable.
    when the user clicks on the table use the method
    getValueAt( int selectedRow,int selectedColumn) to get the contents.
    Object obj = getValueAt( int selectedRow,int selectedColumn) .
    (If obj instance of JLabel)
    do your functionality.
    Hope this helps
    Cheers :)
    Nagaraj

  • Adobe plugin For Mouse Click Event Handler

    Hi All, How to write plugin For Mouse Click Event Handler? Please reply quickly..
    Thanks in Advance

    AS has already been replied to you on the other threads.
    THE ACROBAT SDK has all the information you need to implement your solution. If you investigate the SDK and find a specific part of implementing your solution that is causing a problem. Then post that specific problem on the forum so that Leonard/PDL/ Aandi/Everyone else, can help you with specific problems.
    This question is too open ended for it to be easily answered with out doing a lot of work.
    Please download the SDK.
    Investigate the Documentation/Samples.
    Start developing your plug-in. ( I would recommend the Acrobat-plug-in wizard)
    And if you hit a specific problem we will be happy to try and help.
    Please note MULTIPLE POSTS just annoy.
    HTH
    Malky

  • How can i call mouse click event from keypress event???

    How can i call mouse click event from keypress event???
    I want same GUI changes to be occured at key press.....i.e . button going down & comming up.....
    for calculator

    Put all the code that happens on those events into a method. Then call that method from both events.

  • How can I capture mouse click events on BSP or Web Dynpro ABAP Screen

    hi Guys,
    Currently we have a user inactivity problem,
    the requirement is: if user is clicking on BSP/Web Dynpro ABAP screen, he/she is considered active. so we need an mechanism to capture the mouse click event.
    Using Firebug, we found that this js is in the iframe which contains BSP/web dynpro scrren: /sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    we want to find this js file & put in some javascript code to track user's mouse click, but i cannot find it on server.
    while in ie if we type http://host:port/sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    this file can be downloaded, means this file is there.
    Any one can help on this issue? find the js file or another way to capture the mouse click event.
    Thanks a lot with points!

    Hi  Feng Guo,
                        We can not capture mouse click events on Web Dynpro ABAP Screen . I am not sure about BSP. But as for as I know the portal keep active the iViews until unless mouse clicks happens.
    But for your problem I think you can get solution by setting iView Expiration to some more time period.
    Regards,
    Siva

  • Event structure does not capture mouse click event on toolbar activeX control

    Hi
    We have a toolbar activeX control on FP.  It works perfectly on my computer, but on my coworkers deskyop,  somehow the event structure doesn't capture mouse click event.
    Any idea?  Thanks a lot for any help.
    Anne

    It's a standard activeX control.  I attach a simple vi .
    thanks  for any help.
    Attachments:
    toolbar test.vi ‏41 KB

  • How can I modify the "right click" menu of a table control?

    Hello,
      How can I modify the "right click menu" of a table control. I would like to be able to remove the ability to add or delete columns and maybe other selections. I want to keep the ability to
    add or delete rows

    Hi Andy,
    Dialog & User Interface VIs -> Menu functions
    Never used them, eh?

  • What is the recommended way to handle mouse click events for custom nodes that subclass Panes?

    Hi,
    I have created a custom node that is a StackPane containing a Label on top of a Polygon.
    import javafx.scene.control.Label;
    import javafx.scene.layout.StackPane;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Polygon;
    public class CustomHexagon extends StackPane {
        private Polygon hexagon;
        private Label overlayText;
        public CustomHexagon( String text, double... points ) {
            this.hexagon = new Polygon( points );
            this.overlayText = new Label( text );
            overlayText.setStyle( "-fx-font-weight: bold;" );
            hexagon.setStroke( Color.GREEN );
            hexagon.setStrokeWidth( 5.0 );
            hexagon.setFill( Color.WHITE );
            this.getChildren().addAll( hexagon, overlayText );
    // Lays out the node where it should be according to the points provided for the Polygon.
            this.setLayoutX( points[0] - getLayoutBounds().getMinX() );
            this.setLayoutY( points[1] - getLayoutBounds().getMinY() );
    // Show the border of the StackPane.
            this.setStyle( "-fx-border-color: black; -fx-border-width: 1; -fx-border-style: dashed;");
        public String getOverlayText() {
            return overlayText.getText();
    I want to display a tesselation of these custom hexagons. Because a CustomHexagon is a StackPane, not a Polygon, MouseClick events can be picked up when the mouse is clicked outside of the stroke of the hexagon but still within the StackPane (which takes up a rectangle larger than the hexagon). The following program demonstrates this.
    public class Main extends Application {
        @Override
        public void start(Stage primaryStage) {     
            Group root = new Group();
            CustomHexagon[] hexagons = {
                new CustomHexagon( "00", 10.0, 10.0, 30.0, 10.0, 40.0, 27.3205080756, 30.0, 44.6410161512, 10.0, 44.6410161512, 0.0, 27.3205080756 ),
                new CustomHexagon( "01", 70.0, 10.0, 90.0, 10.0, 100.0, 27.3205080756, 90.0, 44.6410161512, 70.0, 44.6410161512, 60.0, 27.3205080756 ),
                new CustomHexagon( "02", 130.0, 10.0, 150.0, 10.0, 160.0, 27.3205080756, 150.0, 44.6410161512, 130.0, 44.6410161512, 120.0, 27.3205080756 ),
                new CustomHexagon( "03", 190.0, 10.0, 210.0, 10.0, 220.0, 27.3205080756, 210.0, 44.6410161512, 190.0, 44.6410161512, 180.0, 27.3205080756 ),
                new CustomHexagon( "04", 250.0, 10.0, 270.0, 10.0, 280.0, 27.3205080756, 270.0, 44.6410161512, 250.0, 44.6410161512, 240.0, 27.3205080756 ),
                new CustomHexagon( "10", 40.0, 27.3205080756, 60.0, 27.3205080756, 70.0, 44.6410161512, 60.0, 61.961524226799995, 40.0, 61.961524226799995, 30.0, 44.6410161512 ),
                new CustomHexagon( "11", 100.0, 27.3205080756, 120.0, 27.3205080756, 130.0, 44.6410161512, 120.0, 61.961524226799995, 100.0, 61.961524226799995, 90.0, 44.6410161512 ),
                new CustomHexagon( "12", 160.0, 27.3205080756, 180.0, 27.3205080756, 190.0, 44.6410161512, 180.0, 61.961524226799995, 160.0, 61.961524226799995, 150.0, 44.6410161512 ),
                new CustomHexagon( "13", 220.0, 27.3205080756, 240.0, 27.3205080756, 250.0, 44.6410161512, 240.0, 61.961524226799995, 220.0, 61.961524226799995, 210.0, 44.6410161512 ),
                new CustomHexagon( "14", 280.0, 27.3205080756, 300.0, 27.3205080756, 310.0, 44.6410161512, 300.0, 61.961524226799995, 280.0, 61.961524226799995, 270.0, 44.6410161512 ),
                new CustomHexagon( "20", 10.0, 44.6410161512, 30.0, 44.6410161512, 40.0, 61.961524226799995, 30.0, 79.2820323024, 10.0, 79.2820323024, 0.0, 61.961524226799995 ),
                new CustomHexagon( "21", 70.0, 44.6410161512, 90.0, 44.6410161512, 100.0, 61.961524226799995, 90.0, 79.2820323024, 70.0, 79.2820323024, 60.0, 61.961524226799995 ),
                new CustomHexagon( "22", 130.0, 44.6410161512, 150.0, 44.6410161512, 160.0, 61.961524226799995, 150.0, 79.2820323024, 130.0, 79.2820323024, 120.0, 61.961524226799995 ),
                new CustomHexagon( "23", 190.0, 44.6410161512, 210.0, 44.6410161512, 220.0, 61.961524226799995, 210.0, 79.2820323024, 190.0, 79.2820323024, 180.0, 61.961524226799995 ),
                new CustomHexagon( "24", 250.0, 44.6410161512, 270.0, 44.6410161512, 280.0, 61.961524226799995, 270.0, 79.2820323024, 250.0, 79.2820323024, 240.0, 61.961524226799995 ),
                new CustomHexagon( "30", 40.0, 61.961524226799995, 60.0, 61.961524226799995, 70.0, 79.2820323024, 60.0, 96.602540378, 40.0, 96.602540378, 30.0, 79.2820323024 ),
                new CustomHexagon( "31", 100.0, 61.961524226799995, 120.0, 61.961524226799995, 130.0, 79.2820323024, 120.0, 96.602540378, 100.0, 96.602540378, 90.0, 79.2820323024 ),
                new CustomHexagon( "32", 160.0, 61.961524226799995, 180.0, 61.961524226799995, 190.0, 79.2820323024, 180.0, 96.602540378, 160.0, 96.602540378, 150.0, 79.2820323024 ),
                new CustomHexagon( "33", 220.0, 61.961524226799995, 240.0, 61.961524226799995, 250.0, 79.2820323024, 240.0, 96.602540378, 220.0, 96.602540378, 210.0, 79.2820323024 ),
                new CustomHexagon( "34", 280.0, 61.961524226799995, 300.0, 61.961524226799995, 310.0, 79.2820323024, 300.0, 96.602540378, 280.0, 96.602540378, 270.0, 79.2820323024 ),
                new CustomHexagon( "40", 10.0, 79.2820323024, 30.0, 79.2820323024, 40.0, 96.602540378, 30.0, 113.9230484536, 10.0, 113.9230484536, 0.0, 96.602540378 ),
                new CustomHexagon( "41", 70.0, 79.2820323024, 90.0, 79.2820323024, 100.0, 96.602540378, 90.0, 113.9230484536, 70.0, 113.9230484536, 60.0, 96.602540378 ),
                new CustomHexagon( "42", 130.0, 79.2820323024, 150.0, 79.2820323024, 160.0, 96.602540378, 150.0, 113.9230484536, 130.0, 113.9230484536, 120.0, 96.602540378 ),
                new CustomHexagon( "43", 190.0, 79.2820323024, 210.0, 79.2820323024, 220.0, 96.602540378, 210.0, 113.9230484536, 190.0, 113.9230484536, 180.0, 96.602540378 ),
                new CustomHexagon( "44", 250.0, 79.2820323024, 270.0, 79.2820323024, 280.0, 96.602540378, 270.0, 113.9230484536, 250.0, 113.9230484536, 240.0, 96.602540378 )
            EventHandler<MouseEvent> mouseClickedHandler = new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent t) {
                    CustomHexagon h = (CustomHexagon) t.getSource();
                    System.out.println( h.getOverlayText() );
            for ( CustomHexagon hexagon : hexagons ) {
                hexagon.setOnMouseClicked( mouseClickedHandler );
            root.getChildren().addAll( hexagons );
            Scene scene = new Scene(root, 400, 400);
            primaryStage.setTitle("Example");
            primaryStage.setScene(scene);
            primaryStage.show();
        public static void main(String[] args) {
            launch(args);
    After running this program, when one clicks within the intersection of two StackPanes (borders shown by dashed lines), the target of the mouse click event will be the StackPane on top as determined by the order in which they were added to their parent.
    This is a problem because there is only a small "T" shaped area within each hexagon that when clicked will target that hexagon with an event, rather than adjacent nodes.
    I would appreciate any reccomendations to solve this problem.
    Thanks,
    James Giller

    Hello, this is an evergreen. Just call setPickOnBounds(false) on the CustomHexagon.
    An issue tracking this problem is open here: https://javafx-jira.kenai.com/browse/RT-17024

  • Pass Mouse click events from JavaScript to Falsh Movie

    Hi,
    I have an interesting problem here.
    i am trying to create a web page which has my
    flash-presentation movie. i need to disable mouse click &
    keyboard click navigation of the flash movie. The only way by which
    i can navigate my slide in the flash movie should be using 2
    buttons say Next & Prev that are i my web page.
    when i click the Next button i should be able to go to the
    next slid or the animation in the same slide like how i do in the
    power Point.
    Is there any way by which i can send these mouse click
    events from my javascript to my flash movie or is there any other
    means by which i can achieve this.
    ~Blackperil

    Hi Mathias,
    What i understood is that you want to triger a server side event (simulate onClick event of button)from a client side event (javascript confirm popup), based on the choice of user..
    You can also try this one...
    Check = confirm("Do you really want to proceed?");
    if (Check == true)
    document.getElementById('do_proceed').click();
    else
    document.getElementById('do_cancel').click();
    Regards,
    Anubhav

  • Mouse Click Event

    Hi, can any one tell me how to capture the mouse click event in the report ? For example suppose the user is double clicking in a perticular coulmn in a report output, I want to show him/her a message.
    Thanks
    Feroz

    Feroze,
    I think it is not possible to capture mouse click at report runtime. But you can use buttons in report. It will work.

  • How can i set no Right Click on Adf (jspx)

    hi to everyone in this thred i have a cuestion ,
    How can i set no Right Click on Adf (jspx)? i don´t find the solution for this event
    i know a JavaScript to cancel RightClick but , are no how can i use in adf of Jdeveloper 11?
    thanks ...

    Hi,
    there is no native API for this, so you will have to use JavaScript for this. What is the usecase ?
    Frank

  • How can i add control at runtime??

    hi,
    please help me! how can i add control(textfield, dropdownlist or subform...) at run time???
    thanks

    this option had no relation about editing items or not , i hadn't notice it was accessible true pop up
    when you rigt click is properties disable also ?
    may be i 'm wrong i talking about that :
    see attachement
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte
    Attachments:
    example.jpg ‏57 KB

  • HierarchyViewer mouse click event on expansion icon

    Hi,
    I'm using HierarchyViewer in an application. Could you please suggest if I can catch the mouse click event on the expansion icon ["+" sign appearing right below the node]?
    Thank you,
    Nima

    Dear Akash,
    Are you sure about Disclose Listener of the HierarchyViewer??
    I'm using Jdeveloper 11g (11.1.1.5) and HV component doesn't have such listener!

  • Mouse Click Event Is this a bug

    &#65279; I have a applet that has popupmenus tied to certain buttons. When a use clicks on one of the
    buttons a popupmenu is displayed for that button. Originally I used Mouse Click event to show
    the popupmenu but I found that when you switched buttons mouse click wouldn't fire right. When
    I switch to a action event it worked every time instead of losing 2-3 clicks when switching
    buttons. Does anyone no why this might happen. Is it a bug in mouse click?

    The reason why mouse clicks seem to dissapear is because a mouseClicked event is only ever fired when its mousePressed and mouseReleased coordinates are the same.
    This can be a pain!! Id recomend using the mouseReleased method to register mouseClicked events, this should always be called.

  • How can we find whether we clicked UIImage or text in UItableViewCell

    In tableview didselectrowatindexpath method how can we find if we click image in that cell[i mean the image which i set using cell.image ] or text in that cell[i mean the text which i set using cell.textlabel.text]
    Basically i have to do separate functionality if i click image or text....
    I have customized the cell and put view for this thing but bluecolor selection is not coming while i click that cell....
    Please help me out.....

    //////////// Custom tableviewcell....
    - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier tableView:(UITableView*)tableview cellRow:(NSInteger)cellRow cellSection:(NSInteger)cellSection{
    if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) {
    // Initialization code
    ratingView=[[UIImageView alloc] initWithFrame:CGRectMake(0,0,30, 35)];
    textLabel=[[UILabel alloc] initWithFrame:CGRectMake(37,0, self.frame.size.width, self.frame.size.height-9)];
    //[textLabel setBackgroundColor:[UIColor redColor]];
    textLabel.textAlignment=UITextAlignmentLeft;
    //textLabel.text=@"sample";
    [textLabel setFont:[UIFont boldSystemFontOfSize:18]];
    [ratingView setImage:[UIImage imageNamed:@"Rating.png"]];
    [self addSubview:textLabel];
    [self addSubview:ratingView];
    [textLabel setTextColor:[UIColor blackColor]];
    [textLabel setHighlightedTextColor:[UIColor whiteColor]];
    imageChanged=NO;
    chaptersTableView=tableview;
    row=cellRow;
    section=cellSection;
    return self;
    - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    NSLog(@"I m inside touches began method");
    for ( UITouch *touch in touches )
    CGPoint touchPoint = [touch locationInView:self];
    CGRect imageRect = CGRectMake(0, 0, 40, self.frame.size.height);
    if ( CGRectContainsPoint(imageRect, touchPoint) )
    NSLog(@"I have clicked on imageview");
    else
    //[self setBackgroundColor:[UIColor colorWithRed:2.0/255.0 green:114.0/255.0 blue:237.0/255.0 alpha:1.0]];
    //[self.textLabel setBackgroundColor:[UIColor colorWithRed:2.0/255.0 green:114.0/255.0 blue:237.0/255.0 alpha:1.0]];
    NSLog(@"I have clicked on tableView");
    - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
    //NSLog(@"I am inside touches cancelled");
    - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
    @try
    for ( UITouch *touch in touches )
    CGPoint touchPoint = [touch locationInView:self];
    CGRect imageRect = CGRectMake(0, 0, 40, self.frame.size.height);
    if ( CGRectContainsPoint(imageRect, touchPoint) )
    // NSLog(@"I have clicked on imageview");
    if(!imageChanged)
    //[_imageViewTarget performSelector:changeImageAction];
    [self.ratingView setImage:[UIImage imageNamed:@"Rating-filled.png"]];
    [self setImageChanged:YES];
    else
    [self.ratingView setImage:[UIImage imageNamed:@"Rating.png"]];
    [self setImageChanged:NO];
    else
    NSIndexPath *newSetRow = [NSIndexPath indexPathForRow:row inSection:section];
    [chaptersTableView selectRowAtIndexPath:newSetRow animated:NO scrollPosition:UITableViewScrollPositionNone];
    //[chaptersTableView selectRowAtIndexPath:<#(NSIndexPath *)indexPath#> animated:<#(BOOL)animated#> scrollPosition:<#(UITableViewScrollPosition)scrollPosition#>
    [_imageViewTarget performSelector:changeImageAction];
    //NSLog(@"I have clicked on tableView");
    //NSLog(@"I m inside touches ended ");
    @catch (NSException *ex) {
    NSLog(@"Exception caught %@",[ex description]);
    -(void)setImageViewTarget:(id)target action:(SEL)action
    _imageViewTarget=target;
    changeImageAction=action;
    -(void)checkImage
    if(self.imageChanged)
    NSLog(@"imchan %@",self);
    //NSLog(@"I m going to change the filled image");
    [self.imageView setImage:[UIImage imageNamed:@"Rating-filled.png"]];
    else
    NSLog(@"imnotch %@",self);
    ////////////// my view controller
    - (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath
    cell=(CustomTableCell*)[tv dequeueReusableCellWithIdentifier:[NSString stringWithFormat:@"Identifier for row %d in section %d",indexPath.row,indexPath.section]];
    if(cell==nil)
    //cell=[[[CustomTableCell alloc] initWithFrame:CGRectZero reuseIdentifier:[NSString stringWithFormat:@"Identifier for row %d in section %d",indexPath.row,indexPath.section] tableView:tv] autorelease];
    cell=[[[CustomTableCell alloc] initWithFrame:CGRectZero reuseIdentifier:[NSString stringWithFormat:@"Identifier for row %d in section %d",indexPath.row,indexPath.section] tableView:tv cellRow:indexPath.row cellSection:indexPath.section]autorelease];
    //cell=[[[CustomTableCell alloc] initWithFrame:CGRectZero reuseIdentifier:[NSString stringWithFormat:@"Identifier for row %d in section %d",indexPath.row,indexPath.section]] autorelease];
    NSLog(@"** %d sec %d ** %@",[indexPath row],[indexPath section],cell);
    [cell setImageViewTarget:self action:@selector(changeImageView)];
    NSLog(@"%d***",cell.frame.size.height);
    @try {
    if(searchResults)
    [cell.textLabel setText:[searchResultArray objectAtIndex:indexPath.row]];
    else
    switch (indexPath.section) {
    case 0:
    [cell.textLabel setText:[[nameDictionary objectForKey:@"a"] objectAtIndex:indexPath.row]];
    break;
    case 1:
    [cell.textLabel setText:[[nameDictionary objectForKey:@"b"] objectAtIndex:indexPath.row]];
    break;
    case 2:
    [cell.textLabel setText:[[nameDictionary objectForKey:@"c"] objectAtIndex:indexPath.row]];
    break;
    default:
    break;
    @catch (NSException *ex ){
    NSLog(@"Exception caught %@",[ex description]);
    //if(indexPath.row<10)
    // [cell.textLabel setText:[NSString stringWithFormat:@"sample %d in section %d",indexPath.row,indexPath.section]];
    [cell checkImage];
    [cell setImageViewTarget:self action:@selector(changeImageView)];
    //cell.selectionStyle=UITableViewCellSelectionStyleBlue;
    return cell;
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    NSLog(@"I am inside did select row at index path");
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    //[tableView getHeaderView];
    if(searchResults)
    return 1;
    return 3;
    - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
    if(searchResults)
    return [[[searchResultArray objectAtIndex:0] capitalizedString] substringToIndex:1];
    else
    if(section==0)
    //[tableView getHeaderView];
    return @"A";
    else if(section==1)
    //[tableView getHeaderView];
    return @"B";
    else if(section==2)
    //[tableView getHeaderView];
    return @"C";
    return @"";
    - (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
    return [NSArray arrayWithObjects:@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@" M",@"N",@"O",@"P",nil];
    -(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
    //NSLog(@"i m inside touches began method");
    -(void)changeImageView
    //NSIndexPath *newSetRow = [NSIndexPath indexPathForRow:2 inSection:0];
    //[mTableView selectRowAtIndexPath:newSetRow animated:NO scrollPosition:UITableViewScrollPositionNone];
    NSLog(@"I m inside changeImageView");
    SampleViewController *sample=[[SampleViewController alloc] init];
    [self.navigationController pushViewController:sample animated:NO];
    //[cell.ratingView setImage:[UIImage imageNamed:@"Rating-filled.png"]];
    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
    return 36;
    }

Maybe you are looking for

  • Iphone 5c 8.1.2 not showing in osx 10.7.5 finder

    Good afternoon, I'm not sure what is going on.  I used to be able to see devices in the finder but it is no longer showing my iphone.  It is showing a flashdrive.  I changed cords and ports to no avail.  However, when I open itunes the iphone shows u

  • Load balancing WFM 1.0

    Hi! Got a service bus farm containing 3 servers. The same severs also got WFM 1.0 Here I have a problem, I want to use a custom DNS for the sites and load balance it. I use autogenerated certificates and thats a problem, they are all signed to the fi

  • Field length shows more in excel sheet which is sent via email

    I am sending excel sheet through email. I have data in internal table which i move to the email internal table and data is been sent via email using a excel sheet. Now, when I open the excel sheet, i see that all fields get displayed but the last fie

  • CreateRootApplicationModule in Scheduled task

    Dear All, I found an interesting bug in Fusion Web Application Framework. If I call a service method from a scheduling job using Configuration.createRootApplicationModule(...) as the code below: schedulerModule = (SchedulerModule) Configuration.creat

  • Business Place / Section Code at MIRO - WH Tax transaction

    Hi All, I could not able to post MIRO Document with WH Tax for Korea Company Code. WH Tax configuration has been done. New Business Place & Section Code has been created and assigned to the Plant as well.. There was not even any error message but the