NSPredicate like NSLiteralSearch

2009-12-15 Thread Gerriet M. Denkmann
This works. i.e. returns {0,1}: NSRange r2 = [ @"ก่ี" rangeOfString: @"ก" options: NSAnchoredSearch | NSLiteralSearch ]; (without NSLiteralSearch it returns NSNotFound). but an NSPredicate with: "someProperty BEGINSWITH "ก" " does NOT find ก่ี". (the NSPredicate is to be used with -[NSArrayContr

Re: memcpy with 64 bit

2009-12-15 Thread gMail.com
Ouch! That's my old code. But it works on 64-bit Intel, Base SDK 10.6, x86_64, GCC 4.2, Target Mac OS X 10.6 I need an handle to store image bitmap data for later reuse by the OpenGL API "glTexImage2D". Do you know a better way? -- Leonardo > Da: Andrew Farmer > Data: Mon, 14 Dec 2009 20:17:41

Re: memcpy with 64 bit

2009-12-15 Thread Jean-Daniel Dupas
malloc/calloc is a better way. «Mac OS X implements a highly-tuned, threadsafe allocation library, providing standard implementations of the malloc,calloc, realloc, and free routines, among others. If you are allocating memory using older routines such as NewPtr or NewHandle, you should change

Re: memcpy with 64 bit

2009-12-15 Thread Ken Thomases
On Dec 15, 2009, at 2:50 AM, gMail.com wrote: Da: Andrew Farmer Data: Mon, 14 Dec 2009 20:17:41 -0800 On 14 Dec 2009, at 11:06, gMail.com wrote: Handle imagesH = NewHandleClear(totImages * oneImageSize); Wait, Handle? NewHandleClear? Your use of these functions suggests that you

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Alexander Spohr
This seems wrong. When do you call this code? Usually it is just enough to set the springs of your scroll view in IB. Then, after rotation, refit your content. atze Am 15.12.2009 um 03:46 schrieb Matt Neuburg: > I am not grasping how coordinates work in a rotated iPhone app, and I'm >

iPhone Testing Internet Connection?

2009-12-15 Thread Chunk 1978
i have been researching how to do this, and while i believe my code is correct, i always receive the alert stating the internet connection is unavailable. what am i doing wrong? -=-=-=-=- - (BOOL)internetConnection { //INTERNET CONNECTION TESTING //Add the SystemConfigurat

Re: iPhone Testing Internet Connection?

2009-12-15 Thread Jonathan del Strother
Perhaps you should be calling the internetConnection function, rather than comparing its address to 0x001 ? if (internetConnection() == YES) 2009/12/15 Chunk 1978 : > i have been researching how to do this, and while i believe my code is > correct, i always receive the alert stating the

Re: iPhone Testing Internet Connection?

2009-12-15 Thread Chunk 1978
haha... yeah, i just figured out my idiot mistake at the same time as your reply. clearly i need more coffee. thanks :) On Tue, Dec 15, 2009 at 7:33 AM, Jonathan del Strother wrote: > Perhaps you should be calling the internetConnection function, rather > than comparing its address to 0x001

Re: iPhone Testing Internet Connection?

2009-12-15 Thread Claus Guttesen
> haha... yeah, i just figured out my idiot mistake at the same time as > your reply.  clearly i need more coffee. > > thanks :) Or cocoa? :) -- regards Claus When lenity and cruelty play for a kingdom, the gentler gamester is the soonest winner. Shakespeare twitter.com/kometen ___

Re: memcpy with 64 bit

2009-12-15 Thread gMail.com
Thanks, I have just read that doc http://developer.apple.com/mac/library/documentation/Performance/Conceptual/ ManagingMemory/Articles/MemoryAlloc.html So it seems I can really calloc e.g. 60MB with calloc. Can you confirm? If not, I could use NSMutableData. If so, could I get the pointer with thi

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Luke the Hiesterman
First of all, it's important for you to mention where this code gets called. Without that, we can't know the whole story, but I'll grant some notes. On Dec 14, 2009, at 6:46 PM, Matt Neuburg wrote: I am not grasping how coordinates work in a rotated iPhone app, and I'm hoping someone will

