Stop NSScrollView from catching scroll events.

2009-03-23 Thread Ben Lachman
I have a tableview that's neatly wrapped in a scroll view by IB. I manually resize the scrollview whenever a row is added to the tableview so that all the row are always visible. Thus I basically don't need a scroll view. However even though it can't actually scroll the tableview it stil

RE: Creating UI for as of Get Info Panel

2009-03-23 Thread Ankur Singhal
Hi Kyle, Sorry for not clearing my doubt completely. I have created an icon view in which I am showing the files and folders of the selected item by the user. And now I want to create a panel as of finders but I am not able to identify the controls of it like inside the disclosure triangle it is

Re: Creating UI for as of Get Info Panel

2009-03-23 Thread Florian Soenens
This example should get you somewhere... http://developer.apple.com/SampleCode/Reducer/listing6.html Especially, take a look at the CollapsibleBox class. Regards, Florian. On 23 Mar 2009, at 08:54, Ankur Singhal wrote: Hi Kyle, Sorry for not clearing my doubt completely. I have created an ic

Re: How to get a scroll view to recognize overflow on a custom view?

2009-03-23 Thread Ken Tozier
Thanks Quincey this helped. I'm getting scroll bars now. The new issue though is that when I set the size of the content view (document view?) the scroller's size changes to the new size of the content. I've checked and rechecked to make sure all the autosize parts are set up in IB correctl

De-Mystifying NSCell

2009-03-23 Thread Kyle Sluder
Hi all, I've noticed recently a few people have posted to the list in a state of uncertainty regarding NSCell, particularly in the context of NSTableView. I was in much the same boat when I started out with Cocoa; it takes a few runs through it before the scheme starts to make sense. I put toget

Binding NSMatrix to user Defaults

2009-03-23 Thread Vijay Kanse
Hello List, I created NSMatrix contains two radio buttons. I am binding its selected index with shared user defaults. Now i want to make UI such that when user make first radio button ON it should enable one other radio button Matrix. and when user make second radio button OFF It should disable o

Could really use the help of a custom view expert

2009-03-23 Thread Ken Tozier
Hi I've been struggling with a set of complex views for my palette user interface and have literally been fighting with the same stupid issues off and on for almost a year. I've never, in my 15 years of programming come up against a problem as difficult as making a user interface using Co

Re: BOOL takeStupidRoad = NO (search app design question)

2009-03-23 Thread Izidor Jerebic
Hello, David, there is nothing wrong with your aproach. For this amount of data and for its first version the program should be ok. However, if you find out later that your search needs to be faster/ consume less memory/work with more files, you will need to optimize the application. Not

Re: BOOL takeStupidRoad = NO (search app design question)

2009-03-23 Thread David Yamartino
Thanks, Izidor, for these suggestions. Regarding the Spotlight API, several people have suggested this, however my understanding is that Spotlight indexes at the file level - that is, it knows that the word "perpendicular" is contained in File X, File Y, and File Z. However, I need to know the exa

RE: Creating UI for as of Get Info Panel

2009-03-23 Thread Ankur Singhal
Hi Florian, I have gone through the link given by you but I am not able to open its nib file due to some missing plug-in. Can any one tell me how can I add a Table View inside a disclosure triangle and can also show it or hide it depending upon the click on it. Thanks and Regards, Ankur Singhal

Custom NSScroller ...

2009-03-23 Thread Mic Pringle
Hi, Can anyone recommend any open source projects that implement a custom NSScroller, perhaps using images ? I'd like to have a look at some examples of how this is achieved as I've had no luck so far, going it alone. What I'm looking to achieve is the look & feel of the new iTunes scroller, but

How to draw text with expanded inter-character spacing

2009-03-23 Thread Fabry, Geza
I would like to draw some text into my custom view wider than usual but not by stretching the glyphs using a transformation but by increasing the spacing between the glyphs (like in Font > Character Spacing > Spacing > Expanded/Condensed in MS Word). Is there an attribute for an NSAttributedString

Are NSNumber objects some kind of numeric literals

