Writing a CLI Terminal in Cocoa (SOLVED)

hopejr

Senior member
Nov 8, 2004
841
0
0
I need to write a CLI Terminal for a Cisco Network Simulator, so users can configure devices and verify network connectivity using the Internet Operating System. I've tried many different ways of doing it, and my latest attempt is using an NSTextView subclass that overrides keyboard control (stopping the user from moving the insertion point onto the prompt or onto previous lines). The problem now is that when the user selects text in another part of the text view, the insertion point moves and so my overriding methods are completely useless (not that I could get them to work properly anyway). Does anyone have any idea how to fix this, or is there another way that I should do the terminal window?
If someone could get back to me about this ASAP, it would be good because I need it done by tomorrow.
Thanks.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Why dont you just write it as a command line app and have them run it from the terminal? Seems easier.
 

hopejr

Senior member
Nov 8, 2004
841
0
0
I would, but this is meant to be part of a larger GUI app, so that won't work. I managed to get it to work though (I was trying to do too much, and finally worked out how to move the insertion point, and find it's position, just by using selected text ranges). Thanks anyway.