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 > Search Forums > Search Results

Showing results 1 to 50 of 215
Search: Posts Made By: lindberg
Thread Thread Starter Last Post Replies Views Forum
You might try calling setHorizontallyResizable... 705 Views / 3 Replies  
You might try calling setHorizontallyResizable with YES (or true in Java). That defaults to off. You may also try calling sizeToFit after inserting text if the above doesn't work by itself.

You...
Posted by lindberg, on Oct 12, 2002 at 04:19 AM, in Developer Center
The transformation matrix is a PostScript/PDF... 698 Views / 4 Replies  
The transformation matrix is a PostScript/PDF thing; the other values affect the X and Y skew and rotation I think. But really, just ignore it and pass the point size you want to the...
Posted by lindberg, on Oct 12, 2002 at 04:07 AM, in Developer Center
Maybe -highlight:withFrame:inView: ? ... 1,333 Views / 5 Replies  
Maybe -highlight:withFrame:inView: ?

(inherited from NSCell, but it seems to be overridden in NSTableHeaderCell)
Posted by lindberg, on Oct 5, 2002 at 09:00 PM, in Developer Center
Yes, a custom view wrapped in a scroll view is... 773 Views / 5 Replies  
Yes, a custom view wrapped in a scroll view is the way to go. It's unfortunate you can't then set NSText attributes in IB, but it's usually just a few extra lines of code.

If you get *really*...
Posted by lindberg, on Oct 4, 2002 at 02:58 AM, in Developer Center
NSScrollView wraps around any other view to... 773 Views / 5 Replies  
NSScrollView wraps around any other view to provide scrolling behavior (contained as a subview; use the -documentView method to get it). In this case, it's wrapping around an NSTextView. Like...
Posted by lindberg, on Oct 3, 2002 at 10:29 AM, in Developer Center
Depends which ANSI C you're talking about :-) ... 1,239 Views / 14 Replies  
Depends which ANSI C you're talking about :-)

In the older C89 spec, yes, variable-length arrays were prohibited (but was a feature supported by gcc). In the newer ANSI C99 spec, they *are*...
Posted by lindberg, on Oct 3, 2002 at 03:44 AM, in Developer Center
NSDateFormatter expects NSCalendarDate instances... 759 Views / 2 Replies  
NSDateFormatter expects NSCalendarDate instances as its "object value", and formats them to a string for display. Going the other way, it takes a string from the user and creates an NSCalendarDate...
Posted by lindberg, on Sep 30, 2002 at 11:27 PM, in Developer Center
You can make a copy of any NSView using... 549 Views / 9 Replies  
You can make a copy of any NSView using NSArchiver. You will lose all targets, delegates, datasources etc. that point anywhere outside the view (for example to a controller). So, if you need to...
Posted by lindberg, on Jul 21, 2002 at 02:26 PM, in Developer Center
Just for completeness, here's how you get the... 648 Views / 16 Replies  
Just for completeness, here's how you get the value using sysctl(). This way is a little bit more portable than the others.

</font><blockquote><font size="1" face="Geneva, Verdana, Arial,...
Posted by lindberg, on Jul 21, 2002 at 02:00 PM, in Developer Center
Is there any reason this wouldn't work? ... 545 Views / 4 Replies  
Is there any reason this wouldn't work?

</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family:...
Posted by lindberg, on Jun 16, 2002 at 12:51 AM, in Developer Center
If you have a consistently constructed... 1,906 Views / 6 Replies  
If you have a consistently constructed NSDictionary, then maybe, but it's probably not worth it. If you already have your data in a parent/children structure, it should be fairly easy.

In this...
Posted by lindberg, on Jun 7, 2002 at 12:01 AM, in Developer Center
/Developer/Examples/AppKit/OutlineView ... 1,906 Views / 6 Replies  
/Developer/Examples/AppKit/OutlineView
/Developer/Examples/AppKit/DragNDropOutlineView

NSOutlineView is a subclass of NSTableView, so the basic concepts are quite similar.
Posted by lindberg, on Jun 6, 2002 at 01:59 AM, in Developer Center
Thanks for explaining things Chuckit :-) I... 859 Views / 16 Replies  
Thanks for explaining things Chuckit :-)

