Two questions about cocoa programming...
Hi everyone. In the recent development, I need to solve the following two issues: 1. How to distinguish the difference about the inline children count of the XML Node? here is my code: xmlDoc = [[NSXMLDocument alloc] initWithXMLString:[NSString stringWithContentsOfFile:_filePath] options:NSXMLDocumentTidyXML error:&err]; NSXMLElement* _rootNode = (NSXMLElement*)[xmlDoc rootElement]; print: [_rootNode childCount]; Here is twe snippets of xml files: #1 yetAnotherThing This file outputs answer: 3 // Another similar file output: #2 < Descriptor something = "something"> < floor > < Man > This file outputs answer: 2 Is there any method to detect the existence of the "yetAnotherThing" node? More concretely, you can nest the node under the parent node with <> label or not, how to detect the child without being nested by the <> label? Sorry for my English, I hope I have explained the question clearly. :-) 2. Using openPanel function: how can we memorize the most recent opened directory? As the question says, we often the open panel directive to open file, is there some method to guarantee that we can be the same location which is opened last time? Thank you very much for any help. Good luck. ___ 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/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Embed some NSControl in the NSTableView field?
Hi everyone. Maybe this idea is rather crazy, I do want to know whether it is practicable or not. The NSTableView is essentially a table to the end user. For example, your application may seem like the following: Tableheader1Tableheader2 MyVolumeValue = 0.5 Maybe it is a little tedious to double click the "Value = 0.5" field to edit the value. I want to replace the field with a NSSlider control, so the user can adjust it. Like the following: Tableheader1Tableheader2 MyVolume=+=== (<-- this is a slider) Is there any way to accomplish this task? Thank you very much for any suggestion. ___ 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/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
how to implement the auto-complement function like Xcode 3.x?
Hi everyone. After experiment the built-in auto-complement function of Xcode 3.x, I am very impressed really, it is so powerful. Thanks for the hard- working Apple engineers. Then here comes the question: how can we implement this function for our editor-like application? Because I am working on an editor project which concerns about the user experience, I think the auto-complement function is an indispensable one. Moreover, the Xcode-style of auto-implement is exactly what I want. This feature can improve the efficiency and productivity of users greatly. Thank you for help. Any guidance or tutorial is GREATLY appreciated. Have a good day. :-) ___ 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/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Want to save the content of a NSView with CALayer embedded.
Hi everyone. I am ordered to save a NSView hosting the arbitrary number of core animation layers. Although there are many tutorials about how to save the content of a NSView, I can find nothing about saving the content of the layer embedded in a NSVIew. First I tried to use the following code to save the content of the NSVIew. In my opinion, if the content is saved, the layers in the NSView may be saved as well. NSView* _tempView = [_window contentView]; NSRect _tempRect = [[_window contentView] frame]; if ([[_tempView dataWithPDFInsideRect:_tempRect ] writeToFile:resultString atomically:YES] ) { printf("Image Saved\n"); } Yes, the result of the above code is "Image Saved". However, the result image is valueless --- it is blank... :-( Then I tried another method: NSImage* intermediateImage = [[NSImage alloc] initWithSize: NSMakeSize([[_window contentView] frame].size.width, [[_window contentView] frame].size.height)]; [intermediateImage addRepresentation: [[_window contentView] bitmapImageRepForCachingDisplayInRect: [[_window contentView] frame]] ]; NSData* _imageData = [intermediateImage TIFFRepresentation]; if ([_imageData writeToFile:resultString atomically:YES] ) { printf("Image Saved\n"); } I got a failed result too... The saved image is a blank file. Can anyone here give me a help to solve this issue? Thank you very much for any help. Have a good day. :-) ___ 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/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
help about the flat-namespace?
Hi everyone. I am going to use a foreign library named graphviz by AT&T research. There is example application written in Cocoa. I am very lucky to build the library from the source and installed the needed libraries and header files. But when I launched the application, the console dumped out the following information: dyld: Symbol not found: __nl_msg_cat_cntr Referenced from: /usr/local/lib/graphviz/libgvplugin_pango.5.dylib Expected in: flat namespace Can anyone tell me how to solve the flat namespace problem? Or if anyone in the list is also interested in developing graphviz-related applications, are you willing to discuss the problem with me? Any help or guidance is GREATLY appreciated. Thank you very much in advance. ___ 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/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]