Help Debugging NSPredicateEditor reloadCriteria Exception

2009-12-15 Thread Marshall Houskeeper
Under 10.6.2 my program is throwing an exception when I call the NSPredicateEditor method reloadCriteria. I do not see the behavior on earlier releases of 10.6 or 10.5. When the exception is thrown the stack is the following: #0 0x96f624e6 in objc_exception_throw () #1 0x95657138 in +[NS

Re: memcpy with 64 bit

2009-12-15 Thread Clark Cox
On Tue, Dec 15, 2009 at 6:33 AM, gMail.com wrote: > Thanks, > I have just read that doc > http://developer.apple.com/mac/library/documentation/Performance/Conceptual/ > ManagingMemory/Articles/MemoryAlloc.html > > So it seems I can really calloc e.g. 60MB with calloc. Can you confirm? Yes, why wo

Re: Core Data Save As Binary Error

2009-12-15 Thread Mike Abdullah
It's probably unrelated, but why are you using NSArchiver? There's almost no need to these days, and it's more-or-less deprecated (not available on the iPhone for example). On 14 Dec 2009, at 12:41, Richard Somers wrote: > I have a Core Data document based application. > > Saving the file as X

Localization.strings in UTF16 vs UTF8

2009-12-15 Thread Torsten Curdt
Anyone know of any reasonable explanation why for Cocoa localization files need to be in UTF16? http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/StringsFiles.html#//apple_ref/doc/uid/2005-SW1 Is this just to make using SCMs painful? Or what is

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Matt Neuburg
On or about 12/15/09 7:00 AM, thus spake "Luke the Hiesterman" : > should be using a rect based on the bounds Will do, thanks! I think this will make a big difference. :) m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ pantes anthropoi tou eidenai oregontai phusei Among

Re: NSPredicate like NSLiteralSearch

2009-12-15 Thread Jim Turner
I believe you need the diacritic insensitive option: 'someProperty BEGINSWITH[d] "?"' Look up NSComparisonPredicate options in the documentation for more discussion. As for what the 'w' means, it's Spotlight specific. "The Comparison is word based, and also detects transitions from lower-case t

Re: Localization.strings in UTF16 vs UTF8

2009-12-15 Thread Joar Wingfors
On 15 dec 2009, at 07.47, Torsten Curdt wrote: > Anyone know of any reasonable explanation why for Cocoa localization > files need to be in UTF16? Hello Torsten, I think that this is simply a documentation bug. Cocoa expects, or at least expected, strings files in the product to be UTF16. For

Re: Core Data Save As Binary Error

2009-12-15 Thread Richard Somers
On Dec 15, 2009, at 8:34 AM, Mike Abdullah wrote: It's probably unrelated, but why are you using NSArchiver? There's almost no need to these days, and it's more-or-less deprecated (not available on the iPhone for example). It worked. I plan on switching to NSKeyedArchiver but have not been

Re: Localization.strings in UTF16 vs UTF8

2009-12-15 Thread Torsten Curdt
This topic came up during yesterdays CocoaHeads and there was quite some confusion around this. Many thanks for the the clarification, Joar. cheers -- Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or m

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Matt Neuburg
On or about 12/15/09 7:00 AM, thus spake "Luke the Hiesterman" : > should be using a rect based on the bounds Okay, but things are still reversed from the way I naively think they should be. Just consider this code alone (I've moved everything into the view's controller): UIScrollView* sv =

Re: iPhone Testing Internet Connection?

2009-12-15 Thread David Duncan
On Dec 15, 2009, at 4:25 AM, Chunk 1978 wrote: > i have been researching how to do this, and while i believe my code is > correct, i always receive the alert stating the internet connection is > unavailable. what am i doing wrong? Don't use Reachability synchronously. At some point you will be

Re: image not found

