• 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: help loading file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help loading file


  • Subject: Re: help loading file
  • From: simone gabbriellini <email@hidden>
  • Date: Fri, 4 Mar 2005 16:13:17 +0100

I did, and I tried it but my compiler log says:

"NSTextView may not respond to inserText"

and I don't understand why...

but thank you anyway

simone

Il giorno 04/mar/05, alle 16:01, Geert B. Clemmensen ha scritto:

Have you read the documentation for the NSTextView class? There are two methods that should allow you to what you want (I have highlighted a good pointer):

insertText: - (void)insertText:(id)aString

Inserts aString into the receiver’s text at the insertion point if there is one, otherwise replacing the selection. The inserted text is assigned the current typing attributes. This method is the means by which text typed by the user enters an NSTextView. See the NSInputManager(page 557) class and NSTextInput (page 1470) protocol specifications for more information. Because this method pertains to the actions of the user, the text view must be editable for the insertion to work. Generally, programmatic modification of the text is best done by operating on the NSTextStorage.

- (void)setSelectedRange:(NSRange)charRange

Sets the selection to the characters in charRange, resets the selection granularity to NSSelectByCharacter, and posts an NSTextViewDidChangeSelectionNotification (page 1210) to the default notification center. Also removes the marking from marked text if the new selection is greater than the marked region. The charRange argument must begin and end on glyph boundaries and not split base glyphs and their nonspacing marks.

Regards,
Geert B. Clemmensen
www.frontbase.com

On 4. mar 2005, at 15.52, simone gabbriellini wrote:

the problem is:
I have 4 textView, which I've coded and archivied in a file. And this works fine!

My problem is to load back to the GUI the content of the archive stored in the file.

any hints?

thanx,
simone

Il giorno 04/mar/05, alle 15:32, simone gabbriellini ha scritto:

thank you for help,
but now I have another trouble:

NSData is filled with setData
NSTextView is filled by what? setString doesn't work

thanks again,
simone

Il giorno 04/mar/05, alle 14:51, James McConnell ha scritto:

On 3/4/05 7:20 AM, "Anish Kumar" <email@hidden> wrote:

Hi

I think the problem is in this part of the code...

[messaggioInvito setString:[[temp messaggioInvito] string]];

The correct code is....

[messaggioInvito setString:[[self messaggioInvito] string]];


because the method "messaggioInvito" is declared in the file in which you are
calling it, so you have to use "self".

The error "selector not recognized" comes only when you try to call a method
that doesn't exists or that doesn't belong to the object for which you are
passing.


Hope this helps.

regards,
Anish
Software Engineer
http://www.qubyx.com/

That's most likely it. Also make sure that your NSTextView is Editable. If
you set it to be uneditable in IB, you have to do this:

[messaggioInvito setEditable:YES];
[messaggioInvito insertText:[[self messaggioInvito] string]];
[messaggioInvito setEditable:NO];

Just to make sure that you can actually insert text. I got bit by that in a
recent project, thought I'd throw it out there.

James

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: help loading file
      • From: Jeremy French <email@hidden>
    • Re: help loading file
      • From: "Geert B. Clemmensen" <email@hidden>
    • Re: help loading file
      • From: j o a r <email@hidden>
References: 
 >Re: help loading file (From: James McConnell <email@hidden>)
 >Re: help loading file (From: simone gabbriellini <email@hidden>)
 >Re: help loading file (From: simone gabbriellini <email@hidden>)
 >Re: help loading file (From: "Geert B. Clemmensen" <email@hidden>)

  • Prev by Date: Re: help loading file
  • Next by Date: Re: NSSlider and mouse events
  • Previous by thread: Re: help loading file
  • Next by thread: Re: help loading file
  • Index(es):
    • Date
    • Thread