2009-03-23 Thread Horst Jäger
Hi, I noticed that NSNumber objects with the same value are all have the same address. But since they are created at runtime they must all be held in a big container - or am I mistaken? Thanks in advance Horst ___ Cocoa-dev mailing list (Coco

Re: NSAppleScript - what is going on here?

2009-03-23 Thread Michael Tsai
On Mar 23, 2009, at 12:19 AM, Adam R. Maxwell wrote: Using the MDItem C API had none of the AppleScript/Apple event problems, and was a small fraction of the code. On the other hand, MDItem will probably fail if the file is on a volume for which Spotlight is disabled or its index isn't up-t

Re: Are NSNumber objects some kind of numeric literals

2009-03-23 Thread Jean-Daniel Dupas
Le 23 mars 09 à 14:25, Horst Jäger a écrit : Hi, I noticed that NSNumber objects with the same value are all have the same address. But since they are created at runtime they must all be held in a big container - or am I mistaken? Thanks in advance Horst Only commonly used values ar

Core Animation slow down

2009-03-23 Thread memo
Hi all. I had some previous questions about Core Animation, this is not related to that at all (so don't take the previously mentioned code and methods into consideration). I have a transparent window, in which I create a view, and a root layer, and from then on just create and manage sublayers di

Re: NSAppleScript - what is going on here?

2009-03-23 Thread Adam R. Maxwell
On Mar 23, 2009, at 6:28 AM, Michael Tsai wrote: On Mar 23, 2009, at 12:19 AM, Adam R. Maxwell wrote: Using the MDItem C API had none of the AppleScript/Apple event problems, and was a small fraction of the code. On the other hand, MDItem will probably fail if the file is on a volume for

NSObliquenessAttributeName, labelFontOfSize, & Italic

2009-03-23 Thread Eric Gorr
I found this old thread: http://lists.apple.com/archives/Cocoa-dev/2007/Jan/msg00181.html which discusses the same problem I am experiencing. I need an italic version of Lucida Grande, which is the font currently returned by labelFontOfSize. But, of course, I need a generic solution since

Re: Custom NSScroller ...

2009-03-23 Thread Brandon Walkin
Here's some code for a scroller without arrow buttons: http://bitbucket.org/bwalkin/bwtoolkit/src/tip/BWTransparentScroller.m Cheers, Brandon On 23-Mar-09, at 9:14 AM, Mic Pringle wrote: Hi, Can anyone recommend any open source projects that implement a custom NSScroller, perhaps using image

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Michael Ash
On Mon, Mar 23, 2009 at 3:46 AM, Ben Lachman wrote: > I have a tableview that's neatly wrapped in a scroll view by IB.  I manually > resize the scrollview whenever a row is added to the tableview so that all > the row are always visible.  Thus I basically don't need a scroll view. >  However even

Re: Core Animation slow down

2009-03-23 Thread memo
Resending this because my browser messed up the formatting, apologies    Hi all. I had some previous questions about Core Animation, this is not related to that at all (so don't take the previously mentioned code and methods into consideration). I have a transparent window, in which I create a vi

Re: De-Mystifying NSCell

2009-03-23 Thread Todd Heberlein
I put together a short video to try to explain the rationale and mechanisms of NSCell: http://www.cs.loyola.edu/~ksluder/NSCell.mov . If you're confused about why NSCell exists and how it's used inside NSTableView, I hope that my video is able to shine a bit of light. That was fantastic!! I r

Re: nstableview **very** basic question

2009-03-23 Thread Michael
On Mar 21, 2009, at 9:24 PM, Jerry Krinock wrote: On 2009 Mar 21, at 14:27, Michael wrote: I cannot get tableview to show columns of constant width. [tv sizeToFit]; What I get when I use the above code is the first couple of columns varying in size, then the next "n" columns e

IB instantiating objects

2009-03-23 Thread Gmail
I'm working on developing a Pascal Objective-C bridge like RubyObjc and have run across a problem I can't seem to work around with IB. I very new to Cocoa btw, so I hope this makes sense. Maybe I'm asking in the wrong place also. ;) I have noticed that when a nib is loaded it must allocate

Small app does not get keyboard events for alert sheet

2009-03-23 Thread Tomas Kolar
Hello all, we have problem with a minimalistic application that opens standard alert sheet. The code looks like this: int main(int ac, char *av[]) { NSApplication *app=[NSApplication sharedApplication]; // tried to send activateIgnoringOtherApps:YES, in vain NSRect frame=NSMakeRect

How to implement quick-playing and slow-playing of sound file?

2009-03-23 Thread ldl0313036
Hi All, I am developing an application which implement the playing of sound file. Now I want to change the rate of the sound when it is playing.In other words ,I want to implement quick-playing and slow-playing of the sound file.Is there any API for the function? Or can any one tell me any clue

Re: How can main thread be blocked in mach_msg_trap?

2009-03-23 Thread Jerry Krinock
Thanks, guys. Michael, you almost nailed it by naming all of the stupid mistakes I could have made, but you left out one -- 5) You weren't invoking performSelectorOnMainThread::: but instead performSelector:onThread:::, and targetting a different thread (which does not have a run loop runn

Re: How to implement quick-playing and slow-playing of sound file?

2009-03-23 Thread I. Savant
On Mar 23, 2009, at 3:25 AM, ldl0313036 wrote: I am developing an application which implement the playing of sound file. Now I want to change the rate of the sound when it is playing.In other words ,I want to implement quick-playing and slow- playing of the sound file.Is there any API for th

Re: De-Mystifying NSCell

2009-03-23 Thread Ken Worley
VERY well done and informative. Thanks! Ken On Mar 23, 2009, at 3:10 AM, Kyle Sluder wrote: Hi all, I've noticed recently a few people have posted to the list in a state of uncertainty regarding NSCell, particularly in the context of NSTableView. I was in much the same boat when I started ou

Re: Memory leak when setting CALayer name

2009-03-23 Thread David Duncan
On Mar 22, 2009, at 4:19 AM, Gustavo Pizano wrote: So how come Im applying the M.M rules wrongly, what am I missing? :(. If your applying the memory management rules correctly and your still leaking, then there is probably a bug. You should file one at with

Re: NSString and Leaks Instrument, False Positives?

2009-03-23 Thread Kevin Ross
Thanks Bill, I've reported the problem to bugreporter (#6710982). Thanks for helping figure it out! Kevin On Mar 21, 2009, at 5:33 PM, Bill Bumgarner wrote: On Mar 21, 2009, at 5:09 PM, Kevin Ross wrote: KRStarChartMO drawPortentsInRect:circleStyle:] | +[NSFont fontWithName:size:] | __NSF

Custom windows -- just curious

2009-03-23 Thread Тимофей Даньшин
Hi. Does anybody know how to make totally custom windows, such as the control window in DVD Player or the minimized iTunes window? As i said in the subject -- I am just curious. Timofey. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: IB instantiating objects

2009-03-23 Thread Bill Bumgarner
On Mar 22, 2009, at 6:26 PM, Gmail wrote: Is there anyone who is aware how this was accomplished by the other bridges or if I can force IB to not instantiate the classes, or maybe replace the instance with my own? It seems like I need a way to access the instances of those classes inside the

Re: BOOL takeStupidRoad = NO (search app design question)

2009-03-23 Thread Scott Ribe
> Then again, I guess I could use Spotlight to locate the proper files, and > then focus on them for finding the position of the words and then getting > the words around them for the snippets, etc. Exactly. However, for the amount of data you're talking about, just loading it up & searching it is

Re: MacRoman -> UTF8 [solved]

2009-03-23 Thread Clark Cox
On Sun, Mar 22, 2009 at 5:22 AM, Uli Kusterer wrote: > On 22.03.2009, at 12:22, Michael Ash wrote: >> >> On Sun, Mar 22, 2009 at 3:48 AM, Ben Lachman wrote: >>> >>> Just for the record, this was an issue with my HTTP content type settings >>> and the charset that the input was encoded in, not any

Re: Custom windows -- just curious

2009-03-23 Thread Benjamin Dobson
On 23 Mar 2009, at 17:13:22, Тимофей Даньшин wrote: Hi. Does anybody know how to make totally custom windows, such as the control window in DVD Player or the minimized iTunes window? As i said in the subject -- I am just curious. Timofey. Override -initWithContentRect:styleMask:backing:de

Re: How to get a scroll view to recognize overflow on a custom view?

2009-03-23 Thread Quincey Morris
On Mar 23, 2009, at 02:33, Ken Tozier wrote: The new issue though is that when I set the size of the content view (document view?) the scroller's size changes to the new size of the content. I've checked and rechecked to make sure all the autosize parts are set up in IB correctly, but no ma

Re: How to draw text with expanded inter-character spacing

2009-03-23 Thread Keary Suska
On Mar 23, 2009, at 7:20 AM, Fabry, Geza wrote: I would like to draw some text into my custom view wider than usual but not by stretching the glyphs using a transformation but by increasing the spacing between the glyphs (like in Font > Character Spacing > Spacing > Expanded/Condensed in MS W

Re: How to implement quick-playing and slow-playing of sound file?

2009-03-23 Thread I. Savant
On Mar 23, 2009, at 1:23 PM, mm w wrote: Hello, it depends if you have time to learn, using AudioUnits is a long way to go before beeing statisfy, I don't know your background, I am only an hobbyist musician and doing hobbyist stuff with CoreAudio, for instance you have to learn to use AU Lab or

Re: How to implement quick-playing and slow-playing of sound file?

2009-03-23 Thread I. Savant
On Mar 23, 2009, at 2:09 PM, I. Savant wrote: (not to mention your own pubic image) :-D Speaking of pub[l]ic images, this is without a doubt the funniest typo I've made in awhile. Ah, irony. It's even better than when I signed an e-mail with "Retards" instead of "Regards". Apolog

Re: OpenGL Prog Guide for OSX - override initWithFrame

2009-03-23 Thread Richard Somers
On Mar 23, 2009, at 2:51AM, Ian Jackson wrote: I have an OpenGL view as a subclass of NSView. Trying to follow the OpenGL Programming Guide for Mac OS X, I created all the methods described in the "Drawing to a Cocoa View" section. The thing I don't quite understand is that it says to overr

Re: NSLevelIndicator Bindings Crash

2009-03-23 Thread Walker Argendeli
I did some more looking and determined that it should be Item.selection.priority When i do this, however, every time I switch back to another item, the level defaults back to 1. Also, I checked that chapter in Hillegass's book, and it had an example where it used Car.selection.condition, so

Re: MacRoman -> UTF8 [solved]

2009-03-23 Thread Sean McBride
On 3/22/09 4:29 PM, Peter Duniho said: >Of particular note is Apple's own mail archive for the mailing list. >Maybe they've fixed it recently... Apple's archives are not a nice as cocoabuilder's (which I highly recommend), which seems to thread correctly even if the subject changes, see:

Key path for values in "Shared User Defaults"?

2009-03-23 Thread Matthias Arndt
Please help me: What is the key path of a value stored in the shared user defaults? I'm using a sub-classed NSViewController to enhance the print panel with an accessory view: NSBundle *appBundle = [NSBundle bundleForClass:[self class]]; NSViewController *accessoryViewController = [[PrintO

Re: NSLevelIndicator Bindings Crash

2009-03-23 Thread Keary Suska
On Mar 23, 2009, at 1:13 PM, Walker Argendeli wrote: When i do this, however, every time I switch back to another item, the level defaults back to 1. Also, I checked that chapter in Hillegass's book, and it had an example where it used Car.selection.condition, so it seems that selection i

Re: NSLevelIndicator Bindings Crash

2009-03-23 Thread Walker Argendeli
Yes, you're right, Item is an NSArrayController representing the entity "Item". Sorry about that. ItemsList is an Entity and Array Controller representing an outline view of folders. Each folder can have multiple Items in it. Depending on which folder is selected in the ItemsList outline v

Core Data: is fetching safe during validateForInsert:/validateForUpdate?

2009-03-23 Thread Sean McBride
Hi all, Is it OK to perform a fetch during validateForInsert:/ validateForUpdate:? I have a Core Data entity named 'Person' with an attribute named 'uniqueNumber'. I want to ensure that no two People have the same uniqueNumber. I have implemented validateForInsert:/validateForUpdate: along thes

NSPredicate with non-string keys

2009-03-23 Thread Ben Einstein
Hi, I was wondering if anyone knows how to use NSPredicate on values with keys that are NSNumbers (or any non-NSString, for that matter). I've poured over the documentation and tried many things, from converting to a string to %K, %d, etc argument substitutions and nothing seems to work.

Re: NSPredicate with non-string keys

2009-03-23 Thread Kyle Sluder
On Mon, Mar 23, 2009 at 5:03 PM, Ben Einstein wrote: > I was wondering if anyone knows how to use NSPredicate on values with keys > that are NSNumbers (or any non-NSString, for that matter). I've poured over > the documentation and tried many things, from converting to a string to %K, > %d, etc ar

Re: NSPredicate with non-string keys

2009-03-23 Thread Ben Einstein
Sorry, typo, I meant FILTER an array. So is there any way to filter with numberic keys? I guess I could convert all they keys to strings? Urgh Is there any way to filter using all keys in a dictionary? Thanks for you help (so far!) Ben On Mar 23, 2009, at 5:13 PM, Kyle Sluder wrote: On

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Ben Lachman
On Mar 23, 2009, at 10:54 AM, Michael Ash wrote: On Mon, Mar 23, 2009 at 3:46 AM, Ben Lachman wrote: I have a tableview that's neatly wrapped in a scroll view by IB. I manually resize the scrollview whenever a row is added to the tableview so that all the row are always visible. Thus I ba

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Kyle Sluder
On Mon, Mar 23, 2009 at 5:35 PM, Ben Lachman wrote: > How do you call through to some arbitrary class in a class's inheritance > chain? Typically, you don't. Just hand it off to super. NSView isn't declared to implement -scrollWheel:. If you *really* need to invoke a specific class's implement

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Corbin Dunn
On Mar 23, 2009, at 2:35 PM, Ben Lachman wrote: On Mar 23, 2009, at 10:54 AM, Michael Ash wrote: On Mon, Mar 23, 2009 at 3:46 AM, Ben Lachman wrote: I have a tableview that's neatly wrapped in a scroll view by IB. I manually resize the scrollview whenever a row is added to the tableview

Re: NSPredicate with non-string keys

2009-03-23 Thread Kyle Sluder
On Mon, Mar 23, 2009 at 5:18 PM, Ben Einstein wrote: > So is there any way to filter with numberic keys? I guess I could convert > all they keys to strings? Urgh First, arrays don't have keys. I'm assuming you mean you need to filter the items based on values for keypaths off those objects.

Re: NSPredicate with non-string keys

2009-03-23 Thread Ben Einstein
I'm filtering an array of dictionaries, my usual procedure for doing this is: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"MyKey CONTAINS[cd] %@", searchString]; NSArray *filteredArray = [[self dataArray] filteredArrayUsingPredicate:predicate]; So your comment about lowerca

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Ben Lachman
On Mar 23, 2009, at 5:47 PM, Corbin Dunn wrote: On Mar 23, 2009, at 2:35 PM, Ben Lachman wrote: On Mar 23, 2009, at 10:54 AM, Michael Ash wrote: On Mon, Mar 23, 2009 at 3:46 AM, Ben Lachman wrote: I have a tableview that's neatly wrapped in a scroll view by IB. I manually resize the scr

Re: Limiting number of characters per line in a NSTextView

2009-03-23 Thread Andrew Farmer
On 18 Mar 09, at 13:32, Martin Wierschin wrote: I want my NSTextView to show only 32 characters per line and the 33rd character should be shown at next line of textview. My NSTextView will have fixed font. If your font is truly fixed width, you can probably just set the NSTextView frame so i

Re: De-Mystifying NSCell

2009-03-23 Thread David Yamartino
That is really excellent. (must have taken a long time to make) I wish there were more videos like that. I'd learn a lot faster. David On Mon, Mar 23, 2009 at 7:10 PM, Kyle Sluder wrote: > Hi all, > > I've noticed recently a few people have posted to the list in a state > of uncertainty rega

Remove action on NSArrayController bound to table causes index beyond bounds

2009-03-23 Thread Luke Evans
I have a table bound to an NSArrayController that provides content from Core Data. This has been pretty trouble-free except that the hook up that removes the selected object/row (currently a 'minus' button under the table that uses the "remove" action on the controller) appears to cause an

Re: Remove action on NSArrayController bound to table causes index beyond bounds

2009-03-23 Thread I. Savant
On Mar 23, 2009, at 7:52 PM, Luke Evans wrote: *** -[NSCFArray objectAtIndex:]: index (8) beyond bounds (8) 2009-03-23 16:17:46.118 App[17940:817] *** -[NSCFArray objectAtIndex:]: index (8) beyond bounds (8) 2009-03-23 16:17:46.132 App[17940:817] CoreData could not fulfill a fault for '0x1a5

Re: NSPredicate with non-string keys

2009-03-23 Thread Clark Cox
On Mon, Mar 23, 2009 at 2:53 PM, Ben Einstein wrote: > I'm filtering an array of dictionaries, my usual procedure for doing this > is: > > NSPredicate *predicate = [NSPredicate predicateWithFormat:@"MyKey > CONTAINS[cd] %@", searchString]; > NSArray *filteredArray = [[self dataArray] > filteredArr

Re: BOOL takeStupidRoad = NO (search app design question)

2009-03-23 Thread David Yamartino
Yes, thank you. So that's how I'll proceed. David -- On Tue, Mar 24, 2009 at 3:18 AM, Scott Ribe wrote: > > Then again, I guess I could use Spotlight to locate the proper files, and > > then focus on them for fin

Re: IB instantiating objects

2009-03-23 Thread Gmail
NO, it supports subclassing. Do you know what method I could override (and return my instance) before the NIB is loaded so I can control it's isntance variables? I think maybe a low-level protocol like init could perhaps work. Thanks. On Mar 24, 2009, at 12:15 AM, Bill Bumgarner wrote: On

-hexValue for NSString?

2009-03-23 Thread Jonathon Kuo
In NSString theres -intValue, -floatValue, -doubleValue, but no - hexValue (that I can find). I'd like to convert ascii hex NSStrings (@"001A4CD3" etc) into integer values. Having a -hexValue method would make that a snap. If theres no Cocoa way, I guess I could try my hand at writing a cate

Re: IB instantiating objects

2009-03-23 Thread Jonathan Hess
Hey Josef - When IB instantiates an object in a NIB file that has the custom class set, it will instantiate it with either init, initWithFrame:, or initWithCoder: depending on the type of object. Here's a link tot he relevant documentation: http://developer.apple.com/documentation/Cocoa/Con

Re: -hexValue for NSString?

2009-03-23 Thread Ali Ozer
NSScanner has - (BOOL)scanHexInt:(unsigned *)value; // Optionally prefixed with "0x" or "0X" - (BOOL)scanHexLongLong:(unsigned long long *)result; so you can unsigned yourValueHere; BOOL success = [[NSScanner scannerWithString:string] scanHexInt:&yourValueHere]; Ali On Mar 23, 2009, at

Simulating (or obtaining) menubar effect in a Cell

2009-03-23 Thread Tobias Zimmerman
Hello all- I am working with an NSMatrix, and I would like one cell of the Matrix to act just like an item in the menu bar. Specifically: Single clicking should open a menu; holding the mouse down should open the menu and then close it when released; when selected the item should highlight/invert

Re: Small app does not get keyboard events for alert sheet

2009-03-23 Thread Ken Thomases
On Mar 23, 2009, at 1:03 AM, Tomas Kolar wrote: we have problem with a minimalistic application that opens standard alert sheet. [...] The application correctly opens alert sheet but does not get any keyboard actions nor events — they are still sent to previous open app. [...] Does anyo

Re:Re: How to implement quick-playing and slow-playing of sound file?

2009-03-23 Thread null
Hi I am Mac. Anyway ,I should say "Thank you" to both of you. Thank you for you help. Mac 在2009-03-24,"mm w" 写道: Hello, it depends if you have time to learn, using AudioUnits is a long way to go before beeing statisfy, I don't know your background, I am only an hobbyist musician and doing hobb

Re: IB instantiating objects

2009-03-23 Thread Gmail
Thanks! I think that document explains everything I need to know to take control over IB. This is more Objective-C related by maybe you have a quick tip. My first tests suggest that my method for overriding is not correct because overriding "init" is getting invoked from all sorts of other

iPhone Tab bar Question

2009-03-23 Thread Jason Todd Slack-Moehrle
Hi All, I created a standard iPhone application using the built-in wizard and it builds and runs fine. My question is how do I modify the tab bar at the bottom to not make space for an image. I dont want to use images and I dont see how to adjust the height of the bar so I gain some extra

Re: -hexValue for NSString?

2009-03-23 Thread Dave Keck
I think this should do the trick: @implementation NSString (HexIntValue) - (unsigned int)hexIntValue { NSScanner *scanner; unsigned int result; scanner = [NSScanner scannerWithString: self]; [scanner scanHexInt: &result]; return result; } @end Note that I would expect -

XMLParser

2009-03-23 Thread Development
I'm using an an NSXMLParser to parse a document. some of the elements are as follows: Some Thing The problem is that I cannot seem to come up with the element's property. During the parse which callback is going to give me the property and it's value? Thanks. __

Re: IB instantiating objects

2009-03-23 Thread Ashley Clark
On Mar 23, 2009, at 9:30 PM, Gmail wrote: Thanks! I think that document explains everything I need to know to take control over IB. This is more Objective-C related by maybe you have a quick tip. My first tests suggest that my method for overriding is not correct because overriding "init"

Re: NSTableView updating checkboxes

2009-03-23 Thread Graham Cox
On 23/03/2009, at 12:21 PM, Jo Phils wrote: Thank you Andrew (and Graham), I think i'm finally realizing that! :-) Thank you very much. Ok I still don't have it yet but it's back to work for me and hopefully the next time I post back I'll finally have it... :-) Thanks again, Rick H

Re: -hexValue for NSString?

2009-03-23 Thread Jonathon Kuo
Kewl, two excellent solutions! Cocoa is pretty versatile. I have alot to learn yet but I don't quite have my head around why its more "Cocoaish" to invoke a class like NSScanner on an external object (Ali's approach) versus expecting the NSString object to be able to render its own contents

Re: XMLParser

2009-03-23 Thread Dave Geering
On Tue, Mar 24, 2009 at 1:53 PM, Development wrote: > I'm using an an NSXMLParser to parse a document. some of the elements are as > follows: Some Thing > The problem is that I cannot seem to come up with the element's property. > During the parse which callback is going to give me the property an

Re: NSObliquenessAttributeName, labelFontOfSize, & Italic

2009-03-23 Thread Tobias Zimmerman
> From: Eric Gorr > Subject: NSObliquenessAttributeName, labelFontOfSize, & Italic > The solution proposed in the thread was to just add > NSObliquenessAttributeName, which is easy enough, but I am not sure > what the appropriate angle should be. > > Is there a standard angle which should be use

Re: IB instantiating objects

2009-03-23 Thread Gmail
On Mar 24, 2009, at 10:01 AM, Ashley Clark wrote: On Mar 23, 2009, at 9:30 PM, Gmail wrote: Thanks! I think that document explains everything I need to know to take control over IB. This is more Objective-C related by maybe you have a quick tip. My first tests suggest that my method for

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Michael Ash
On Mon, Mar 23, 2009 at 6:09 PM, Ben Lachman wrote: > On Mar 23, 2009, at 5:47 PM, Corbin Dunn wrote: > >> On Mar 23, 2009, at 2:35 PM, Ben Lachman wrote: >> >>> On Mar 23, 2009, at 10:54 AM, Michael Ash wrote: >>> On Mon, Mar 23, 2009 at 3:46 AM, Ben Lachman wrote: > > I have a tabl

Re: -hexValue for NSString?

2009-03-23 Thread Michael Ash
On Mon, Mar 23, 2009 at 9:25 PM, Dave Keck wrote: > I think this should do the trick: > > @implementation NSString (HexIntValue) > > - (unsigned int)hexIntValue > { > >    NSScanner *scanner; >    unsigned int result; > >    scanner = [NSScanner scannerWithString: self]; > >    [scanner scanHexInt

Re: IB instantiating objects

2009-03-23 Thread Ashley Clark
On Mar 23, 2009, at 10:31 PM, Gmail wrote: On Mar 24, 2009, at 10:01 AM, Ashley Clark wrote: On Mar 23, 2009, at 9:30 PM, Gmail wrote: Thanks! I think that document explains everything I need to know to take control over IB. This is more Objective-C related by maybe you have a quick tip.

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Kyle Sluder
On Mon, Mar 23, 2009 at 10:48 PM, Michael Ash wrote: > Right, that would be my preferred way of doing it. I like to use the > NSObject methods rather than the ObjC runtime functions where I can, > since the NSObject methods are usually friendlier and more broadly > compatible. For the record, I a

Re: IB instantiating objects

2009-03-23 Thread Gmail
Great, thanks. I almost have this working but with one little problem. 1) I add the "init" method to my class 2) When init is invoked from the NIB I call objc_msgSend with the selector "init" which returns the new instance of the class (retrieved from objc_getClass) I previously registered wi

Re: IB instantiating objects

2009-03-23 Thread Gmail
I'm sorry! The light bulb just went off as soon as I sent that last message. I'm NOT supposed to init a NEW instance, but use that instance and simply modify it, which works perfectly. Please ignore that last message, this issue is solved and thank you very much for helping. Pascal users on

Re: -hexValue for NSString?

2009-03-23 Thread Ali Ozer
NSString's intValue and related methods are conveniences, for quick- and-dirty extraction of the desired value, with limited flexibility and no real error checking. If you want to do error checking, or do a little more sophisticated scanning (like extracting multiple values, etc), you would