2009-12-15 Thread Torsten Curdt
>> But that means the difference should not really matter here then. > > You are correct.  The problem here is not because of using > @executable_path instead of @loader_path.  The problem is because the > binary was moved outside of Contents/MacOS where it belongs. Well, those user will not go in

Ideas for multi-type inspector design

2009-12-15 Thread Mads Paulin
Hi All, I am trying to make an inspector like panel for my application and could use some input on the design of that. My application has an NSOutlineView displaying objects of multiple types. These objects are stored in an NSTreeController. Now, I would like to have an inspector panel show so

Re: memcpy with 64 bit

2009-12-15 Thread gMail.com
Great. The errors were 576 at the beginning. Now they are only 20... The porting continues. Maybe you know this too: I can't longer use the APIs from QTMovie.h IsMovieDone MoviesTask SetMovieDrawingCompleteProc SetMovieGWorld UnlockPixels Do you know how to replace them? I am

Re: NSPredicate like NSLiteralSearch

2009-12-15 Thread Gerriet M. Denkmann
On 15 Dec 2009, at 23:13, Jim Turner wrote: > I believe you need the diacritic insensitive option: > > 'someProperty BEGINSWITH[d] "ก"' Well, no. BEGINSWITH[d] tells me that "กิน" begins with "กุ" - that is: it ignores not only the tone-marks, but also some vowels, which makes it quite unusab

Re: Sorted Table Column

2009-12-15 Thread Sean McBride
On 12/14/09 10:09 PM, Graham Cox said: >>> I have an NSTableView with just one column, filled by some >NSArrayController. >>> >>> Initially the items are not in any recognizable order. >>> When I click on the NSTableHeaderView a triangle appears and now the >items are nicely sorted. >>> >>> Is it

Re: Wierd Crash Report

2009-12-15 Thread Sean McBride
On 12/14/09 1:29 PM, Nick Zitzmann said: >Well, for starters, the garbage collector doesn't work under Rosetta, >and Rosetta will crash if you try to start up a GC-enabled app in its >environment. So if you make a GC-enabled app, you also must set the >info.plist key that requires native execution

Re: iPhone Testing Internet Connection?

2009-12-15 Thread Markus Spoettl
On Dec 15, 2009, at 6:20 PM, David Duncan wrote: > Don't use Reachability synchronously. At some point you will be blocked, you > will hit a watchdog timer, and your application will be killed. I find that a little misleading. It seems to depend on how you use the API. If you check for a specif

Ideas for multi-type inspector design

2009-12-15 Thread Mads Paulin
Hi All, I am trying to make an inspector like panel for my application and could use some input on the design of that. My application has an NSOutlineView displaying objects of multiple types. These objects are stored in an NSTreeController. Now, I would like to have an inspector panel show so

Error on third opening of preferences window

2009-12-15 Thread David Hirsch
Okay, all: can somebody explain this error to me? The debugger isn't much help and the problem is not in my code (because I can reproduce this without writing any code!). 1) Make a new document-based cocoa project in XCode. 2) Open MainMenu.xib in IB, add a new blank window. Set the window

Re: Error on third opening of preferences window

2009-12-15 Thread Markus Spoettl
On Dec 15, 2009, at 8:02 PM, David Hirsch wrote: > The same behavior happens in a non-document-based app. Did you switch off "Release When Closed" for the window in IB? If not, the window will be released after the first round and you're messaging a released object when trying to open it again.

Re: Error on third opening of preferences window

2009-12-15 Thread David Hirsch
Ah, I see. Strange that this would be the default behavior. -Dave On Dec 15, 2009, at 11:07 AM, Markus Spoettl wrote: On Dec 15, 2009, at 8:02 PM, David Hirsch wrote: The same behavior happens in a non-document-based app. Did you switch off "Release When Closed" for the window in IB? If

Re: memcpy with 64 bit

