I'm working on a couple of TextMate plugins, and I would like to force text selection and possibly scrolling in TextMate's main window ([NSApp mainWindow]).
I see that TextMate uses a custom text view class called OakTextView.
1. Is the OakTextView api (header file?) available to the public?
2. Does anyone have any advice to share on how to accomplish text selection in an OakTextView?
I can get a reference to the main window's oaktextview in cocoa easily enough. i just don't know how to make it select text. I'd prefer to do this via objc/cocoa. However, if there are applescript hooks to this, those would be of interest too (especially if the oaktextview api is not available).
Thanks!!!!
I suggest trying class-dump
On Dec 25, 2006, at 10:42 PM, Todd Ditchendorf wrote:
- Is the OakTextView api (header file?) available to the public?
Thanks Kevin! I didn't know about class-dump, but it def produced what I needed.
http://www.cocoadev.com/index.pl?ClassDump
http://www.codethecode.com/Projects/class-dump/download.html
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
On Dec 25, 2006, at 10:22 PM, Kevin Ballard wrote:
I suggest trying class-dump
On Dec 25, 2006, at 10:42 PM, Todd Ditchendorf wrote:
- Is the OakTextView api (header file?) available to the public?
-- Kevin Ballard http://kevin.sb.org kevin@sb.org http://www.tildesoft.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Todd, On Dec 26, 2006, at 4:18 PM, Todd Ditchendorf wrote:
Thanks Kevin! I didn't know about class-dump, but it def produced what I needed.
Keep in mind that Allan is going to (has already done) some pretty major changes for 2.0, which may include a different class altogether. Depending on what calls you are considering, this may or may not present a problem in 4-5 months. You might want to check with Allan first (though he is on vacation at the moment).
http://www.cocoadev.com/index.pl?ClassDump
http://www.codethecode.com/Projects/class-dump/download.html
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
Haris
On Dec 25, 2006, at 9:42 PM, Todd Ditchendorf wrote:
I'm working on a couple of TextMate plugins, and I would like to force text selection and possibly scrolling in TextMate's main window ([NSApp mainWindow]).
I see that TextMate uses a custom text view class called OakTextView.
Is the OakTextView api (header file?) available to the public?
Does anyone have any advice to share on how to accomplish text
selection in an OakTextView?
Been there... AFAIK the cire of the TextView is written in C++. classdump doesn't help there, and no way to use the ObjcC-runtime system to 're-pipe' things...
Gerd
Keep in mind that Allan is going to (has already done) some pretty major changes for 2.0, which may include a different class altogether. Depending on what calls you are considering, this may or may not present a problem in 4-5 months. You might want to check with Allan first (though he is on vacation at the moment).
Haris:
Thanks for the tip. I'll be keeping that in mind.
Been there... AFAIK the cire of the TextView is written in C++. classdump doesn't help there, and no way to use the ObjcC-runtime system to 're-pipe' things...
Gerd:
That would explain some of the C++-esque garbage that class-dump produced... but the good news is that a complete OakTextView ObjC header was also produced, and I've been able to use this successfully (I'll be shipping my plugin very soon :) Let me know if you'd like me to share what I found.
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
On Dec 26, 2006, at 9:55 AM, Gerd Knops wrote:
On Dec 25, 2006, at 9:42 PM, Todd Ditchendorf wrote:
I'm working on a couple of TextMate plugins, and I would like to force text selection and possibly scrolling in TextMate's main window ([NSApp mainWindow]).
I see that TextMate uses a custom text view class called OakTextView.
Is the OakTextView api (header file?) available to the public?
Does anyone have any advice to share on how to accomplish text
selection in an OakTextView?
Been there... AFAIK the cire of the TextView is written in C++. classdump doesn't help there, and no way to use the ObjcC-runtime system to 're-pipe' things...
Gerd
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate