Re: Coming up with ideas

2009-06-12 Thread Rick Langschultz
I usually like to develop something that helps me. If it helps me fix something that's broken. Or make something last longer I go for it. I define the problem. Define solution(s). Then code. Then design. Just a thought and my $0.02. Sent from my iPhone On Jun 12, 2009, at 9:30 PM, Developm

Re: Coming up with ideas

2009-06-12 Thread Graham Cox
On 13/06/2009, at 1:27 PM, WT wrote: 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 pro

Re: searching a string in big file

2009-06-12 Thread Stephen J. Butler
2009/6/13 Angelo Chen : > I need to open a big file and search for a certain string, if found, I need > tup do some updates and write back the file, any idea what approach I should > take? Thanks, 32 or 64 bit? What is the encoding (ASCII, UTF-8, UTF-16, etc)? Are the updates in place (that is,

searching a string in big file

2009-06-12 Thread Angelo Chen
Hi, I need to open a big file and search for a certain string, if found, I need tup do some updates and write back the file, any idea what approach I should take? Thanks, Angelo Yahoo!香港提供網上安全攻略,教你如何防範黑客! 請前往 http://hk.promo.yahoo.com/security/ 了解更多! __

Re: "Leaks" utility

2009-06-12 Thread Ryan Joseph
On Jun 13, 2009, at 12:26 PM, Greg Parker wrote: Can anyone who uses this utility tell me how to set the this environment variable? I'm thinking it's possible this must be set via GDB, otherwise I'm not sure where it could get a stack trace from. Thank you for helping. Environment variab

Re: "Leaks" utility

2009-06-12 Thread Stephen Blinkhorn
export MallocStackLogging=1 Stephen On 12 Jun 2009, at 22:29, Ryan Joseph 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 enoug

Re: "Leaks" utility

2009-06-12 Thread Greg Parker
On Jun 12, 2009, at 9:29 PM, Ryan Joseph wrote: 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 MallocStackLogging environment variable was set when the applicatio

Re: "Leaks" utility

2009-06-12 Thread Ryan Joseph
Thanks, I have only just opened Instruments.app but it's pretty dense. Leaks gives a nice clean, fast output if you don't need to analyze it too heavily. I just found out about it a few days ago but I recommend anyone try it, it's pretty slick to get the results so easily. On Jun 13, 2009,

Re: "Leaks" utility

2009-06-12 Thread Joar Wingfors
On 12 jun 2009, at 22.04, Ryan Joseph wrote: 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. Even if you're not using Xcode, it's still much

Re: "Leaks" utility

2009-06-12 Thread Ryan Joseph
I use my own little IDE that I developed so I can write Pascal with Cocoa and wanted to make a light-weight GUI for the leaks utility that I could use from my app is the reason for doing this. Otherwise yes, using MallocDebug is better. It's really fast and handy to call leaks instead of lo

Re: "Leaks" utility

2009-06-12 Thread Chris Suter
Hi Ryan, On Fri, Jun 12, 2009 at 9:29 PM, Ryan Joseph 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 enough to understand a p

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 "Executa

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. ___ Coc

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 us

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,

"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 MallocStackL

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 apps

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 mind

Re: Coming up with ideas

2009-06-12 Thread Michael Vannorsdel
Mostly listening to people going, hey I wish this was easier or if this program I always use had xyz and did abc better. Also ideas from yourself when you find something you need to make your life easier. I'm sure many developers have made their own various mini-tools to do random things f

re: Foundation tool & NSUserDefault

2009-06-12 Thread Mr. George Warner
On Thu, 11 Jun 2009 07:19:30 -0400, KK 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 > bundle ident

Re: Determining whether text fully fits in a box

2009-06-12 Thread Rob Keniger
On 13/06/2009, at 12:34 PM, Graham Cox wrote: What's the easiest way to tell if a given bit of text fits a text container? I see there is a delegate method that is called when text doesn't fit, but it would be more convenient if I could just query the layout manager and ask it whether it f

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

Determining whether text fully fits in a box

2009-06-12 Thread Graham Cox
Hi all, What's the easiest way to tell if a given bit of text fits a text container? I see there is a delegate method that is called when text doesn't fit, but it would be more convenient if I could just query the layout manager and ask it whether it fitted the text or it overflowed. I ne

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 th

Re: Discussion to splinter off cocoa-dev list

2009-06-12 Thread Clark Cox
On Fri, Jun 12, 2009 at 4:45 PM, Martin Stoufer wrote: > 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 n

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 redraw

Re: Discussion to splinter off cocoa-dev list

2009-06-12 Thread Todd Heberlein
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 the iPhone 3.0, I wonder if it would be worth having some frank discussion on if now is a good time to split off from this list some more focused discussion l

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 ___

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 the

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

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 Cox wrote: > Right-click

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 NSWind

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 t

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 here wrote: > > 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 ap

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: 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 m

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 1978 wrote: > thanks.  i see it's refreshing the entire main screen. > > and Quartz Debugger seriousl

Re: UTI not identified correctly for some users.

2009-06-12 Thread Sean McBride
Mitchell, Welcome to the wonderful world of file extensions! :) A file has one and only one UTI. The system (Launch Services aka LS) decides on a UTI based on the file's extension and HFS type (and MIME type?). So if two apps declare different UTIs that refer to the same extension, LS will pick

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, Mic

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 Help/Unsubsc