2009-12-15 Thread Sean McBride
On 12/15/09 11:46 AM, Jean-Daniel Dupas said: >«Mac OS X implements a highly-tuned, threadsafe allocation library, >providing standard implementations of the malloc,calloc, realloc, and >free routines, among others. If you are allocating memory using older >routines such as NewPtr or NewHandle, yo

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Luke the Hiesterman
You should probably post a sample project which demonstrates this. Luke On Dec 15, 2009, at 9:09 AM, Matt Neuburg wrote: > On or about 12/15/09 7:00 AM, thus spake "Luke the Hiesterman" > : > >> should be using a rect based on the bounds > > Okay, but things are still reversed from the way I n

Re: memcpy with 64 bit

2009-12-15 Thread gMail.com
I agree. Anyway, I can't use some APIs from QuickTime. Do you know any replacement for 64-bit Intel + 10.6 only? MoviesTask SetMovieDrawingCompleteProc SetMovieGWorld UnlockPixels -- Leo > Da: Sean McBride > Organizzazione: Rogue Research Inc. > Data: Tue, 15 Dec 2009 14:22:41 -

Re: memcpy with 64 bit

2009-12-15 Thread David Duncan
On Dec 15, 2009, at 12:22 PM, gMail.com wrote: > I agree. Anyway, I can't use some APIs from QuickTime. > Do you know any replacement for 64-bit Intel + 10.6 only? > >MoviesTask >SetMovieDrawingCompleteProc >SetMovieGWorld >UnlockPixels Asking how to replace APIs usually leads t

Core Data and pre loading objects (importing).

2009-12-15 Thread Ben Packard
Hi, I am pretty new to cocoa so thanks for being patient... I have spent some time building a command line tool that reads a .txt file saved locally by an online poker client. This file contains data on my own playing history. I have a chunky method that dissects this file and creates differe

NSUndoManager auto-grouping?

2009-12-15 Thread Scott Squires
I'm having an odd problem with multiple levels of undo/redo. Same basic setup for a number of routines, however certain types of routines seem to be automatically be grouped. prepareWithInvocationTarget is used for all of these. I have some image processing routines that are on another thread

Re: NSNumber stringValue

2009-12-15 Thread Lane Roathe
on Sat, Dec 12, 2009 Andy Lee may have said: >As glenn pointed out, that string most certainly *can* be a string that >can be converted back to a bitwise equivalent of the original float. >Ben's question was whether in practice it is guaranteed to be so, or >whether stringValue uses a maximum numb

Core Data - Importing using NSOperation - Problems on main thread

2009-12-15 Thread Nick Banks
Hi, I have an application that persists its data using core data. It uses an NSOperation to download new versions of the data asynchronously. This NSOperation uses its own MOC (moc2) (as opposed to the MOC (moc1) used in the main thread, which is used by the UI). Both MOCs share the same pe

NSBitmapImageRep - Fallback Background Color for JPEG output

2009-12-15 Thread Jakob Weick
Hello, Leopard introduced a new NSBitmapImageRep attribute NSImageFallbackBackgroundColor. I often use it in my applications. Now in Snow Leopard this option does not work anymore. Also the equivalent option in the ImageIO framework kCGImageDestinationBackgroundColor is useless. Here is some c

NSTableView, NSDateFormatter, CoreData

2009-12-15 Thread Space Ship Traveller
Hello, I have a NSTableView with a CoreData model. This model is irrelevant except for the fact that at least one model class has an optional date field. I have an NSDateFormatter instantiated in the NIB since there are several columns sharing the same formatting behavior. When the user enters

Re: Smooth Scrolling for NSScrollView

2009-12-15 Thread William Ehrich
There was a smooth scrolling feature that was introduced in 10.3 which seems to be automatically enabled for NSTextViews, but it doesn't seem to work for NSScrollViews with custom views. Is there anything I need to do to enable this? Or is this enabled by default now (I'm using the 10.5 SDK, runn

NSUndoManager issues

2009-12-15 Thread Scott Squires
I'm having an odd problem with multiple levels of undo/redo. Same basic setup for a number of routines, however certain types of routines seem to be automatically be grouped. prepareWithInvocationTarget is used for all of these. I have some image processing routines that are on another thread

