Results 1 to 2 of 2

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: convertPoint

  1. #1
    Default convertPoint
    I found a code snippet from the 13th page of this pdf file about handling input. The code is as follows:

    Code:
    - (void)mouseDown: (GSEventRef)event
    {
        tapRect = GSEventGetLocationInWindow(event);
        CGPoint mousePoint = [self convertPoint:tapRect.origin fromView:nil];
    }
    Can anyone tell me why the following error occurs upon compile?

    Code:
    Mike@miketv /iphone-apps/app
    $ make
    arm-apple-darwin-gcc -c   app.m -o app.o
    arm-apple-darwin-gcc -c   myapp.m -o myapp.o
    EmptyApplication.m: In function '-[myapp mouseDown:]':
    myapp.m:23: warning: 'myapp' may not respond to -convertPoint:fromView:'
    myapp.m:23: warning: (Messages without a matching method signature
    myapp.m:23: warning: will be assumed to return 'id' and accept
    myapp.m:23: warning: '...' as arguments.)
    myapp.m:23: error: invalid initializer
    make: *** [myapp.o] Error 1
    Perhaps it's my header?
    UIView-Geometry.h:

    Code:
    /*
     *     Generated by class-dump 3.1.1.
     *
     *     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2006 by Steve Nygard.
     */
    
    #import <UIKit/UIView.h>
    
    @interface UIView (Geometry)
    - (BOOL)autoresizesSubviews;	// IMP=0x323c48ec
    - (struct CGRect)bounds;	// IMP=0x323c4918
    - (struct CGPoint)convertPoint:(struct CGPoint)fp8 fromView:(id)fp16;	// IMP=0x323c43d8
    - (struct CGPoint)convertPoint:(struct CGPoint)fp8 toView:(id)fp16;	// IMP=0x323c432c
    - (struct CGRect)convertRect:(struct CGRect)fp8 fromView:(id)fp24;	// IMP=0x323c4598
    - (struct CGRect)convertRect:(struct CGRect)fp8 toView:(id)fp24;	// IMP=0x323c4640
    - (struct CGSize)convertSize:(struct CGSize)fp8 fromView:(id)fp16;	// IMP=0x323c4484
    - (struct CGRect)extent;	// IMP=0x323c89a0
    - (struct CGRect)frame;	// IMP=0x323c4070
    - (struct CGRect)hitRect;	// IMP=0x323c46e8
    - (id)hitTest:(struct CGPoint)fp8 forEvent:(struct __GSEvent *)fp16;	// IMP=0x323c65a4
    - (BOOL)ignoresMouseEvents;	// IMP=0x323c42a4
    - (struct CGPoint)origin;	// IMP=0x323c4a28
    - (BOOL)pointInside:(struct CGPoint)fp8 forEvent:(struct __GSEvent *)fp16;	// IMP=0x323c4308
    - (void)resizeSubviewsWithOldSize:(struct CGSize)fp8;	// IMP=0x323c6708
    - (void)resizeWithOldSuperviewSize:(struct CGSize)fp8;	// IMP=0x323c87c0
    - (void)setAutoresizesSubviews:(BOOL)fp8;	// IMP=0x323c48cc
    - (void)setAutoresizingMask:(unsigned int)fp8;	// IMP=0x323c4900
    - (void)setBounds:(struct CGRect)fp8;	// IMP=0x323c4958
    - (void)setFrame:(struct CGRect)fp8;	// IMP=0x323c40b0
    - (void)setFrame:(struct CGRect)fp8 forFields:(int)fp24;	// IMP=0x323c4724
    - (void)setOrigin:(struct CGPoint)fp8;	// IMP=0x323c4a74
    - (void)setRotationBy:(float)fp8;	// IMP=0x323c47e4
    - (void)setTransform:(struct CGAffineTransform)fp8;	// IMP=0x323c4250
    - (struct CGAffineTransform)transform;	// IMP=0x323c4200
    @end
    Moreover, what does the fp prefix stand for in these headers? Are they pointers to other structs?
    Thanks in advance!
    - MikeTV

  2. #2
    What class is "self" in your code? Is it a UIView or a UIApplication?

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •