• 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: Multiple windows in a doc based app How-To
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple windows in a doc based app How-To


  • Subject: Re: Multiple windows in a doc based app How-To
  • From: Joseph Jones <email@hidden>
  • Date: Sat, 2 Mar 2002 11:55:12 -0800

I actually got this working on my own. Took a lot more reading and a lot of hitting my head against the wall. :-)

However, now I have another issue. I have a requirement where I need to use a compbo box when editing one of the column items in my table view. I have currently replaced the NSTableColumn's dataCell to be an NSComboBoxCell. Unfortunately, this has a bad side effect in that the combobox is always displayed, and at a rather large size as well. What I really want is to only show the combo box during an edit operation, not all the time. In reading the docs, I'm not sure where the best place to do this would be. I can hook into textDidBegin/EndEditing delegate methods, but given they pass an NSText* around I'm not sure if this is safe or not.

Any suggestions?

On a side note, I'd like to add a little sort up/down arrow to my table column headers to show my current sort direction for that column. Where can I hook to do this? Is there a character for these arrows, or will I have to use NSBezierPath to draw it?


Thanx,
joe

On Saturday, March 2, 2002, at 09:16 AM, Erik M. Buck wrote:

Do any of the many tutorials and read Apple's generally very good
documentation on the document architecture. Your questions are about trivial
"issues", but they are only trivial if you have mastered the basic aspects
of Cocoa graphical user interfaces. The basics are not easy to teach in
email. That is why I recommend the tutorials.

----- Original Message -----
From: "Joseph Jones" <email@hidden>
To: "Joseph Jones" <email@hidden>
Cc: "CocoaDev" <email@hidden>; "MacOSXDev"
<email@hidden>
Sent: Saturday, March 02, 2002 12:31 AM
Subject: Re: Multiple windows in a doc based app How-To


No one can help me with these issues?

joe


On Wednesday, February 27, 2002, at 08:17 PM, Joseph Jones wrote:

Hi all,

Hopefully my email address issue is now fixed, so this should get
through. :-)

Warning: Newbie Cocoa/Obj-C developer in action.


I have a doc based app and I am trying to get multiple windows on
a single document working. I have a main window that live throughout
the life of the document. It has it's own derived NSWindowController
and works very well.

Question 1: What is the best way for the doc and controller to
communicate? Currently, I am attempting to implement a protocol to
alleviate the following issues: Circular includes between the
controller and the document and the fact that [self document] throws a
compiler warning if I try to call a method I implemented in my derived
documnet class.

My main window is a table view containing a listing of items in my
document. However, not all the data in my document is displayed there.
Each of my items has a note field that I wish to disply using a
secondary temporary window. This window will appear when you select a
menu item, and disappear when you select the set button (or the cancel
button).

Question 2: What is the best way for this window to get/set it's
data? I am planning in using the same protocol to get and set the
specific items note data. Whe the set or cancel button is selected,
appropriate methods in the protocol are called. However, what happens
when the user selects a new item from my table view? Obviously, one way
is have the main window talk to the document and tell it a new item was
selected, and then have the document tell teh other window to update
itself. Unfortunately, this requires adding to the protocol, which at
this point is starting to look VERY heavy considering how simple this
application really is. Should I use notifications instead?

Question 3: Should the temporary window be added to the
windowController list for the document? If so, should it be removed
when the user selects set/cancel on the temp window?

I've been reading all the docs concerning Doc based apps in Cocoa
(including the class docs) and can't seem to get a grip on what I need
to do here.

Thanx,
joe
_______________________________________________
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.


_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev
_______________________________________________
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.

  • Follow-Ups:
    • Re: Multiple windows in a doc based app How-To
      • From: Jeff Gilbert <email@hidden>
References: 
 >Re: Multiple windows in a doc based app How-To (From: "Erik M. Buck" <email@hidden>)

  • Prev by Date: Re: NSTabView like PB.
  • Next by Date: Re: NSTabView like PB.
  • Previous by thread: Re: Multiple windows in a doc based app How-To
  • Next by thread: Re: Multiple windows in a doc based app How-To
  • Index(es):
    • Date
    • Thread