advertisement

Article:
  Working With Bitmap Images; Document-Based Application Redux
Subject:   Making the view a dragging destination
Date:   2002-05-03 12:34:15
From:   michele
Response to: Making the view a dragging destination

Hello p,


"Evidentally, not all methods need be mentioned in the header file, rather these are only used in the name space of the implementation. What are such methods called? "


They are inherited, so you don't need to put them in the header file, but you can. Do what you feel.


"When I made a new window from the file menu item, it always came in with my default gif, Yoda.gif, but I could still drag another gif onto that window and Yoda would be supplanted. Does this cause memory leak or is the old image in ram automatically released?"


No, it's designed so that there is no memory leak. You can test it with ObjectAlloc (in Developper Applications). Launch ObjectAlloc, put a few breaks in strategic places in your code in PB, debug compile, open your debug built in Object Alloc and watch your own classes.


"initWithCoder evidenced itself as an override with the message to super and that fact that, though it was restricted to the name space of IAImageView.m, there was not visible call to it there. "


If you want to see when a part of your code is called, put a descriptive NSLog message in all methods so near as the beginning of the code as you can (I mean, after the variables), say NSLog(@"Enter mymethod"); Then debug run. You'll have a trace of all calls: yours and the underlying ones.


"To be contrary, I tried dragging Dennis Gabor's nobel lecture pdf to the window and got the first page complete with figure, but I didn't get the "whole picture" (35 pages). "


I'm not sure, but I remember playing with Preview and Acrobat for pdfs. Try to change the application to open the pdf (either Acrobat or Preview). I know one of them gives you the whole file (just don't remember which one).


Drag and drop is explained in Programming Topics.


Michèle





1 to 3 of 3
  1. is Programming Topics a pdf?
    2002-05-09 07:08:32  psheldon [View]

  2. both Acrobat and Preview show whole pdf
    2002-05-09 06:54:38  psheldon [View]

  3. Making the view a dragging destination
    2002-05-05 21:49:21  dallasmac [View]

    • Making the view a dragging destination
      2002-05-06 13:19:45  michele [View]

1 to 3 of 3