Remove specific items from an Array - is this the best way?

2009-01-13 Thread Steve Cronin
Folks; I have an array of 'Suspect' objects which have 'names', 'capeSize', 'hatSize', 'planetOfOrigin', all the usual stuff... Now I also have a list of 'RebelOutposts'; a set of 'planet' name strings, What I want to do is remove from a usualSuspects array of Suspects any Suspect whos

Re: Remove specific items from an Array - is this the best way?

2009-01-13 Thread Kyle Sluder
Take a look at function NSExpressions: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSExpression_Class/Reference/NSExpression.html#//apple_ref/doc/uid/TP30001190-SW11 You really can't get any more generic than NSPredicate. When you need to remove a set of things fro

Re: NSImage resizing

2009-01-13 Thread Parimal Das
hi whenever i am running this through the command line, my app is crashing with the error "GraphicsConetext not init" my code crashes at the call of [lock focus]i am not creating any view till now So can i do it without lock/unlock focus and without view and if not then is it possible to create a

[SOLVED]: Sync problems with NSArrayController + NSSortDescriptor + NSTextField

2009-01-13 Thread Dado Colussi
It turned out that I had checked the Auto Rearranges Content in IB for my NSArrayController instance. When I turned it off, and sent - rearrangeObjects to the NSArrayController in - controlTextDidEndEditing: in the NSTextField's delegate, everything started working as expected. It seems tha

open folders as documents

2009-01-13 Thread Georg Seifert
hello, I want to be able to select folders (with a certain extension, but no registered file type) in the open dialog of a NSDocument app. - Is there a possibility to register a filetype without loosing the ability to see the content in the finder (without selecting "show content")? - or

File association

2009-01-13 Thread Mahaboob
I saved the project using NSArchiver with an extension say .myExtension. And also I opened the saved project by unachieved it from menu. Now I need to open the saved project when double clicking on it. How can I do this file association? Where I need to write code for unarchiving its content ? Th

Re: open folders as documents

2009-01-13 Thread Kyle Sluder
On Tue, Jan 13, 2009 at 4:54 AM, Georg Seifert wrote: > I want to be able to select folders (with a certain extension, but no > registered file type) in the open dialog of a NSDocument app. Did you look at the documentation? -[NSOpenPanel setCanChooseDirectories] looks like it would be a very lo

Meeting CocoaHeads Amsterdam Jan-14.

2009-01-13 Thread macdev
The CocoaHeads Amsterdam is gathering tomorrow (January 14th 2009). Johan Kool will give a presentation about finding (potential) bugs in your code using LLVM/Clang. For more information: www.cocoaheads.nl, and http://groups.google.com/group/cocoaheads-amsterdam?pli=1

[MEET] Amsterdam CocoaHeads, Wed Jan 14

2009-01-13 Thread Cathy Shive
Hello Cocoa developers in and near Amsterdam! The Amsterdam chapter of CocoaHeads will be meeting again this Wednesday (tomorrow), January 14 from 7-9PM. Information about the location and presentation can be found on our Google Groups page: http://groups.google.com/group/cocoaheads-amste

Re: Implementing an Inspector similar to the one in IB.

2009-01-13 Thread Brian Bruinewoud
Just to clarify, I mean the exposable areas below that can be shrunk to a heading or expanded to full. The link that Brandon posted is exactly what I'm after. So, thanks everyone for the reply. On 12/01/2009, at 20:59 , Kyle Sluder wrote: On Sun, Jan 11, 2009 at 3:20 AM, Brian Bruinewoud

Re: NSImage resizing

2009-01-13 Thread Heinrich Giesen
On 09.01.2009, at 15:11, Parimal Das wrote: in my application i need to resize a .jpg image through a command line What does it mean: "resize" ?. Every NSBitmapImageRep has two sizes: a (print-)size which says how long width and hight (expressed in inch, cm or printerpoints or ...) of the

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread Chunk 1978
i found this on apple's website, but i'm not sure if this is what you are talking about when you say using an apple event to quit the finder. also, based on the description of the code, it doesn't seem like this will automatically relaunch finder after it has been quit. OSErr QuitFinder() { i

