• 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: posting message to text view from C-function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: posting message to text view from C-function


  • Subject: Re: posting message to text view from C-function
  • From: Roland Silver <email@hidden>
  • Date: Thu, 5 May 2005 21:37:25 -0600

Ondra,
Your solution, void plainCFunction(NSTextView *tv), leaves me with ANOTHER problem of the same kind: if the caller of plainCFunction is also a C-function, where does IT get the NSTextView object to give plainCFunction as argument?


On May 5, 2005, at 7:38 PM, Ondra Cada wrote:

Roland,

On 6.5.2005, at 3:34, Roland Silver wrote:

I have a window with a text view, and I would like to post a message to that text view from a C-function. I have an outlet IBOutlet NSTextView *textView defined for a class EmuController : NSObject, and from any method of EmuController I could post an NSString using e.g.
[textView insertText:nsString];
But is there some way I can post a string to the text view from a C-function?

Sure. The very same one. Just ensure you have an access to textView (like, using it for argument):


void plainCFunction(NSTextView *tv) {
  [tv insertText:@"whatever"];
}
---
Ondra Čada
OCSoftware:     email@hidden               http://www.ocs.cz
private         email@hidden             http://www.ocs.cz/oc




_______________________________________________ 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: posting message to text view from C-function
      • From: Ondra Cada <email@hidden>
    • Re: posting message to text view from C-function
      • From: j o a r <email@hidden>
References: 
 >posting message to text view from C-function (From: Roland Silver <email@hidden>)
 >Re: posting message to text view from C-function (From: Ondra Cada <email@hidden>)

  • Prev by Date: Binding on an NSTextField
  • Next by Date: Re: getting the key window from another application
  • Previous by thread: Re: posting message to text view from C-function
  • Next by thread: Re: posting message to text view from C-function
  • Index(es):
    • Date
    • Thread