Re: CGImageDestinationSetProperties does not work for animated GIF

2008-11-24 Thread Rob Keniger
On 24/11/2008, at 6:24 AM, Patrick Haruksteiner wrote: CGImageDestinationSetProperties(imageDestination, (CFDictionaryRef)finalGIFImageProperties); I've never worked with this API before, but what happens if you change the above line to this?: CGImageDestinationSetProperties(imageDest

Re: Multiple views in a nib file?

2008-11-24 Thread Graham Cox
On 24 Nov 2008, at 6:17 pm, Jean-Nicolas Jolivet wrote: What I'm trying to do is a bit weird but, it seems to be the only way I can think of implementing such a concept, anyway I'll do my best to explain... so I have an abstract class (let's call it Tools)... basically it just defines some

Re: Need some advice on multithreading

2008-11-24 Thread Peter Duniho
Mike already gave a bunch of good advice, so I'll just try to usefully expand on that (but I also have one "sort-of" disagreement I'll mention :) )... Date: Mon, 24 Nov 2008 01:06:17 +0100 From: WT <[EMAIL PROTECTED]> [...] 2. continuously running the simulation engine, at a rate that can

Re: Remove HTML Tags

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 00:54, Mr. Gecko a écrit : Hello, what's the best way to remove html tags and javascript from a NSString? (I'm working on a web crawler and I'm needing a way to get the contents of a page that doesn't have a description on it.) Thanks, Mr. Gecko Just a suggestion:

Re: Multiple views in a nib file?

2008-11-24 Thread Jean-Nicolas Jolivet
mm interesting reading!... I'm trying to see how I could implement this in my case...I used the "Tool" example as it seemed easier to explain but basically, what the abstract class represents is an "Operation" (just a simple operation performed on some text...).. example of subclass could b

Re: GetApplicationTextEncoding & "carbon free"

2008-11-24 Thread spsaxena
Thanks all for your reply. I would like to go with your suggestion of removing it. S! On Fri, Nov 21, 2008 at 8:57 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > On Fri, Nov 21, 2008 at 4:42 AM, spsaxena <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am working on making my application carbon free. I

Killing a Thread

2008-11-24 Thread Mahaboob
Hi, I¹m developing an application for sending email. This allows the user to restrict, 1. Number of emails to be send simultaneously and 2. Time between emails in seconds. So I used a thread to send the mail. I can send the mails. After sending mail to all email id¹s I need to kill the thread. But

Re: NSXMLElement -stringValue and whitepsace

2008-11-24 Thread Klaus Backert
Am 24.11.2008 um 02:41 schrieb Keith Blount: Thanks for trying... It's a shame... I have an OPML importer (no export) working based on old code I had found based on CFXMLTreeRef, but I was hoping to write an importer/exporter based on NSXMLDocument, and this is the one sticking point - eve

Re: Remove HTML Tags

2008-11-24 Thread Rob Keniger
On 24/11/2008, at 6:54 PM, Jean-Daniel Dupas wrote: Hello, what's the best way to remove html tags and javascript from a NSString? (I'm working on a web crawler and I'm needing a way to get the contents of a page that doesn't have a description on it.) Thanks, Mr. Gecko Just a suggestion

Re: Need some advice on multithreading

2008-11-24 Thread WT
Hi Mike, thank you for taking the time to answer my post. >> Elsewhere, I also found these two Late Night Cocoa podcasts >> >> Concurrent Programming >> http://www.mac-developer-network.com/podcasts/latenightcocoa/episode25/index.html >> >> Lockless Thread-Safe Data Structures >> http://www.ma

Re: NSTableView Problems

