Re: Positioning of autocomplete popups

2009-06-12 Thread Dave Robertson
Ross, Thanks for your comments. I agree the autocomplete popup looks curiously unpolished compared to other system popup menus. I've implemented the approach you suggest, and can populate an NSPopuButton menu with my completion candidates. This works well up until the user types another

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Gerriet M. Denkmann
On 11 Jun 2009, at 18:55, Graham Cox graham@bigpond.com wrote: On 12/06/2009, at 2:08 AM, Arun wrote: Hi All, Is there any API in cocoa which can be used to fetch computer name which is getting displayed in Finder? I'm not sure if there's a better way, but you can use the Gestalt

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Graham Cox
On 12/06/2009, at 4:24 PM, Gerriet M. Denkmann wrote: On 11 Jun 2009, at 18:55, Graham Cox graham@bigpond.com wrote: On 12/06/2009, at 2:08 AM, Arun wrote: Hi All, Is there any API in cocoa which can be used to fetch computer name which is getting displayed in Finder? I'm not sure

Re: NSView directly drawn on screen?

2009-06-12 Thread Chunk 1978
NSBorderlessWindowMask (i think that's what it's called) is what you're looking for. Apple supplies a sample app here: http://developer.apple.com/samplecode/RoundTransparentWindow/index.html On Fri, Jun 12, 2009 at 1:51 AM, John Kujohn.c...@gmail.com wrote: What I am trying to achieve is like

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Tito Ciuro
Hi Arun, How about -[NSProcessInfo hostname]? Check the following document for more info: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSProcessInfo_Class/Reference/Reference.html Regards, -- Tito On Jun 11, 2009, at 11:58 PM, Graham Cox wrote: On

Re: NSView directly drawn on screen?

2009-06-12 Thread John Ku
Thank you, I had that implemented. The problem still persist where my subclass of NSWindow gets focused and deactivates the current running program's window. I want to have NSWindow to get keyboard/mouse events and still not deactivate/lose focus of your current running application. Let's say I

Re: Passing References During Initialization / Nib Loading