Re: Method Signature Problem.

2009-06-12 Thread Kyle Sluder
On Fri, Jun 12, 2009 at 1:01 PM, Joshua Garnham wrote: > How would I declare it ? The same way you declare any method: in an @interface block. You haven't posted enough code to illuminate *why* the method you're trying to use can't be found, but here are a few common reasons: 1. Forgetting to #i

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 )sender { ... - (BOOL)performDragOp

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 a

Re: problems with scripting

2009-06-12 Thread Matt Neuburg
On or about 6/12/09 11:21 AM, thus spake "Vitaly Ovchinnikov" : > 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 application "My Ap

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); cu[

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 ha

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, no

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 "pro

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

2009-06-12 Thread Brian Christensen
On Jun 11, 2009, at 14:04, Florian Witteler wrote: I would like to know, how you experiences cocoa-developers would handle the drawing in a solitaire-game. You may want to have a look at GeekGameBoard as a reference point: http://mooseyard.com/hg/hgwebdir.cgi/GeekGameBoard/archive/tip.zip ht

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 : > dyld (the OS X dynamic linker) already does this.  You have to specify > DYLD_B

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: 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 wrote: > This was a problem with NSImageView on Tiger. My workaround is to call > [imageView setImage:nil] and then [imageView setImag

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: 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 s

Re: problems with scripting

2009-06-12 Thread Vitaly Ovchinnikov
Hello Matt, I finally did something using the following suite definition:

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 wrote: > 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 command > line > option

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 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 yo

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 initialized.

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 murthy 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 unmount > the disk imag

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, vvvs

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

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 is

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

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

2009-06-12 Thread vvvsn murthy
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 command line options but i want to know whether there are any APIs to mount and unmount the disk images? Thanks Murthy _

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 (b

PopUp and PullDown buttons behaving differently with NSViews included in their menus on mouse down

2009-06-12 Thread Michal Antonic
Hi, I have an NSPopUpButton with several menu items. Each menu item has an associated custom NSView. When I click the button, menu appears. Then, I push the mouse button down somewhere outside the menu and inside the application window, and hold. This is where the behaviour starts to diff

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 or

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: API for fetching the computer name in cocoa

2009-06-12 Thread Arie Pieter Cammeraat
Won't CSCopyMachineName do the job? Op 12-jun-2009, om 8:24 heeft Gerriet M. Denkmann het volgende geschreven: On 11 Jun 2009, at 18:55, Graham Cox 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 gettin

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 file.

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 "comp

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 will

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 g

State of the Union videos?

2009-06-12 Thread Todd Heberlein
Does anyone know if/when Apple will post the "State of the Union" presentations from WWDC 09? Todd ___ 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

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 moderator

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Michael Ash
On Fri, Jun 12, 2009 at 12:44 PM, Eric Schlegel wrote: > > 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

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 sheet

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: Discloser triangle

2009-06-12 Thread Kyle Sluder
On Fri, Jun 12, 2009 at 2:16 AM, cocoa learner 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 turn add the advanced o

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 wrote: On Fri, Jun 12, 2009 at 4:13 AM, Quincey Morr

Re: Passing References During Initialization / Nib Loading

2009-06-12 Thread Michael Ash
On Fri, Jun 12, 2009 at 4:13 AM, Quincey Morris 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 instance is entirely u

Re: problems with scripting

2009-06-12 Thread Matt Neuburg
On Fri, 12 Jun 2009 14:45:48 +0400, Vitaly Ovchinnikov 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 suite and >nothing added by

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, KK wrote: > Yes... I se

Re: is setFrame as optimal as setNeedsDisplayInRect?

2009-06-12 Thread Michael Ash
On Fri, Jun 12, 2009 at 7:48 AM, Chunk 1978 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 frame of the view

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

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 Fuhrmann wrote: > Sidney thanks, > > Will this still be available in Snow Leopard? > > Michael > On 11 juin 09, at 18:17, Sidney San

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:

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 o

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 ___

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 NSM

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

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]; for(i

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];

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 (Coco

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 v

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 gestal

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 produ

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: 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" end tell is the one that you have mentioned in the .Sdef file . In your Xcode when you click on the Sdef file , check

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 pli

  1   2   >