Re: Removing quit button from dock menu

2010-02-24 Thread yogin bhargava
Hi All, Thanks for your responses. The application is an installer which has to install something. And that installer should not be allowed to quit. Thanks, YOGIN On Wed, Feb 24, 2010 at 12:32 AM, Mark Ritchie wrote: > Hi Yogin! > > On 22/Feb/2010, at 10:33 PM, yogin bhargava wrote: > > I d

Re: -commitEditing NSAlert not always presented as a sheet

2010-02-24 Thread Keith Duncan
On 23 Feb 2010, at 18:17, Kyle Sluder wrote: > On Tue, Feb 23, 2010 at 7:05 AM, Keith Duncan wrote: > >> However, if I click my 'Done' button, which first attempts to -commitEditing >> for the hosting view controller, and will then close the hosting child >> window if -commitEditing returns Y

Tracking NSPoint in flipped superview

2010-02-24 Thread Nikhil Khandelwal
Hi, I have override a mouseDown event. Now I am trying to locate the [theEvent locationInWindow] points in the superview which is flipped. So this is giving me just opposite NSpoint so is there any method to flip the points or to check for points in particular view. Thanks, Nikhil DISCLAIMER

Re: Tracking NSPoint in flipped superview

2010-02-24 Thread Graham Cox
On 24/02/2010, at 9:12 PM, Nikhil Khandelwal wrote: > I have override a mouseDown event. Now I am trying to locate the [theEvent > locationInWindow] points in the superview which is flipped. So this is giving > me just opposite NSpoint so is there any method to flip the points or to > check fo

Strange behavior of applicationShouldHandleReopen delegate

2010-02-24 Thread yogin bhargava
Hi All, I have the following delegate being implemented in my app. - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag { [mainApplicationWindow makeKeyAndOrderFront: self]; return NO; } This delegate is called when i close my window and cl

Re: Removing quit button from dock menu

2010-02-24 Thread Steven Degutis
Generally, Cocoa developers do not write installers, but instead use PackageMaker to install our apps for us. If it's not software you're installing then, well, I don't know what to tell you. But you still can't stop the user from quitting your app. If they really want to, they can quit it from the

Re: Removing quit button from dock menu

2010-02-24 Thread Andy Lee
Don't try to achieve this by removing UI options. For one thing, I'm not sure if this prevents AppleScript or shutdown from quitting your app. But regardless, instead of removing the Quit option without explanation, it's better to implement applicationShouldTerminate: in your application deleg

Stop editing session of NSTextField

2010-02-24 Thread Nikhil Khandelwal
Hi, How can I end the editing session for NSTextField forcefully. I tried abortEditing however it does not accept the changes made to NSTextField. I want the changes made to NSTextField acceptable when I quit the editing session. Thanks in advance. Nikhil DISCLAIMER == This e-mail

Re: Removing quit button from dock menu

2010-02-24 Thread Arun
I think what Yogin is looking for is something like what Finder has. The finder doc menu does not has the "Quit" option in it. Well i wish i could have given the solution if i were to know how finder has did it. Unfortunately i am Novice in cocoa..!!! -Arun On Wed, Feb 24, 2010 at 6:32 PM, Andy L

Re: Removing quit button from dock menu

2010-02-24 Thread Andrew Farmer
On 24 Feb 2010, at 05:09, Arun wrote: > I think what Yogin is looking for is something like what Finder has. The > finder doc menu does not has the "Quit" option in it. > Well i wish i could have given the solution if i were to know how finder has > did it. Unfortunately i am Novice in cocoa..!!!

Re: Removing quit button from dock menu

2010-02-24 Thread Jens Alfke
On Feb 24, 2010, at 1:20 AM, yogin bhargava wrote: >Thanks for your responses. The application is an installer which has to > install something. And that installer should not be allowed to quit. As others have said, it's better to use Apple's installer app, if possible. Don't try to remove

Re: Removing quit button from dock menu

2010-02-24 Thread Mark Ritchie
On 24/Feb/2010, at 1:20 AM, yogin bhargava wrote: > Thanks for your responses. The application is an installer which has to > install something. And that installer should not be allowed to quit. Hi Yogin! I agree with the others who have posted... Using a standard package and the regular