2009-06-12 Thread Michael Ash
On Thu, Jun 11, 2009 at 10:10 PM, Quincey Morrisquinceymor...@earthlink.net wrote: On Jun 11, 2009, at 18:05, Brad Gibbs wrote: Why not just use a singleton [[MainWindowController sharedWindowController] switchToView:[menuItems objectAtIndex:[menuItemsArrayController selectionIndex]] ?

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Gerriet M. Denkmann
On 12 Jun 2009, at 08:58, Graham Cox wrote: On 12/06/2009, at 4:24 PM, Gerriet M. Denkmann wrote: On 11 Jun 2009, at 18:55, Graham Cox graham@bigpond.com wrote: On 12/06/2009, at 2:08 AM, Arun wrote: Hi All, Is there any API in cocoa which can be used to fetch computer name which

Re: [NSTask] -launch return

2009-06-12 Thread M Pulis
On Jun 11, 2009, at 12:29 AM, ERG Consultant wrote: Do you know anything at all about how os'es work? THANK YOU FOR ASKING! See below for details. Yes. For example, Rosetta is not an OS. It is scheduled by the OS. I was also in attendance at WWDC when they introduced Rosetta. Given my

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Gerriet M. Denkmann
On 12 Jun 2009, at 09:08, Tito Ciuro wrote: Hi Arun, How about -[NSProcessInfo hostname]? Check the following document for more info: I just added this to my code: NSProcessInfo *pi = [ [ NSProcessInfo alloc ] init ]; NSString *d = [ pi hostName ];

Re: [NSTask] -launch return

2009-06-12 Thread M Pulis
On Jun 11, 2009, at 12:30 AM, ERG Consultant wrote: Ps: at least by paying DTS I will get a CORRECT answer. Exactly why I was one of those suggesting you contact DTS! Short on memory, yes? I also took the time to suggest that you present a business case to Apple. Especially if you

Re: NSView directly drawn on screen?

2009-06-12 Thread Chunk 1978
if you don't want your apps window to become focused, you have to return NO on canBecomeKeyWindow, but if you want it to appear above the other windows, you should set it's level higher. here's some code you can use as a guide: -=-=-=-=- #import DesktopWindow.h @implementation DesktopWindow -

Re: Passing References During Initialization / Nib Loading

2009-06-12 Thread Quincey Morris
On Jun 12, 2009, at 00:27, Michael Ash wrote: Singleton-ness is a property of the API, not the implementation. If the API provides a single instance which you use, then it's a singleton. Enforcing that single instance is entirely up to the implementation of the API. It's not a necessary feature

Discloser triangle

2009-06-12 Thread cocoa learner
Hi All, I want to use some advance options as Discloser triangle. If user clicks the Discloser triangle then he/she should see the advance options (some controls like buttons, tabview etc) with resized window (i mean when the Discloser Triangle is not clicked then window should be small and when

Re: Doc kind from extension

2009-06-12 Thread Micha Fuhrmann
Sidney thanks, Will this still be available in Snow Leopard? Michael On 11 juin 09, at 18:17, Sidney San Martín wrote: How about this? CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, CFSTR(pdf), NULL); NSString *name =

dumb question

2009-06-12 Thread Chunk 1978
maybe this coffee hasn't kicked in yet and undoubtedly there is a simple solution, but i'm trying unsuccessfully to refactor some code, and i'd like to set the following as a static or define instead of having it written several times in several methods -=-=-=- CGRect fullScreenRect = [[UIScreen

Launching agents .

2009-06-12 Thread rethish
Hi, I need to launch TextEdit Application on a specified time. I created schedule application which create a plist file consisting of three property keys : label , Program argument, startcalendarinterval. and save it in the /Library/LaunchDaemons folder. But it is not working. Then i saved the

Re: dumb question

2009-06-12 Thread Chunk 1978
not yet, just the one class... i assume to use it in other classes i would simply import the class that has the static definition... just don't know how to write the static definition. On Fri, Jun 12, 2009 at 6:41 AM, Arie Pieter Cammeraatcocoa-...@yaranga.nl wrote: do you also use it across

problems with scripting

2009-06-12 Thread Vitaly Ovchinnikov
Hello, I completely stumped with allowing my application to be called from apple-script. After reading of apple docs, I added simple sdef file and two keys to info.plist. Sdef file contains only standard suite and nothing added by me, but even with this I can't run the simplest script like this

Re: Get|SetControlProperty() equivalent

2009-06-12 Thread Jo Meder
Hi Michael, Michael Vannorsdel wrote: Subclass NSView and use poseAsClass to replace the default implementation. You'll need to do the posing before running NSApplicationMain. You'll have to use a different approach if you're building for 64-bit. That's intriguing. I thought with the

Re: Foundation tool NSUserDefault

2009-06-12 Thread KK
Yes... I see. Thank you. My other question is, can you change where this .plist file goes? My tool runs as root, so when I use NSUserDefaults, it saves the .plist file in /private/var/root/Library/Preferences, but I would prefer that it go right in /Library/Preferences ... is this possible? On

view drawing differences between Tiger and Leopard ?

2009-06-12 Thread vinai
Hi Folks, In my application, I am reading some data from a file on disk, processing it, and sending that computed array through the NSImageRepresentation - NSImage - NSImageView - NSWindow chain for viewing. After the data is processed, I call [myView setNeedsDisplay: YES]; [myView

is setFrame as optimal as setNeedsDisplayInRect?

2009-06-12 Thread Chunk 1978
with a drag method, i'm continuously setting the frames of 2 views by evoking the setFrame method. while setting a frames of these views, are their superview being redrawn aswell, or just the area of the screen where the frame of the view is being reset?

Re: Launching agents .

2009-06-12 Thread Jerry Krinock
On 2009 Jun 12, at 03:39, rethish wrote: what is the reason for this behaviour? Actually, we answered this for you last week http://www.cocoabuilder.com/archive/message/cocoa/2009/6/4/238136 I'll explain in more detail. The problem you are seeing is that a newly-installed launchd

Re: problems with scripting

2009-06-12 Thread Arjun SM
My application has opened documents, but script returns can't get name of document 1. i think you should change your Applescript. tell application MyApp mention the command (verb) here end tell Command is the one that you have mentioned in the .Sdef file . In your Xcode when

Re: dumb question

2009-06-12 Thread WT
I have the following in a project of mine, in a file Constants.h, which I import as needed from other source files: #define kAppFrame ([UIScreen mainScreen].applicationFrame) #define kScreenWidth([UIScreen mainScreen].bounds.size.width) #define kScreenHeight

Re: [NSTask] -launch return

2009-06-12 Thread Scott Ribe
Do you know anything at all about how os'es work? Look, if the user doesn't launch another PPC process, you have only 2 choices: - take the hit of Rosetta launch in advance - wait for Rosetta when you launch your process Being rude to people who are trying to help you will not magically

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Bill Monk
On Jun 12, 2009, at 5:43 AM, Gerriet M. Denkmann wrote: StringPtr c = (void *)response; NSUInteger cle = *c; char *cu = malloc( cle + 1); memcpy( cu, c + 1, cle); cu[cle] = '\0'; NSLog(@%s

Re: How to tell if a Panel is Open [solved]

2009-06-12 Thread Scott Ribe
Thanks to those who helped me with this question. The solution was to use NSWindow's -attachedSheet method, and (in my case), check for nil. If nil, there is no attached sheet; if not nil, there is an attached sheet. Yes there's a call for that so you don't need to carry around a state

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Adam R. Maxwell
On Jun 12, 2009, at 12:37 AM, Gerriet M. Denkmann wrote: Amazing how many ways to get a hostname do exist! There is also NSHost, which has -name and -names. smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list

What's wrong with my NSMutableArray?

2009-06-12 Thread Allan Greenier
This is so simple I know the answer will embarrass me. This is an iPhone app. I've got an NSMutable array declared in my EAGLview.h file NSMutableArray *boxes; I init and fill it in the EAGLview's initWithCoder method boxes = [NSMutableArray arrayWithCapacity:NUM_BOXES];

What's wrong with my NSMutableArray

2009-06-12 Thread Allan Greenier
This is so simple I know the answer will embarrass me. I've got an NSMutable array declared in my EAGLview.h file NSMutableArray *boxes; I init and fill it in the EAGLview's initWithCoder method boxes = [NSMutableArray arrayWithCapacity:NUM_BOXES];

Re: What's wrong with my NSMutableArray?

2009-06-12 Thread Dave DeLong
You're not initing the NSMutableArray. You're using a convenience constructor, and it's returning an autoreleased object. What's probably happening is that the autoreleased object is getting deallocated via a popped autorelease pool. Try changing the line to be: boxes = [[NSMutableArray

Re: What's wrong with my NSMutableArray?

2009-06-12 Thread Devon Ferns
You need to retain your array since arrayWithCapacity returns an autoreleased object. And in dealloc, release the array, and set to nil if you want to but not necessary. Devon Allan Greenier wrote: This is so simple I know the answer will embarrass me. This is an iPhone app. I've got an

Re: What's wrong with my NSMutableArray?

2009-06-12 Thread Allan Greenier
Thanks Devon. On Jun 12, 2009, at 10:46 AM, Devon Ferns wrote: You need to retain your array since arrayWithCapacity returns an autoreleased object. And in dealloc, release the array, and set to nil if you want to but not necessary. Devon

Delayed Framework Loading

2009-06-12 Thread Dong Feng
Is there a way to make a framework not loaded until the first invocation to one of its functions? I know there is a way, that is, to not link the framework to the executable, but use CFURLCreateWithFileSystemPath(). However, this way, you have to resolve all functions you are going to use one by

Re: view drawing differences between Tiger and Leopard ?

2009-06-12 Thread Dave Fernandes
This was a problem with NSImageView on Tiger. My workaround is to call [imageView setImage:nil] and then [imageView setImage:myImage]. This will cause a flicker, but your image will be redrawn. Not sure if anyone else has a better workaround. Dave On Jun 12, 2009, at 7:32 AM, vinai wrote:

Re: Doc kind from extension

2009-06-12 Thread Sidney San Martín
I would hope so! Neither of those functions are marked as deprecated in the docs, so they're not going anywhere soon. -Sidney On Fri, Jun 12, 2009 at 6:21 AM, Micha Fuhrmannmic...@mac.com wrote: Sidney thanks, Will this still be available in Snow Leopard? Michael On 11 juin 09, at 18:17,

Re: Doc kind from extension

2009-06-12 Thread Nick Zitzmann
On Jun 12, 2009, at 4:21 AM, Micha Fuhrmann wrote: Will this still be available in Snow Leopard? The only people who can answer that are under NDA, but... Why wouldn't it be available, unless it's been deprecated for years? Nick Zitzmann http://www.chronosnet.com/

Re: is setFrame as optimal as setNeedsDisplayInRect?

2009-06-12 Thread Michael Ash
On Fri, Jun 12, 2009 at 7:48 AM, Chunk 1978chunk1...@gmail.com wrote: with a drag method, i'm continuously setting the frames of 2 views by evoking the setFrame method.  while setting a frames of these views, are their superview being redrawn aswell, or just the area of the screen where the

Re: Foundation tool NSUserDefault

2009-06-12 Thread Sidney San Martín
To get that level of control, you'll need to use CFPreferences: CFPreferencesSetValue(key, value, bundleID, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); if(!CFPreferencesAppSynchronize(bundleID)){ // Handle failure } -Sidney On Fri, Jun 12, 2009 at 7:18 AM, KKkthem...@gmail.com

Re: problems with scripting

2009-06-12 Thread Matt Neuburg
On Fri, 12 Jun 2009 14:45:48 +0400, Vitaly Ovchinnikov vitaly.ovchinni...@gmail.com said: Hello, I completely stumped with allowing my application to be called from apple-script. After reading of apple docs, I added simple sdef file and two keys to info.plist. Sdef file contains only standard

Re: Passing References During Initialization / Nib Loading

2009-06-12 Thread Michael Ash
On Fri, Jun 12, 2009 at 4:13 AM, Quincey Morrisquinceymor...@earthlink.net wrote: On Jun 12, 2009, at 00:27, Michael Ash wrote: Singleton-ness is a property of the API, not the implementation. If the API provides a single instance which you use, then it's a singleton. Enforcing that single

Re: Passing References During Initialization / Nib Loading

2009-06-12 Thread Brad Gibbs
There's a great macro available for creating singletons on the cocoa with love blog. It's dead simple to use and it does override init and copy methods to make sure only one instance is created. On Jun 12, 2009, at 8:50 AM, Michael Ash michael@gmail.com wrote: On Fri, Jun 12, 2009 at

Re: Discloser triangle

2009-06-12 Thread Kyle Sluder
On Fri, Jun 12, 2009 at 2:16 AM, cocoa learnercocoa.lear...@gmail.com wrote: I do not understand how to achieve this effect. I'd wire up the disclosure triangle's target/action to a method on my window controller. Something like -[MyWindowController showAdvancedOptions:]. This method would in

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Eric Schlegel
On Jun 12, 2009, at 7:14 AM, Adam R. Maxwell wrote: There is also NSHost, which has -name and -names. However, be aware that [[NSHost currentHost] name] can block for an exceedingly long time, so if you use it, always call it on a thread; and some of other API recommended here, such as

Re: Questions on using using modal sheets with Core Data

2009-06-12 Thread Kevin Ross
I adapted the examples in the NSPersistentDocument tutorial, and this works great. The problem I'm having is with some of the state management because some of the properties are dependent upon others. I'll try to explain how the relationship works. Let's say we have 2 objects in the

Re: Delayed Framework Loading

2009-06-12 Thread Kyle Sluder
dyld (the OS X dynamic linker) already does this. You have to specify DYLD_BIND_AT_LAUNCH to get different behavior. --Kyle Sluder -- --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Hiding Glyphs

2009-06-12 Thread Philip White
On Jun 5, 2009, at 5:12 PM, Douglas Davidson wrote: As I understand it, what you want to do is not to affect layout at all, but simply to cause certain glyphs not to be displayed. In general this can be problematic, because without knowledge of the font involved one can't necessarily

Re: State of the Union videos?

2009-06-12 Thread Bryan Henry
Last year's session videos were posted to ADC on iTunes in February of this year, so I wouldn't hold your breath for seeing them anytime soon. ADC on iTunes: http://developer.apple.com/adconitunes - Bryan On Jun 12, 2009, at 10:32 AM, Todd Heberlein wrote: Does anyone know if/when Apple

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Greg Guerin
Eric Schlegel wrote: However, be aware that [[NSHost currentHost] name] can block for an exceedingly long time, so if you use it, always call it on a thread; and some of other API recommended here, such as SCDynamicStoreCopyComputerName, is probably a better choice. And beware that

Method Signature Problem.

2009-06-12 Thread Joshua Garnham
I am getting the Error/Warning about a part of my code saying 'Messages Without A Matching Method Signature will be assumed to return 'id' and accept '…' as arguments.)' I do not understand why I am getting this error, so please help, below is a link to that part of code in the implementation

Missing something about initialization

2009-06-12 Thread Alfonso Ortega
I'm trying to parse a bit of html and use it to initialize an object. I have very little background in objective-c, everything parses correctly, I just can't seem to get the object initialized. What am I doing wrong? -(id)initWithNavcenRow:(NSString *)row { NSScanner *rowScanner =

Re: dumb question

2009-06-12 Thread Arie Pieter Cammeraat
do you also use it across several classes? Op 12-jun-2009, om 12:36 heeft Chunk 1978 het volgende geschreven: maybe this coffee hasn't kicked in yet and undoubtedly there is a simple solution, but i'm trying unsuccessfully to refactor some code, and i'd like to set the following as a static

Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed

2009-06-12 Thread Florian Witteler
Hi all! I would like to know, how you experiences cocoa-developers would handle the drawing in a solitaire-game. I have two general questions: 1) Would you use interface-builder files to lay out all the things like - whole gametable with stacks of cards - stacks of cards - the card itself

Re: Method Signature Problem.

2009-06-12 Thread Kyle Sluder
Read the error message. It's saying I couldn't find a method with this name. I'll still compile your code, but it better look like what I'm assuming it looks like, or else you're going to blow up at runtime. You need to declare the method somewhere, and that declaration must either be in every

Re: Method Signature Problem.

2009-06-12 Thread Bill Bumgarner
On Jun 11, 2009, at 10:03 AM, Joshua Garnham wrote: I am getting the Error/Warning about a part of my code saying 'Messages Without A Matching Method Signature will be assumed to return 'id' and accept '…' as arguments.)' I do not understand why I am getting this error, so please help, below

Re: How can we mount and unmount dmg files on MAC OS X?

2009-06-12 Thread Nick Zitzmann
On Jun 12, 2009, at 3:01 AM, vvvsn murthy wrote: i want to know whether there are any APIs to mount and unmount the disk images? There are, but they're in a black box. You're best off just using hdiutil. Nick Zitzmann http://www.chronosnet.com/

Re: How can we mount and unmount dmg files on MAC OS X?

2009-06-12 Thread Sidney San Martín
Unfortunately, the DiskImages framework is private, so there is no API to interact with them. You'll have to use an NSTask to interact with hdiutil... and it wouldn't be a bad idea to file a bug suggesting that the DiskImages framework be made public. -Sidney On Fri, Jun 12, 2009 at 5:01 AM,

Re: How can we mount and unmount dmg files on MAC OS X?

2009-06-12 Thread Kyle Sluder
On Fri, Jun 12, 2009 at 2:01 AM, vvvsn murthyvaddadi.mur...@gmail.com wrote: I am new to Cocoa Framework.I want to know  how to mount and unmount dmg files programmatically using cocoa framework.I have worked with command line options but i want to know whether there are any APIs to mount and

Re: Missing something about initialization

2009-06-12 Thread Dave DeLong
You need the [super init] stuff in there. Dave On Jun 12, 2009, at 2:54 AM, Alfonso Ortega wrote: I'm trying to parse a bit of html and use it to initialize an object. I have very little background in objective-c, everything parses correctly, I just can't seem to get the object

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed

2009-06-12 Thread Kyle Sluder
On Thu, Jun 11, 2009 at 11:04 AM, Florian Wittelerflorian_witte...@gmx.de wrote: 1) Would you use interface-builder files to lay out all the things like - whole gametable with stacks of cards - stacks of cards - the card itself (background image and some icon with text) or would you handle

Re: How can we mount and unmount dmg files on MAC OS X?

2009-06-12 Thread KK
I'm not sure if there are any APIs, but you can use hdiutil man hdiutil On Fri, Jun 12, 2009 at 5:01 AM, vvvsn murthy vaddadi.mur...@gmail.comwrote: Hi, I am new to Cocoa Framework.I want to know how to mount and unmount dmg files programmatically using cocoa framework.I have worked with

Re: problems with scripting

2009-06-12 Thread Vitaly Ovchinnikov
Hello Matt, I finally did something using the following suite definition: suite name=My Suite code=mysu class name=document code=docu description=my project plural=document inherits=document cocoa class=MyDocument/ property name=source code=snam

Re: Missing something about initialization

2009-06-12 Thread Ken Thomases
On Jun 12, 2009, at 4:54 AM, Alfonso Ortega wrote: I'm trying to parse a bit of html and use it to initialize an object. I have very little background in objective-c, everything parses correctly, I just can't seem to get the object initialized. What am I doing wrong? You're not invoking

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed

2009-06-12 Thread Nick Zitzmann
On Jun 11, 2009, at 12:04 PM, Florian Witteler wrote: 1) Would you use interface-builder files to lay out all the things like - whole gametable with stacks of cards - stacks of cards - the card itself (background image and some icon with text) or would you handle all the drawing by yourself?

Re: view drawing differences between Tiger and Leopard ?

2009-06-12 Thread vinai
Dave, I'll give it a try and report back to the list if that is indeed what's going on. Thanks for the tip. cheers vinai --- On Fri, 6/12/09, Dave Fernandes dave.fernan...@utoronto.ca wrote: This was a problem with NSImageView on Tiger. My workaround is to call [imageView setImage:nil]

Re: Missing something about initialization

2009-06-12 Thread Scott Andrew
A couple of things: You are not retaining your values after retrieved (slot, svn, prn, clock, block). These are auto released and will be released the the next time the pool is cleaned up. (assuming you are not using garbage collection). Not sure what your class is subclassed from, but if

Re: Delayed Framework Loading

2009-06-12 Thread Dong Feng
I tried to launch without this flag, or with this flag set to 0. Either way, it seems the function with __attribute__((constructor)) is always invoked at launch time, that is, no delay load. 2009/6/13 Kyle Sluder kyle.slu...@gmail.com: dyld (the OS X dynamic linker) already does this.  You

Re: Questions on using using modal sheets with Core Data

2009-06-12 Thread Dave Fernandes
Kevin, You'll have to say a bit more about how you adapted the example. Do you create a new MOC and create new objects within it with attributes copied from the document MOC? Is there a Core Data relationship between these two new objects? What do you mean by dependent on others and

Re: Missing something about initialization

2009-06-12 Thread Ken Thomases
On Jun 12, 2009, at 1:27 PM, Scott Andrew wrote: You are not retaining your values after retrieved (slot, svn, prn, clock, block). These are auto released and will be released the the next time the pool is cleaned up. slot, svn, and prn are apparently integers. They are scalar values,

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Gerriet M. Denkmann
On 12 Jun 2009, at 15:21, Bill Monk wrote: On Jun 12, 2009, at 5:43 AM, Gerriet M. Denkmann wrote: StringPtr c = (void *)response; NSUInteger cle = *c; char *cu = malloc( cle + 1); memcpy( cu, c + 1, cle);

Re: problems with scripting

2009-06-12 Thread Matt Neuburg
On or about 6/12/09 11:21 AM, thus spake Vitaly Ovchinnikov vitaly.ovchinni...@gmail.com: MyDocument is derived from NSDocument and has property sourceFile and method - (id) handleDoSomethingScriptCommand: (NSScriptCommand *) cmd {NSLog(@got it); return nil; } I wrote a simple script: tell

Re: Missing something about initialization

2009-06-12 Thread Scott Andrew
Duh.. Should read the code that says intValue mind went to assignment and didnt finish reading the lines. Scott On Jun 12, 2009, at 11:21 AM, Ken Thomases wrote: On Jun 12, 2009, at 4:54 AM, Alfonso Ortega wrote: I'm trying to parse a bit of html and use it to initialize an object. I

Re: Questions on using using modal sheets with Core Data

2009-06-12 Thread Kevin Ross
Thanks Dave, I'm creating a new MOC in the sheet and hooking it up to the same persistent store as the document, so when the NSArrayController performs it's initial fetch at load (I have it set in IB to automatically prepare content). I'm not actually using this context to add or remove

Dragging text between NSTextFields - A 'source' question

2009-06-12 Thread Steve Cronin
Folks; I want to allow users to drag selected text between text fields. I have subclasses NSTextField and implemented: - (void)awakeFromNib { [self registerForDraggedTypes:[NSArray arrayWithObject:NSStringPboardType]];} - (unsigned int)draggingEntered:(id NSDraggingInfo)sender { ... -

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed

2009-06-12 Thread Erik Buck
http://developer.apple.com/samplecode/GeekGameBoard/ ___ 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

Re: is setFrame as optimal as setNeedsDisplayInRect?

2009-06-12 Thread Chunk 1978
thanks. i see it's refreshing the entire main screen. and Quartz Debugger seriously did a number on my Mac... everything is now huge in resolution and window elements are misplaced. a restart didn't help. any idea how to restore my normal screen on my mac? On Fri, Jun 12, 2009 at 11:47 AM,

Re: is setFrame as optimal as setNeedsDisplayInRect?

2009-06-12 Thread Chunk 1978
oh nevermind. i realized i set the User Interface Resolution to 2.0, so it's not a bug. resolution independence is going to be nice once it works properly. On Fri, Jun 12, 2009 at 4:39 PM, Chunk 1978chunk1...@gmail.com wrote: thanks.  i see it's refreshing the entire main screen. and Quartz

Re: SQLite -- same DB, different machines - different results

2009-06-12 Thread Тимофей Даньшин
Thank you all for your replies. I really didn't have any order by clause. But, unfortunately, I can't test it on my iMac right now. On Jun 11, 2009, at 6:30 PM, Gregory Weston wrote: Timofey wrote: I've written the alfa of my first app on the Mac which works in an acceptable manner on my

Show the dock icon's context menu

2009-06-12 Thread Ian was here
I've googled the heck out of this thing, but came up empty handed. Does anyone know how to make the context menu for the running application's dock icon pop up? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Show the dock icon's context menu

2009-06-12 Thread Clark Cox
Right-click on it, control click on it, or regular-click on it and hold the button down for a few seconds. On Fri, Jun 12, 2009 at 2:33 PM, Ian was herehowlew...@yahoo.com wrote: I've googled the heck out of this thing, but came up empty handed. Does anyone know how to make the context menu

Re: NSView directly drawn on screen?

2009-06-12 Thread John Ku
I got to play around with your suggestions but still cannot get it to not loose focus. Thought it did give me a better perspective on how levels, frames, keys work. Thank you for that. I have the NSWindow and removed NSView for testing, but when I clicked on the NSWindow, it'll still switch focus

Re: NSView directly drawn on screen?

2009-06-12 Thread John Ku
Here is a wild wild guess, perhaps I want to have my NSWindow to somehow belong to the menubar application. So technically, it looks like a window, but actually is just NSView drawn out from the menubar with no NSWindow but accepts keyboard/mouse events? Is it possible to have NSView without

Re: Show the dock icon's context menu

2009-06-12 Thread Sidney San Martín
Maybe we should assume that the goal is to display it programmatically? I've also wanted to do this and haven't found a way — in one application, having a left click on the Dock icon show the menu would have been particularly useful. On Fri, Jun 12, 2009 at 5:53 PM, Clark Coxclarkc...@gmail.com

Re: Show the dock icon's context menu

2009-06-12 Thread Clark Cox
Short of simulating a mouse click on the appropriate spot, I don't think this can be done. Finding what that spot is would also be difficult; you *may* be able to use the accessibility APIs to accomplish this, but that would, of course, require that the user had enabled accessibility. On Fri, Jun

Discussion to splinter off cocoa-dev list

2009-06-12 Thread Martin Stoufer
Greetings everyone, Having just finished my first WWDC and I am re-energized to get back into some deep development cycles again. As to how 1 week could be so grueling and satisfying at the same time, we may never know. With all the new functionality (APIs) to be provided in 10.6 and for

Re: Discussion to splinter off cocoa-dev list

2009-06-12 Thread Bill Bumgarner
On Jun 12, 2009, at 4:45 PM, Martin Stoufer wrote: Ultimately this decision is up to the list owner. This request is put out for open discussion to see if indeed there is any interest in moving forward. https://devforums.apple.com [EOD] b.bum

Re: is setFrame as optimal as setNeedsDisplayInRect?

2009-06-12 Thread Chunk 1978
hum... it seems that Quartz Debugger's Flash Screen function isn't much help with using the iPhone simulator... since it's an emulator it will flash the entire screen regardless if setNeedsDisplayInRect is called. which brings me back to my first question... i know that setNeedsDisplay will

Coming up with ideas

2009-06-12 Thread Development
Hey, how do you guys come up with ideas for new programs? I'm going nuts trying to figure out what type of application I should make. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Coming up with ideas

2009-06-12 Thread Graham Cox
On 13/06/2009, at 12:30 PM, Development wrote: Hey, how do you guys come up with ideas for new programs? I'm going nuts trying to figure out what type of application I should make. I wish I had your problem ;-) I come up with ideas for new apps several times a week. I'm going nuts trying

re: Foundation tool NSUserDefault

2009-06-12 Thread Mr. George Warner
On Thu, 11 Jun 2009 07:19:30 -0400, KK kthem...@gmail.com wrote: Hello, I am writing a Foundation tool - a command-line utility that uses Objective-C and the Foundation framework, and I'm trying to save preferences under the application domain.. My understanding is that you would need a

Re: Coming up with ideas

2009-06-12 Thread Greg Guerin
Development wrote: Hey, how do you guys come up with ideas for new programs? I'm going nuts trying to figure out what type of application I should make. How about an idea generator app? To get ideas for it, google keywords: idea generator If that seems like a joke, do it anyway, but

Re: Coming up with ideas

2009-06-12 Thread WT
On Jun 13, 2009, at 4:36 AM, Graham Cox wrote: On 13/06/2009, at 12:30 PM, Development wrote: Hey, how do you guys come up with ideas for new programs? I'm going nuts trying to figure out what type of application I should make. I wish I had your problem ;-) I come up with ideas for new

Leaks utility

2009-06-12 Thread Ryan Joseph
I wasn't sure where to post this but Cocoa programmers should know as well as any one else I thought. I have just learned about the leaks unix utility for detecting memory leaks but I'm not unix savvy enough to understand a point mentioned in the man page. Which is: If the

Re: problems with scripting

2009-06-12 Thread Vitaly Ovchinnikov
Yes, I read many of them and the command I created should work, as it almost similar the one you described in your tutorial. My suite seems to be correct as the property already works, but the command still doesn't. Am I wrong with the command/suite or with the script? Thank you. On Fri, Jun 12,

Detecting text under mouse

2009-06-12 Thread Jacob Rhoden
Hi, Is it possible to write an application that tracks the mouse over any application and reads the contents of the text that is under the mouse? I would like to develop an application that provides context sensitive translation as a learning tool. ie, See this windows application that is

Re: Leaks utility

2009-06-12 Thread Dave Keck
In Xcode: in the left column, under the Executables disclosure group, double-click your executable. Click the 'Arguments' tab at the top, and in the bottom section of that window, you can set environment variables for when your app is launched. ___

Re: Leaks utility

2009-06-12 Thread Ryan Joseph
Thank you, but I'm not using Xcode and need an actual unix solution. Knowing the command which was generated from that would be useful (maybe it's output into a console someplace?). Thanks again. On Jun 13, 2009, at 11:59 AM, Dave Keck wrote: In Xcode: in the left column, under the

Re: Leaks utility

2009-06-12 Thread Chris Suter
Hi Ryan, On Fri, Jun 12, 2009 at 9:29 PM, Ryan Josephthealchemistgu...@gmail.com wrote: I wasn't sure where to post this but Cocoa programmers should know as well as any one else I thought. I have just learned about the leaks unix utility for detecting memory leaks but I'm not unix savvy

  1   2   >