re: Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Ben Trumbull
Specifically my entity has a 'transformable' attribute for which the values are a custom object class, and this object class has an ivar that is an NSMutableDictionary. The user can modify entries in this dictionary, and I would like this to cause the context to be flagged as dirty and to have th

Possible to load window from nib in thread from Finder CM plugin

2009-05-28 Thread Aaron London
I'm working on a Finder CM plugin that needs a more complex UI for some menu item commands than CFUserNotificationCreate provides. All menu item commands for this CM perform work via an NSObject derived class on a thread so as not to block the Finder. Is it possible from that thread to load

Re: Traversing an NSXML subtree

2009-05-28 Thread Justin Palmer
I had to do this recently. I needed to convert an NSXMLDocument to an NSDictionary. If you're interested, you can find the code on GitHub: http://github.com/Caged/aixmlserialize/blob/5322baec2f075d6f4f3bf9cab53b6a606c48ad76/src/AIXMLElementSerialize.m Justin Palmer http://alternateidea.com | ht

NSNotificationCenter CPU usage problem

2009-05-28 Thread Mike Crowe
Hi all, I'm running into a CPU usage problem with my Cocoa application. Basically once the app has been running for a few hours it starts, all of a sudden, to steadily consume an increasing amount of CPU. On further investigation with Instruments, it seems that object allocations seem to be the ca

issue porting resource files code from 10.4 to 10.5

2009-05-28 Thread Victor Bovio
Hello everyone, I'm porting an Application from 10.4 to 10.5 at 64 bit, and I have a problem with resource files, in the Tiger app I have this code to read some resource files: FSSpec spec; FSRef ref; CFURLRef url = (CFURLRef)[NSURL fileURLWithPath: myPathString]; if (CFURLGetFSRef(url, &ref)

multiple windows (dialogs) per nib (.xlib) file

2009-05-28 Thread John Yeh
How do I open a specific window in a nib file? I tried to use the following code, but it displays ALL the windows in that nib file. DialogController -[id]init { self = [super initWithWindowNibName:@"MyNibName"]; } DialogController *dialogController = [[DialogController alloc] init]; [NSApp runModa

Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Sean McBride
On 5/28/09 11:25 AM, Ben Trumbull said: >> Specifically my entity has a 'transformable' attribute for which the >> values are a custom object class, and this object class has an ivar >> that is an NSMutableDictionary. The user can modify entries in this >> dictionary, and I would like this to cau

Re: multiple windows (dialogs) per nib (.xlib) file

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 11:36 AM, John Yeh wrote: > How do I open a specific window in a nib file? I tried to use the following > code, but it displays ALL the windows in that nib file. Typically, you only have one window per nib file. There's usually a one-to-one correspondence between nib fil

Re: How to get the selected popupmenu item with core data

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 11:16 AM, Michael Süssner wrote: > Now I have the problem how I can read the index of the currently selected > object of the popupmenu. This is typically indicative of a flawed design. You shouldn't be asking the UI for this; bind one of the selection bindings to a proper

Re: Clarification on the purpose of NSUserDefaults (newbie)

2009-05-28 Thread Fritz Anderson
On 26 May 2009, at 6:34 PM, Diego Rey Mendez wrote: I'm new to development on the iPhone. I have been reading for a while now the official docs, and some tutorials and posts online explaining the use of NSUserDefaults. My questions: 1) It sounds to me as if this is the preferred class for

Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Rick Hoge
Ben, Quincey, Sean, thanks for the comments. Maybe there are some lower level design issues to rethink. This pattern is usually a flawed model design. If the properties are to be this independently mutable, then there should be a relationship, and/or the complex attribute should be deco

Re: Possible to load window from nib in thread from Finder CM plugin

2009-05-28 Thread Nick Zitzmann
On May 28, 2009, at 7:37 AM, Aaron London wrote: Is it possible from that thread to load a NSWindow from a nib and be able to have that window respond to UI events? No; it is a bad idea to load nibs in threads other than the main thread. You can't count on both the AppKit and instantiated

How to activate Find and Replace for Textview?

2009-05-28 Thread archana udupa
Hi lists Thanks in advance for those who can help me..:)I have subclass of textview. I want to add find and replace menu items.How can i do that? -- With Regards, - Archiez...:0)

Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 11:59 AM, Rick Hoge wrote: >  The user can change the input parameters in the object's dictionary of > inputs, and this should be reflected in the persistent store of > corresponding to the custom attribute on disk.  I realize this is ugly, but > I can't think of any other