2008-11-24 Thread Alexander Spohr
Am 24.11.2008 um 01:21 schrieb Barry Fawthrop: Thank You my datasource methods are as follows: -(int) numberOfRowsInTableView:(NsTableView *)table { return [schedule count]; } -(id)talbeview: (NSTableView *)table objectValueForTableColumn: (NSTableColumn *)col: row:(int)row { return [schedul

Re: Need some advice on multithreading

2008-11-24 Thread Jens Miltner
Am 24.11.2008 um 11:08 schrieb WT: >And to answer one question you asked inline, NSNotificationCenter >delivers all notifications synchronously and immediately on the thread >on which they were sent. It is really just a way of indirectly >invoking methods, it doesn't know or care about threa

Re: Need some advice on multithreading

2008-11-24 Thread WT
Hi Peter, thanks for answering my post. >> [...] >>2. continuously running the simulation engine, at a rate that can also >>be changed dynamically by the user (for instance, in the bouncing >>balls example, increasing gravity makes the balls move faster, thereby >>requiring the engine to r

Re: Multiple views in a nib file?

2008-11-24 Thread Graham Cox
On 24 Nov 2008, at 7:56 pm, Jean-Nicolas Jolivet wrote: mm interesting reading!... I'm trying to see how I could implement this in my case...I used the "Tool" example as it seemed easier to explain but basically, what the abstract class represents is an "Operation" (just a simple operation

Re: Need some advice on multithreading

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 11:35, WT a écrit : >>[...] >>Is this the right idea? Does anyone have a better suggestion? Are >>there any pitfalls that I'm not seeing? One concern I have is that >>there might be some weird interactions between running the simulation >>and drawing the results due to the fact

using C++ STL in Empty Project

2008-11-24 Thread BirdSong
Hi all,I want to use c++ STL in a empty project, but there are some linking errors... Does anyone know how to fix it?Are there any pre-steps to setup the environment (such as set include path, or include some framework, etc).Thanks in advance.Best Wishes! Shuo SongSchool of Software Engineering

RE: using C++ STL in Empty Project

2008-11-24 Thread Luca Ciciriello
Could you please give to me more info? Which compiler are you using? What kind of project are you attempting to build (Obj-C,/Obj-C++/C/C++)? Luca.> From: [EMAIL PROTECTED]> To: cocoa-dev@lists.apple.com> Date: Mon, 24 Nov 2008 12:27:22 +> Subject: using C++ STL in Empty Project> > > Hi a

Re: using C++ STL in Empty Project

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 13:27, BirdSong a écrit : Hi all,I want to use c++ STL in a empty project, but there are some linking errors... Does anyone know how to fix it?Are there any pre- steps to setup the environment (such as set include path, or include some framework, etc).Thanks in advance.Bes

RE: Crash when "loading" window second time

2008-11-24 Thread Ulai Beekam
Hi again,Actually the previous poster idea about unchecking the "release" checkbox in Interface builder works.I wonder then, why don't I have to uncheck this box when using a controller object that inherits from NSWindowController?Also, Hillegass didn't mention this checkbox before in the book

RE: using C++ STL in Empty Project

2008-11-24 Thread Luca Ciciriello
In this case make you sure to use .mm as extension for your module and, as Jean-Daniel Dupas has said, try to link against libstdc++ lib Luca. _ See the most popular videos on the web http://clk.atdmt.com/GBL/go/115454061/direct/01/

Re: NSTableView Problems

2008-11-24 Thread Barry Fawthrop
To All Thank You My main problem was I did not set Identifiers in the IB for the tableColumns So I could not reference each column Having set that and using an NSMutableDictionary helped to get what I was needing. Thank you for your input it sure helped me grasp the concepts Barry Barry Fawt

NaN values from presentationLayer

2008-11-24 Thread DKJ
I have a UIView myView that I animate by changing its center property. During the animation, this line is called by an NSTimer every 0.1 seconds: CGRect myViewFrame = [[myView.layer presentationLayer] frame]; But sometimes this gives me all NaN values in the CGRect, and things go o

Re: Need some advice on multithreading

2008-11-24 Thread Adam R. Maxwell
On Nov 24, 2008, at 2:27 AM, Jens Miltner wrote: Am 24.11.2008 um 11:08 schrieb WT: >And to answer one question you asked inline, NSNotificationCenter >delivers all notifications synchronously and immediately on the thread >on which they were sent. It is really just a way of indirectly >i

Re: Need some advice on multithreading

2008-11-24 Thread glenn andreas
On Nov 24, 2008, at 4:35 AM, WT wrote: Hi Peter, thanks for answering my post. >> [...] >>2. continuously running the simulation engine, at a rate that can also >>be changed dynamically by the user (for instance, in the bouncing >>balls example, increasing gravity makes the balls move fast

Call getElementById in Cocoa

2008-11-24 Thread Pierce Freeman
Hi everyone. I am wondering if there is some way to call the getElementById on a website through Cocoa, and then return the value of the field. I am assuming it would somehow be through WebKit, but I am not sure how to do this (as well as if the method needs a different way to get the page's code

Re: Call getElementById in Cocoa

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 16:42, Pierce Freeman a écrit : Hi everyone. I am wondering if there is some way to call the getElementById on a website through Cocoa, and then return the value of the field. I am assuming it would somehow be through WebKit, but I am not sure how to do this (as well as

Re: Killing a Thread

2008-11-24 Thread Nick Zitzmann
On Nov 24, 2008, at 2:02 AM, Mahaboob wrote: So I used a thread to send the mail. I can send the mails. After sending mail to all email id’s I need to kill the thread. But I failed to do that and my application getting crashed after sending the mail. I think I should write the code for tha

Re: main thread communicating with background thread and vice-versa

2008-11-24 Thread Joseph Kelly
From what I can tell, clicking the button is not setting mainThreadParm = kStopped. Set a breakpoint in your action method to verify. Since (I assume) mainThreadParm is a member variable of your Controller class instance (and therefore accessible to all object methods of the class) it won't

Re: Killing a Thread

2008-11-24 Thread Joseph Kelly
Why can't your thread just return when it's finished? On Nov 24, 2008, at 1:02 AM, Mahaboob wrote: Hi, I’m developing an application for sending email. This allows the user to restrict, 1. Number of emails to be send simultaneously and 2. Time between emails in seconds. So I used a thread t

Re: Call getElementById in Cocoa

2008-11-24 Thread John Terranova
On Nov 24, 2008, at 8:11 AM, Jean-Daniel Dupas wrote: You call -mainFrameDocument on your WebView to get a DOMDocument instance, and have access to the DOM functions from here (there is no up-to-date doc of the Cocoa DOM API, you will have to check headers files directly to see what functi

Re: Call getElementById in Cocoa

2008-11-24 Thread Mike Abdullah
On 24 Nov 2008, at 16:45, John Terranova wrote: On Nov 24, 2008, at 8:11 AM, Jean-Daniel Dupas wrote: You call -mainFrameDocument on your WebView to get a DOMDocument instance, and have access to the DOM functions from here (there is no up-to-date doc of the Cocoa DOM API, you will have t

Re: Call getElementById in Cocoa

2008-11-24 Thread Matt Long
You can use an NSXMLDocument: NSString *webpageString = [[[NSString alloc] initWithContentsOfURL:@"http://www.google.com "] autorelease]; NSError *error = nil; NSXMLDocument *document = [[NSXMLDocument alloc] initWithXMLString:webpageString

Re: Need some advice on multithreading

2008-11-24 Thread WT
>> [...] >>2. continuously running the simulation engine, at a rate that can also >>be changed dynamically by the user (for instance, in the bouncing >>balls example, increasing gravity makes the balls move faster, thereby >>requiring the engine to run more often in order to preserve accura

Re: Call getElementById in Cocoa

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 18:03, Mike Abdullah a écrit : On 24 Nov 2008, at 16:45, John Terranova wrote: On Nov 24, 2008, at 8:11 AM, Jean-Daniel Dupas wrote: You call -mainFrameDocument on your WebView to get a DOMDocument instance, and have access to the DOM functions from here (there is no up

Re: Animated subviews

2008-11-24 Thread David Duncan
On Nov 23, 2008, at 9:54 AM, DKJ wrote: Now I'm getting a very odd result. In the code for a UIView I have this: CALayer *theLayer = self.layer; id pLayer = [theLayer presentationLayer]; The first line is fine, but for the second I get a compiler warning: no '-presen

Re: Core Animation: How to swicth off all implicit animations?

2008-11-24 Thread David Duncan
On Nov 22, 2008, at 11:41 AM, Wolf Hauser wrote: Question: is there a (simple) way to switch all these implicit behaviors off (while keeping the possibility to stack the two views in layers)? Since this doesn't appear to have been answered, there is a long mechanism that determines what

Re: NaN values from presentationLayer

2008-11-24 Thread David Duncan
On Nov 24, 2008, at 6:53 AM, DKJ wrote: I have a UIView myView that I animate by changing its center property. During the animation, this line is called by an NSTimer every 0.1 seconds: CGRect myViewFrame = [[myView.layer presentationLayer] frame]; But sometimes this gives me all N

Re: Need some advice on multithreading

2008-11-24 Thread WT
For instance, as far as I know, there is no way to change the period of an NSTimer that's already in existence. Since both the simulation update rate and the frame update rate are timer-driven and dynamically changeable by the user, I expect lots of NSTimer objects to be created. I thin

Re: Call getElementById in Cocoa

2008-11-24 Thread Mike Abdullah
On 24 Nov 2008, at 17:28, Jean-Daniel Dupas wrote: Le 24 nov. 08 à 18:03, Mike Abdullah a écrit : On 24 Nov 2008, at 16:45, John Terranova wrote: On Nov 24, 2008, at 8:11 AM, Jean-Daniel Dupas wrote: You call -mainFrameDocument on your WebView to get a DOMDocument instance, and have a

Re: Multiple views in a nib file?

2008-11-24 Thread Jean-Nicolas Jolivet
Thanks a lot for your reply! It does help a lot to see how someone else implemented a similar concept!... I love the multiple controllers (1 per subclass) / Multiple views (again, 1 per subclass) idea... I'll try to implement it for my situation as it seems to be the best way to go... I'

Re: Call getElementById in Cocoa

2008-11-24 Thread Frédéric Testuz
Le 24 nov. 08 à 18:34, Mike Abdullah a écrit : On 24 Nov 2008, at 17:28, Jean-Daniel Dupas wrote: Le 24 nov. 08 à 18:03, Mike Abdullah a écrit : On 24 Nov 2008, at 16:45, John Terranova wrote: On Nov 24, 2008, at 8:11 AM, Jean-Daniel Dupas wrote: You call -mainFrameDocument on your We

Re: Need some advice on multithreading

2008-11-24 Thread Michael Ash
On Mon, Nov 24, 2008 at 5:08 AM, WT <[EMAIL PROTECTED]> wrote: >>- First, don't use NSOperationQueue unless you can stand to have your >>app crash from time to time, or unless you can require Snow Leopard. >>It's crashy and I have no particular hope that Apple is going to make >>it stop being crash

Re: Special Characters... menu item

2008-11-24 Thread Aki Inoue
There is no sure way of preventing it to be added. The menu item and the Character Palette accessed from it is a part of Mac OS X user experience. Why disable ? Aki On 2008/11/22, at 14:51, [EMAIL PROTECTED] wrote: Hi, Is there a way to keep "Special Characters..." from being added to

Re: NSTypesetter problem

2008-11-24 Thread Aki Inoue
NSATSTypesetter trying to create a new instance is a normal behavior. When the typesetter detects it's being invoked to layout recursively, it instantiates a copy. The real culprit here is probably at #15 -[TTypesetter setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:] that's tri

CALayer containing a view

2008-11-24 Thread Kenneth Ballenegger
Hello, I cannot find anything in the docs regarding this. Is it possible, and if so, how, to set a layer's content to a view? The doc for the content propriety says it should be a CGImageRef, and the delegate methods seem to be for drawing content like one would draw in a view. Also, can i

Core Data/Bindings issue

2008-11-24 Thread Paul Tomlin
Hi, Precis: I'm sometimes seeing what appears to be the result of [(NSManagedObject) description] in an NSPopUpButton instead of the expected value as set in bindings. I've got a Core Data Document Based Application in which I'm seeing occasional issues with a binding. The application u

Re: Remove HTML Tags

2008-11-24 Thread Mr. Gecko
I am just using a php script because it's easier. On Nov 24, 2008, at 2:54 AM, Jean-Daniel Dupas wrote: Le 24 nov. 08 à 00:54, Mr. Gecko a écrit : Hello, what's the best way to remove html tags and javascript from a NSString? (I'm working on a web crawler and I'm needing a way to get the c

Re: Need some advice on multithreading

2008-11-24 Thread WT
>> Is that the general consensus? I've now seen a few examples and they all >> seem to work fine. Then, again, extrapolating from a small sample is always >> dangerous... > >No, it's not a general consensus. It's something I discovered on my >own, and posted about it here. I haven't received a

How to debug GC related EXC_BAD_ACCESS

2008-11-24 Thread Nirias
I have a garbage collected application that runs (apparently) flawlessly with a debug build. But with a release build it promptly fails with an EXC_BAD_ACESS error. My guess is that somehow the GC is not seeing a clear reference to some object(s) and is releasing them too soon. Is there a recomme

Re: Core Data/Bindings issue

2008-11-24 Thread Benjamin Stiglitz
The popup button has: Content bound to MyArrayController.arrangedObjects Content Values bound to MyArrayController.arrangedObjects.name Sometimes, and is vaguely seems to be related to changing the XIB, the labels of the cells in the popup are what I would expect from calling -description on

Re: iPhone Development Lists

2008-11-24 Thread I. Savant
> I noticed that there is NOT an iPhone Dev list on this server. Does anyone > have any recommendations for newbie iPhone development? The only one I know > of is iPhoneDevCentral.Org, however it is quite limited at the moment? Have you searched this list's archives or read the details of the

iPhone Development Lists

2008-11-24 Thread Greg Deward
Good afternoon! I noticed that there is NOT an iPhone Dev list on this server. Does anyone have any recommendations for newbie iPhone development? The only one I know of is iPhoneDevCentral.Org, however it is quite limited at the moment? Thanx, in advance. -- Greg _

Re: Remove HTML Tags

2008-11-24 Thread Douglas Davidson
On Nov 24, 2008, at 2:02 AM, Rob Keniger wrote: On 24/11/2008, at 6:54 PM, Jean-Daniel Dupas wrote: Hello, what's the best way to remove html tags and javascript from a NSString? (I'm working on a web crawler and I'm needing a way to get the contents of a page that doesn't have a descripti

Re: CALayer containing a view

2008-11-24 Thread David Duncan
On Nov 24, 2008, at 1:54 AM, Kenneth Ballenegger wrote: I cannot find anything in the docs regarding this. Is it possible, and if so, how, to set a layer's content to a view? You might try setting up a delegate that calls the view's -drawRect: method, but this may not work in all cases. This

Re: Determining use of serial comma

2008-11-24 Thread Aki Inoue
I believe the serial comma is, in a strict sense, not tied to any particular locale even though it's commonly used in US. Also, it's advisable not to try algorithmically formatting localized strings like this. It often causes issues with other locales because it's very hard for a single per

Re: Need some advice on multithreading

2008-11-24 Thread Ken Thomases
On Nov 24, 2008, at 1:39 PM, WT wrote: That's exactly what I had done in the first place, but the results weren't too good. I then wrote a much simpler app (one bouncing ball) to test possible solutions and, of course, started with this very approach. For fun, I allow the user to rotate the

Re: NSPopupUpButton not showing checked menu items

2008-11-24 Thread Peter Ammon
On Nov 23, 2008, at 3:33 PM, Steve Christensen wrote: On Nov 23, 2008, at 3:05 PM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 6:01 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: The class methods also don't make a distinction between popup and pulldown, so I would think that the "selecti

Re: NSPopupUpButton not showing checked menu items

2008-11-24 Thread Steve Christensen
On Nov 24, 2008, at 12:53 PM, Peter Ammon wrote: On Nov 23, 2008, at 3:33 PM, Steve Christensen wrote: On Nov 23, 2008, at 3:05 PM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 6:01 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: The class methods also don't make a distinction between popup

Re: NSPopupUpButton not showing checked menu items

2008-11-24 Thread Peter Ammon
On Nov 24, 2008, at 1:21 PM, Steve Christensen wrote: On Nov 24, 2008, at 12:53 PM, Peter Ammon wrote: On Nov 23, 2008, at 3:33 PM, Steve Christensen wrote: On Nov 23, 2008, at 3:05 PM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 6:01 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: The c

Re: Need some advice on multithreading

2008-11-24 Thread WT
That's exactly what I had done in the first place, but the results weren't too good. I then wrote a much simpler app (one bouncing ball) to test possible solutions and, of course, started with this very approach. For fun, I allow the user to rotate the container and, sure enough, the ball h

NSOpenPanel Preview

2008-11-24 Thread David Blanton
I have a custom file format which when selected in an NSOpenPanel I want to show a preview. I can only find information on showing a preview through Navigation Services. Should I use Navigation Services (ugly api)? I want to use NSOpenPanel. David Blanton

Re: Need some advice on multithreading

2008-11-24 Thread Scott Ribe
You can also drop down below Cocoa. See MPQueue, and google MP2POSIX. Further discussion would probably be more productive on the mt-smp or perfoptimization-dev lists. I had typed up much more info, but apparently there's a magic key in Entourage that clears the text of a draft, closes the window,

Re: NSOpenPanel Preview

2008-11-24 Thread Corbin Dunn
Le Nov 24, 2008 à 2:36 PM, David Blanton a écrit : I have a custom file format which when selected in an NSOpenPanel I want to show a preview. I can only find information on showing a preview through Navigation Services. Should I use Navigation Services (ugly api)? No... I want to use

Re: NSOpenPanel Preview

2008-11-24 Thread Mike Abdullah
You want to write a Quick Look generator. http://developer.apple.com/documentation/UserExperience/Conceptual/Quicklook_Programming_Guide/Introduction/chapter_1_section_1.html#/ /apple_ref/doc/uid/TP40005020-CH1-DontLinkElementID_5 On 24 Nov 2008, at 22:36, David Blanton wrote: I have a custom

Re: Using PDF for help --- with spotlight search?

2008-11-24 Thread Russ
I'm trying to get spotlight search support for my PDF help file, users expect it to work since the input field is there. This is legit: Apple Final Cut Pro has PDF-based help. I've been studying what Final Cut Pro does--- it has CFBundleHelpBookFolder set to a folder containing the PDF, and it

Re: NSOpenPanel Preview

2008-11-24 Thread David Blanton
Cool. I'll look at QuickLook. David Blanton ___ 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/Unsubscri

Re: NSPopupUpButton not showing checked menu items

2008-11-24 Thread Steve Christensen
On Nov 23, 2008, at 11:26 PM, Benjamin Dobson wrote: Actually, I only wanted to select a single item in the pulldown case, the same as what correctly happens for me in the popup case. The problem has always been that, even though the button itself is reporting that a particular item is "sel

[Reposted] Document based resource strategy

2008-11-24 Thread Carlos Eduardo Mello
Hi, [ I'm reposting this since it apparently didn't go through the first time... ] Newbie questions here. I've been studying Hillegass's book and Apple's Guides and just started to prepare for implementing my own code. I know similar questions have been asked here recently but it I am st

Re: Call getElementById in Cocoa

2008-11-24 Thread Pierce Freeman
Does this code convey what you are saying/how to do this? IBOutlet id webView; NSString *urlOfObject = [NSString stringWithFormat: @"http://www.somesite.com/hiddenFieldPage.php";]; [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlOfObject]]]; DomDocument *d

Re: CGImageDestinationSetProperties does not work for animated GIF

2008-11-24 Thread Patrick Haruksteiner
That was the way I tried it before - like the docs suggested - but it did not work. On my search for a solution to this problem I came across this: http://pojos-devlog.blogspot.com/2005/08/saving-animated-gif-using- coregraphics.html I thought that this is the solution to my problem, but i

Re: Call getElementById in Cocoa

2008-11-24 Thread Jean-Daniel Dupas
The link I provided is for another option, using Javascript call to retreive the value, but I think using the native DOM API is prefered. Note that before calling mainFrameDocument, you should make sure the document is loaded. There is probably a WebView delegate method that provide this in

Re: NSOpenPanel Preview

2008-11-24 Thread Graham Cox
On 25 Nov 2008, at 10:12 am, David Blanton wrote: Cool. I'll look at QuickLook. David Blanton Also, note that if you can write your file preview as a PDF or other image (JPEG), and your file is packaged, you don't need to write a QL plug-in, you just need to add a QuickLook folder to y

Fully justified text on a single line

2008-11-24 Thread Graham Cox
I need to layout some text fully justified even if it's only one line or even one word. The standard layout never justifies the last line, even when the paragraph alignment is set to NSJustifiedTextAlignment, and for one line, the first line is the last line... I can't see a way to set a fl

Re: Need some advice on multithreading

2008-11-24 Thread Peter Duniho
Date: Mon, 24 Nov 2008 11:35:42 +0100 From: WT <[EMAIL PROTECTED]> Hi Peter, thanks for answering my post. Happy to. :) [...] While it may wind up making sense to put the simulation engine in a separate thread, I would recommend _not_ trying to adjust the simulation rate to account for th

Re: Call getElementById in Cocoa

2008-11-24 Thread Pierce Freeman
Okay, sounds good. Just making sure, would that code would work? Sincerely, Pierce F On 11/24/08 3:54 PM, "Jean-Daniel Dupas" <[EMAIL PROTECTED]> wrote: > The link I provided is for another option, using Javascript call to > retreive the value, but I think using the native DOM API is prefere

Re: MVC in Cocoa?

2008-11-24 Thread Michael Hines
Have you read the MVC introduction from Apple? < http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html > sherm-- So I read the MVC introduction and a bunch of the other design patterns documents, this is how I see the models worki

Re: Call getElementById in Cocoa

2008-11-24 Thread Adam R. Maxwell
On Nov 24, 2008, at 5:10 PM, Pierce Freeman wrote: Okay, sounds good. Just making sure, would that code would work? It looked fine to me; I use something similar for loading URLs in an offscreen webview. As Jean-Daniel pointed out, you'll have to use the delegate methods to tell when it

NSAnimation subclass calling display on a view

2008-11-24 Thread David Alter
I'm creating an animation using NSAnimation. I have created a subclass of NSAnimation that over loads setCurrentProgress. The delegate is a subclass of NSImageView. When setCurrentProgress gets called I call my delegate display method. My drawRect method in my subclass of NSImageView identifies if

Re: iPhone Development Lists

2008-11-24 Thread Bruno Sanz Marino
Here you have 2 lists on the web There are more... http://forums.macrumors.com/forumdisplay.php?f=135 http://www.iphonedevsdk.com/forum/iphone-sdk-development/ I. Savant escribió: I noticed that there is NOT an iPhone Dev list on this server. Does anyone have any recommendations for newbie

Re: Call getElementById in Cocoa

2008-11-24 Thread Pierce Freeman
Hi Adam: Thanks for your response, though I am wondering how I could make the delegate method. I know how to do it for NSWorkspace, however not for WebKit. Sincerely, Pierce F. On 11/24/08 5:41 PM, "Adam R. Maxwell" <[EMAIL PROTECTED]> wrote: > > On Nov 24, 2008, at 5:10 PM, Pierce Freeman

Re: Call getElementById in Cocoa

2008-11-24 Thread Adam R. Maxwell
On Nov 24, 2008, at 5:53 PM, Pierce Freeman wrote: Thanks for your response, though I am wondering how I could make the delegate method. I know how to do it for NSWorkspace, however not for WebKit. Call -[WebView setFrameLoadDelegate:] and then implement whatever WebFrameLoadDelegate metho

Re: Call getElementById in Cocoa

2008-11-24 Thread Pierce Freeman
Sorry for my newbie-ness, but I still don't really get what you are talking about. Are you saying that I should do this: [WebView setFrameLoadDelegate:didFinishLoadForFrame]; - (void)didFinishLoadForFrame { // Do stuff } Sincerely, Pierce F. On 11/24/08 6:02 PM, "Adam R. Maxwell" <[EMAI

Re: MVC in Cocoa?

2008-11-24 Thread Clark Cox
On Thu, Nov 20, 2008 at 4:13 PM, Michael Hines <[EMAIL PROTECTED]> wrote: > Hey guys, > > This is my first message to the mailing list, so please let me know if > I violate any form of etiquette. I apologize ahead of time. > > This is also my first Obj-C and Cocoa application. > > My application i

Re: Call getElementById in Cocoa

2008-11-24 Thread Adam R. Maxwell
On Nov 24, 2008, at 6:32 PM, Pierce Freeman wrote: Sorry for my newbie-ness, but I still don't really get what you are talking about. Are you saying that I should do this: [WebView setFrameLoadDelegate:didFinishLoadForFrame]; - (void)didFinishLoadForFrame { // Do stuff } No. Here you

Re: Multiple views in a nib file?

2008-11-24 Thread Graham Cox
On 25 Nov 2008, at 4:56 am, Jean-Nicolas Jolivet wrote: Thanks a lot for your reply! It does help a lot to see how someone else implemented a similar concept!... I love the multiple controllers (1 per subclass) / Multiple views (again, 1 per subclass) idea... I'll try to implement it for

Re: Call getElementById in Cocoa

2008-11-24 Thread Pierce Freeman
Okay Adam, I think I am beginning to understand. However, I just get two problems trying to run that code: 1. error: 'request' undeclared (first use in this function) 2. warning: 'webView' may not respond to '+isLoading' Thanks for your help. Sincerely, Pierce Freeman -- Pierce Freeman [EMA

Re: Need some advice on multithreading

2008-11-24 Thread Peter N Lewis
At 13:38 -0500 24/11/08, Michael Ash wrote: No, it's not a general consensus. It's something I discovered on my own, and posted about it here. I haven't received any overall confirmation that it's broken, but my simple test project was able to reliably crash on perhaps half a dozen different hard