• 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
Content of NSTextField in NSPanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Content of NSTextField in NSPanel


  • Subject: Content of NSTextField in NSPanel
  • From: Stéphane BARON <email@hidden>
  • Date: Sun, 23 Nov 2003 14:31:25 +0100

I have an NSWindow and an NSPanel attached to it in my app.

i use:

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

to display the NSPanel.

In this NSPanel there is some NSTextField, which are empty if it is the
first call of the NSWindow.

When the NSPanel is closed the values of the NSTextField are saved to a
file.

When the NSPanel is called again (even if the NSWindow have been closed
before) the NSTextField aren't empty
as they should be.

They keep displaying the values entered before.

I know that i can set those values to @"" using setStringValue before
the sheet is displayed with beginSheet, but i don't believe
that it is normal for the NSPanel to keep old values.

I have tried to make my NSPanel backing to retained or nonretained type
but the first show a white window and the second also keep
the valus.(At the moment the NSPanel backing is set to be buffered)

Is there a way to free all those NSTextField without using
ssetStringValue before displaying the NSPanel??

S.Baron
_______________________________________________
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: Content of NSTextField in NSPanel
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: info/inspector icon
  • Next by Date: Re: Save a NSAppleScript to a file
  • Previous by thread: info/inspector icon
  • Next by thread: Re: Content of NSTextField in NSPanel
  • Index(es):
    • Date
    • Thread