On Nov 7, 2009, at 5:41 AM, Graham Cox wrote: On 07/11/2009, at 7:19 AM, Carlo Caione wrote: [...] Ok, but the problem is not so simple (I think). Actually I have to populate the popup menu and, according to the choice of the user on this popup, set a string in another text field. [...]]]>
[SOLVED] On 2009-11-06, at 12:42 PM, Clark Cox wrote: On Fri, Nov 6, 2009 at 5:22 AM, Ryan Homer <email@hidden> wrote: [...] When you define a string using ü, isn't it stored internally as one UTF-16 code unit (not sure if I'm using the notation correctly), [...]]]>
[...] I'll probably end up using the "merge..." method available but that makes me feel bad to save a document automatically when the user should be the only one responsible for this. For example, the user will not be able to use the "Revert" command from the File menu to [...]]]>
Am 07.11.2009 um 09:39 schrieb Eric Morand: [...] EOF is capable of nested editing context. I don’t know if CoreData can do that as well. But why don’t you want to save? If you just want your objects in memory, why use CoreData at all? atze [...]]]>
[...] Actually, the change will be promoted only when they are committed to the store, and that implies a save on the disk. Or am I wrong ? Eric.]]>
the license Pol has decided to distribute his frameworks under isn’t fodder for the mailing list. On Nov 5, 2009, at 7:12 AM, Jeremy Pereira wrote: [...]]]>
[...] The obvious answer is to populate the menu in Interface Builder. Why can't you do that? If the menu is dynamically populated then the title strings should be set up using NSLocalizedString or one of its cousins, so that the strings originally come from the . [...]]]>
+ (void)list
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSMutableDictionary* result = [NSMutableDictionary dictionary];
struct ifaddrs* addrs;
BOOL success = (getifaddrs(&addrs) == 0);
if (success)
{
const struct ifaddrs* cursor = addrs;
while (cursor ! [...]]]>Hi, in an application I need to populate a popup button with at least twenty entries. What is the correct place where I have to store labels? Can a property list be a good idea or is it better to leave them in the .m file? Thanks for your help... [...]]]>
I need to get the iPhone's current IP address. I know that CFHost is the way to go, since we don't have NSHost. Does anyone have an example of how to turn the iPods name to a iPodsName.local? I can't seem to find the rules, or the sample code that is mentioned all over the web. [...]]]>
Am 06.11.2009 um 17:52 schrieb Eric Morand: [...] You copy nothing. On save the changes are distributed to every other context that holds the object. If the object was never in the other context (esp. a new one) you have to fetch it anyway. Or you get the NSManagedObjectID and ask the other context for the object to that ID. The relationships will just be there. The NSManagedObjectContext is your scratchpad. If you want something inside it fetch it or create it. If you change something, the change will be promoted. atze]]>
I'm calling -[NSXMLElement nodesForXPath:error:] to find stuff in an XML document. It works great, until I try to find elements that use a namespace prefix; then it won't find them unless I put the exact same prefix in the query. That's a bad solution, though, because the prefix [...]]]>
I'm having a hard time with versions and iPhone apps (and iTunes). I'm working on a new version of my app. I'd like to distribute it to a few testers. I would like the version string to reflect the beta nature of the build: 1.1b1. But iTunes doesn't respect version strings in that format. [...]]]>
[...] In MVC style, you would have a controller that observes for value changes and then calls the appropriate methods on the view. You could add bindings support in your view, but you would still need a controller and this approach might be more work than it is worth [...]]]>
Hi all, I have a NSView subclass that displays a graphical representation of my model. The model is described by some numerical values, which are entered into text fields. As each text field is edited, the graphical representation should be redrawn to reflect the new value. [...]]]>
[...] Multithreading, as a general problem, is HARD. To do what you're suggesting ("just do what I'm asking") the framework would have to lock all of these things: - NSTextView instance - NSTextStorage instance - NSMutableString instance How is it supposed to do that? [...]]]>
[...] Thread-safety of a complex system is hugely more complicated than just managing "calling it multiple times". It's nightmarishly complex, and generally just not worth it. Cocoa takes the approach that asynchrony is a better approach than promiscuous multithreading — most tasks like [...]]]>
On Nov 6, 2009, at 5:09 AM, Ken Thomases wrote: On Nov 5, 2009, at 6:20 AM, Dalton Hamilton wrote: [...] Well, I would think Cocoa would let me manage whether I'm calling it multiple times and just do what I'm asking. So, I now I'm trying to set an NSLock, then call the worker Thread and [...]]]>
[...] It does seem to be down at the moment (http://downforeveryoneorjustme.com/CocoaBuilder.com) and as best I can tell it's been down for a week now... Based on my limited attempts. There are plenty of other archives though! :) Matt]]>
Folks; Is the cocoabuilder server having problems? I haven't been able to access it for at least 2 days. Steve]]>
Hi Developers, I am currently having problems creating the data model for my application since I want to convert a String to an Int32. The value expression should be sth. like this (pseudo-code): if ($source.name == "First name") return 1; else if ($source. [...]]]>
[...] Set a breakpoint at the top of this method. Is the method called at launch time? If so, is 'box' or 'w' nil? —Jens]]>
[...] I'm referring to decomposition. [...] And any code that is indexing a Unicode string *must* be prepared to accept both decomposed and precomposed forms. [...] Then you need to be very careful how you define "character". Is "ü" a single character, or two characters? [...]]]>
i'm following hillegass' "view swapping" (chapter 29), concerning the NSViewController. i can successfully display the proper view at launch (based on the index of an NSMutableArray), but i cannot set the window's title using the same index? the window loads as "Untitled", which is it's [...]]]>
Hi mmalc, Thanks for your help. This is what I feared : I have to copy manually the object from the editing context to the main one. What will happen with relationships ? Let's say we have a one-to-one relationship between the Product entity and the Family entity and that [...]]]>
The problem may be that the NSOperationQueue releases your NSOperation once the main method ends. If you don't retain it elsewhere, the parser tries to fire delegate methods on a released object. Sounds like you need to make your NSOperation concurrent (which, IMHO, is a misnomer). [...]]]>
[...] This is illustrated in the documentation: [...]]]>
Hi guys, Apple keeps on talking about Core-Data managed object contexts as "scratchpads". I'm trying to use them as such but face a lot of problem when it comes to merge contexts between each others once I want to "submit" the modifications that lies in the scratchpad. [...]]]>
You could write pre-processor macros to handle all your NS* methods and typedef NSPoint, etc. to their respective core graphics implementations so you don't need to maintain two code bases. -Brian On Fri, Nov 6, 2009 at 10:53 AM, Matt Neuburg <email@hidden> wrote: [...] [...]]]>
On Thu, 05 Nov 2009 18:59:34 -0500, Alexander Cohen [...] If you're on iPhone, just pop it into a UIColor and now you can archive it. m.]]>
On Thu, 5 Nov 2009 06:56:45 -0400, Patrick William Walker [...] It's because none of those things exist on iPhone. You have to switch to using stuff like CGPoint, CGRect, and CGPath (although in fact for the latter you're likely to use the CGContext... commands and not save a path at all). [...]]]>
[...] No, it doesn't. NSString is a container for UTF-16 *code units*, not code points, and not grapheme clusters, and its methods reflect that design choice (so -length is the length in UTF-16 code units, and the indices are indices in UTF-16 code units too). [...]]]>
On 2009-11-05, at 1:59 PM, Douglas Davidson wrote: On Nov 5, 2009, at 10:42 AM, Clark Cox wrote: [...] NSString already treats many composed characters as a grapheme cluster, such as accented characters. This made me think that it would also treat the Chinese character as one character regardless of its internally represented storage. [...] While Chinese characters exhibit similar properties, being composed of "parts" from the language perspective, parts which are most times characters themselves, Unicode has never treated Chinese characters as the composition of such, but rather as separate character in its own right. In other words, there is no decomposition of a Chinese character such as you can do with é, for example. I believe this is the same for Japanese kanji as well. [...]]]>
On 2009-11-05, at 1:42 PM, Clark Cox wrote: On Thu, Nov 5, 2009 at 8:04 AM, Ryan Homer <email@hidden> wrote: [...] Are you referring to the alternate form muessen or the decomposed form? While the decomposed form would have a length > 6, the string [...]]]>
I have found a partial solution, which is enough for my needs. Instead of passing an empty dictionary to -enterFullscreen:withOptions, you tell it to disable the dock and the menu bar. The result is a view in fullscreen, and reordering magically works. [...]]]>
http://sites.google.com/site/ymtxjasazk/nc7nnoouyi]]>
[...] Because everything in AppKit is thread-unsafe, unless specifically marked safe.]]>
[...] Yes, because Cocoa generally doesn't support manipulating the GUI from any thread other than the main thread. Read through this: http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/Multithreading/Introduction/Introduction. [...]]]>
Hi, You need to use CG**** structs on iPhone. CGPoint, CGRect... Don't forget different make function naming conventions either: NSMakeRect -> CGRectMake. Karolis, Cheers On Thu, Nov 5, 2009 at 4:56 AM, Patrick William Walker < [...]]]>
Hi, I'm writing a Cocoa UI for an AudioUnit plug-in, based on a custom NSView. Some host apps load such plug-ins within an NSPanel, or at least a window with the hidesOnDeactivate property set to YES. I'm trying to get notification when the panel is hidden and shown. [...]]]>
Hi, I have been working on a somewhat game engine (not really, but acts like one) and currently involved in porting this to different platforms. The engine works perfectly fine on Linux, FreeBSD and Windows so far. It is comprised of following parts: 1. Entry point (e.g. main or WinMain) 2. [...]]]>
Hello, I'm doing the below and when I call the -runTask: method is called from the main run loop (no threading) with [self runTask:self]; the NSTextView updates great; however, when I call -runTask via [NSThread detachNewThreadSelector:@selector(runTask:) toTarget:self [...]]]>
Why do I get an "Expected specified-qualifier-list before NSPoint" when trying to port of my model classes from Cocoa to iPhone SDK? I've been reading through the documentation and haven't really found much to explain why I'm getting errors when using other things like [...]]]>
it’s quite possible that the library he’s using is public API, and if so, my apologies. however, every other wrapper has been using private API. Unfortunately, moderation doesn’t provide the time to examine code posted on third party blogs. The fact that the class is called “Apple Remote” doesn’t exactly give you any indication that it isn’t on one of the third party libs that do use hacks. [...] If it is, great. my apologies to Harry. Kudos to Martin (with the exception of the class naming) [...] that examining code on unlinked website isn’t something that volunteer moderation offers time for.]]>
[...] What private API is used? All I saw in the code were documented IOKit calls. I thought that if something's obviously is exposed via public API like IOKit, it would be considered public API. I'm not trying to be contrary or anything, I'm simply trying to [...]]]>
Hello there, Thought I'll share a little observation I just made, and that cost me about an hour to debug. This is in hope that, using my experience, you may check for similar bugs. Look at this piece of code: /// NSNumberFormatter * nf = [[[NSNumberFormatter alloc] init] autorelease]; [ [...]]]>
And yes, it was the obvious assign rather than retain. Thank you! Ben On Nov 5, 2009, at 5:46 PM, Jonathan del Strother wrote: How is your bad IBOutlet declared? Does it have a @property declaration that's using 'assign' rather than 'retain', perhaps? [...]]]>
Hi Steve and David, Thank you both for your comments; they were very helpful. I had thought that I had to match the context to the image I was going to use, but that's clearly wrong. I had missed that link to the supported pixel formats - that's very informative. [...]]]>
[...] Good question, I haven't tested that but I will do so. [...] The root object is indeed unchanging. You're right, caching the object would be an improvement on the fetch. I'll proceed with this and see if I have any problems. Many thanks,]]>
Hi Chris, [...] How large are the XML files? Does each contain multiple animation steps or just one? [...] Do your stalls happen because of the parsing or because of the downloading? The fact that you are using -initWithURL: suggests that your stalls may be because of downloading, as -[ [...]]]>