• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: problem with initWithFrame.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with initWithFrame.


  • Subject: Re: problem with initWithFrame.
  • From: publiclook <email@hidden>
  • Date: Tue, 29 Apr 2003 13:14:14 -0400

You don't want to subclass NSScrollView.
You definitely don't want to return an instance of NSMatrix from the -initWithFrame: method of a subclass of NSScrollView.

You probably want to install an NSMatrix instance as the document view of a scroll view and you probably don't want to do any subclassing at all.

See copious documentation on the view hierarchy, the difference between containment and inheritance relationships.

On Tuesday, April 29, 2003, at 08:37 AM, Manish Pattath wrote:

Hi,

1)In my sample application in Cocoa, I am creating a
matrix and in it NSButtonCells dynamically based on
the number of images to be displayed. I have used
custom view and then subclassed it from NSScrollView.
I do the entire stuff in initWithFrame() function.
the problem i have seen is if I return the matrix
created from the function initWithFrame(), then all
the thumbnails are shown properly. But when self is
returned from initWithFrame() then nothing is
displayed.
Moreover one more thing noted is is matrix is returned
from initWithFrame() then control does not come to
awakeFromNib() function otherwise if self is returned,
the control comes to awakeFromnib().

2)The matrix that is created dynamcially in the first
point cannot be accessed in any other function of the
same class. the debugger shows it as Outofscope.

Does any one know what could be causing this
behaviour?

Thanks for reading me.

with rgds,
pmanish


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >problem with initWithFrame. (From: Manish Pattath <email@hidden>)

  • Prev by Date: [ANN] poof image Apple sample code
  • Next by Date: Re: Newbie: TableView question
  • Previous by thread: problem with initWithFrame.
  • Next by thread: object , name, identity...and newbie
  • Index(es):
    • Date
    • Thread