Re: Image preview with UIWebView

2011-01-25 Thread Kyle Sluder
On Tue, Jan 25, 2011 at 10:05 PM, Leon Qiao wrote: > I plan to use the UIWebView to display the preview of some image files. > It works well when opening the common files. But it seems some special > formats (such as "CRW", Canon Camera Raw file) are not supported. It can be > viewed via the QLPre

Re: Using NSWindow without NIB (XIB) file ?

2011-01-25 Thread Lou Zell
On Tue, Jan 25, 2011 at 2:48 AM, David Remacle wrote: > Hello > > Is it possible to use NSWindow without NIB file ? > > Below is a code sample I put together when I was trying to accomplish the same thing. I was pretty against Interface Builder when I first started with Cocoa because it felt a b

Image preview with UIWebView

2011-01-25 Thread Leon Qiao
Dear all, I plan to use the UIWebView to display the preview of some image files. It works well when opening the common files. But it seems some special formats (such as "CRW", Canon Camera Raw file) are not supported. It can be viewed via the QLPreviewController. Is there any better way to do the

Re: Using NSWindow without NIB (XIB) file ?

2011-01-25 Thread mlist0...@gmail.com
This should be a FAQ. The topic of Cocoa without Interface Builder comes up on the list surprisingly frequently, usually from someone who, like you, is "trying to understand how Cocoa really works". You may be thinking that graphical UI builders (like Interface Builder) are somehow a crutch an

Re: Using NSWindow without NIB (XIB) file ?

2011-01-25 Thread Ken Thomases
On Jan 25, 2011, at 4:48 AM, David Remacle wrote: > Is it possible to use NSWindow without NIB file ? It is definitely possible to create NSWindow objects in code, without using a NIB. However, the rest of your email suggests you're trying to build an entire application without either NIBs or

Re: Using NSWindow without NIB (XIB) file ?

2011-01-25 Thread Sherm Pendley
On Tue, Jan 25, 2011 at 5:48 AM, David Remacle wrote: > > Is it possible to use NSWindow without NIB file ? Yes. Interface Builder uses documented, public methods to create interface elements before serializing them to a NIB file. You can use the same methods in your app. Honestly though, I would

Re: WebKit WebArchive Create but no Load?

2011-01-25 Thread Bruce Cresanta
SOLVED-- The webArchive message on the dataSource is faulty-- it creates bad archives. Much better to create a WebArchive with it's own initialization routine that takes a mainResource and subresources. The loadArchive works flawlessly against a webarchive created in this fashion. Bruce

Using NSWindow without NIB (XIB) file ?