Re: How to get the selected popupmenu item with core data

2009-05-28 Thread Michael Süssner
I have found a solution. By adding a property to the File's Owner I have been able to bind the attribute to the PopupMenu and now it works fine. I think that this implementation is according to the MCV-pattern, isn't it. Thanks, for the help Am 28.05.2009 um 20:49 schrieb Kyle Sluder: O

Re: Bindings and core data

2009-05-28 Thread Michael Süssner
Thanks for the hint Am 28.05.2009 um 01:23 schrieb Shlok Datye: The reason why IB complains is that the dot accessor only returns a regular set. You should therefore use "IBOutlet NSSet *selParticipants" instead. For the same reason, you cannot add a participant to selection.participant

remove object from one-to-many relationship

2009-05-28 Thread Michael Süssner
I have a master-detail view, where the detail contains another table with a one-to-many relationship. I have added a Remove Button which I have linked to the corresponding controller object. Although the list is not empty, I cannot remove any relationship. Then I have bound the canRemove

Re: How to get the selected popupmenu item with core data

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 12:36 PM, Michael Süssner wrote: > I think that this implementation is according to the MCV-pattern, isn't it. Yes, that's correct. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: How to activate Find and Replace for Textview?

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 12:11 PM, archana udupa wrote: >   Thanks in advance for those who can help me..:)I have subclass of > textview. I want to add find and replace menu items.How can i do that? Look at the default Edit:Find:Find… menu item. It's wired up to First Responder's -performFindPane

Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Rick Hoge
Just a follow-up. It's not perfect, and I'll revisit the design, but it does what I need for now. Specifically my entity has a 'transformable' attribute for which the values are a custom object class, and this object class has an ivar that is an NSMutableDictionary. The user can modify ent

Re: Send Keyboard Events

2009-05-28 Thread Dave Keck
Check out CGPostKeyboardEvent. ___ 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.com Help/Unsubscribe/Update your Subscr

Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Ben Trumbull
On May 28, 2009, at 11:59 AM, Rick Hoge wrote: Ben, Quincey, Sean, thanks for the comments. Maybe there are some lower level design issues to rethink. This pattern is usually a flawed model design. If the properties are to be this independently mutable, then there should be a relatio

Re: Bluetooth serial examples

2009-05-28 Thread Daniel Pasco
If you have Xcode installed, you can find the sample code in / Developer/Examples/Bluetooth. RFCOMMClientSample and RFCOMMServerSample show how to implement a Bluetooth serial service and client and are a great starting point. It should show you enough to address both issues. -Daniel Pasc

Re: Send Keyboard Events

2009-05-28 Thread Dave DeLong
>From the docs: "This function is not recommended for general use because of undocumented special cases and undesirable side effects. The recommended replacement for this function is CGEventCreateKeyboardEvent, which allows you to create a keyboard event and customize the event before posting i

Hiding process list app icon for GUI apps

2009-05-28 Thread Erg Consultant
Is there a way to hide a GUI app's icon in the process/switch list as can be done for faceless background apps? I've tried several of the Info.plist settings but nothing seems to do this. Thanks, Erg ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: How determine if file is in Trash, given Path or Alias