CGEventCreateMouseEvent - iPhone as remote control for Mac

2009-12-15 Thread Benjamin Ludwig
Hi! I'm Trying to do the following: - Connect an iPhone app with a little Cocoa app using the AsyncSocket class - Send touch events from the iPhone and post mouse events on the Mac with CGEventCreateMouseEvent to have a remote control for my Mac I've written a little protocol for the communicati

[iPhone] Sample code for live camera stream?

2009-12-15 Thread Gabriel Zachmann
I am having problems of getting "live" images from the iPhone's camera. I suppose this should be quite simple but I am not sure how to do it. Basically, what I want to do is this loop forever: grab current image from the camera do some computer vision processing (object detection) d

Ideas for multi-type inspector design

2009-12-15 Thread Mads Paulin
Hi All, I am trying to make an inspector like panel for my application and could use some input on the design of that. My application has an NSOutlineView displaying objects of multiple types. These objects are stored in an NSTreeController. Now, I would like to have an inspector panel show some

[moderator] Re: Don't Report Documentation Bugs to Apple Bug Reporter

2009-12-15 Thread Scott Anguish
Followup Nothing has changed. If bugs are found in the documentation in the reference library (essentially developer.apple.com/*/library) they should be sent to bugreporter.apple.com or use the feedback mechanism. documentation bugs found in articles on the ADC site (outside the reference lib

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Luke the Hiesterman
There is not currently API for this. The API allows you to place overlays on the screen, but video data is not delivered to your app until the user is finished recording. Luke On Dec 15, 2009, at 9:24 AM, Gabriel Zachmann wrote: > I am having problems of getting "live" images from the iPhone's

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Gabriel Zachmann
> There is not currently API for this. The API allows you to place overlays on > the screen, but video data is not delivered to your app until the user is > finished recording. So, how do all the so-called augmented reality apps do it? Best regards, Gabriel. smime.p7s Description: S/MIME cry

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Mark Woollard
They place UI elements over the video feed provided on screen by the built in video capture window, but they don't have access to the actual video data. Mark On 15 Dec 2009, at 16:04, Gabriel Zachmann wrote: >> There is not currently API for this. The API allows you to place overlays on >> the

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Matt Neuburg
On or about 12/15/09 11:29 AM, thus spake "Luke the Hiesterman" : > You should probably post a sample project which demonstrates this. http://www.apeth.com/example.zip Thanks for any enlightenment! m. > > On Dec 15, 2009, at 9:09 AM, Matt Neuburg wrote: > >> On or about 12/15/09 7:00 AM, thus

Setting the port of an NSURL

2009-12-15 Thread Development
I need to send a post request to a URL but I need it sent to a port other than the standard 80, 8080 etc. How can I set the port that an NSURLRequest or URL is on? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: Setting the port of an NSURL

2009-12-15 Thread Nick Zitzmann
On Dec 15, 2009, at 2:42 PM, Development wrote: > I need to send a post request to a URL but I need it sent to a port other > than the standard 80, 8080 etc. How can I set the port that an NSURLRequest > or URL is on? [NSURL URLWithString:@"http://www.example.com:/path/to/something/";] and

Re: NSUndoManager auto-grouping?

2009-12-15 Thread Kyle Sluder
On Sat, Dec 12, 2009 at 12:16 PM, Scott Squires wrote: > Same basic setup for a number of routines, however certain types of routines > seem to be automatically be grouped. Have you read the documentation for per-event grouping? > I have some image processing routines that are on another thread

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Kyle Sluder
On Tue, Dec 15, 2009 at 12:54 PM, Luke the Hiesterman wrote: > There is not currently API for this. The API allows you to place overlays on > the screen, but video data is not delivered to your app until the user is > finished recording. Erm, Ustream Live Broadcaster does it just fine. Are you

Sending a non http request

2009-12-15 Thread Development
I am trying to post data to NSString * url = [NSString stringWithFormat:@"ipp://%@:%i/%@",host,[service port],item]; Which as you can see is an ipp address. However the code below fails as I get an error from the NSError that I am using an unsupported url. Obviously if I send it as http:// all I

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Benjamin Stiglitz
> Erm, Ustream Live Broadcaster does it just fine. Are you suggesting > they are circumventing API restrictions? > > http://www.techcrunch.com/2009/12/09/iphone-live-streaming-ustream/ There was recently a clarification in the developer forums from Michael Jurewitz; I’d suggest you take a look t

Re: NSUndoManager auto-grouping?

2009-12-15 Thread Kyle Sluder
Also it's quite rude to submit the same question to the list twice within two hours. If someone can/is willing to help you out, they will. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderat

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Kyle Sluder
On Tue, Dec 15, 2009 at 2:24 PM, Benjamin Stiglitz wrote: > There was recently a clarification in the developer forums from Michael > Jurewitz; I’d suggest you take a look there. That would probably be that link which made its rounds on Twitter today, and which I couldn't view because I can't ge

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Kyle Sluder
Scratch that, I have access. It's just that the link I was provided did not work on my phone. For those who also have access to the iPhone forums, here is the relevant link: https://devforums.apple.com/message/149553 Not reproducing the contents here, obviously. --Kyle Sluder On Tue, Dec 15,

Re: Ideas for multi-type inspector design

2009-12-15 Thread Kyle Sluder
Please refrain from reposting the same message over and over. It's rude and filling up everyone's inboxes. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Gabriel Zachmann
> They place UI elements over the video feed provided on screen by the built in > video capture window, but they don't have access to the actual video data. So, how do they do this: http://www.youtube.com/watch?v=QoZRHLmUKtM ? Or this: http://www.youtube.com/watch?v=5M-oAmBDcZk ? > Erm, Ustream

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Luke the Hiesterman
On Dec 15, 2009, at 3:11 PM, Gabriel Zachmann wrote: > According to this > > http://www.tuaw.com/2009/12/14/app-store-approved-app-brings-video-recording-to-iphone-3g-and-1/ > they use the non-documented UIGetScreenImage(). > > I'd love to use that if it's the only way -- if only somebody coul

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Alex Kac
Ah that's probably why the message in the forums says that it will be superceded in the future, for proper naming and hopefully slightly more functionality). Thanks Apple! On Dec 15, 2009, at 5:14 PM, Luke the Hiesterman wrote: > > On Dec 15, 2009, at 3:11 PM, Gabriel Zachmann wrote: > >> Ac

ipp help - need advice

2009-12-15 Thread Development
I have constructed a url request to send a png file to a ipp printer to be printed. The problem is that I get a Bad Request error when I post it. I am wondering if some one that knows how to construct a correct ipp job request would look at my code and point out what I have done wrong. I know t

Re: Ideas for multi-type inspector design

2009-12-15 Thread Graham Cox
On 16/12/2009, at 7:38 AM, Mads Paulin wrote: > I am able to get the infrastructure of the inspector up and running and also > able to make a NIB file and an NSWindowController subclass for each object > type to go into the inspector. Where I need some input is on how to > determine which of thes

Re: NSUndoManager issues

2009-12-15 Thread Graham Cox
On 15/12/2009, at 1:02 PM, Scott Squires wrote: > I have some image processing routines that are on another thread and undo > objects are created. > > When these are done in a series by the user (several minutes apart) and an > undo is preformed then one by one they are invoked from just one u

Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Richard Somers
I have a managed object with a transformable attribute. The attribute is a C struct and uses a custom value transformer. The transformer uses the depreciated NSArchiver but it is drop dead simple and it works. I am trying to implement keyed archiving and can't figure out what to do or which

App works when launched from Xcode, not from Finder

2009-12-15 Thread PCWiz
I'm having a *really* strange issue here. First of all, my app works fine in Debug mode. I can launch it from Xcode or from Finder and it will work fine. The problem comes when using "Release". If I pick the Release config and then click the Build button from Xcode, the app still works fine. _Ho

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Graham Cox
On 16/12/2009, at 11:34 AM, PCWiz wrote: > My build configurations for both Debug and Release are identical (I haven't > checked thoroughly, but I know I didnt change much). Both configs are set to > use the LLVM GCC 4.2 compiler, and GC is set to Required. The only other > change I've made is

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Kiel Gillard
In Xcode, are you running the target's executable with any command line arguments? Kiel On 16/12/2009, at 11:34 AM, PCWiz wrote: > I'm having a *really* strange issue here. First of all, my app works fine in > Debug mode. I can launch it from Xcode or from Finder and it will work fine. > > Th

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Kyle Sluder
On Tue, Dec 15, 2009 at 4:34 PM, PCWiz wrote: > I don't know why this is happening. I don't think its an issue with my code > if it works in Debug (Xcode & Finder) and Release (Xcode only). Two rules of software development: Rule 1: Check again. It's probably your fault. Rule 2: It's still proba

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread PCWiz
I have 2 frameworks set in a Copy Files build phase and both are being copied as they should. I haven't explicitly set any command line arguments for the app, but where would I check that? And nothing is being logged into the Console. I'll make a quick screen capture right now to demonstrate wha

Dirtying NSSearchField

2009-12-15 Thread Gerriet M. Denkmann
I have a document based Core Date app. MyDocument.nib contains among other things an NSSearchField (or NSTextField - same behaviour) which has it's value bound to some NSString in MyDocument.h. When I type in this SearchField the window gets marked as dirty (documentEdited) and the Edit menu ha

Highlighting a row in an NSTableView

2009-12-15 Thread Gerriet M. Denkmann
When I (by clicking selecting it) highlight a row in an NSTextView the background changes to light blue and the selected text is easily readable. But when I (by clicking it) highlight a row in an NSTableView the background changes to dark blue and the text becomes very hard to read. Is there a

Re: NSUndoManager issues

2009-12-15 Thread Jerry Krinock
On 2009 Dec 15, at 16:15, Graham Cox wrote: > You should probably arrange for the thread to submit its undo tasks to the > undo manager on the main thread, Indeed, NSUndoManager is not thread-safe. I use one of the -performSelectorOnMainThread... methods in this situation. Watch for deadloc

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Jerry Krinock
On 2009 Dec 15, at 16:24, Richard Somers wrote: > I am trying to implement keyed archiving and can't figure out what to do or > which way to go. I can't seem to see the forest for the trees and keep going > around in circles in the documentation and on the web. Concentrate on this one: http:/

Even slider values with OpenAL pitch shifting

2009-12-15 Thread Chunk 1978
i have a seemingly simple enough problem, but i can't wrap my head around it. i have an even slider with a min value of 0.0, a maximum value of 2.0 and a neutral default value of 1.0. i need to be able to shift the pitch of a sound down one octave (to slider value 0.0) and shift the pitch up one

Re: Even slider values with OpenAL pitch shifting

2009-12-15 Thread Kyle Sluder
On Tue, Dec 15, 2009 at 6:01 PM, Chunk 1978 wrote: > any thoughts on how i can solve this kind of problem? Have your controller correctly map between the two number systems? Pitch grows geometrically (+1 octave = 2x the freq, -1 octave = 1/2 the freq, as you have deduced), while sliders are linea

Re: Even slider values with OpenAL pitch shifting

2009-12-15 Thread Graham Cox
On 16/12/2009, at 1:01 PM, Chunk 1978 wrote: > in OpenAL a normal sound file with no pitch has a value of > 1.0, one octave above the normal sound the pitch shifts up to 2.0, but > one octave below the normal sound the pitch shifts down to 0.5, not > 0.0 as i had expected! > > any thoughts on ho

Re: Sending a non http request

2009-12-15 Thread Andrew Farmer
On 15 Dec 2009, at 14:22, Development wrote: > I am trying to post data to NSString * url = [NSString > stringWithFormat:@"ipp://%@:%i/%@",host,[service port],item]; > Which as you can see is an ipp address. However the code below fails as I get > an error from the NSError that I am using an unsu

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread PCWiz
Here's the screen capture that demonstrates this issue: http://www.vimeo.com/8208563 This time around, I got a few errors logged in Console: *** -[NSRecursiveLock unlock]: lock ( '(null)') unlocked from thread which did not lock it *** Break on _NSLockError() to debug. *** -[NSRecursiveLock unl

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Richard Somers
On Dec 15, 2009, at 6:36 PM, Jerry Krinock wrote: Concentrate on this one: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Archiving/Tasks/codingctypes.html Ok. I changed -transformedValue: of the custom value transformer to look like this. - (id)transformedValu

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Graham Cox
On 16/12/2009, at 3:11 PM, Richard Somers wrote: > return [NSKeyedArchiver archivedDataWithRootObject:value]; > } > > When I save the document I get an error: *** -[NSKeyedArchiver > encodeValueOfObjCType:at:]: this archiver cannot encode structs. > > Any ideas what's wrong? You'

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Eric Schlegel
On Dec 15, 2009, at 8:05 PM, PCWiz wrote: > This would explain my apps screwup. If it can't connect then that would > explain the request timed out and authentication errors. The problem is, I > have no idea why this only happens on the Release config *when launched from > Finder* > > And I d

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Richard Somers
On Dec 15, 2009, at 9:18 PM, Graham Cox wrote: You're archiving 'value'. You want instead to return the mutableData that the first archiver wrote to, which is otherwise unused. Thanks. Saving keyed archive of struct foo now works for xml store (I think, when I open up the xml document I was

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread PCWiz
Is there any way to do this using one mac? On 2009-12-15, at 9:33 PM, Eric Schlegel wrote: > > On Dec 15, 2009, at 8:05 PM, PCWiz wrote: > >> This would explain my apps screwup. If it can't connect then that would >> explain the request timed out and authentication errors. The problem is, I >

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Kyle Sluder
On Tue, Dec 15, 2009 at 8:47 PM, PCWiz wrote: > Is there any way to do this using one mac? Yes, just launch Terminal, cd to YourAppBundle.app/Contents/MacOS, and run gdb from there. Read the gdb manual, tutorials online, and TN2124 for more. http://developer.apple.com/mac/library/technotes/tn20

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Graham Cox
On 16/12/2009, at 3:47 PM, Richard Somers wrote: > Thanks. Saving keyed archive of struct foo now works for xml store (I think, > when I open up the xml document I was expecting to see the keys for foo but > instead just see data as before). I can't comment on the other (main) problem, but th

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Joar Wingfors
On 15 dec 2009, at 16.48, PCWiz wrote: > I have 2 frameworks set in a Copy Files build phase and both are being copied > as they should. So you intend for your frameworks to be copied into and used from the bundle of your app? If so, have you set their Installation Directory build setting to

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Richard Somers
On Dec 15, 2009, at 10:06 PM, Graham Cox wrote: You're creating an archive-within-an-archive and an archive is just a block of binary data by default. If you set the output format type of your secondary archive to XML, you'll be able to see the keys, but it will still be a separate second a

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-15 Thread Graham Cox
On 16/12/2009, at 5:12 PM, Richard Somers wrote: > On Dec 15, 2009, at 10:06 PM, Graham Cox wrote: > >> You're creating an archive-within-an-archive and an archive is just a block >> of binary data by default. If you set the output format type of your >> secondary archive to XML, you'll be abl

Re: Core Data and pre loading objects (importing).

2009-12-15 Thread Jerry Krinock
On 2009 Dec 12, at 08:34, Ben Packard wrote: > NSManagedObject *player = [NSEntityDescription > insertNewObjectForEntityForName:@"Player" inManagedObjectContext:[self > managedObjectContext]]; The above is good. > But what I want to do is use a tournament builder class from the original > pr