2011-01-25 Thread David Remacle
Hello Is it possible to use NSWindow without NIB file ? I can compile terminal application without using Xcode (by using gcc -framework Foundation files -o progname) but how do that with a gui application with Nib file ? It's just for understand how xcode compile the application with nib file a

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread WT
On Jan 25, 2011, at 8:45 PM, Dave Carrigan wrote: > I don't have your original message any more, but my understanding is that you > have rolled your own tab bar controller. Yes, though not all of its functionality. > When the docs say that a UINavigationController can be a tab in a tab bar > i

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread WT
On Jan 25, 2011, at 8:37 PM, Conrad Shultz wrote: > I totally agree. If I understand the OP's design, as a user I would > find the UITabBar switching out from under me very disturbing and > confusing. How would I get back to the previous view? The navigation bar has a back button. The navigatio

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread WT
On Jan 25, 2011, at 8:30 PM, Matt Neuburg wrote: > Here are the ways you can use a tabbed interface, pasted in from the docs: > > • Install it directly in your application’s main window. > • Install it as one of the two root views in a split view interface. > (iPad only) > • Pr

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread Dave Carrigan
On Jan 25, 2011, at 2:11 PM, WT wrote: > On Jan 25, 2011, at 6:41 PM, Matt Neuburg wrote: > >> You asked for further support from the documentation for my statement that >> you're using view controllers for views that are going into the wrong sort >> of place in your view hierarchy. The devil ca

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/25/11 2:30 PM, Matt Neuburg wrote: > > On Jan 25, 2011, at 2:11 PM, WT wrote: > >> when you're on the front screen you see >> >> Results | Statistics | App Info >> >> but when you're in a particular experiment, you see >> >> Results | Statist

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread Matt Neuburg
On Jan 25, 2011, at 2:11 PM, WT wrote: > when you're on the front screen you see > > Results | Statistics | App Info > > but when you're in a particular experiment, you see > > Results | Statistics | Analysis ... (other relevant tabs for this particular > experiment) > > When you're on the

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread WT
On Jan 25, 2011, at 6:41 PM, Matt Neuburg wrote: > You should not be using view controllers merely as dumpster divers to load > nib files and extract their contents in a semi-automatic way. As I said in my > previous note, if you want to store those views in nibs, fine, but then the > way to ex

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread Matt Neuburg
On Tue, 25 Jan 2011 14:05:05 -0200, WT said: >While writing this reply, it occurred to me to try something I thought I had >tried before but which I had not, namely, to turn off "resize view from nib" >for the window root view controller (tabBarVC, in MainWindow.xib) and then >make its view (l

Re: How to set tab order in a window that has view swapping

2011-01-25 Thread Marc Respass
Hi Abhijeet, > Hi,I have a single window with a toolbar and a custom view in my application. > Toolbar has Back and Next button on it. This is my MainMenu.xib. I have 5 > more xibs other than the MainMenu.xib in my application. Each xib contains > one view with different controls in it. On Next

Re: lots of find/replace in text file

2011-01-25 Thread Matt Neuburg
On Tue, 25 Jan 2011 02:17:46 -0800, Kyle Sluder said: >For something more complicated, a simple XML format might be appropriate: > > >The quick fox jumped over the lazy type="noun" /> > > >Especially if you want to share the resulting madlib with other >people, who might then want to reuse the sa

Re: @property and Garbage Collection

2011-01-25 Thread Greg Parker
On Jan 25, 2011, at 2:15 AM, Kevin Bracey wrote: > Yes, I can see the the rule for copy, I'm guessing it still makes a copy. > > I'm a little confused as to what ( retain ) now does, does it now also do a > copy, If I remove the ( copy ) I get > warning: default 'assign' attribute on property 'al

Re: Weather API for commercial use in iOS app

2011-01-25 Thread Roger Dalal
I am grateful for your reply, Conrad. I had seen the stackoverflow.com thread - some useful information there for sure. But I was hoping someone from this list might reply with a specific recommendation based on personal experience. Most of the information I have found so far are only suggesti

Re: How send XML data to document window?

2011-01-25 Thread Uli Kusterer
On 1/25/11 5:18 PM, McLaughlin, Michael P. wrote: Question: What is the recommended method for writing the changed XML to the document window for user feedback? I don't want to write the changed XML to a file and read it back in because most changes are only temporary. -setStringValue: ___

Re: Weather API for commercial use in iOS app

2011-01-25 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roger Dalal wrote: > Good Day, List: > > Does anyone have any information regarding the commercial use of a > Weather API for iOS apps? I have tried contacting a few of the more > popular services (such as weather wunderground) via e-mail, but never >

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread WT
I forgot to mention that it's precisely why there may be unforeseen problems that I am doing this on a test harness, to see how it comes about before I implement this design in the full app. That's clearly a valid approach. Even if it doesn't work and I have to change the design, I learn someth

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread WT
Those are valid arguments, Dave, and I'm grateful that you pointed me to them, but not necessarily applicable in all cases. In my specific case, the app only supports one orientation (so rotation isn't an issue) and the status bar is always visible. I will not categorically claim that this desig

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread Dave Carrigan
From the View Controller Programming Guide: "It is recommended that you use only the suggested techniques for displaying the views of your view controllers. In order to present and manage views properly, the system makes a note of each view (and its associated view controller) that you display

How send XML data to document window?

2011-01-25 Thread McLaughlin, Michael P.
In my app, I read an XML file, init an NSXMLDocument and also display the file contents in an NSTextField in a document window. The user can then change parts of the XML via several dialogs. The XML data is eventually sent to subprocesses for computation. The NSTextField is set to non-editable b

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread WT
On Jan 25, 2011, at 8:04 AM, Matt Neuburg wrote: > No, it's not. What you're doing is very thoroughly illegal, which is why > you're getting strange results. I beg to differ and would like you (or someone else) to point me to the part of the documentation that says that a view controller cannot

Re: @property and Garbage Collection

2011-01-25 Thread James Bucanek
Kevin Bracey wrote (Tuesday, January 25, 2011 2:59 AM +1300): In a Garbage Collected App when using the @property is it correct that I still have to specify (copy) or (retain) or have I missed something? I thought using GC didn't require retain and that everything cou

Re: Loading the Foundation at runtime

2011-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 2011 à 14:55, Fritz Anderson a écrit : > On 24 Jan 2011, at 10:39 AM, Mathieu Suen wrote: > >> int >> main () >> { >> int error; >> objc_loadModule ("Foundation", onLoad, &error); >> return EXIT_SUCCESS; >> } >> --objc-test.c-- >> >> But the linker complain: >> >> U

Re: Loading the Foundation at runtime