Need to duplicate the look & feel of the upper-left traffic-lights on a borderless window app

2010-02-24 Thread Michael A. Crawford
I'm creating an app where the client wants to have rounded corners and other oddities on the main window. Therefore I'm thinking I need the main window to be borderless. Unfortunately I also lose the standard look and behavior that the red-yellow-green gumdrop buttons, in the upper-left corner

Re: Need to duplicate the look & feel of the upper-left traffic-lights on a borderless window app

2010-02-24 Thread Kyle Sluder
On Wed, Feb 24, 2010 at 10:21 AM, Michael A. Crawford wrote: > Anyone have any ideas or code that will help me duplicate this standard app > interface and its behavior as part of my app's main window? 1) Tell your client to seriously reconsider violating the HIG. 2) Look at +[NSWindow standardWi

Re: Stop editing session of NSTextField

2010-02-24 Thread Mark Townsend
The way that I did it was to change the FirstResponder. Generically I did: [[self window] makeFirstResponder:self]; This is on a NSWindowController sub-class, but it should work on anything that you can change the FirstResponder on. --- Mark Townsend http://www.markltownsend.com On Wed, Feb 2

NSFetchRequest with NSPredicate not fetches the expected objects (iPhone)

2010-02-24 Thread Giannandrea Castaldi
Hi, I'm developing an atom feed reader for iPhone and I'm trying to execute a NSFetchRequest with a NSPredicate in a test where the result should be an array with two objects but instead is emtpy. There are two entities: Feed (Atom feed) and Entry. In the model Entry has a relationship with one Fee

Re: Deprecated APIs

2010-02-24 Thread Bill Bumgarner
On Feb 23, 2010, at 8:57 PM, Steve Christensen wrote: >> That code uses blocks, though, which implies that it will be compiled using >> a later version of Objective-C. Will that code really run on older versions >> of OS X? > > The compile-time conditional assumes that you're building against

Re: Stuck on NSTreeController bindings

2010-02-24 Thread Mark Townsend
Jenny, I think what you want is to set the Entity on the NSTreeController to be the Alpha entity, not Delta. The predicate 'parent == nil' will only give you back Delta objects where parent == nil. From what you've said, this will never be true as the Alpha objects are your top level objects. A

Odd NSString behavior

2010-02-24 Thread McLaughlin, Michael P.
This is just a minor glitch but I hate loose ends. I have a Cocoa app as a resource in my MainBundle. If I try to get its executable via the obvious NSString * linrgPath = [myBundle pathForResource: @"linrg2.app/Contents/MacOS/linrg2" ofType: @""]; then linrgPath is nil; However, if I split th

Re: Odd NSString behavior

2010-02-24 Thread Dave DeLong
If the extra cocoa app is a resource in your main bundle, then it should be in Contents/Resources, not Contents/MacOS. If you put it in Contents/Resources, then you can retrieve it easily via: NSString * linrgPath = [[NSBundle mainBundle] pathForResource:@"linrg2" ofType:@""]; The name "pathF

Re: Deprecated APIs

2010-02-24 Thread Steve Christensen
On Feb 24, 2010, at 11:04 AM, Bill Bumgarner wrote: On Feb 23, 2010, at 8:57 PM, Steve Christensen wrote: That code uses blocks, though, which implies that it will be compiled using a later version of Objective-C. Will that code really run on older versions of OS X? The compile-time condi

Re: Odd NSString behavior

2010-02-24 Thread Jens Alfke
On Feb 24, 2010, at 11:30 AM, McLaughlin, Michael P. wrote: NSString * linrgPath = [myBundle pathForResource: @"linrg2.app/Contents/MacOS/linrg2" ofType: @""]; then linrgPath is nil; This has nothing to do with NSString; you're misusing NSBundle. -pathForResource: only looks in the Resources

Re: Deprecated APIs

2010-02-24 Thread Jean-Daniel Dupas
Le 24 févr. 2010 à 20:36, Steve Christensen a écrit : > On Feb 24, 2010, at 11:04 AM, Bill Bumgarner wrote: > >> On Feb 23, 2010, at 8:57 PM, Steve Christensen wrote: >> That code uses blocks, though, which implies that it will be compiled using a later version of Objective-C. Will t