I probably should have used

NSColor *color = ((row % 2) == 0)? evenRowColor : oddRowColor;

in the example to be more explicit, but the (num & 1)...
Posted by lindberg, on May 27, 2002 at 11:48 PM, in Developer Center
I think this has something to do with indexing,... 487 Views / 5 Replies  
I think this has something to do with indexing, when the PB index files get out of whack. Try finding the *.pbxindex directory under build and get rid of that, or better yet, just delete the entire...
Posted by lindberg, on May 27, 2002 at 11:31 PM, in Developer Center
NSHost will give you the addresses given in DNS... 804 Views / 3 Replies  
NSHost will give you the addresses given in DNS (or NetInfo) to the local hostname -- typically just one, and if the hostname is "localhost", then you'll get 127.0.0.1 .

To get the addresses for...
Posted by lindberg, on May 27, 2002 at 11:12 PM, in Developer Center
You can do this without subclassing too by... 859 Views / 16 Replies  
You can do this without subclassing too by implementing the -tableView:willDisplayCell:forTableColumn:row: delegate method. Something like this:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana,...
Posted by lindberg, on May 25, 2002 at 03:36 PM, in Developer Center
You don't. Basic preprocessing is a fallback for... 386 Views / 1 Replies  
You don't. Basic preprocessing is a fallback for when the "smart" preprocessing can't parse esoteric (though quite valid) constructs that the regular GNU preprocessor can. The basic mode usually...
Posted by lindberg, on May 21, 2002 at 05:33 PM, in Developer Center
Don't use srand/rand. Use srandom()/random()... 1,474 Views / 10 Replies  
Don't use srand/rand. Use srandom()/random() instead. It's not as portable, but it's a much much better random number generator. rand() is awful. If you need portability, find the source code to...
Posted by lindberg, on May 21, 2002 at 04:45 PM, in Developer Center
Depends on how seriously you want to keep all... 1,131 Views / 4 Replies  
Depends on how seriously you want to keep all NSColor attributes, and
if you want the user to be able to edit the value in preferences.

This is one simplistic way (done as C functions), which is...
Posted by lindberg, on May 15, 2002 at 12:34 PM, in Developer Center
3) NSBezierPath should work here as well -- use... 559 Views / 5 Replies  
3) NSBezierPath should work here as well -- use the moveToPoint: method to move the current point around without drawing lines. To draw a point, uh, I guess you could just call lineToPoint: on the...
Posted by lindberg, on May 14, 2002 at 03:37 AM, in Developer Center
I would put logs in the other methods to make... 3,644 Views / 5 Replies  
I would put logs in the other methods to make sure they're being called when you think they are. It's either never getting set, or it's being nilled out by something else. I can't imagine +array...
Posted by lindberg, on May 11, 2002 at 05:44 AM, in Developer Center
You need to [auto]release it eventually if you... 547 Views / 2 Replies  
You need to [auto]release it eventually if you don't want to leak that memory. However, as you noticed, autorelease gets freed at the end of the current event -- much too soon for you. You need to...
Posted by lindberg, on May 11, 2002 at 05:32 AM, in Developer Center
Unless the object value is an attribute string,... 606 Views / 3 Replies  
Unless the object value is an attribute string, I'm not sure why this is happening.

Get the dataCell for your label column... presumably this is an NSTextFieldCell? If so, call...
Posted by lindberg, on May 8, 2002 at 06:25 PM, in Developer Center
An example from modifying some of my code... ... 692 Views / 4 Replies  
An example from modifying some of my code...

This uses /bin/sh -c to execute the command, which treats the string as if it was typed onto the command line. You may very well find it easier to...
Posted by lindberg, on May 8, 2002 at 04:47 PM, in Developer Center
I think you need to call... 1,113 Views / 8 Replies  
I think you need to call registerForDraggedTypes() on the NSTableView so it knows to accept your type.