2009-05-28 Thread Martin Wierschin
BOOL isInTrash(NSString* path) { FSRef fsRef; Boolean result = false ; OSStatus err = FSPathMakeRef( (UInt8*)[path UTF8String], &fsRef, NULL) ; if (err == noErr) { FolderType

CABasicAnimation leaking?

2009-05-28 Thread Mike Manzano
Hi all, I have some animation code that looks like this: CABasicAnimation *theAnimation = [CABasicAnimation animationWithKeyPath:@"position.x"] ; NSLog( @"ANIMATION: started %x" , theAnimation ) ; theAnimation.removedOnCompletion = YES ; theAnimation.duration = 0.125f

-init never gets sent

2009-05-28 Thread Erg Consultant
I have an object which I initialize like this: gReg = [ [ Registry alloc ] init ]; Problem is, my init method never receives any message. Does anyone know what can cause this? Thanks, Erg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Re: -init never gets sent

2009-05-28 Thread David Blanton
what is the result of [ Registry alloc ] ? On May 28, 2009, at 5:34 PM, Erg Consultant wrote: I have an object which I initialize like this: gReg = [ [ Registry alloc ] init ]; Problem is, my init method never receives any message. Does anyone know what can cause this? Thanks, Erg

Re: -init never gets sent

2009-05-28 Thread Erg Consultant
Oddly, the object returned is non-nil. I should mention that the pointer being returned is a hack global declared at the top of the file like this: static Registry *gReg = nil; but that shouldn't matter. And I've checked that that global is never set to nil or created twice anywhere else in th

Re: performSelectorOnMainThread problem

2009-05-28 Thread Erg Consultant
Either your main thread doesn't implement the selector requested, or else it's an issue with the runloop never processing the request. If you have code that alters the runloop or modifies its input sources, check that code first. Erg From: Ben Einstein To: c

Performance, Efficiency - Coding practice

2009-05-28 Thread John Ku
I have this original class with the following method: - (void) update { NSString *title = [[NSString alloc] init]; title = @"TEST"; NSPoint drawAtOrigin; drawAtOrigin.x = 0; drawAtOrigin.y = 10; [title drawAtPoint: drawAtOrigin withAttributes: nil]; } Here, I updated it trying to be efficient:

Re: -init never gets sent

2009-05-28 Thread David Blanton
what does the declaration of init look like? On May 28, 2009, at 5:46 PM, Erg Consultant wrote: Oddly, the object returned is non-nil. I should mention that the pointer being returned is a hack global declared at the top of the file like this: static Registry *gReg = nil; but that shouldn'

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Graham Cox
On 29/05/2009, at 9:57 AM, John Ku wrote: I have this original class with the following method: - (void) update { NSString *title = [[NSString alloc] init]; title = @"TEST"; This is incorrect for a start. You are leaking an empty string. You allocate and initialise it, then reassign its poi

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Andrew Farmer
On 28 May 2009, at 16:57, John Ku wrote: Is this a more efficient way to code? Which coding practice is better in terms of efficiency, memory, performance? The update method will get called often. So Im thinking there is no need to create 'NSPoint drawAtOrigin' everytime. Your thoughts? N

Re: performSelectorOnMainThread problem

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 4:53 PM, Erg Consultant wrote: > Either your main thread doesn't implement the selector requested, or else > it's an issue with the runloop never processing the request. If you have code > that alters the runloop or modifies its input sources, check that code first. Thre

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 4:57 PM, John Ku wrote: > NSString *title = [[NSString alloc] init]; > title = @"TEST"; NSString is immutable, and Objective-C doesn't have operator overloading. So what you're doing here is creating an empty NSString, assigning a pointer to it to your title variable, the

Re: -init never gets sent

2009-05-28 Thread Mike Manzano
How is your init defined? Mike Manzano Sent while mobile On May 28, 2009, at 4:34 PM, Erg Consultant wrote: I have an object which I initialize like this: gReg = [ [ Registry alloc ] init ]; Problem is, my init method never receives any message. Does anyone know what can cause this? T

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread John Ku
Thank you all for the explanation. After reading over and experiment, I kind of get what you all are saying.I've probably confused myself too much with the dot syntax to use title = @"fdsfd". So if i have: NSMutableString *title = [[NSString alloc] init]; [title setString: @"test"]; That would b

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Shawn Erickson
On Thu, May 28, 2009 at 4:57 PM, John Ku wrote: > I have this original class with the following method: > - (void) update { > NSString *title = [[NSString alloc] init]; You create an empty string instance in the above and make title point at it. > title = @"TEST"; You then make title point a th

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Graham Cox
On 29/05/2009, at 10:42 AM, John Ku wrote: NSMutableString *title = [[NSString alloc] init]; [title setString: @"test"]; That would be correct and safe? Yes, but pointless. If the string is a constant, use a constant. NSString* string = @"whatever"; --Graham _

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Shawn Erickson
On Thu, May 28, 2009 at 5:42 PM, John Ku wrote: > Thank you all for the explanation. After reading over and experiment, I kind > of get what you all are saying.I've probably confused myself too much with > the dot syntax to use title = @"fdsfd". > > So if i have: > > NSMutableString *title = [[NSS

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread John Ku
Yeah sorry everyone, in the original example i am using a constant.My working app is actually using a mutable string. So I've got both mixed up. And yeah, NSMutableString will be initialized else where and released later. *hits myself in the head* Im not processing correctly today.. Thanks, John

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Andrew Farmer
On 28 May 2009, at 17:48, Graham Cox wrote: On 29/05/2009, at 10:42 AM, John Ku wrote: NSMutableString *title = [[NSString alloc] init]; [title setString: @"test"]; That would be correct and safe? Yes, but pointless. Nope, that'd be assigning a NSString instance to a NSMutableString varia

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Roland King
So if i have: NSMutableString *title = [[NSString alloc] init]; [title setString: @"test"]; That would be correct and safe? Thank!! John No. I hope it would emit warnings on compilation too. That would set title to an NSString instance, then you go calling setString: on it and that's an

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Graham Cox
On 29/05/2009, at 10:56 AM, Andrew Farmer wrote: Nope, that'd be assigning a NSString instance to a NSMutableString variable oops, missed that ;-) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: -init never gets sent

2009-05-28 Thread Greg Guerin
Erg Consultant wrote: Oddly, the object returned is non-nil. I should mention that the pointer being returned is a hack global declared at the top of the file like this: static Registry *gReg = nil; but that shouldn't matter. Post your code for alloc and -init. Your question can only be

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread John Ku
Better than making mistake one after another. But good lesson for me. Cheers, John On Thu, May 28, 2009 at 6:01 PM, Graham Cox wrote: > > On 29/05/2009, at 10:56 AM, Andrew Farmer wrote: > > Nope, that'd be assigning a NSString instance to a NSMutableString >> variable >> > > > oops, missed t

Re: -init never gets sent

2009-05-28 Thread Erg Consultant
The object's -init looks like this: - (id)init { if( !gReg ) { if( ( self = [ super init ] ) ) { // Zero out members... keys = nil; lastFlushTime = nil; } } return self; } Oddly, I just ran

Re: Hiding process list app icon for GUI apps

2009-05-28 Thread Peter Ammon
On May 28, 2009, at 1:57 PM, Erg Consultant wrote: Is there a way to hide a GUI app's icon in the process/switch list as can be done for faceless background apps? I've tried several of the Info.plist settings but nothing seems to do this. Thanks, Erg Hi Erg, The LSUIElement key preve

Re: -init never gets sent

2009-05-28 Thread Graham Cox
On 29/05/2009, at 11:19 AM, Erg Consultant wrote: - (id)init { if( !gReg ) { if( ( self = [ super init ] ) ) { // Zero out members... keys = nil; lastFlushTime = nil; } } return self; } This is a little broken. -init must a

Re: Hiding process list app icon for GUI apps

2009-05-28 Thread Erg Consultant
That is exactly what I want - my app is a standard Cocoa app with a few windows and a menu bar but it's used to launch other apps - so I don't want it showing up in the Command-Tab switch list, the Dock, or the Force Quit window. Mainly, I need my windows and menubar to still be visible. Thanks

Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Dave Fernandes
On May 28, 2009, at 2:16 PM, Quincey Morris wrote: Well, yeah. The problem is that you're using something with the behavior of an entity (your custom object) as an attribute. That is, you want your object graph to include your custom objects (for the purpose of monitoring their changes), b

Re: Regarding SavePanel in NSDocument

2009-05-28 Thread Andy Lee
On May 28, 2009, at 11:08 AM, Graham Cox wrote: On 29/05/2009, at 12:47 AM, Sourabh Sahu wrote: I created NSDocument which has inbuilt SavePanel, what I want is the reference of SavePanel in my class. What's an inbuilt save panel? Because there isn't one in a normal NSDocument I tried N

Re: Regarding SavePanel in NSDocument

2009-05-28 Thread Graham Cox
On 29/05/2009, at 1:10 PM, Andy Lee wrote: In what way? Show the stack trace. Show your code. Show something. Yes. Don't expect people to guess what you're doing. SHOW US what you're doing and tell us what happened. And to that list I could have added show some initiative! --Graham _

Re: Send Keyboard Events

2009-05-28 Thread Mr. Gecko
Seems to be what I needed. Thanks, Mr. Gecko On May 28, 2009, at 3:27 PM, Dave Keck wrote: Check out CGPostKeyboardEvent. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: NSNotificationCenter CPU usage problem

2009-05-28 Thread Ken Thomases
On May 28, 2009, at 9:51 AM, Mike Crowe wrote: I'm running into a CPU usage problem with my Cocoa application. Basically once the app has been running for a few hours it starts, all of a sudden, to steadily consume an increasing amount of CPU. On further investigation with Instruments, it s

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Michael Ash
On Thu, May 28, 2009 at 8:57 PM, Roland King wrote: >> >> So if i have: >> >> NSMutableString *title = [[NSString alloc] init]; >> [title setString: @"test"]; >> >> That would be correct and safe? > > No. I hope it would emit warnings on compilation too. No warning will be emitted. -init is decla

Re: Recommendations to Reading the Xcode in built Documentation to the fullest effect

2009-05-28 Thread Kevin LaCoste
The fact that AppKiDo isn't built in is one of the reasons I like it. When you update your docs in Xcode's built-in browser a relaunch of AppKiDo will cause it to pick up the changes. Agreed on the loading delay. That's annoying. And it's pretty weak on the polish side. It does display inherited m

Re: Hiding process list app icon for GUI apps

2009-05-28 Thread Eric Schlegel
On May 28, 2009, at 6:31 PM, Erg Consultant wrote: That is exactly what I want - my app is a standard Cocoa app with a few windows and a menu bar but it's used to launch other apps - so I don't want it showing up in the Command-Tab switch list, the Dock, or the Force Quit window. Mainly, I

Re: Hiding process list app icon for GUI apps

2009-05-28 Thread Erg Consultant
Oddly it worked. I set LSUIElement in the Info.plist and the app UI works without the Dock or task list icon. However, doing that caused another weird problem - now my app launches multiple instances of itself every time I double-click it. Remove the LSUIElement key and that behavior goes away.

Re: Core data, bindings and multiple view NIB

2009-05-28 Thread Tomaž Kragelj
Ok, I see. The main thing is that now it works and I can setup the bindings in IB instead of programatically which is another bonus... Thanks for all the information, Tom On 28.5.2009, at 16:23, Keary Suska wrote: On May 27, 2009, at 10:07 PM, Tomaž Kragelj wrote: Thanks Keary, this works,

Re: Hiding process list app icon for GUI apps

2009-05-28 Thread Graham Cox
On 29/05/2009, at 3:28 PM, Erg Consultant wrote: I think the runtime stuff on OS X was never really ready for prime- time. LOL. That's hilarious! :) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: Booleans

2009-05-28 Thread Joel Norvell
John, I believe the problem is that you're treating the boolean as a pointer. HTH, Joel ___ 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 c

Laying out superscripted text

2009-05-28 Thread Graham Cox
I have code that lays out text on a path. It essentially boils down to the technique given in the Text Layout Programming Guide example code (Circle text) of setting up a transform before letting the layout manager get on with its normal work, done by calling -[NSLayoutManager drawGlyphsFor

Bluetooth serial examples

2009-05-28 Thread Allen Curtis
Hello, I can not find any Bluetooth examples on the developer website. There was a link but it was broken. I have two problems that I am trying to solve: 1. The correct way to communicate with a Bluetooth serial port. The documentation indicated that there is a new method that provides be

Clarification on the purpose of NSUserDefaults (newbie)

2009-05-28 Thread Diego Rey Mendez
Hello everyone, I'm new to development on the iPhone. I have been reading for a while now the official docs, and some tutorials and posts online explaining the use of NSUserDefaults. My questions: 1) It sounds to me as if this is the preferred class for storing the user preferences for my applic

Opening a NSPanel in the current virtual desktop instead of the one the app is in

2009-05-28 Thread Stefan Balu
Hey all, I am trying to open a NSPanel in the current virtual desktop, however, it moves me to the virtual desktop where the main NSWindow resides. How can I force a NSPanel to open in the current virtual desktop? -- Ștefan BĂLU Tel: +40726 252 799 ___

Re: Opening a NSPanel in the current virtual desktop instead of the one the app is in

2009-05-28 Thread Stefan Balu
Fixed. [NSApp activateIgnoringOtherApps:YES]; [panel setCollectionBehavior:NSWindowCollectionBehaviorDefault|NSWindowCollectionBehaviorMoveToActiveSpace]; [panel makeKeyAndOrderFront:self]; On Wed, May 27, 2009 at 3:16 PM, Stefan Balu wrote: > Hey all, > > I am trying t

Re: Opening a NSPanel in the current virtual desktop instead of the one the app is in

2009-05-28 Thread Stefan Balu
Actually it didn't fix everything. If I close (and not release) the pannel, go to a different space, when the panel is to be displayed it will move me to where it previously was. So, the code below only unties the panel from the main window, however, if my panel is to be closed, when i call makeKe

New Reporting Tool Now in Beta

2009-05-28 Thread Etchasoft Incorporated
NOTE: Prior notice of this submission was provided to the list administrator. To comply with the administrator’s request, please do not respond to this post via the email list. We have instead established a special email for this beta test as follows: e...@etchasoft.com May 27, 2009 Announcem

SQLite/MySQL BLOB-creator application needed.

2009-05-28 Thread Frederick C . Lee
Greetings: I'm working within the Cocoa/iPhone environment using SQLite as my persistent storage means (albeit, MySQL would be adequate as well). I want to create a digital library that stores images as BLOBs to be incorporated into an SQLite table. So I need a simple OS X application (eit

How to make our application as default for particular type of file.

2009-05-28 Thread Nikhil Khandelwal
Hi, I want to make my application as default for file of particular extension programmatically. Please reply as soon as possible. Thanks, Nikhil DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended

Re: Booleans

2009-05-28 Thread Gregory Weston
John Ku wrote: I am trying to set an object's boolean, everything works but I get a warning of 'pointer from integer without a cast'. *// Here is the Main Class:* [theObject setActivated: YES]; *// Here is the Object Class:* @property(readwrite, assign) BOOL *activated; @synthesize

Re: Traversing an NSXML subtree

2009-05-28 Thread McLaughlin, Michael P.
On 5/27/09 5:02 PM, "Keith Duncan" wrote: >> Could someone clue me in as to the preferred method to do a >> subtraversal? > > Have you looked at XPath, it will save you from having to enumerate > and perform element-name string comparisons. > > Keith > Yes. I looked at that but 1. My tree is

Re: Traversing an NSXML subtree

2009-05-28 Thread Graham Cox
On 28/05/2009, at 10:10 PM, McLaughlin, Michael P. wrote: Yes. I looked at that but 1. My tree is quite small (about 3 pages) and Xpath seemed like overkill. 2. Different objects will seek out information in different parts of the tree. That is, each will do a subtraversal once "their"

Re: Laying out superscripted text

2009-05-28 Thread Graham Cox
On 28/05/2009, at 5:19 PM, Graham Cox wrote: I have code that lays out text on a path. It essentially boils down to the technique given in the Text Layout Programming Guide example code (Circle text) of setting up a transform before letting the layout manager get on with its normal work, d

Re: Cocoa-dev Digest, Vol 6, Issue 794

2009-05-28 Thread McLaughlin, Michael P.
On 5/27/09 6:42 PM, "Greg Guerin wrote: >> In reviewing the NSXML documents, I found no really simple way to >> traverse a >> subtree of an NSXMLDocument. That is, traverse from the root until >> you hit >> the node with the right name then pretend that that node is the >> root of a >> smaller t

Re: How determine if file is in Trash, given Path or Alias

2009-05-28 Thread Sean McBride
Jerry Krinock (je...@ieee.org) on 2009-05-27 1:04 AM said: >At first I thought these FS functions were in Carbon, but the docs say >that they are in CoreServices, so I guess this is OK for the 64-bit >future. It's another example of 'Carbon' being a term with many meanings. These APIs have their

Re: Cocoa-dev Digest, Vol 6, Issue 794

2009-05-28 Thread Graham Cox
On 28/05/2009, at 10:45 PM, McLaughlin, Michael P. wrote: I'm familiar with recursion; that is what prompted my query. However, the tree-traversal documentation at http://devworld.apple.com/documentation/Cocoa/Conceptual/NSXML_Concepts/Arti cles/TraversingTree.html#//apple_ref/doc/uid/TP400

Send Keyboard Events

2009-05-28 Thread Mr. Gecko
Hello, I'm trying to find out how to like make a button that will push the key h or whatever so I can make an virtual keyboard. Any tips/help? Thanks, Mr. Gecko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Rick Hoge
I have a core data (doc-based) app in which one of the entities includes a custom object as a persistent attribute. The custom object class implements NSCoding, and these objects are saved to the core data store with no problem (they are read back correctly etc). Instance variables of t

sending continues NSImage data to iPhone

2009-05-28 Thread sheen mac
Hi All, I am doing a screen sharing app for iPhone and Mac.I captured the Mac Screen as NSImage using OpenGL and send it to iPod as Gif data. But sending and restoring to UIImage process make delay because of Image size.The image size of capture is 320 x 388. Is any better way available for comp

Re: Traversing an NSXML subtree

2009-05-28 Thread Graham Cox
On 28/05/2009, at 11:56 PM, McLaughlin, Michael P. wrote: Hello, I think you’re correct in what you show below. I was expecting that, since an XML document is already a tree, it would already have an equivalent to what you describe. I’ve reinvented the wheel too many times and now try

Re: Core data, bindings and multiple view NIB

2009-05-28 Thread Keary Suska
On May 27, 2009, at 10:07 PM, Tomaž Kragelj wrote: Thanks Keary, this works, however it requires that the same binding is repeated in each nib where the same list should be handled (some views may only need to show it while others can also modify it). I was thinking of creating a "master" s

Re: Traversing an NSXML subtree

2009-05-28 Thread Graham Cox
On 29/05/2009, at 12:21 AM, Graham Cox wrote: makeObjectPerformSelector makeObjectsPerformSelector: ^ --G. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta

Find default application for file of particular extension

2009-05-28 Thread Nikhil Khandelwal
Hi all, I want to find out which application is the default one for .x extension file in my application and to make my application the default one for that extension. Its an urgent project requirement, so please reply as soon as possible. Thanks, NIKHIL DISCLAIMER == This e-mail may con

Re: Triggering change notifications when modifying custom object ivars in core data app

2009-05-28 Thread Keary Suska
On May 28, 2009, at 7:03 AM, Rick Hoge wrote: I have a core data (doc-based) app in which one of the entities includes a custom object as a persistent attribute. The custom object class implements NSCoding, and these objects are saved to the core data store with no problem (they are read

Regarding SavePanel in NSDocument

2009-05-28 Thread Sourabh Sahu
Hi All, I created NSDocument which has inbuilt SavePanel, what I want is the reference of SavePanel in my class. I tried NSSavePanel *panel = [NSDocument savePanel] But the code crashes. Any help will be appreciated. -Sourabh DISCLAIMER == This e-mail may contain privileged and confidenti

Re: NSString initWithFormat and stringWith

2009-05-28 Thread Andy Lee
On Wednesday, May 27, 2009, at 11:23PM, "Bill Bumgarner" wrote: >On May 27, 2009, at 8:20 PM, Andy Lee wrote: >> I just noticed an earlier message in this thread that points out >> that stringWithString: does in fact do the same optimization as - >> copy for constant strings. So the approach i

Re: Find default application for file of particular extension

2009-05-28 Thread Filip van der Meeren
On 28 May 2009, at 16:36, Nikhil Khandelwal wrote: Hi all, I want to find out which application is the default one for .x extension file in my application and to make my application the default one for that extension. For finding out who is "owning" an extention you should use the Launch

Spotlight importer default plugins?

2009-05-28 Thread Michael Domino
Hi all, I know this is off-topic, but I posted to the Spotlight list and got no replies, and I thought someone here might know this. Can anyone list the default set of mdimporter filters shipped with Mac OS X 10.4? I can figure this out by doing a clean install, but I am hoping to avoid t

Re: Regarding SavePanel in NSDocument

2009-05-28 Thread Graham Cox
On 29/05/2009, at 12:47 AM, Sourabh Sahu wrote: I created NSDocument which has inbuilt SavePanel, what I want is the reference of SavePanel in my class. What's an inbuilt save panel? Because there isn't one in a normal NSDocument I tried NSSavePanel *panel = [NSDocument savePanel] But t

Re: NSString initWithFormat and stringWith

2009-05-28 Thread Bill Bumgarner
On May 28, 2009, at 7:52 AM, Andy Lee wrote: On Wednesday, May 27, 2009, at 11:23PM, "Bill Bumgarner" wrote: If you find something that is causing a bundle with Objective-C code to be unloaded, please file a bug via http://bugreport.apple.com/. It isn't supported and the number of edge cases

Re: NSString initWithFormat and stringWith

2009-05-28 Thread Jesper Storm Bache
Does your latest statement mean that the following (from http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/Tasks/loading.html#/ /apple_ref/doc/uid/20001127-124675) is incorrect/obsolete information: "You can unload the contents of a CFBundle object using CFBundleUnlo

Re: Cocoa-dev Digest, Vol 6, Issue 794

2009-05-28 Thread Greg Guerin
Mike McLaughlin. wrote: I'm familiar with recursion; that is what prompted my query. However, the tree-traversal documentation at http://devworld.apple.com/documentation/Cocoa/Conceptual/ NSXML_Concepts/Arti cles/TraversingTree.html#//apple_ref/doc/uid/TP40001257 seems to indicate that th

performSelectorOnMainThread problem

2009-05-28 Thread Ben Einstein
Does anyone know of any issue that would cause performSelectorOnMainThread to not actually perform the selector but not report any kind of error? I use threads very often and have never had a problem like this, but when I call: [aControllerObject performSelectorOnMainThread:@selector(doSome

Creating strings in a loop - Efficiency Question

2009-05-28 Thread Reza Farhad
Hi I have a situation where I need to create a new string as I go through a loop. What will be the most efficient way of doing this each time the call goes through the loop. 1. To create an auto releasing string. 2. To create a non auto-releasing string at the start of the loop and releas

Re: Creating strings in a loop - Efficiency Question

2009-05-28 Thread Dave Carrigan
On May 28, 2009, at 9:20 AM, Reza Farhad wrote: I have a situation where I need to create a new string as I go through a loop. What will be the most efficient way of doing this each time the call goes through the loop. 1. To create an auto releasing string. 2. To create a non auto-releasin

Re: performSelectorOnMainThread problem

2009-05-28 Thread Nick Zitzmann
On May 28, 2009, at 10:11 AM, Ben Einstein wrote: Does anyone know of any issue that would cause performSelectorOnMainThread to not actually perform the selector but not report any kind of error? Are you sure the main thread isn't busy and is running a run loop in its default mode? Ni

  1   2   >