Accessing files from other folders.

2009-03-17 Thread rethish
Hi, When running an iphone application I can access files from the application¹s folders (Document, Library, Temp). Is that possible to access files from folders (like music folder ..)other than the folder specified above? Thankyou. ___ Cocoa-dev ma

Growl vs. CFUserNotification

2009-03-17 Thread Jerry Krinock
On 2009 Mar 15, at 09:03, Jean-Daniel Dupas wrote (in thread "GUI Calls in Tool Executable..."): Just to complete the answer, the correct way to display alert from a background process is to use the CFUserNotification API. Thanks, I wasn't even aware of that. I was thinking of using Grow

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Peter Zegelin
Thanks Michael, That works great. I changed the name of the variable as well: [warrantyTextView readRTFDFromFile:[[NSBundle mainBundle] pathForResource:@"LicenseAgreement" ofType:@"rtf"]]; NSMutableString *warranty = [[warrantyTextView textStorage] mutableString]; [war

Re: GUI Calls in Tool Executable seem to be No-Op. Nice, but safe?

2009-03-17 Thread Jerry Krinock
On 2009 Mar 15, at 08:49, Michael Ash wrote: For example, Apple could easily decide in 10.6 (or even 10.5.7) that NSAlert really could do with an explicit call to NSApplicationLoad for convenience. Now you are screwed. Yes. Do the right thing, and don't make GUI calls if you don't want GUI

Re: cast to pointer from int of diff size & IODisplayCreateInfoDictionary

2009-03-17 Thread Sean McBride
Trygve Inda (cocoa...@xericdesign.com) on 2009-03-17 7:36 PM said: >io_service_tservice; >CFDictionaryRef dict; > >dict = (CFDictionaryRef) IODisplayCreateInfoDictionary (service, >kNilOptions); Why the cast? >No matter what I do I get: > >warning: cast to pointer from integer of dif

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Michael Ash
On Tue, Mar 17, 2009 at 10:41 PM, Peter Zegelin wrote: > In the same vein I have two other bits where I would like to automatically > replace text. The first is my 'Warranty Panel'. I am currently loading it > into an NSTextView like so: > > [warrantyTextField readRTFDFromFile:[[NSBundle mainBundl

Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-17 Thread Michael Ash
On Tue, Mar 17, 2009 at 7:41 PM, Jerry Krinock wrote: > In documentation for method > >  -[NSApplication > beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] > > I read: > > "The didEndSelector ... is invoked after the modal session has ended and is > passed a return code and cal

Re: Drawing background windows during window move.

2009-03-17 Thread Michael Ash
On Tue, Mar 17, 2009 at 1:38 PM, Garrett Moon wrote: > I have two windows in an application, a GuideWindow and a RegularWindow. The > GuideWindow covers all screens and displays guide lines that match up with > the edges of the contentView in RegularWindow. When RegularWindow is moved > or resized

Re: cast to pointer from int of diff size & IODisplayCreateInfoDictionary

2009-03-17 Thread Clark Cox
2009/3/17 Trygve Inda : > io_service_t        service; > CFDictionaryRef     dict; > > dict = (CFDictionaryRef) IODisplayCreateInfoDictionary (service, > kNilOptions); The fact that you have to cast the result at all is a pretty big indicator. I'd bet you've forgotten to include whatever header IO

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Peter Zegelin
On 16/03/2009, at 5:20 PM, Peter Zegelin wrote: OK - thanks everyone. Just as I was about to wire things up in IB I realised that a subclass of NSTextField would be the best way. Turns out its a one liner in awakeFromNib. - (void)awakeFromNib { [self setStringValue:[[self string

Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-17 Thread Jerry Krinock
Thank you, guys. So, saying that the return code is specified in contextInfo is not just "missing information", it's just plain wrong, or as they say "inaccurate" ;) Document feedback has been submitted for this and for Sean's int -> NSInteger. ___

Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-17 Thread Sean McBride
Jerry Krinock (je...@ieee.org) on 2009-03-17 7:41 PM said: >"The didEndSelector ... is invoked after the modal session has ended >and is passed a return code and caller specified in contextInfo. >didEndSelectorshould have the following signature: > >- (void)sheetDidEnd:(NSWindow *)sheet >

Re: How to make letters appear in italics?

2009-03-17 Thread Li Fumin
It works now. And "NSUnitalicFontMask" works too. Thanks, all of you. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.

Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-17 Thread Graham Cox
On 18/03/2009, at 10:41 AM, Jerry Krinock wrote: Well, as it says in the feedback form, "This document is missing information." I guess that contextInfo is a pass-thru. But what in the world is the returnCode? My didEndSelector always seem to get -1000. Someone tell me please the miss

Re: NSTableView behavior changes

2009-03-17 Thread Harry Plate
Graham, Finally getting back to this problem. >>2) I would like my user to be able to select a table entry, and >> be able >> to respond to the 'delete' key - by discarding the selected entry. >> Currently >> that does not work at all. > > You have to make this happen yourself. The controlle

Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-17 Thread Alexander Spohr
Am 18.03.2009 um 00:41 schrieb Jerry Krinock: "The didEndSelector ... is invoked after the modal session has ended and is passed a return code and caller specified in contextInfo. didEndSelectorshould have the following signature: - (void)sheetDidEnd:(NSWindow *)sheet return

Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-17 Thread Andy Lee
Under "See Also" is endSheet:returnCode:, the docs for which do explain the returnCode, which presumably has the same meaning. Yeah, this fact is discoverable, but it couldn't hurt to submit feedback saying it wasn't obvious. --Andy On Mar 17, 2009, at 7:41 PM, Jerry Krinock wrote: In d

Re: [iPhone] NumberPad with the dot

2009-03-17 Thread Brian Slick
In searching for a similar solution myself, I've come across three possibilities: 1) Roll your own keyboard, as others have mentioned. 2) Overlay a decimal button onto the keyboard, like this: http://billabonger.net/blog/2009/01/add-a-decimal-to-uitextfield-number-pad-keyboard/ * - I have no i

"selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-17 Thread Jerry Krinock
In documentation for method -[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] I read: "The didEndSelector ... is invoked after the modal session has ended and is passed a return code and caller specified in contextInfo. didEndSelectorshould have the

Re: How to make letters appear in italics?

2009-03-17 Thread Martin Wierschin
On Mar 17, 2009, at 2:16 PM, Jim Correia wrote: In the case where you want to remove the italic attribute, you should be using -convertFont:toNotHaveTrait:. It actually doesn't matter, you can use the unitalic/unbold masks with -convertFont:toHaveTrait: On Mar 17, 2009, at 2:26 PM, Iceber

cast to pointer from int of diff size & IODisplayCreateInfoDictionary

2009-03-17 Thread Trygve Inda
io_service_tservice; CFDictionaryRef dict; dict = (CFDictionaryRef) IODisplayCreateInfoDictionary (service, kNilOptions); No matter what I do I get: warning: cast to pointer from integer of different size I am compiling 32/64bit and this is defined as: CFDictionaryRef IODisplayCrea

[ANN] KSOutlineView Framework/Interface Builder Plugin

2009-03-17 Thread Kyle Sluder
Hi everybody, In the course of developing the application I'm working on, I got frustrated with having to create dummy data sources for my static source list outline views. They result in quite a bit of code that can be a mess to alter when you want to later add an item to the source list, they m

Re: Incomprehensible KVC Failure!

2009-03-17 Thread Quincey Morris
On Mar 17, 2009, at 15:10, Seth Willits wrote: I have a property in one of my classes: NSString * suggestedDiskImageName; @property (retain, readwrite) NSString * suggestedDiskImageName; @synthesize suggestedDiskImageName; Which is just like a dozen others that I declare, except for some rea

Re: -stringByEvaluatingJavaScriptFromString: return value iphone

2009-03-17 Thread Brent Fulgham
On Sat, Jan 31, 2009 at 9:10 AM, Marco Cassinerio wrote: > Hi, > > i'm trying to execute a javascript function on the iPhone and get the return > value. > > The function is simple: > return "hello"; > The iPhone uses a new version of WebKit than ships on the Mac (unless you install a WebKit night

Re: Incomprehensible KVC Failure!

2009-03-17 Thread Markus Spoettl
On Mar 17, 2009, at 11:10 PM, Seth Willits wrote: It's completely boggling my mind. When this happens to me (and it does occasionally) it usually is a tiny spelling error in the observation registration code, something my dyslexic brain can't spot even if it stares at it for hours. Not s

Re: [iPhone] NumberPad with the dot

2009-03-17 Thread Jelle De Laender
Okay but then you haven't the possibility to show the marker? So the user cannot insert text? He can only remove the numbers from right to left and add numbers at the right side Not very comfortable... not other solution? edit: Now you said this, I saw the same behaviour in other applic

Model & Table Cell Updating Issues

2009-03-17 Thread Walker Argendeli
I'm fairly new to Core Data, so I'm sure there's a simple answer to my question, but here goes. I have an NSStepper, NSLevelIndicator, and an NSTableView with a column containing an NSImageCell. When the "priority" is changed through the slider or level indicator, I want to update the oth

Re: [iPhone] NumberPad with the dot

2009-03-17 Thread Dave DeLong
You fake it. Have a non-editable textfield with a custom UILabel subclass on top of it. When the UILabel gets tapped, bring up your custom keyboard and put the typed text into the UILabel. Dave On Mar 17, 2009, at 4:19 PM, Jelle De Laender wrote: Hi I've create a UIView with some UIButt

Re: [iPhone] NumberPad with the dot

2009-03-17 Thread Jelle De Laender
Hi I've create a UIView with some UIButtons for a custom keypad. Now I've a problem to 'hide' the numberpad of Apple. When a user 'clicks/touches' the editfield, my UIView should be showed (setHidden:NO) and the textField should go in editing-modus, but without the numberPad of Apple. How

Incomprehensible KVC Failure!

2009-03-17 Thread Seth Willits
I have a property in one of my classes: NSString * suggestedDiskImageName; @property (retain, readwrite) NSString * suggestedDiskImageName; @synthesize suggestedDiskImageName; Which is just like a dozen others that I declare, except for some reason that is beyond comprehension after my HOUR L

Re: UIView hidden - still drawing the subviews?

2009-03-17 Thread Ricky Sharp
On Mar 17, 2009, at 4:32 PM, Jelle De Laender wrote: I've a UIView with some subviews (most of them are UIButtons). When I hide an UIView (setHidden:YES), I expect that the subviews are also hidden (not drawed)... but the subviews are still visible when I run my code. How can I hide the

Re: [NSTableView] How should a grid be drawn?

2009-03-17 Thread Iceberg-Dev
On Mar 17, 2009, at 12:45 AM, Corbin Dunn wrote: On Mar 16, 2009, at 4:06 PM, Iceberg-Dev wrote: I'm trying to draw a custom grid for a table view. I' using the code at the end of this post. The problem is that when I scroll the tableview, some of the horizontal lines are not drawn. I

UIView hidden - still drawing the subviews? [SOLVED]

2009-03-17 Thread Jelle De Laender
It seems that the new Interface Builder react very strange on my commands... I've retry it and it works now, just like I expected and just like it should be. So this 'problem' is solved. Begin forwarded message: From: Jelle De Laender Date: Tue 17 Mar 2009 22:32:09 GMT+01:00 To: Cocoa

UIView hidden - still drawing the subviews?

2009-03-17 Thread Jelle De Laender
Hi I've a UIView with some subviews (most of them are UIButtons). When I hide an UIView (setHidden:YES), I expect that the subviews are also hidden (not drawed)... but the subviews are still visible when I run my code. How can I hide the subviews when I hide a UIView? Should I create a

Re: Bindings: which object+property is being edited?

2009-03-17 Thread Keary Suska
On Mar 17, 2009, at 2:18 PM, Jim Correia wrote: Given an NSObjectController subclass, or an NSManagedObjectContext (with chained controllers), is it possible to determine the set of objects + properties currently being edited? The NSEditorRegistration protocol is untyped: - (void)

Re: Garbage Collection, Core Foundation, and the -finalize problem

2009-03-17 Thread Sean McBride
On 3/17/09 5:35 AM, Bill Cheeseman said: >>> I am looking for a strategy to avoid implementing a -finalize >>> method in a garbage-collected Objective-C class that declares a >>> CFTypeRef-style Core Foundation instance variable. I believe this >>> is a fairly common problem, because any Cocoa wra

Re: How to make letters appear in italics?

2009-03-17 Thread Iceberg-Dev
On Mar 17, 2009, at 10:16 PM, Jim Correia wrote: On Mar 17, 2009, at 10:14 AM, Li Fumin wrote: Hi,all.I am new to cocoa. I am reading Aaron Hillegass's Book "Cocoa Programming for Mac OS X". I have got some problems with challenge 2 of Chapter 20.I have a custom NSView called BigLetterVi

Re: How to make letters appear in italics?

2009-03-17 Thread Jim Correia
On Mar 17, 2009, at 10:14 AM, Li Fumin wrote: Hi,all.I am new to cocoa. I am reading Aaron Hillegass's Book "Cocoa Programming for Mac OS X". I have got some problems with challenge 2 of Chapter 20.I have a custom NSView called BigLetterView, and then it show the input letter on the view.

Drawing background windows during window move.

2009-03-17 Thread Garrett Moon
I have two windows in an application, a GuideWindow and a RegularWindow. The GuideWindow covers all screens and displays guide lines that match up with the edges of the contentView in RegularWindow. When RegularWindow is moved or resized, GuideWindow updates its display to move the guide li

How to make letters appear in italics?

2009-03-17 Thread Li Fumin
Hi,all.I am new to cocoa. I am reading Aaron Hillegass's Book "Cocoa Programming for Mac OS X". I have got some problems with challenge 2 of Chapter 20.I have a custom NSView called BigLetterView, and then it show the input letter on the view.Now I want to make the letter which I just input

Re: Double Initialize - is that how it should be?

2009-03-17 Thread Dave Keck
This is expected behavior; from the docs: The runtime sends initialize to each class in a program exactly one time just before the class, or any class that inherits from it, is sent its first message from within the program. (Thus the method may never be invoked if the class is not used.) The runt

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Rich Collyer
You might try just getting the name as an NSString with: NSString applicationName = [[[NSBundle mainBundle] infoDictionary] objectForKey: CFBundleExecutable]; Than populate the dialog with that string (using the technique shown by Mark. +++ Rich Collyer - Senior Softwa

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Ricky Sharp
On Mar 17, 2009, at 3:33 PM, Peter Ammon wrote: On Mar 15, 2009, at 11:20 PM, Peter Zegelin wrote: I have some text labels in a registration dialog that contain the application name eg "xxx Demonstration" "Thank you for purchasing xxx" and so on. I would like this registration dialog to

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Peter Ammon
On Mar 15, 2009, at 11:20 PM, Peter Zegelin wrote: I have some text labels in a registration dialog that contain the application name eg "xxx Demonstration" "Thank you for purchasing xxx" and so on. I would like this registration dialog to be general enough that I can use it in multiple

Bindings: which object+property is being edited?

2009-03-17 Thread Jim Correia
Given an NSObjectController subclass, or an NSManagedObjectContext (with chained controllers), is it possible to determine the set of objects + properties currently being edited? The NSEditorRegistration protocol is untyped: - (void)objectDidBeginEditing:(id)editor; - (void)o

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Michael Ash
On Mon, Mar 16, 2009 at 2:20 AM, Peter Zegelin wrote: > I have some text labels in a registration dialog that contain the > application name eg > > "xxx Demonstration" > "Thank you for purchasing xxx" > > and so on. > > I would like this registration dialog to be general enough that I can use it >

Re: SearchKit quiestion.

2009-03-17 Thread David Casseres
Тимофей, I am wondering what you consider irrelevant, if it is not simply a low relevance score returned by SearchKit. If you have additional criteria such that you need to make your own comparisons between the query and the strings returned from SearchKit, then SearchKit may be a waste

[Moderator] REMINDER - PRE-RELEASE AND BETA SOFTWARE NOT TO BE DISCUSSED HERE

2009-03-17 Thread Scott Anguish
for example unreleased iPHone OS and Mac OS X operating systems such as Snow Leopard. Doing so will result in moderation. see Apple's http://devforums.apple.com for more options. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: NSTableView Drag and Drop doesn't work

2009-03-17 Thread Corbin Dunn
On Mar 17, 2009, at 8:41 AM, Jushin wrote: I did further investigation and found the reason. It was because the problem of "regsterForDraggedTypes" I just wanted to filter out images, so I used following to define types: NSArray* types = (NSArray*)CGImageSourceCopyTypeIdentifiers(); and th

Re: NSTableView Drag and Drop doesn't work

2009-03-17 Thread Nick Zitzmann
On Mar 17, 2009, at 9:41 AM, Jushin wrote: It didn't work. I only could make it work after I changed this to: [tableView registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,nil]]; So, how can I filter image files for drag and drop? You have to do that manually in your v

Re: Working with weekdays on NSDate, NSDateComponents, NSCalendar and NSValueTransformer

2009-03-17 Thread Joar Wingfors
On 17 mar 2009, at 08.44, Roland King wrote: I assumed that -Wall meant .. all. What does Wextra, Winit-self, Wundeclared-selector add? And why aren't they part of all? -Wall can't very well include everything, since a lot of the available warnings are very special in purpose and not gene

Re: Working with weekdays on NSDate, NSDateComponents, NSCalendar and NSValueTransformer

2009-03-17 Thread Roland King
I assumed that -Wall meant .. all. What does Wextra, Winit-self, Wundeclared-selector add? And why aren't they part of all? On Mar 17, 2009, at 11:16 PM, Joar Wingfors wrote: On 17 mar 2009, at 06.32, Michele Barboni wrote: if(value = nil) return nil; missed a "=".. sorry.. .

Re: NSTableView Drag and Drop doesn't work

2009-03-17 Thread Jushin
I did further investigation and found the reason. It was because the problem of "regsterForDraggedTypes" I just wanted to filter out images, so I used following to define types: NSArray* types = (NSArray*)CGImageSourceCopyTypeIdentifiers(); and then set it as, [tableView registerForDraggedTypes:

Re: Working with weekdays on NSDate, NSDateComponents, NSCalendar and NSValueTransformer

2009-03-17 Thread Joar Wingfors
On 17 mar 2009, at 06.32, Michele Barboni wrote: if(value = nil) return nil; missed a "=".. sorry.. ...and that's why it's great to re-train yourself to type it the other way around: if (nil == value) A stricter set of compiler warnings helps too, of course: -

NSTableView Drag and Drop doesn't work

2009-03-17 Thread Jushin
In MyDocument.xib, I have a table and an array list (dataList) for data source. Then I created a subclass of NSArrayController (dataListController) and linked the array list (dataList) to this class. And in the dataListcontroller, I made an outlet of the table and made a connection. Ok, that's my s

Re: Double Initialize - is that how it should be?

2009-03-17 Thread Jim Correia
On Mar 16, 2009, at 10:21 PM, Steve Cronin wrote: I use an object in my application called 'appDelegate'; it's a subclass of NSObject. I instantiate this object in the main Nib file This object has IBActions for the main menu and since it is -app delegate it is a kind on central dispatcher

Re: Working with weekdays on NSDate, NSDateComponents, NSCalendar and NSValueTransformer

2009-03-17 Thread Michele Barboni
On Mar 16, 2009, at 8:40 PM, Michele Barboni wrote: if(value = nil) return nil; missed a "=".. sorry.. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the m

Re: How can i change the view.

2009-03-17 Thread Ron Fleckner
On 17/03/2009, at 8:16 PM, haresh vavdiya wrote: Hi, Actually i want to develop small application which is for register and login. I have set one box on MainMenu.xib and it should contain login view and if i will press register then it should change the view to register v

Re: Garbage Collection, Core Foundation, and the -finalize problem

2009-03-17 Thread Bill Cheeseman
On Mar 16, 2009, at 2:32 PM, Michael Tsai wrote: On Mar 16, 2009, at 2:08 PM, Bill Cheeseman wrote: I am looking for a strategy to avoid implementing a -finalize method in a garbage-collected Objective-C class that declares a CFTypeRef-style Core Foundation instance variable. I believe thi

How can i change the view.

2009-03-17 Thread haresh vavdiya
Hi, Actually i want to develop small application which is for register and login. I have set one box on MainMenu.xib and it should contain login view and if i will press register then it should change the view to register view in same box itself. I have one login view and

Re: Enforcing trial software on Mac

2009-03-17 Thread Jean-Daniel Dupas
Le 17 mars 09 à 03:46, Jeff Laing a écrit : I have seen a couple of fairly nice solutions, and lots of really awful ones. Generally speaking, the awful ones try to go to great lengths to be sneaky and hide files or other data in places in your computer they shouldn't be messing with. Its wor