• 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: Nubie question re Sketch behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nubie question re Sketch behavior


  • Subject: Re: Nubie question re Sketch behavior
  • From: "Erik M. Buck" <email@hidden>
  • Date: Mon, 15 Oct 2001 20:11:40 -0500

> I was less than specific as to what I was looking for. I see that
> NSView has
> setFrameSize which the user can call. Fine and I could use this.
> On the otherhand In MacApp
> the view has an overloaded method (CalcMinFrame()) in which the user may
> specify a
> way to calculate the new size of the view. The framework calls this
> method at appropriate times
> to update the view size, in this case, as the user adds objects and
> drags them into empty places
> to make an ever increasing canvas. I did not see something like this in
> NSView. Does it exist?
>

No. It does not exist in NSView. That is hardly a behavior that every view
should inherit from NSView.

Inside Sketch you will fine a place in the code where objects are moved.
You will find a place in the code where objects are placed. In those
places, call a method called sizeToFitObjects.

You then need to write the sizeToFitObjects methods. Iterate over the
collection of objects accumulating their bounds. The set Sketch's view to a
frame large enough to enclose all of the objects.


References: 
 >Re: Nubie question re Sketch behavior (From: John James <email@hidden>)

  • Prev by Date: [somewhat off] Re: loginwindow
  • Next by Date: Client / Server Application
  • Previous by thread: Re: Nubie question re Sketch behavior
  • Next by thread: Search Paths
  • Index(es):
    • Date
    • Thread