2011-01-25 Thread Fritz Anderson
On 24 Jan 2011, at 10:39 AM, Mathieu Suen wrote: > int > main () > { > int error; > objc_loadModule ("Foundation", onLoad, &error); > return EXIT_SUCCESS; > } > --objc-test.c-- > > But the linker complain: > > Undefined symbols: > "_objc_loadModule", referenced from: > _main

Re: How to set tab order in a window that has view swapping

2011-01-25 Thread Michael Babin
On Jan 25, 2011, at 1:21 AM, Abhijeet Singh wrote: > Hi,I have a single window with a toolbar and a custom view in my application. > Toolbar has Back and Next button on it. This is my MainMenu.xib. I have 5 > more xibs other than the MainMenu.xib in my application. Each xib contains > one view

Re: Disable (grey out) main menu when displaying modal window?

2011-01-25 Thread Darren Wheatley
Hi, The answer is to implement the NSUserInterfaceValidations protocol. The one method I needed to implement was: - (BOOL)valildateUserInterfaceItem: Returning NO disables the referenced menu item. All works fine now. Darren. On 25/01/2011 08:45, "Darren Wheatley" wrote: >Hi, > >I load a

Re: @property and Garbage Collection

2011-01-25 Thread Quincey Morris
On Jan 25, 2011, at 02:15, Kevin Bracey wrote: > I'm a little confused as to what ( retain ) now does, does it now also do a > copy, If I remove the ( copy ) I get > warning: default 'assign' attribute on property 'allImportHeaders' which > implements 'NSCopying' protocol not appropriate with -f

Re: WebKit WebArchive Create but no Load?

2011-01-25 Thread Mike Abdullah
-[WebFrame loadArchive:] On 25 Jan 2011, at 04:29, Bruce Cresanta wrote: > Hello, > > It is rather straightforward to create a webarchive in Cocoa: > > WebArchive* archive = [[[webArchive mainFrame] dataSource] webArchive] > > However... Once you have this archive, there seems to be no way to

Re: lots of find/replace in text file

2011-01-25 Thread Kyle Sluder
On Tue, Jan 25, 2011 at 1:56 AM, Matt Neuburg wrote: > This is madlibs; the template string comes from him, the programmer. Only the > words that go into the blanks come from the user. You'll need to prove to me > that performing the substitution this way is any more dangerous than > substituti

Re: @property and Garbage Collection

2011-01-25 Thread Kevin Bracey
Yes, I can see the the rule for copy, I'm guessing it still makes a copy. I'm a little confused as to what ( retain ) now does, does it now also do a copy, If I remove the ( copy ) I get warning: default 'assign' attribute on property 'allImportHeaders' which implements 'NSCopying' protocol not

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-25 Thread Matt Neuburg
On Mon, 24 Jan 2011 22:36:51 -0200, WT said: >Hello list, > >I have the following view hierarchy in an iPhone test app: > >window > status bar > view managed by a tab bar with 2 tabs >view for tab 0: some view, managed by some view controller >view for tab 1: one of a set of views, manag

Re: @property and Garbage Collection

2011-01-25 Thread Thomas Davie
On 25 Jan 2011, at 09:59, Kevin Bracey wrote: > Hi Guys, > > I've been using Retain/Release up til now but I have started my first GC > project. > > In a Garbage Collected App when using the @property is it correct that I > still have to specify (copy) or (retain) or have I missed something?

@property and Garbage Collection

2011-01-25 Thread Kevin Bracey
Hi Guys, I've been using Retain/Release up til now but I have started my first GC project. In a Garbage Collected App when using the @property is it correct that I still have to specify (copy) or (retain) or have I missed something? I thought using GC didn't require retain and that everything

Re: lots of find/replace in text file

2011-01-25 Thread Matt Neuburg
On Jan 24, 2011, at 6:54 PM, Kyle Sluder wrote: > On Jan 24, 2011, at 6:02 PM, Matt Neuburg wrote: > >> >> (2) A common trick is make the text file a format string (i.e., containing a >> lot of %@) and just hand it to stringWithFormat along with all the >> substitutions. Badda bing badda boo

Disable (grey out) main menu when displaying modal window?

2011-01-25 Thread Darren Wheatley
Hi, I load a custom file import window in my Cocoa app using: [NSApp runModalForWindow:window]; The window displays just fine, and is modal. However, the application main menu is still active (e.g. File menu and items), which is making the modal display redundant. I've googled this and searche

Re: Loading the Foundation at runtime

2011-01-25 Thread Jean-Daniel Dupas
Le 24 janv. 2011 à 17:39, Mathieu Suen a écrit : > Hi All, > > In other to write a binding for a language I need to load the Foundation > framework at run time. > So just to test I wrote a simple example: > > --objc-test.c-- > #include > #include > #include > > void > onLoa