Re: Mac Pro memory sizes

2009-01-13 Thread julius
Keit hi, On 12 Jan 2009, at 22:51, Schultz Keith J. wrote: Hi Julius, If I understand your problem correctly you are: 1) processing a very large amount of intergers 2) using highly optimized code that is: a) you are manipulating the data directly via pointers

Re: CALayer removeFromSupeLayer crashes

2009-01-13 Thread Dennis Christopher
Matt, Thanks for this reply. I will reply back to the list once I get this solved so others can benefit from it. updateRemovedSublayer is however CALayer's not mine. I have no need to access individual layers, if it is ok just to call [[self layer] setSublayers:nil], as Dave Duncan sugge

Re: Make the whole view go full screen

2009-01-13 Thread Jonathan Selander
Cool, seems like I'm on the right track with these functions :) Now I just need to figure out how to resize the main contentView to the desktop resolution and to make the background image i put scale up to the resolution. For the window size i tried this: screenRect = [[NSScreen mainScreen]

White background when NSButton is pressed

2009-01-13 Thread Jonathan Selander
Hi, Im using alpha-transparent PNGs on NSButtons to build a part of my interface. It looks good, but when a button is pressed, a square white background fills the button. Is there a way to get rid of this in IB? I've been toying with almost every option so far with no luck. Thanks ___

How to center a custom NSView in a NSScrollView

2009-01-13 Thread Meik Schuetz
Dear all, I've already tried with a custom NSClipView, as explained here: http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html I also tried setting the height/width of the custom NSView to the size of the NSScrollView, but somehow I do not get it to work correctly. The question is, h

Re: Make the whole view go full screen

2009-01-13 Thread Jean-Daniel Dupas
http://www.cocoabuilder.com/archive/message/cocoa/2008/5/14/206531 Le 13 janv. 09 à 15:01, Jonathan Selander a écrit : Cool, seems like I'm on the right track with these functions :) Now I just need to figure out how to resize the main contentView to the desktop resolution and to make the

Information request on QT streaming

2009-01-13 Thread Arnab Ganguly
Hi All, My query is streaming from the playlist file that we get from shoutcast.com.If we open the playlist file in text edit format is going to be the below numberofentries=21 File1=http://scfire-mtc-aa04.stream.aol.com:80/stream/1074 Title1=(#1

Re: Mac Pro memory sizes

2009-01-13 Thread julius
My thanks to all who replied to my query. Let me see if I can correctly summarise your advice. All references to Mac memory as GB or MB refer to standard 8 bit bytes. Mac 64-bit computing relates to the size of pointers into the address space and a number of native data types such as NSInteger

Re: White background when NSButton is pressed

2009-01-13 Thread glenn andreas
On Jan 13, 2009, at 8:03 AM, Jonathan Selander wrote: Hi, Im using alpha-transparent PNGs on NSButtons to build a part of my interface. It looks good, but when a button is pressed, a square white background fills the button. Is there a way to get rid of this in IB? I've been toying with

IKImageBrowserView drag and drop/reordering when using core data

