• 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: document based app, custom ibaction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: document based app, custom ibaction


  • Subject: Re: document based app, custom ibaction
  • From: Bart Beulen <email@hidden>
  • Date: Tue, 19 Aug 2008 15:07:07 +0200

Sorry, didn't know I had to connect the outlets of the mydocument class through file owner.... This basically solved my problems.

Op 19 aug 2008, om 14:03 heeft Graham Cox het volgende geschreven:


On 19 Aug 2008, at 7:03 pm, Bart wrote:

Another similar problem.

I would like to add a sheet to the button I've created. Normally I would create an IBOutlet and connect the window for the sheet to it, combined with a code to open:

[NSApp beginSheet:totalsSheet
	   modalForWindow:[NSApp mainWindow]
		modalDelegate:self
	   didEndSelector:NULL
		  contextInfo:NULL];

and close it:

	[NSApp endSheet:totalsSheet];
	[totalsSheet orderOut:sender];

However, is this possible when using a mydocument class, because I cannot find any outlets in the interface builder....

So, add the outlets you need to the class. It is called *MY*document after all - it's yours ;-)


e.g. in MyDocument.h, add the instance variable:

IBOutlet id	mySheetWindow;

and this will show up in IB for you to connect to.

(This probably isn't the time to get into handling this in a separate controller class, but you may want to revisit this question when you get the hang of it a bit more).

I would also like to create some seperate outlets for displaying some float values from some variables of the mydocument class, this is a similar problems since I don't know where to find the outlets to connect the GUI elements to.

Do you really mean outlet? Or just an instance variable? While an outlet is an instance variable, not all instance variables are outlets...


Still, in either case, just add them to your class definition as above.

At the moment all data is presented in a table using an array controller. This is fine, but I would like to perform some calculations on the same data and present the results in a pop-up window. I guess the method described above should be a nice way to do this.

Well, see how you go. Not sure why a separate pop-up window seems such a good idea, but I guess you're just learning the ropes, so go right ahead.


hth,

Graham
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: document based app, custom ibaction
      • From: Jonathan Hess <email@hidden>
References: 
 >document based app, custom ibaction (From: Bart Beulen <email@hidden>)
 >Re: document based app, custom ibaction (From: "Sherm Pendley" <email@hidden>)
 >Re: document based app, custom ibaction (From: Bart Beulen <email@hidden>)
 >Re: document based app, custom ibaction (From: Bart <email@hidden>)
 >Re: document based app, custom ibaction (From: Graham Cox <email@hidden>)
 >Re: document based app, custom ibaction (From: Bart Beulen <email@hidden>)
 >Re: document based app, custom ibaction (From: Bart <email@hidden>)
 >Re: document based app, custom ibaction (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: document based app, custom ibaction
  • Next by Date: Re: Window controllers, code obfuscation
  • Previous by thread: Re: document based app, custom ibaction
  • Next by thread: Re: document based app, custom ibaction
  • Index(es):
    • Date
    • Thread