Re: Stuck on NSTreeController bindings

2010-02-24 Thread Jenny M
Hi Mark, Thanks so much for the tip, unfortunately that's not the case. The Delta's parent/children relationships point to fellow Deltas. It has a different relationship (a "beta") that points to the beta. The entities aren't inherited from one another, they're just chained together. Each Alpha ha

Re: Deprecated APIs

2010-02-24 Thread Greg Parker
On Feb 24, 2010, at 11:36 AM, Steve Christensen wrote: > On Feb 24, 2010, at 11:04 AM, Bill Bumgarner wrote: >> On Feb 23, 2010, at 8:57 PM, Steve Christensen wrote: That code uses blocks, though, which implies that it will be compiled using a later version of Objective-C. Will that code

Getting relative day-of-week name?

2010-02-24 Thread Rick Mann
I'd like to take an NSDate and get a relative day-of-week name. For example, if today is 2/24, and the NSDate is some time on 2/23, it would be "Yesterday." If the NSDate were 2/22, it would be "Monday." Is there an existing format specifier for this (fully localized, etc)? Or must I roll my ow

Re: Odd NSString behavior

2010-02-24 Thread Sherm Pendley
On Wed, Feb 24, 2010 at 2:30 PM, McLaughlin, Michael P. wrote: > This is just a minor glitch but I hate loose ends. > > I have a Cocoa app as a resource in my MainBundle.  If I try to get its > executable via the obvious > > NSString * linrgPath = [myBundle pathForResource: > @"linrg2.app/Contents

Re: Odd NSString behavior

2010-02-24 Thread McLaughlin, Michael P.
Thank you to all who responded. I like this solution. I also replaced myBundle with [NSBundle mainBundle] directly. On 2/24/10 3:06 PM, "Sherm Pendley" wrote: On Wed, Feb 24, 2010 at 2:30 PM, McLaughlin, Michael P. wrote: > This is just a minor glitch but I hate loose ends. > > I have a Co

Re: Getting relative day-of-week name?

2010-02-24 Thread mmalc Crawford
On Feb 24, 2010, at 12:04 pm, Rick Mann wrote: > I'd like to take an NSDate and get a relative day-of-week name. For example, > if today is 2/24, and the NSDate is some time on 2/23, it would be > "Yesterday." If the NSDate were 2/22, it would be "Monday." > > Is there an existing format speci

Application Menu - Preferences

2010-02-24 Thread David Blanton
In an NSDocument app where should or how should the Application Preferences menu item be connected? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Leak on iPhone Application start up.

2010-02-24 Thread Gustavo Pizano
Hello all. This is what I have: I have in the MainWindow.xib a UINavigationController, and the Root Controller its a custom UIViewController which in IB Im setting to load it's view form another .xib, So on IB I see UINavigationViewController's rootController's view that says "View loaded fr

Re: Application Menu - Preferences

2010-02-24 Thread Paul Bruneau
On Feb 24, 2010, at 3:28 PM, David Blanton wrote: In an NSDocument app where should or how should the Application Preferences menu item be connected? This is kind of old, and its main focus is bindings, but it gives you everything you need I think http://developer.apple.com/cocoa/cocoabi

Re: Leak on iPhone Application start up.

2010-02-24 Thread David Duncan
On Feb 24, 2010, at 12:44 PM, Gustavo Pizano wrote: > when I check with leaks I have the following: > > 0 libSystem.B.dylib malloc > ... > 14 dyld dlopen > 15 libSystem.B.dylib dlopen > 16 CoreGraphics open_handle_to_dylib_path > 17 CoreGraphics load_function > 18 CoreGraphics CGLibraryLoa

Re: Application Menu - Preferences

2010-02-24 Thread David Blanton
Good Tip. Thanks. What I was really getting at is how to set the target / action for when the item is selected. Here is what I did, so if this is way off base please let me know. I sub-classed NSMenuItem and set the Preferences menu item to this class. In the awakeFromNib I set the t

Re: Leak on iPhone Application start up.

2010-02-24 Thread Gustavo Pizano
I was worrying about it.. I hadn't tried in a device, because this app its on its earlier steps, will have to get a certificate to test it in the device.. Anyway, I guess it wont hurt reporting the bug, ... mmm.. nice question... where is the link? G On Feb 24, 2010, at 9:54 PM, David Duncan

Re: Leak on iPhone Application start up.

2010-02-24 Thread David Duncan
On Feb 24, 2010, at 1:02 PM, Gustavo Pizano wrote: > mmm.. nice question... where is the link? http://bugreport.apple.com -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: Stuck on NSTreeController bindings

2010-02-24 Thread Mark Townsend
Jenny, So, how are the Alphas and Betas displayed? Are they in NSArrayControllers? What does your UI look like? What do you want your root nodes to be? Deltas or Betas? What you might try is when you select the Alpha, call setContent: on NSTreeController passing in the Alpha.Beta.Deltas array,

Re: Application Menu - Preferences

2010-02-24 Thread Paul Bruneau
On Feb 24, 2010, at 3:58 PM, David Blanton wrote: Good Tip. Thanks. What I was really getting at is how to set the target / action for when the item is selected. Here is what I did, so if this is way off base please let me know. I sub-classed NSMenuItem and set the Preferences menu ite

Re: Application Menu - Preferences

2010-02-24 Thread Graham Cox
On 25/02/2010, at 7:28 AM, David Blanton wrote: > In an NSDocument app where should or how should the Application Preferences > menu item be connected? In general, it should be connected to First Responder (in fact nil) to an action of your choice. Then that action can be implemented where it

Re: Getting relative day-of-week name?

2010-02-24 Thread Rick Mann
On Feb 24, 2010, at 12:22:56, mmalc Crawford wrote: > > On Feb 24, 2010, at 12:04 pm, Rick Mann wrote: > >> I'd like to take an NSDate and get a relative day-of-week name. For example, >> if today is 2/24, and the NSDate is some time on 2/23, it would be >> "Yesterday." If the NSDate were 2/2

Re: Application Menu - Preferences

2010-02-24 Thread Quincey Morris
On Feb 24, 2010, at 12:58, David Blanton wrote: > What I was really getting at is how to set the target / action for when the > item is selected. Here is what I did, so if this is way off base please let > me know. > > I sub-classed NSMenuItem and set the Preferences menu item to this class.

Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
I've purchased apps from other developers on this forum, which have mechanisms for limiting functionality until a valid registration code has been provided. I'd like to include this functionality in my own app but don't want to create it from scratch if I don't have to. To that end, I'm lookin

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Sherm Pendley
On Wed, Feb 24, 2010 at 4:54 PM, Michael A. Crawford wrote: > I've purchased apps from other developers on this forum, which have > mechanisms for limiting functionality until a valid registration code has > been provided.  I'd like to include this functionality in my own app but > don't want t

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Graham Cox
On 25/02/2010, at 9:00 AM, Sherm Pendley wrote: > I've heard good things about Aquatic Prime: AP is certainly very easy to use, but it's also extremely weak, and has already been widely cracked, so you might want to take that into account. --Graham __

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Gleb Dolgich
On 24 Feb 2010, at 21:54, Michael A. Crawford wrote: > I've purchased apps from other developers on this forum, which have > mechanisms for limiting functionality until a valid registration code has > been provided. I'd like to include this functionality in my own app but > don't want to creat

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
Thanks, Sherm. I'm not a fan either. This is a client request. -Michael On Feb 24, 2010, at 5:00 PM, Sherm Pendley wrote: > On Wed, Feb 24, 2010 at 4:54 PM, Michael A. Crawford > wrote: >> I've purchased apps from other developers on this forum, which have >> mechanisms for limiting function

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Paul Sanders
I rolled my own. I was not about to put all that effort into developing the app and have someone steal my work from under my nose. For validating the license key, I would recommend some form of digital signature rather than just a simple checksum. I used a checksum first time around and it wa

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread jonat...@mugginsoft.com
> > Not really a Cocoa question... Don't know where else you'd ask it though. > The macsb group has this topic discussed to death. http://tech.groups.yahoo.com/group/macsb/ IMHO all code is mutable. Regards Jonathan Mitchell Developer http://www.mugginsoft.com ___

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
Thanks for the pointer to the more appropriate group. I'll go check it out. -Michael On Feb 24, 2010, at 5:37 PM, jonat...@mugginsoft.com wrote: > >> >> Not really a Cocoa question... Don't know where else you'd ask it though. >> > The macsb group has this topic discussed to death. > > htt

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
Jeez, Paul, thanks for the thorough answer. I'm not new to public/private key encryption or digital sigs, I was just hoping not to have to do it myself. Due to the extra time involved. Still, if this is what the client wants, I'm obliged to get it done. Part of your response suggests that if

Re: Application Menu - Preferences

2010-02-24 Thread Graham Cox
On 25/02/2010, at 9:39 AM, Gabriel Fernandez wrote: > Okay, I'm a skeptical person, so I have to ask why isn't there a > "preferences" method in the FirstResponder IB object to begin with? > But more to the point, how do I get a reference to the application delegate > instance? > First Respon

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Jens Alfke
On Feb 24, 2010, at 2:57 PM, Michael A. Crawford wrote: Part of your response suggests that if there was an existing framework that was openly available, it wouldn't do me any good because the bad guys would have the source code. I don't know if that is your thinking but this thought had

Re: Application Menu - Preferences

2010-02-24 Thread Graham Cox
On 25/02/2010, at 11:28 AM, Gabriel Fernandez wrote: > But if it doesn't exist, then why not bind Menu->Preferences to the > Application Delegate's custom -( IBAction ) preferences: method? Yep, that would work OK. > I guess I don't know how to use First Responder to call the Application >

Re: Stuck on NSTreeController bindings

2010-02-24 Thread Jenny M
Hi Mark, Well, the Alpha is in an NSArrayController. There's a dropdown that selects the proper Alpha. The Beta, right now, is just a pass-through to the Deltas, maybe I shouldn't have it, but in terms of the real-life objects, it needs to be there. So there's a popup box for Alphas, then I want a

Re: Getting relative day-of-week name?

2010-02-24 Thread Jon Hull
I wrote a fully localized calendar control for 10.2 (even supported Japanese properly :-), but stopped supporting it when apple came out with their own official calendar control. At the time I had to roll my own to get the best behavior. It is really easy to do though... For yesterday, today, an

Re: Getting relative day-of-week name?

2010-02-24 Thread Rick Mann
Thanks, Jon. That's exactly what I did, except for the rules around when to change formats, and this, which I don't understand: "For yesterday, today, and tomorrow you just use the built in natural language formatter." Which formatter is this? On Feb 24, 2010, at 17:08:14, Jon Hull wrote: > I

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Graham Lee
On 24 Feb 2010, at 22:57, Michael A. Crawford wrote: > Part of your response suggests that if there was an existing framework that > was openly available, it wouldn't do me any good because the bad guys would > have the source code. I disagree. If it's based on a tried and tested (and occasiona

Re: Application Menu - Preferences

2010-02-24 Thread David Blanton
First, thanks to all for a great discussion / learning experience ! It seems cleaner to me to put the preferences window in a separate NIB and have the app delegate create the window controller that loads the separate NIB. Is the approach I have taken ... works great ! On Feb 24, 2010, at

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Jens Alfke
On Feb 24, 2010, at 5:27 PM, Graham Lee wrote: I disagree. If it's based on a tried and tested (and occasionally formally verified) crypto system, knowing the algorithm doesn't lead to a crack. Weaknesses would come through bugs in the framework (or incorrect application of it), and the mo

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael Ash
On Wed, Feb 24, 2010 at 5:05 PM, Graham Cox wrote: > > On 25/02/2010, at 9:00 AM, Sherm Pendley wrote: > >> I've heard good things about Aquatic Prime: > > > AP is certainly very easy to use, but it's also extremely weak, and has > already been widely cracked, so you might want to take that into

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Greg Parker
On Feb 24, 2010, at 5:27 PM, Graham Lee wrote: > On 24 Feb 2010, at 22:57, Michael A. Crawford wrote: >> Part of your response suggests that if there was an existing framework that >> was openly available, it wouldn't do me any good because the bad guys would >> have the source code. > > I disag

Menu Delegate methods: Lazy or non-lazy Precedence?

2010-02-24 Thread Jerry Krinock
If the delegate of an NSMenu implements both the lazy-populating methods: numberOfItemsInMenu: menu:updateItem:atIndex:shouldCancel: as well as the non-lazy populating method menuNeedsUpdate: Which one gets the delegate messages? Yesterday I found that it was the non-lazy method, but

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Chris Williams
This can be quite a religious argument, but speaking from experience of code that's been rigorously hacked time and again, the only effective way to disable parts of your code is to not have that code in the executable. E.G. a compile a demo version, and a real licensed version. Having code ex

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Graham Lee
On 25 Feb 2010, at 01:41, Greg Parker wrote: > On Feb 24, 2010, at 5:27 PM, Graham Lee wrote: >> On 24 Feb 2010, at 22:57, Michael A. Crawford wrote: >>> Part of your response suggests that if there was an existing framework that >>> was openly available, it wouldn't do me any good because the ba

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Graham Lee
On 25 Feb 2010, at 01:45, Chris Williams wrote: > Having code execute dependent on some switch, regardless of the number or > sophistication of the switches, can be hacked. But then once you sell the licensed version you've given it to someone who might distribute it on, so that's not foolproof

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Greg Guerin
Michael A. Crawford wrote: Jeez, Paul, thanks for the thorough answer. I'm not new to public/ private key encryption or digital sigs, I was just hoping not to have to do it myself. Due to the extra time involved. Still, if this is what the client wants, I'm obliged to get it done. Anot

Suppress or Fix Inverse Relationship Warnings

2010-02-24 Thread Steve Steinitz
Hello, After research and reflection I decided to remove some troublesome inverse relationships from the Core Data model in my multi-machine application. I've taken steps to avoid database integrity issues and have written accessors to preserve the data embodied in the removed relationships.

How to call on id

2010-02-24 Thread David Blanton
I have an ivar tyoed as id as id m_view at some point m_view gets set to a particular view I would like to send messages to m_view as [m_view selector] but since it is not typed I get the message 'struct objc_object' has no member named 'selector' How does one work with / around this

Re: Stop editing session of NSTextField

2010-02-24 Thread Erik Buck
send [[textField window] makeFirstResponder:[textField window]]; to finish any editing in progress in textField or any other text field within the window. or see "Forcing the End of Editing" at http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/TextEditing/Tasks/BatchEditing.h

Re: How to call on id

2010-02-24 Thread Graham Cox
On 25/02/2010, at 2:31 PM, David Blanton wrote: > I have an ivar tyoed as id as > > idm_view > > at some point m_view gets set to a particular view > > I would like to send messages to m_view as [m_view selector] but since it is > not typed I get the message > > 'struct objc_object' has

Re: How to call on id

2010-02-24 Thread David Blanton
I misspoke earlier. What I want to do is access an an ivar in m_view such as m_cpp wher m_cpp is an instance of a C++ class and then call functions on m_cpp such as m_view->m_cpp.Function() but I get 'struct objc_object' has no member named 'm_cppr' My apologies for not being precise earl

Re: How to call on id

2010-02-24 Thread Andrew Farmer
On 24 Feb 2010, at 19:43, David Blanton wrote: > I misspoke earlier. > > What I want to do is access an an ivar in m_view such as m_cpp wher m_cpp is > an instance of a C++ class and then call functions on m_cpp such as > > m_view->m_cpp.Function() > > but I get 'struct objc_object' has no memb

Re: How to call on id

2010-02-24 Thread Graham Cox
On 25/02/2010, at 2:43 PM, David Blanton wrote: > I misspoke earlier. > > What I want to do is access an an ivar in m_view such as m_cpp wher m_cpp is > an instance of a C++ class and then call functions on m_cpp such as > > m_view->m_cpp.Function() > > but I get 'struct objc_object' has no m

Re: How to call on id

2010-02-24 Thread David Blanton
Yeah! 2) looks like the answer ... I am trying now ... Thanks! -db On Feb 24, 2010, at 8:52 PM, Andrew Farmer wrote: On 24 Feb 2010, at 19:43, David Blanton wrote: I misspoke earlier. What I want to do is access an an ivar in m_view such as m_cpp wher m_cpp is an instance of a C++ class

RE: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Jeff Laing
> > Part of your response suggests that if there was an existing > framework that was openly available, it wouldn't do me any good because > the bad guys would have the source code. > > I disagree. If it's based on a tried and tested (and occasionally > formally verified) crypto system, knowing th

Embedded frameworks and hard links

2010-02-24 Thread Ashley Clark
I've been using an embedded framework in a couple of my apps for database access. I've recently created an Automator action which also embeds this framework, built from within the same project. This Automator action is, in turn, then embedded within the app bundle also. Now at this point, there

Re: Embedded frameworks and hard links

2010-02-24 Thread Sherm Pendley
On Wed, Feb 24, 2010 at 11:58 PM, Ashley Clark wrote: > I've been using an embedded framework in a couple of my apps for database > access. I've recently created an Automator action which also embeds this > framework, built from within the same project. This Automator action is, in > turn, then

Re: Embedded frameworks and hard links

2010-02-24 Thread Stephen J. Butler
On Wed, Feb 24, 2010 at 10:58 PM, Ashley Clark wrote: > I've manually replaced the contents of the duplicate framework in the action > with hard links to the other embedded framework and it works well but I'm > wondering if there's some automated way to do this already that I'm missing. There w

Re: Embedded frameworks and hard links

2010-02-24 Thread Ashley Clark
On Feb 25, 2010, at 12:12 AM, Stephen J. Butler wrote: > On Wed, Feb 24, 2010 at 10:58 PM, Ashley Clark wrote: >> I've manually replaced the contents of the duplicate framework in the action >> with hard links to the other embedded framework and it works well but I'm >> wondering if there's som

NSColorPanel changeColor not called

2010-02-24 Thread David Blanton
changeColor is listed as a delegate method for NSColorPanel Here is my code - (IBAction)color:(id)sender { NSColorPanel* cp; cp = [NSColorPanel sharedColorPanel]; [cp setDelegate:self]; [cp setContinuous:YES]; NSLog(@"%@",[cp delegate]); [NSApp ru

Re: NSColorPanel changeColor not called

2010-02-24 Thread Graham Cox
On 25/02/2010, at 5:44 PM, David Blanton wrote: > Am I missing something obvious? Generally apps don't run the color panel modally. I believe there is a way to do it, I've seen it in some apps with an added OK/Cancel button, though it seems rare and weird. It may be that running it this way w

Re: NSColorPanel changeColor not called

2010-02-24 Thread David Blanton
Well, no. I have run it modal from a modal panel non-modal from a modal panel non-modal from a non-modal panel changeColor is never called. I am stumped and going to pour a glass of wine and play a game of chess ! - db On Feb 24, 2010, at 11:53 PM, Graham Cox wrote

Re: NSColorPanel changeColor not called

2010-02-24 Thread Graham Cox
Ah, your reply prompted me to review the documentation, which I believe is in error. It's not the delegate that gets sent this message, it's the panel's target. use -setTarget: instead. -changeColor: is also sent to the responder chain regardless. The documentation lists -changeColor: under "d

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Brian Postow
On Feb 24, 2010, at 5:23 PM, Paul Sanders wrote: > > Not really a Cocoa question... Don't know where else you'd ask it though. I've been having good luck with getting general programming questions answered on www.stackoverflow.com... Brian Postow Senior Software Engineer Acordex Imaging Sy

Re: Application Menu - Preferences

2010-02-24 Thread Gabriel Fernandez
Okay, I'm a skeptical person, so I have to ask why isn't there a "preferences" method in the FirstResponder IB object to begin with? But more to the point, how do I get a reference to the application delegate instance? Thanks, Gabe > > -- > > Message: 16 > Date: T

Re: Application Menu - Preferences

2010-02-24 Thread Gabriel Fernandez
On Feb 24, 2010, at 5:58 PM, Graham Cox wrote: > > The application delegate is a real object, but you have to create it by > adding it to the nib and connecting it up to the 'delegate' outlet of the > application. Typically you do that by subclassing NSObject and so drag an > NSObject icon in