2009-01-13 Thread jonat...@mugginsoft.com
I have been utilising the IKImageBrowserViewWithCoreData Apple sample code and wished to add drag and drop and reordering functionality. Another Apple sample project, image-browser, covers most of the detail. My problem is the following: Drag and drop from say the finder works okay (if one can

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread Chunk 1978
ok... so i've decided to use a simple apple script for this: tell application "Finder" quit delay 0.25 launch end tell or this (which i believe is the same thing) tell application "Finder" quit delay 0.25 activate application "Finder" end tell but

Re: NSTextField input validation

2009-01-13 Thread Keary Suska
On Jan 12, 2009, at 5:22 PM, Adam Venturella wrote: So there we have it. Again this does do exactly what I want it to do, if the user tries to enter a letter or anything not a number, I get an NSBeep(); It works if the operation is a paste operation or initiated by a keystroke. My main q

***Junkmail*** How do I programaticly create a va_list

2009-01-13 Thread Horst Jäger
Hi, I have a problem concerning the va_list. I don't know how to programaticly create one. I need to do this because I want to use the initWithFormat method of NSString. But I neither know how many args there will be nor are the args Strings - they are selectors the associated methods o

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread Mark Butler
You could use a repeat... Tell app "Finder" to quit Repeat until process "Finder" exists Tell app "finder" to activate Delay .25 End I wrote this on an iphone so it's only close. Mark On Jan 13, 2009, at 8:11 AM, Chunk 1978 wrote: ok... so i've decided to use a simple apple script

Re: Getting the network Machine Icon

2009-01-13 Thread Sandro Noel
Follow UP. Here is what i got from the Carbon-dev list I'd guess it just uses AFP to ask the server: From : The AFP client sends the FPGetS

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread Chunk 1978
Repeat until exists process "Finder" is false? i keep getting errors in applescript... can't get this right... > You could use a repeat... > > Tell app "Finder" to quit > Repeat until process "Finder" exists >Tell app "finder" to activate >Delay .25 > End > > I wrote this on an iphone so

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread Mark Butler
Sorry not quite that simple how about... tell application "Finder" to quit set theProcess to {} repeat try tell application "System Events" to tell application "Finder" to activate end try delay 0.25 tell application "System Events" to set theProcesses to name of eve

Re: ***Junkmail*** How do I programaticly create a va_list

2009-01-13 Thread Bill Bumgarner
On Jan 13, 2009, at 8:32 AM, Horst Jäger wrote: I have a problem concerning the va_list. I don't know how to programaticly create one. I need to do this because I want to use the initWithFormat method of NSString. But I neither know how many args there will be nor are the args Strings - th

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread Chunk 1978
ok thank you all for your help... i'm now convinced this is a better option than force quitting the finder On Tue, Jan 13, 2009 at 11:54 AM, Mark Butler wrote: > Hi Chuck, > hmm.. no this has no logic to deal with the finder being busy > This is only making sure the the Finder exists before relau

Re: Getting the network Machine Icon

2009-01-13 Thread I. Savant
On Tue, Jan 13, 2009 at 11:32 AM, Sandro Noel wrote: > The AFP client sends the FPGetSrvrInfo command to obtain server information. > The FPGetSrvrInfo command returns server information including the following > server parameters: server name, machine type, AFP version strings, UAM > strings, vo

Re: CALayer removeFromSupeLayer crashes

2009-01-13 Thread Corbin Dunn
On Jan 9, 2009, at 12:19 PM, Dennis Christopher wrote: I attach a base layer to a custom view as follows: [view setWantsLayer:YES]; then I add several layers with: CALayer *layer = [CALayer layer]; layer.name = @"test"; [view.layer addSublayer:layer]; the view draws and each layer draws th

Re: NSTextField input validation

2009-01-13 Thread Adam Venturella
It is my understanding that, NSTextFieldCell gets the windows field editor when the user goes to edit the cell's contents. How I understood the docs was that I need to override the cell's: setUpFieldEditorAttributes: as that is the point at which the cell is getting the windows field editor. Once

runModalForWindow, best solution to modal session

2009-01-13 Thread Alexander Reichstadt
Hi, in my app I call runModalForWindow: in a class method initializer -- the class is a NSWindowController subclass-- from a controller of a sheet. Please, disregard UI Guidelines, it's a highly customized app and this approach used as per specific request. + (id)selectItem { KSingleItemS

Re: Using UIImageView for animations

2009-01-13 Thread David Duncan
On Jan 12, 2009, at 8:10 PM, Glenn Bloom wrote: - When I animate a set of PNG's rather than JPEG's (again using UIImageView's animationImages property), I am thinking I don't need to think about compression (or Apple optimization)? Is it then appropriate to think of the total memory to be c

Re: NSTextField input validation

2009-01-13 Thread Keary Suska
On Jan 13, 2009, at 10:32 AM, Adam Venturella wrote: It is my understanding that, NSTextFieldCell gets the windows field editor when the user goes to edit the cell's contents. How I understood the docs was that I need to override the cell's: setUpFieldEditorAttributes: as that is the poin

Re: runModalForWindow, best solution to modal session

2009-01-13 Thread Keary Suska
On Jan 13, 2009, at 10:44 AM, Alexander Reichstadt wrote: Hi, in my app I call runModalForWindow: in a class method initializer -- the class is a NSWindowController subclass-- from a controller of a sheet. Please, disregard UI Guidelines, it's a highly customized app and this approach use

CoreData with OutlineView collapses items on fetch

2009-01-13 Thread peter ljunglöf
Hi, After upgrading to 10.5.6, I got a problem with NSOutlineView and NSTreeController in my CoreData application. When executing fetch: on the NSTreeController, deeply nested items (nesting level>=2) collapses in the NSOutlineView. I created a minimal XCode project with the same problem,

Re: runModalForWindow, best solution to modal session

2009-01-13 Thread Alexander Reichstadt
Hi Keary, On 13.01.2009, at 19:44, Keary Suska wrote: On Jan 13, 2009, at 10:44 AM, Alexander Reichstadt wrote: Hi, in my app I call runModalForWindow: in a class method initializer -- the class is a NSWindowController subclass-- from a controller of a sheet. Please, disregard UI Guideli

Re: CoreData with OutlineView collapses items on fetch

2009-01-13 Thread Ron Lue-Sang
Hi Peter, I only skimmed through your description/question, but I'm reasonable sure I know what you're asking and what the answer is. The outlineView identifies its items by pointer comparison. So two objects that are logically the same can show up in the tree together, but they can have d

dynamic resizing of a window

2009-01-13 Thread Ronnie B
Hi All. I have a modal dialog that I want to resize dynamically in case if a validation on an input field fails and I display a validation text bellow the field. I would like to 'push' the rest of the dialog down, leaving the rest if the elements proportionally as they were. Anyone can suggest a

Re: Getting the network Machine Icon

2009-01-13 Thread Sandro Noel
Well it's not that bad of a place to put it... there is not way to know beforehand if the servers are going to be present So it makes sense to ask the server what it is. when Bonjour declares it's presence. or when the SMB server broadcasts. The icons for every possible mac model are local t

Re: open folders as documents

2009-01-13 Thread Kyle Sluder
On Tue, Jan 13, 2009 at 7:47 AM, Georg Seifert wrote: > But how I get hold of the open panel in a NSDocument app? Again, *please* read the documentation. The "The Roles of Key Objects in Document-Based Applications" section of the Document-Based Applications Overview guide describes who is respo

Re: ***Junkmail*** How do I programaticly create a va_list

2009-01-13 Thread Jeff LaMarche
I can reinforce Bill's advice here. I tried to do this same thing once, fairly recently actually, so that I could subclass a Foundation class that had a variadic init method. I lost several hours of my time and a lot of my sanity trying to find a way to make it work before giving up. On

Re: IKImageBrowserView drag and drop/reordering when using core data [SOLVED]

2009-01-13 Thread jonat...@mugginsoft.com
IKImageBrowserDataSource Protocol has the answer. For non file path represented images we need to implement - imageBrowser:writeItemsAtIndexes:toPasteboard: /* write images to paste board need for dragging of non path represented images */ - (NSUInteger) imageBrowser:(IKImageBrowserView *

Re: Using UIImageView for animations

2009-01-13 Thread Sebastian Morsch
I am having the same problem with UIImageView, just in my case, it's not FPS performance but running out of memory. Using + imageWithContentsOfFile didn't seem to solve the problem. I had 20 full screen PNGs loaded at the same time to hand them over to the view via the animationImages prope

Enable Scripting Failing - Missing something? Based on SimpleScripingVerbs sample

2009-01-13 Thread Adam Venturella
I have been reading over the docs re: Implementing Scripting for the last couple of hours: http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_implement/chapter_4_section_1.html#//apple_ref/doc/uid/2037-BBCJEEEC Looked Over this sample from the docs: Imp

Constructing class names dynamically

2009-01-13 Thread Mohan Parthasarathy
Hi, Sorry for the bad subject name. I found no other way to explain this. What i need is a way to generate a class name dynamically. For example, the user selects an entry in the Table (assume just one column) and each entry is handled by a separate class. Obviously, i can have a dictionary which

alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread JB
Hi all, I'm building a client for a server with (apparently) weird redirect issues, I cannot get a proper HTTP response using NSURLConnection sendSynchronousRequest However, I can print out the response code using the asynchronous method: [[NSURLConnection alloc] initWithRequest:request delegate:

Re: Constructing class names dynamically

2009-01-13 Thread Bill Bumgarner
On Jan 13, 2009, at 1:18 PM, Mohan Parthasarathy wrote: Does this make sense ? Yes. Or this is a bad idea ? Yes. Generally, anyway, it is indicative of bad design when your code seems to require dynamic generation of classes. Not to say that there aren't specific cases where it is warr

Re: Constructing class names dynamically

2009-01-13 Thread Jean-Daniel Dupas
Le 13 janv. 09 à 22:29, Bill Bumgarner a écrit : On Jan 13, 2009, at 1:18 PM, Mohan Parthasarathy wrote: Does this make sense ? Yes. Or this is a bad idea ? Yes. Generally, anyway, it is indicative of bad design when your code seems to require dynamic generation of classes. he is

Aquatic Prime + PayPal With Multiple Apps?

2009-01-13 Thread Chunk 1978
i've been researching aquatic prime and it doesn't seem easy to have multiple apps if licenses are purchased thru PayPal. Aquatic Prime + PayPal requires Auto Return to be turned on, and a Return URL to be supplied. the return URL leads to the .PHP file that produces the license and and automatic

[SOLVED]: Enable Scripting Failing - Missing something? Based on SimpleScripingVerbs sample

2009-01-13 Thread Adam Venturella
I dunno what I was doing wrong, but I want back and made 2 new projects from scratch, following the steps I laid out, and they both woked. One was a Striaght up Cocoa app, he the other was a Core Data App. :: shrugs :: ___ Cocoa-dev mailing list (Cocoa

Re: Aquatic Prime + PayPal With Multiple Apps?

2009-01-13 Thread Devon Ferns
With Paypal IPN you can put in custom variables or different URLs for different products like /ipn.php?product=1, /ipn.php?product=2 etc. In your php script you could just load the correct key pair depending on the URL parameters or custom variables passed. Devon Chunk 1978 wrote: i've been

Re: Constructing class names dynamically

2009-01-13 Thread Bill Bumgarner
On Jan 13, 2009, at 1:33 PM, Jean-Daniel Dupas wrote: he is just talking about class name, not class. NSClassFromString() is probably what you're looking for. NSMutableString *clsName = derive class name from the entry. Class cls = NSClassFromString(clsName); id instance = [[cls alloc] init];

Re: Constructing class names dynamically

2009-01-13 Thread Mohan Parthasarathy
thanks, this is exactly what i was looking for.. thanks mohan On Tue, Jan 13, 2009 at 1:41 PM, Bill Bumgarner wrote: > On Jan 13, 2009, at 1:33 PM, Jean-Daniel Dupas wrote: > >> he is just talking about class name, not class. >> >> NSClassFromString() is probably what you're looking for. >> >>

Re: Using UIImageView for animations

2009-01-13 Thread David Duncan
On Jan 13, 2009, at 1:03 PM, Sebastian Morsch wrote: I am having the same problem with UIImageView, just in my case, it's not FPS performance but running out of memory. Using + imageWithContentsOfFile didn't seem to solve the problem. I had 20 full screen PNGs loaded at the same time to han

Re: CoreData with OutlineView collapses items on fetch

2009-01-13 Thread peter ljunglöf
Hi Ron, thanks for the information. Your explanation sounds reasonable and it also explains why the selection is removed (since the old TreeNode is removed), and why the delegate method outlineViewItemDidCollapse (and similar) is not triggered (since there is no "collapse", just a new fre

How can I change the time format for NSDatePicker?

2009-01-13 Thread peter ljunglöf
Hi, here's a question about the time format for NSDatePicker. There are only two possibilities for time format: hr+min and hr+min+sec. I recently noticed that the actual time format used is the Short resp. Normal time format as defined in the International System Preferences. This means t

Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread Kevin Gessner
On Jan 13, 2009, at 4:27 PM, JB wrote: Hi all, I'm building a client for a server with (apparently) weird redirect issues, I cannot get a proper HTTP response using NSURLConnection sendSynchronousRequest However, I can print out the response code using the asynchronous method: [[NSURLCon

Re: Strange Webview Problem

2009-01-13 Thread Diez B. Roggisch
req = [NSURLRequest requestWithURL: url cachePolicy: NSURLRequestReloadIgnoringCacheData timeoutInterval: 0 ]; Just for the record - the timoutInterval of 0 is the culprit. I don't have the slightest idea why it stopped working, but

Re: Strange Webview Problem

2009-01-13 Thread Nick Zitzmann
On Jan 13, 2009, at 3:45 PM, Diez B. Roggisch wrote: Just for the record - the timoutInterval of 0 is the culprit. I don't have the slightest idea why it stopped working, but I don't care either. It might be worth mentioning in the docs though that passing 0 actually terminates the request

supress calling objectValueForTableColumn

2009-01-13 Thread David Blanton
I programatically add the enclosing scroll view of a table view to a scroll view that is the upper portion of a vertical split view. I would like to supress the calling of objectValueForTableColumn whne resizing the split view so it functions smoothly. Is this possible? David Blanton

Re: Strange Webview Problem

2009-01-13 Thread Diez B. Roggisch
Nick Zitzmann schrieb: On Jan 13, 2009, at 3:45 PM, Diez B. Roggisch wrote: Just for the record - the timoutInterval of 0 is the culprit. I don't have the slightest idea why it stopped working, but I don't care either. It might be worth mentioning in the docs though that passing 0 actually t

Re: Strange Webview Problem

2009-01-13 Thread Jean-Daniel Dupas
Le 14 janv. 09 à 00:11, Diez B. Roggisch a écrit : Nick Zitzmann schrieb: On Jan 13, 2009, at 3:45 PM, Diez B. Roggisch wrote: Just for the record - the timoutInterval of 0 is the culprit. I don't have the slightest idea why it stopped working, but I don't care either. It might be worth me

Seamlessly converting any type of document to PDF?

2009-01-13 Thread Laurent Daudelin
Hello. I'm looking for suggestions on how to convert any type of document to PDF. Ideally without the user input but I'm mostly interested in getting it to work. I did think about a few possible solutions but I'm not sure. 'textutil' could be used for some conversions to maybe html and th

Re: supress calling objectValueForTableColumn

2009-01-13 Thread David Blanton
I just added if([aTableView inLiveResize]) return nil; in the objectValueForTableColumn call table blank but the resize is quick and the table refreshes quick I guess I should oride preservescontentduringresize On Jan 13, 2009, at 4:00 PM, David Blanton wrote: I programaticall

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread has
Chunk 1978 wrote: ok... so i've decided to use a simple apple script for this: tell application "Finder" quit delay 0.25 launch end tell or this (which i believe is the same thing) tell application "Finder" quit delay 0.25 activate application "

Re: Strange Webview Problem

2009-01-13 Thread Diez B. Roggisch
Jean-Daniel Dupas schrieb: Le 14 janv. 09 à 00:11, Diez B. Roggisch a écrit : Nick Zitzmann schrieb: On Jan 13, 2009, at 3:45 PM, Diez B. Roggisch wrote: Just for the record - the timoutInterval of 0 is the culprit. I don't have the slightest idea why it stopped working, but I don't care ei

Re: Killall Finder Brings Hidden Apps To Front?

2009-01-13 Thread Chunk 1978
humm well, my app is 10.5 only, so only G4s+ can run it (i think)... i just realized that if the finder is busy (copying, etc.) it will not quit and the system will show the attached message. my procedure was this: - execute action - quit finder - relaunch finder but i've realized that if th

Re: dynamic resizing of a window

2009-01-13 Thread Jerry Krinock
On 2009 Jan, 13, at 11:48, Ronnie B wrote: I have a modal dialog that I want to resize dynamically in case if a validation on an input field fails and I display a validation text bellow the field. I would like to 'push' the rest of the dialog down, leaving the rest if the elements propor

Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread Jerry Krinock
On 2009 Jan, 13, at 14:24, Kevin Gessner wrote: On Jan 13, 2009, at 4:27 PM, JB wrote: How can I force my code to wait for the asynchronous request to finish, without using sendSynchronousRequest? You can split your post-connection stuff into another method, and call it from the delegat

Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread Shawn Erickson
On Tue, Jan 13, 2009 at 4:13 PM, Jerry Krinock wrote: > > On 2009 Jan, 13, at 14:24, Kevin Gessner wrote: > >> On Jan 13, 2009, at 4:27 PM, JB wrote: >> >>> How can I force my code to wait for the asynchronous request to finish, >>> without using sendSynchronousRequest? >> >> You can split your po

UTIs and type codes and extensions

2009-01-13 Thread Randall Meadows
I'm just making sure I'm not missing something... There's no system-defined way to go from a UTI to an old-style file type code (which the UTI docs seem to refer to as a "tag") and back again, am I correct? For instance, my app can export files as TIFF, JPEG, or PNG. When the user makes

Re: UTIs and type codes and extensions

2009-01-13 Thread Julien Jalon
On Wed, Jan 14, 2009 at 2:14 AM, Randall Meadows wrote: > I'm just making sure I'm not missing something... > > There's no system-defined way to go from a UTI to an old-style file type > code (which the UTI docs seem to refer to as a "tag") and back again, am I > correct? > extern CFStringRef UTT

Re: Seamlessly converting any type of document to PDF?

2009-01-13 Thread Martin Wierschin
I'm looking for suggestions on how to convert any type of document to PDF. I've never used it, but the QuickLook API seems to indicate this functionality may be available if the document QuickLook generator cooperates: "If your application has documents that (potentially) have more than

Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread JB
Great suggestion! However, the post method itself sits inside a try-catch-finally statement: @implementation Controller - (void)sync{ @try { NSLog(@"sync has begun"); ... lots of setup, with potential to throw custom errors ... [batch post]; // can throw custom errors too } @cat

Re: Seamlessly converting any type of document to PDF?

2009-01-13 Thread Andrew Farmer
On 13 Jan 09, at 15:24, Laurent Daudelin wrote: I'm looking for suggestions on how to convert any type of document to PDF. Ideally without the user input but I'm mostly interested in getting it to work. I did think about a few possible solutions but I'm not sure. 'textutil' could be used for

Re: runModalForWindow, best solution to modal session

2009-01-13 Thread Ken Thomases
On Jan 13, 2009, at 1:21 PM, Alexander Reichstadt wrote: On 13.01.2009, at 19:44, Keary Suska wrote: If so, do you override -initWithWindowNibName:? The implementation may matter. No, I only override initWithWindow. Should I override it, and if so should I call on NSBundle to load my nib

Re: Constructing class names dynamically

2009-01-13 Thread Ken Thomases
On Jan 13, 2009, at 3:33 PM, Jean-Daniel Dupas wrote: he is just talking about class name, not class. NSClassFromString() is probably what you're looking for. NSMutableString *clsName = derive class name from the entry. Class cls = NSClassFromString(clsName); id instance = [[cls alloc] init]

Re: Constructing class names dynamically

2009-01-13 Thread Mohan Parthasarathy
On Tue, Jan 13, 2009 at 8:06 PM, Ken Thomases wrote: > On Jan 13, 2009, at 3:33 PM, Jean-Daniel Dupas wrote: > > he is just talking about class name, not class. >> >> NSClassFromString() is probably what you're looking for. >> >> NSMutableString *clsName = derive class name from the entry. >> >>

How font size managed without affecting the font? Please help

2009-01-13 Thread rethish
Hi all, problem: I have some text(in textview) with different combination of fonts. If i select some range of text (combination of different fonts) to change its size , the size changes with a change in font (which was last selected from the popupbutton pop1). I want to change the fontsize