Also, NSPasteboard.DragPboard is the string name of a pasteboard, not a pastboard type. You...
Posted by lindberg, on May 8, 2002 at 04:03 PM, in Developer Center
The easy way would be: <BLOCKQUOTE><font... 518 Views / 4 Replies  
The easy way would be:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
aString = [[aString componentsSeparatedByString:<font color =...
Posted by lindberg, on Apr 6, 2002 at 03:59 AM, in Developer Center
I second the basic advice -- it's usually easier... 525 Views / 3 Replies  
I second the basic advice -- it's usually easier to work with scalar ints, floats, etc. NSNumber is useful as a wrapper when you need objects (to, say, put in an NSDictionary or something) but...
Posted by lindberg, on Apr 3, 2002 at 01:28 PM, in Developer Center
Remember that your pref pane view is taken out of... 445 Views / 1 Replies  
Remember that your pref pane view is taken out of the window it's in when the nib is loaded, and put into another window (the preferences window). In all likelihood the original window was freed,...
Posted by lindberg, on Mar 15, 2002 at 04:53 PM, in Developer Center
You'll need to subclass NSTextField and override... 1,745 Views / 1 Replies  
You'll need to subclass NSTextField and override the keyDown: method.
Posted by lindberg, on Mar 15, 2002 at 04:45 PM, in Developer Center
I think NSRectFill() uses NSCompositeCopy (i.e.... 2,338 Views / 3 Replies  
I think NSRectFill() uses NSCompositeCopy (i.e. replace the existing color) when drawing. I've not actually done this myself, but you might want to try NSRectFillUsingOperation() using...
Posted by lindberg, on Mar 15, 2002 at 04:35 PM, in Developer Center
Your environment might be different. Anything... 510 Views / 1 Replies  
Your environment might be different. Anything you do in your .cshrc (or similar) will be available to your command-line launch, but not to the NSTask launch (if you're launching the NSTask from a...
Posted by lindberg, on Mar 9, 2002 at 01:26 PM, in Developer Center
There are a couple methods in NSStringDrawing.h... 2,187 Views / 1 Replies  
There are a couple methods in NSStringDrawing.h in the AppKit
for getting the size for an NS[Attributed]String, but these don't
deal with text that needs to be wrapped based on a max width.

Are...
Posted by lindberg, on Mar 7, 2002 at 10:08 PM, in Developer Center
Probably easy enough to write your own method... 454 Views / 3 Replies  
Probably easy enough to write your own method that calls -scrollRectToVisible:. The one complication is that you'd have to do slightly different things for flipped views (which I believe NSTextView...
Posted by lindberg, on Mar 7, 2002 at 08:54 PM, in Developer Center
Yup. -readFromFile: is called around document... 730 Views / 3 Replies  
Yup. -readFromFile: is called around document creation, but the nib isn't loaded until the window needs to be placed on screen, which happens later in the normal scheme of things. Therefore your...
Posted by lindberg, on Feb 6, 2002 at 06:32 PM, in Developer Center
Also read the... 724 Views / 3 Replies  
Also read the /Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/BasicEventHandling/Tasks/HandlingMouseTracking.html doc file. I think you'll need to set up a tracking rect to get...
Posted by lindberg, on Feb 3, 2002 at 10:04 AM, in Developer Center
You either have an outlet to the window, or use... 697 Views / 3 Replies  
You either have an outlet to the window, or use the -window method on any NSView to get the window that view is in.

There is a -flushWindow method on NSWindow, that should force a flush. You...
Posted by lindberg, on Jan 30, 2002 at 03:34 PM, in Developer Center
Generally, I prefer to add method definitions... 548 Views / 1 Replies  
Generally, I prefer to add method definitions manually in the source code and then parse them back into IB. Of course, this was before FileMerge was used instead of overwriting the files directly...
Posted by lindberg, on Jan 30, 2002 at 03:28 PM, in Developer Center
Implementing a copy-type method for anything that... 1,039 Views / 4 Replies  
Implementing a copy-type method for anything that implements NSCoding
is really easy. Here's a category on NSObject that does it...

<BLOCKQUOTE><font size="1"face="Geneva, Verdana,...
Posted by lindberg, on Jan 29, 2002 at 01:55 AM, in Developer Center
Not sure why those are out of date, but... 638 Views / 3 Replies  
Not sure why those are out of date, but however... just run ranlib on them.

ranlib /usr/lib/libstdc++.a
ranlib /usr/lib/gcc/darwin/2.95.2/libcc_dynamic.a

You might need to do that as root...
Posted by lindberg, on Jan 29, 2002 at 12:29 AM, in Developer Center
Nope, Project Builder is not the problem. ... 485 Views / 2 Replies  
Nope, Project Builder is not the problem.

TPKG2Name is an instance method, yet in code you're calling it like a class method. The error message is correct; the compiler can not find the class...
Posted by lindberg, on Jan 23, 2002 at 04:13 PM, in Developer Center
Right, the default compositing operation is... 1,756 Views / 3 Replies  
Right, the default compositing operation is usually NSCompositeSourceOver, (layering over top) whereas you want to use NSCompositeCopy (replace the pixels with the specified color) or maybe...
Posted by lindberg, on Jan 22, 2002 at 02:35 PM, in Developer Center
No, the code as posted is just fine. @"name" is... 1,048 Views / 2 Replies  
No, the code as posted is just fine. @"name" is a perfectly valid NSString.

However, at some point you need to declare all the classes you're making use of, meaning you have to import their...
Posted by lindberg, on Jan 22, 2002 at 02:32 PM, in Developer Center
Dunno if it should be there or not (I'm not much... 619 Views / 2 Replies  
Dunno if it should be there or not (I'm not much of a C++ guy), but a quick Google search came up with this URL:

http://www.sgi.com/tech/stl/download.html
Posted by lindberg, on Jan 20, 2002 at 05:28 PM, in Developer Center
Um, you don't want to use NSImage's +imageNamed:... 1,896 Views / 4 Replies  
Um, you don't want to use NSImage's +imageNamed: method when you're a bundle in another application (unless you want to use one of the app's images). That only looks in the application bundle. It...
Posted by lindberg, on Jan 20, 2002 at 05:22 PM, in Developer Center
With a quick glance at the docs, it looks like... 604 Views / 5 Replies  
With a quick glance at the docs, it looks like you have to subclass NSToolbarItem to do validation with a view item (which this presumably is).
Posted by lindberg, on Jan 16, 2002 at 04:58 AM, in Developer Center
Actually, toolbars are indeed separate instances,... 604 Views / 5 Replies  
Actually, toolbars are indeed separate instances, not the same one. NSToolbars with the same identifier are synchronized through notifications though.

Any NSView can only exist in one place. If...
Posted by lindberg, on Jan 16, 2002 at 04:56 AM, in Developer Center
You could add a Defaults.plist (or whatever) file... 461 Views / 8 Replies  
You could add a Defaults.plist (or whatever) file to your app as a resource, and in applicationDidFinishLaunching, find the file via NSBundle, load it into an NSDictionary, and call registerDefaults...
Posted by lindberg, on Dec 18, 2001 at 09:03 PM, in Developer Center
The first instance of an NSDocumentController (or... 1,936 Views / 2 Replies  
The first instance of an NSDocumentController (or a custom subclass) to be allocated will become the +sharedDocumentController, which is what you want. The easiest way is just to instantiate it in...
Posted by lindberg, on Dec 14, 2001 at 02:07 PM, in Developer Center
That's ...odd. You mean you click on the column... 480 Views / 4 Replies  
That's ...odd. You mean you click on the column but its header cell stays gray like the others instead of turning blue? Or are you trying to do this programmatically?

If it's programmatically,...
Posted by lindberg, on Dec 5, 2001 at 10:08 PM, in Developer Center
Device stuff works quite differently under Darwin... 558 Views / 2 Replies  
Device stuff works quite differently under Darwin then other Unices -- it's all in the IOKit. The info is all there but it might be difficult to drill down to it. You can use IORegistryExplorer.app...
Posted by lindberg, on Dec 5, 2001 at 02:59 PM, in Developer Center
Showing results 1 to 50 of 215
 
Top
Privacy Policy
All times are GMT -4. The time now is 11:16 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,