Re: posting message to text view from C-function
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