Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Need help with [theTextView toggleRuler:sender ];

Need help with [theTextView toggleRuler:sender ];
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2004
Status: Offline
Reply With Quote
Aug 1, 2004, 07:27 AM
 
here is my code

- (IBAction)toggleTheRulerid)sender
{
[theTextView toggleRuler:sender ];
}

Is it possible to make the ruler on by default?
     
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Aug 2, 2004, 05:01 AM
 
In your awakeFromNib method, you could use setRulersVisible:. So something like:
Code:
- (void)awakeFromNib { [theTextView setRulersVisible:YES]; }
That should make it so the rulers are visible on startup, while also allowing users to toggle.

Thanks,
Oliver
     
Fresh-Faced Recruit
Join Date: Jul 2004
Status: Offline
Reply With Quote
Aug 2, 2004, 06:35 AM
 
2004-08-02 07:32:59.980 Captain America Notepad[758] *** -[NSTextView setRulersVisible:]: selector not recognized
2004-08-02 07:32:59.981 Captain America Notepad[758] An uncaught exception was raised
2004-08-02 07:32:59.982 Captain America Notepad[758] *** -[NSTextView setRulersVisible:]: selector not recognized
2004-08-02 07:32:59.982 Captain America Notepad[758] *** Uncaught exception: <NSInvalidArgumentException> *** -[NSTextView setRulersVisible:]: selector not recognized

Captain America Notepad has exited due to signal 5 (SIGTRAP).

I already have an awake from nib so i added it to that and know this happens
CODE:

- (void)awakeFromNib
{
[theTextView setRulersVisible:YES];
[theTextColorWell setColor:[NSColor blackColor]];
[theBackgroundColorWell setColor:[NSColor whiteColor]];
}
     
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Aug 2, 2004, 06:55 AM
 
Oops, my mistake, instead of using [theTextView setRulersVisible:]

Use:

[[theTextView enclosingScrollView] setRulersVisible:YES];

That should hopefully do it.

Thanks,
Oliver
     
Fresh-Faced Recruit
Join Date: Jul 2004
Status: Offline
Reply With Quote
Aug 3, 2004, 07:00 AM
 
Sorry does not work

Thanks,
Naintofaren
     
Fresh-Faced Recruit
Join Date: Jul 2004
Status: Offline
Reply With Quote
Aug 8, 2004, 07:50 AM
 
i really need this can anyone else help me

sorry if i am bugging you


Thanks,
Naintofaren
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:06 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2