Problem in colorAT method

Discussion in 'iOS Programming' started by iphonejudy, Jun 15, 2009.

  1. iphonejudy macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #1
    I saw the below method in the document,It says it returns the color value of a particular pixel(x,y).But i got error that colorAtX is not declared.

    Can anyone tell me the reason?


    Code:
    - (NSColor *)colorAtX:(NSInteger)x y:(NSInteger)y
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    In which document? It's an instance method of a particular class: you have to call it on an instance of that class for it to work: you can't just type colorAtX:10 y:100 anywhere and have it work...
     
  3. Ivan P macrumors 68030

    Ivan P

    Joined:
    Jan 17, 2008
    Location:
    Home
    #4
    iphonejudy strikes again, working on the first app made by every MR member :p
     
  4. iphonejudy thread starter macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    So you have a valid NSBitmapImageRep object? Really? On an iPhone? I'm pretty sure UIImages don't work with NSBitmapImageReps.

    Once again (and I know you've been told this before) ApplicationKit == Mac OSX. You can't use it on the iPhone. Please read the correct documentation instead of anything you find at random.

    In all seriousness you seem to ask so many questions have you ever considered just getting someone qualified who knows what they are doing to do whatever it is you are trying to do: you are clearly miles out of your depth and never going to do this properly.

    I believe he is pointing out that we (that is MacRumors contributors) have written at least as much of this application as you have. If you ever complete this I hope you are going to share the profits.
     

Share This Page