Re: using AppleScript to print an HTML document

2017-09-25 Thread Jens Alfke
> On Sep 24, 2017, at 1:22 PM, Alan Snyder <applemail832...@cbfiddle.com> wrote: > > I’m trying to use AppleScript to get Safari to print an HTML document > (showing the print dialog) and am having no luck with the direct approach. This isn’t really a Cocoa developm

using AppleScript to print an HTML document

2017-09-24 Thread Alan Snyder
I’m trying to use AppleScript to get Safari to print an HTML document (showing the print dialog) and am having no luck with the direct approach. This script times out without opening a print dialog or printing the document: tell application "Safari" print POSIX file "/Us

Converting from RTF to HTML misses out image tags

2014-04-25 Thread Pax
I'm trying to convert from RTF to HTML like so: NSAttributedString* rtfContent = [[NSAttributedString alloc]initWithRTF:rtfData documentAttributes:nil]; NSData* htmlData = [rtfContent dataFromRange:NSMakeRange(0, rtfContent.length) documentAttributes

HTML emails from Objective C

2013-12-22 Thread Bryan Schmiedeler
I am trying to write an HTML email using Objective C. I have the HTML all done, now I am just putting it into mutable string line by line. I am using / to escape when I need a quote in the HTML.  This I think will work but sure seems tedious. Is there something I am missing, some library

Re: HTML emails from Objective C

2013-12-22 Thread Diederik Meijer | Ten Horses
Can you post your code please? Op Nov 26, 2013, om 9:16 PM heeft Bryan Schmiedeler bryanschmiede...@me.com het volgende geschreven: I am trying to write an HTML email using Objective C. I have the HTML all done, now I am just putting it into mutable string line by line. I am using

Re: HTML emails from Objective C

2013-12-22 Thread Mike Abdullah
On 26 Nov 2013, at 20:16, Bryan Schmiedeler bryanschmiede...@me.com wrote: I am trying to write an HTML email using Objective C. I have the HTML all done, now I am just putting it into mutable string line by line. I am using / to escape when I need a quote in the HTML. This I think

Re: HTML emails from Objective C

2013-12-22 Thread Jens Alfke
On Nov 26, 2013, at 12:16 PM, Bryan Schmiedeler bryanschmiede...@me.com wrote: I have the HTML all done, now I am just putting it into mutable string line by line. I am using / to escape when I need a quote in the HTML. Are you saying you’re putting the HTML in hardcoded string constants

Re: HTML emails from Objective C

2013-12-22 Thread Uli Kusterer
On 26 Nov 2013, at 21:16, Bryan Schmiedeler bryanschmiede...@me.com wrote: I am trying to write an HTML email using Objective C. I have the HTML all done, now I am just putting it into mutable string line by line. I am using / to escape when I need a quote in the HTML. This I think

Re: UILabel HTML to attributed string conversion: odd font choice for em text

2013-12-17 Thread Jens Alfke
to define a custom font/style mapping, then insert that into the HTML… —Jens ___ 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

Re: UILabel HTML to attributed string conversion: odd font choice for em text

2013-12-17 Thread Steve Christensen
some CSS to define a custom font/style mapping, then insert that into the HTML… I'm doing this same sort of thing in several locations within the app which would mean providing CSS for each as a workaround. Not the most elegant solution but for now I have ended up post-processing the attributed

UILabel HTML to attributed string conversion: odd font choice for em text

2013-12-17 Thread Steve Christensen
I have formatted text delivered to the app as HTML that I am converting to a NSAttributedString and then assigning to a UILabel like this: NSDictionary* options = @{ NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding), NSDefaultAttributesDocumentAttribute

HTML to Text to Tagged Text to XHTML

2013-08-25 Thread Thomas Wetmore
I am looking for some pointers or advice. I am developing an application to semantically tag HTML pages with genealogical information as defined by the schema.org/Person object and related objects. The NLP required to do the semantic analysis resides in a well-proven text processing library

Re: HTML to Text to Tagged Text to XHTML

2013-08-25 Thread Jens Alfke
Some thoughts: If you just convert the HTML to a plain string, you’ve lost the knowledge of how the characters in that string map back to the HTML, and I don’t think you can feasibly put it back together after modifying the string. There are two approaches I can see. (1) Use

sending html file to safari for printing

2012-06-06 Thread Amy Gibbs
I've got an app I've written for myself, it's mac core data based. I need to be able to output a printout of some data, it would basically be a table with some images and data. I think the easiest thing to do may be to create an HTML page that can then be opened in Safari. I can manage

Re: sending html file to safari for printing

2012-06-06 Thread Jens Alfke
On Jun 6, 2012, at 9:08 AM, Amy Gibbs wrote: I can manage creating and saving the HTML file, how do I automatically open it up in Safari (or the default browser it doesn't matter) so I can print it out? Tell NSWorkspace to open the file. —Jens

Re: sending html file to safari for printing

2012-06-06 Thread Frédéric Testuz
Le 6 juin 2012 à 18:08, Amy Gibbs a écrit : I've got an app I've written for myself, it's mac core data based. I need to be able to output a printout of some data, it would basically be a table with some images and data. I think the easiest thing to do may be to create an HTML page

How to display HTML in proper format in a NSTextView

2011-11-29 Thread Sandeep Mohan Bhandarkar
Hi All, I am trying to display HTML content in a NSTextView in such a way that the HTML content is visible within the Text area and the user can also edit the Non HTML sections. for doing this I have made use of the following code. NSAttributedString *attrString = [[NSAttributedString alloc

Re: How to display HTML in proper format in a NSTextView

2011-11-29 Thread Fritz Anderson
On 29 Nov 2011, at 3:27 AM, Sandeep Mohan Bhandarkar wrote: Here htmlData is an NSData object that has been initialized with the contents of an HTML File. However on doing this the HTML Displayed in the Text view does not seem to be formatted correctly. Please see the figure below

Re: How to display HTML in proper format in a NSTextView

2011-11-29 Thread Jens Alfke
On Nov 29, 2011, at 1:27 AM, Sandeep Mohan Bhandarkar wrote: Here htmlData is an NSData object that has been initialized with the contents of an HTML File. However on doing this the HTML Displayed in the Text view does not seem to be formatted correctly. Please see the figure below

RE: MFMailComposeViewController: referencing attached data in HTML body

2011-06-27 Thread Pierre Fournier
Great, thanks Heath. Date: Sun, 26 Jun 2011 21:23:02 -0500 From: heath.bord...@gmail.com To: cocoa-dev@lists.apple.com Subject: Re: MFMailComposeViewController: referencing attached data in HTML body You could base64 your image data and use a data url to refer to it within your HTML

MFMailComposeViewController: referencing attached data in HTML body

2011-06-26 Thread Pierre Fournier
Hi,is there a way to reference the attached data within the HTML body?[mailController addAttachmentData:pngDataFooter mimeType:@image/png fileName:@footer.png];[mailController setMessageBody:@htmlbodyimg src=\footer.png\/body/html isHTML:TRUE];When running such code, I get a blue question

Re: MFMailComposeViewController: referencing attached data in HTML body

2011-06-26 Thread Heath Borders
You could base64 your image data and use a data url to refer to it within your HTML. Then, you wouldn't have to attach it. -Heath Borders heath.bord...@gmail.com Twitter: heathborders http://heath-tech.blogspot.com On Sun, Jun 26, 2011 at 6:14 PM, Pierre Fournier shir...@hotmail.com wrote

Re: Adding HTML data to the general pasteboard

2011-05-28 Thread Kyle Sluder
On Thu, May 26, 2011 at 11:43 PM, Patrick Robertson robertson.patr...@gmail.com wrote: I currently have an application which pastes objects from a given list of saved objects (basically strings) to wherever the mouse if focused. What I'm looking to do is paste these objects in RT format into

Re: Adding HTML data to the general pasteboard

2011-05-28 Thread Kyle Sluder
alternative, I'd be impressed :) Thanks for your help. I was actually in the process of adding a `htmlForString` method to my NSString class that would convert a URL into its HTML representation (a href=...url..url.../a I guess there won't be a need for that now. Bringing this back on-list

Adding HTML data to the general pasteboard

2011-05-27 Thread Patrick Robertson
... is, for example public.rtf or public.html I'm assuming I need to first convert the string into a HTML type string? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Adding HTML data to the general pasteboard

2011-05-27 Thread Patrick Robertson
OK, so after a bit more looking into this, it seems I need to convert a string: @http://example.com; into two NSData objects. One for RTF and one for HTML, then add these to the pasteboard as different types. What would you all suggest as the best way of converting the above string into RTF

UIWebView HTML to match UITextView

2011-03-21 Thread BareFeetWare
Hi all, I'm trying to show text in a UIWebView to match exactly how it appears in a UITextView. Is there a standard library or subclass to do this? I've got it mostly working, by programmatically implementing what is basically a copy of the HTML syntax produced by TextEdit. But a few things

HTML Writer class

2011-03-21 Thread Philip Vallone
Hi list, Is there a Cocoa Touch class for creating HTML documents? For example, in C# there is the HTMLDoument class. I searched the reference docs, but came up empty. Regards, Phil ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: HTML Writer class

2011-03-21 Thread Mike Abdullah
https://github.com/karelia/KSHTMLWriter Standard BSD license On 21 Mar 2011, at 13:04, Philip Vallone wrote: Hi list, Is there a Cocoa Touch class for creating HTML documents? For example, in C# there is the HTMLDoument class. I searched the reference docs, but came up empty

Re: HTML Writer class

2011-03-21 Thread Philip Vallone
Thanks Mike! On Mar 21, 2011, at 10:45 AM, Mike Abdullah wrote: https://github.com/karelia/KSHTMLWriter Standard BSD license ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: UIWebView HTML to match UITextView

2011-03-21 Thread Matt Neuburg
On Mon, 21 Mar 2011 20:58:40 +1100, BareFeetWare list.develo...@barefeetware.com said: Hi all, I'm trying to show text in a UIWebView to match exactly how it appears in a UITextView. Is there a standard library or subclass to do this? This might not be possible, as they may use two completely

Re: UIWebView HTML to match UITextView

2011-03-21 Thread BareFeetWare
to layout my text, some time back, and it uses very different spacing. WebKit and UITextView seem identical, down to the pixel, in layout, with only a few small exceptions, like the ones I mentioned earlier. I have my own class and methods for converting text to HTML (including converting to lt

Inconsistent HTML data in WebView

2011-02-02 Thread Bruce Cresanta
Hello, I noticed that in the didFinishLoadForFrame delegate method that the data in [[[sender mainFrame] dataSource] data] is blank for some websites. When the web page loaded is http:// www.google.com is works beautifully. When the web page loaded is http://www.php.net it doesn't

Add video issue using HTML with JSON wrapper IOS4

2010-08-19 Thread Kevin Phillips
Hello all, The current project I am working on is based in the HTML language with a java wrapper to go on the iphone IOS4. My current issue is that video is not being handled the way I want it to. The video should open with 1 click and return to the previous screen. If anyone has any advice

Re: Add video issue using HTML with JSON wrapper IOS4

2010-08-19 Thread Kyle Sluder
On Thu, Aug 19, 2010 at 12:32 PM, Kevin Phillips kevin.a...@gmail.com wrote: The current project I am working on is based in the HTML language with a java wrapper to go on the iphone IOS4. None of this has to do with Cocoa. ___ Cocoa-dev mailing

HTML link tree browser OS component

2010-04-30 Thread jonat...@mugginsoft.com
Is anyone aware of a BSD like licensed component that provides a way of browsing a tree of supplied HTML links? Think: 1. xcode documentation browser style window. 2. tree of external links on the left - supplied as XML. 3. webkit view on the right. 4. search field searches site of currently

Weird Parsed HTML string into NSXMLDocument

2010-02-01 Thread Gustavo Pizano
Hello all: I have a string with the html I created, i the following: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=UTF-8

Re: Weird Parsed HTML string into NSXMLDocument

2010-02-01 Thread Gustavo Pizano
Pizano wrote: Hello all: I have a string with the html I created, i the following: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text

Re: determining HTML text encoding

2010-01-31 Thread Rainer Standke
Hello again, it turns out that the WebKit.framework includes the header for DOMDocument. Nonetheless, I seem to be unable to get anything out of the DOMDocument but (null). Any other ideas? Thanks, Rainer On Jan 29, 2010, at 15:30 , Jens Alfke wrote: On Jan 29, 2010, at 12:33 PM,

determining HTML text encoding

2010-01-29 Thread Rainer Standke
Hello, I have an app that loads a web page into a webView. From that I grab the main frame's html text like so: NSString *htmlString = [[[NSString alloc] initWithData:[[frame dataSource] data] encoding:NSISOLatin1StringEncoding] autorelease]; I am wondering how I could detect the html

Re: determining HTML text encoding

2010-01-29 Thread Paul Sanders
. - Original Message - From: Rainer Standke li...@standke.com To: Cocoa List Cocoa-dev@lists.apple.com Sent: Friday, January 29, 2010 6:46 PM Subject: determining HTML text encoding Hello, I have an app that loads a web page into a webView. From that I grab the main frame's html text

Re: determining HTML text encoding

2010-01-29 Thread Jens Alfke
On Jan 29, 2010, at 10:46 AM, Rainer Standke wrote: I have an app that loads a web page into a webView. From that I grab the main frame's html text like so: NSString *htmlString = [[[NSString alloc] initWithData:[[frame dataSource] data] encoding:NSISOLatin1StringEncoding] autorelease]; I

Re: determining HTML text encoding

2010-01-29 Thread Rainer Standke
? As far as I can tell I am trying to use Javascript here, no? Thanks! Rainer On Jan 29, 2010, at 11:33 , Jens Alfke wrote: On Jan 29, 2010, at 10:46 AM, Rainer Standke wrote: I have an app that loads a web page into a webView. From that I grab the main frame's html text like so

Re: determining HTML text encoding

2010-01-29 Thread Jens Alfke
On Jan 29, 2010, at 12:33 PM, Rainer Standke wrote: NSLog(@%@, [frame.DOMDocument.characterSet class]); I get an error: request for member 'characterSet' in something not a structure or union You may need to #import the header for DOMDocument. As far as I can tell I am trying to use

Converting an NSAttributedString into an html string

2010-01-15 Thread Gustavo Pizano
]) documentAttributes:htmlAtt error:error]; NSAttributedString * htmlString = [[NSAttributedString alloc] initWithData:htmlData options:nil documentAttributes:htmlAtt error:error]; in htmlData, I have DATa .. :P. but know I need to get the html formatted string, I mean, if Im right and Darin

Re: Converting an NSAttributedString into an html string

2010-01-15 Thread Gustavo Pizano
!!! NSArray * exclude = [NSArray arrayWithObjects:@doctype, @html, @head, @body,@xml,nil]; NSDictionary * htmlAtt = [NSDictionary dictionaryWithObjectsAndKeys:NSHTMLTextDocumentType,NSDocumentTypeDocumentAttribute,exclude,NSExcludedElementsDocumentAttribute,nil]; NSError * error

Re: Using HTML form in cocoa app

2009-11-14 Thread Jerry Krinock
On 2009 Nov 12, at 09:16, Mark Reddick wrote: Hey all. I'm trying to figure out how to use an HTML form in a cocoa application... Looks like WebKit to me. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/WebKit/ObjC_classic/Intro/IntroWK.html

Using HTML form in cocoa app

2009-11-13 Thread Mark Reddick
Hey all. I'm trying to figure out how to use an HTML form in a cocoa application. The situation is that I need to be able to read files that contain an HTML page with an HTML form in it. I then need to somehow present this form to the user (in my cocoa app) and let them fill it out

Cocoa HTML template engine?

2009-11-04 Thread Jens Alfke
I want to populate a WebView with some nicely-styled HTML depicting an Objective-C data model. The nicest way to do this is with some sort of template engine, so I can tweak the output by editing HTML-like templates rather than messing with code. I've already written this twice before

Re: Cocoa HTML template engine?

2009-11-04 Thread jonat...@mugginsoft.com
I haven't used it but I recall that MGTemplateEngine can generate html. Might be worth a look. http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa Regards Jonathan Mitchell Developer http://www.mugginsoft.com On 4 Nov 2009, at 17:15, Jens Alfke wrote: I want

Re: Problems choosing an encoding for Word generated html

2009-06-01 Thread Michael Ash
On Sun, May 31, 2009 at 7:08 PM, Ken Tozier kentoz...@comcast.net wrote: Hi I wrote an app that converts Word files into a simpler format by first converting from .doc to html using scripting and Word's Save as Web page command followed by using NSXMLDocument to extract the parts I need. I'm

Problems choosing an encoding for Word generated html

2009-05-31 Thread Ken Tozier
Hi I wrote an app that converts Word files into a simpler format by first converting from .doc to html using scripting and Word's Save as Web page command followed by using NSXMLDocument to extract the parts I need. I'm finding that there are no good options when it comes to choosing

NSString and decoding HTML Entities

2009-04-05 Thread Stuart Malin
I need to convert strings that contain HTML entities (e.g., #8217; or #gt;). I can't seem to find an NSString method to do so (not that I sometimes don't easily miss the obvious). So, I created a category on NSString and made two trivial methods that take advantage of toll- free bridging

Re: NSString and decoding HTML Entities

2009-04-05 Thread I. Savant
On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote: I need to convert strings that contain HTML entities (e.g., #8217; or #gt;). To what? If you want it to be an attributed string, there's always the - [NSAttributedString initWithHTML:...] methods (in the NSAttributedString AppKit

Re: NSString and decoding HTML Entities

2009-04-05 Thread Jack Carbaugh
wrote: I need to convert strings that contain HTML entities (e.g., #8217; or #gt;). I can't seem to find an NSString method to do so (not that I sometimes don't easily miss the obvious). So, I created a category on NSString and made two trivial methods that take advantage of toll-free

Re: NSString and decoding HTML Entities

2009-04-05 Thread Bryan Henry
The HTML entities that Stuart is talking about aren't percent escapes, and aren't replaced by - stringByReplacingPercentEscapesUsingEncoding:. - Bryan On Apr 5, 2009, at 4:19 PM, Jack Carbaugh wrote: Why don't you just use the features of NSString

Re: NSString and decoding HTML Entities

2009-04-05 Thread Stuart Malin
On Apr 5, 2009, at 10:19 AM, I. Savant wrote: On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote: I need to convert strings that contain HTML entities (e.g., #8217; or #gt;). To what? If you want it to be an attributed string, there's always the - [NSAttributedString initWithHTML

Re: NSString and decoding HTML Entities

2009-04-05 Thread Stephen J. Butler
On Sun, Apr 5, 2009 at 2:56 PM, Stuart Malin stu...@zhameesha.com wrote: I need to convert strings that contain HTML entities (e.g., #8217; or #gt;). I can't seem to find an NSString method to do so (not that I sometimes don't easily miss the obvious). So, I created a category on NSString

Re: NSString and decoding HTML Entities

2009-04-05 Thread I. Savant
On Apr 5, 2009, at 4:35 PM, Stuart Malin wrote: The source is not HTML tagged, but contains HTML entities. see: http://www.w3schools.com/tags/ref_entities.asp http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references So, for instance, I want to convert --gt

Re: NSString and decoding HTML Entities

2009-04-05 Thread Stuart Malin
On Apr 5, 2009, at 11:32 AM, I. Savant wrote: On Apr 5, 2009, at 4:35 PM, Stuart Malin wrote: The source is not HTML tagged, but contains HTML entities. see: http://www.w3schools.com/tags/ref_entities.asp http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references So

Re: NSString and decoding HTML Entities

2009-04-05 Thread I. Savant
percent escaping and entity decoding is often confused. No apology necessary - I should have included a :-), since it was meant to be tongue-in-cheek. Your point that HTML entities are HTML is sensible, and more important, valid. Thank you for taking the time to build a test case

preparing HTML email content for Mail.app like safari does

2009-03-07 Thread Ferhat Ayaz
Hi, I like it how safari prepares email contents with cmd-i. I would like to know how to do this programatically in cocoa. Is this possible? I want to send local html files with all linked images as html email. Thanks, Ferhat ___ Cocoa-dev

Re: preparing HTML email content for Mail.app like safari does

2009-03-07 Thread has
Ferhat Ayaz wrote: I like it how safari prepares email contents with cmd-i. I would like to know how to do this programatically in cocoa. Is this possible? I want to send local html files with all linked images as html email. Safari uses an undocumented Apple event API (mail/mlpg) in Mail. I

Attributed string to HTML: invalid image URLs

2009-02-19 Thread David Sinclair
Hi, I just wrote some code to export an attributed string to a HTML file wrapper, with images within a folder. It works fine, except the image URLs in the HTML are invalid; they are just file:/// and the image name. Omitting that prefix would make them valid relative URLs. How can I

RTFD - HTML ( NSHTMLTextDocumentType )

2009-02-15 Thread Chris Idou
When converting an AttributedString to HTML per http://www.cocoadev.com/index.pl?HTMLFromRTFD all the links begin with file:///. So trying to open the result in a browser results in broken links for all the images since apparently file:/// signifies the root directory. Why aren't the links

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: 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

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

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

Remove HTML Tags

2008-11-23 Thread Mr. Gecko
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 ___ Cocoa-dev mailing list

Re: Converting from HTML

2008-10-19 Thread Drarok Ithaqua
think I'll just do manual string replacements for now, as it seems the easiest solution. On 18 Oct 2008, at 00:22, Aurora Phoenix wrote: Hi DI... Depending on how heavy you need to understand the structure of the HTML, a simple parse using string chopping/ranges might be sufficient

Re: Converting from HTML

2008-10-17 Thread Mike Abdullah
On 17 Oct 2008, at 03:17, Drarok Ithaqua wrote: Hi all, i'm trying to find a way to convert an HTML-originated URL into one I can use in cocoa. Example input: link type=application/rss+xml rel=alternate href=/search/uniqueamp;stuffamp;here / I know the URL that this data is fetched from

Re: Converting from HTML

2008-10-17 Thread Aurora Phoenix
Hi DI... Depending on how heavy you need to understand the structure of the HTML, a simple parse using string chopping/ranges might be sufficient OR (personally I would prefer) use something like libxml2 / Xpath to grok the input. Note simple resolution of entities might not be sufficient

Converting from HTML

2008-10-16 Thread Drarok Ithaqua
Hi all, i'm trying to find a way to convert an HTML-originated URL into one I can use in cocoa. Example input: link type=application/rss+xml rel=alternate href=/ search/uniqueamp;stuffamp;here / I know the URL that this data is fetched from, so I can prefix that to achieve a full URL

Re: Converting from HTML

2008-10-16 Thread Nathan Day
Try this http://www.thinkmac.co.uk/blog/2005/05/removing-entities-from-html-in-cocoa.html On 17/10/2008, at 13:17 , Drarok Ithaqua wrote: Hi all, i'm trying to find a way to convert an HTML-originated URL into one I can use in cocoa. Example input: link type=application/rss+xml rel

Inconsistent HTML text size in TextField

2008-10-09 Thread David
I have a TextField which supports attributed text. I'm using HTML to populate the field. The problem is that depending on which userid I run the application in, the size of the text is different. How can that be? Is there some Safari setting or preference that can be affecting

Re: Converting NSString to valid HTML string

2008-08-21 Thread Randall Meadows
On Aug 21, 2008, at 12:16 PM, JanakiRam wrote: I'm developing an Cocoa client application.As part of application logic , i make the Webservice Call with XML data - which returns the XML file as response which contains the HTML code for the special characters. While sending the data i need

Re: Converting NSString to valid HTML string

2008-08-21 Thread Nate Weaver
Those are for URL encoding; I think he wants HTML entities. I can't remember if there are Cocoa methods to do this, but you can use CFXMLCreateStringByEscapingEntities() (since NSString * and CFStringRef are toll-free bridged): NSString *input = @2 4; NSString *output = (NSString

tidying HTML up

2008-07-18 Thread Ivan
Hi, I'm developing a Cocoa Touch app for the iPhone/iPod Touch and I was using NSXMLDocument with the tidyXHTML option to transform some web paged into safe XML documents that I parsed with NSXMLParser later on. Since NSXMLDocument is no longer (or never had really been) part of the

Re: tidying HTML up

2008-07-18 Thread Ivan
Please Mr. Jobe, keep on-topic :-) I'm asking for alternatives to NSXMLDocument to get a tidy XHTML document ready to be parsed with the NSXMLParser class, nothing to do with iPhone... :-) OK, I'm sory, I'll check for another list. Ivan. ___

Re: tidying HTML up

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 3:07 PM, Ivan wrote: I'm asking for alternatives to NSXMLDocument to get a tidy XHTML document ready to be parsed with the NSXMLParser class NSXML uses libTidy. If for some reason you can't use those, you should be able to build libTidy yourself and link it into your

Re: tidying HTML up

2008-07-18 Thread Marcel Weiher
, but don't know if it is possible to import it in any way into my Xcode and my iPhone app (at least within a reasonable time/effort limits). Objective-XML has a SAX parser (NSXMLParser-compatible) that can deal with untidy XML/HTML: http://www.metaobject.com/downloads/Objective-C

Re: converting HTML causes crash

2008-06-14 Thread Jens Alfke
On 13 Jun '08, at 10:58 PM, Rod Schmidt wrote: Yes, that is what's happening, but I am puzzled as to why it only happens when I call initWithData:... or initWithHTML:... and the object it's trying to send a message to has nothing to do with the HTML conversion code. Run with zombies

converting HTML causes crash

2008-06-13 Thread Rod Schmidt
I'm trying to convert some HTML to an attributed string to display in a text view. The conversion takes place fine using NSAtrributedString initWithData:..., but later on I get an EXC_BAD_ACCESS. Here's the stack trace where it usually happens (sometimes its different): #0 0x911546e8

Re: converting HTML causes crash

2008-06-13 Thread Jens Alfke
1367 Finding EXC_BAD_ACCESS bugs in a Cocoa project. (Which is an odd title; I've never had trouble _finding_ them, it's _fixing_ them that's hard.) file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/qa/qa2004/qa1367.html

NewBie: Trying to load a html file bundled with app...

2008-06-02 Thread Mark Bateman
Hi, I'm currently using this code line to load a http web page: [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@http://www.abc123.com;]]]; Is their a way I can modify this to load a htm file that is included in the app bundle: Thanks, Mark.

Re: NewBie: Trying to load a html file bundled with app...

2008-06-02 Thread I. Savant
Is their a way I can modify this to load a htm file that is included in the app bundle: Yes. Get the main bundle for the application and ask it for the path to the resource (given its name and type), then create a URL from that. The rest you know ...See NSBundle for the details. -- I.S.

html question

2008-05-19 Thread vinitha
Hi, I want to convert string to its corresponding values.I found a method in NSAttributedString initWithHtml,i think it will convert HTML to attributed string.I found 3 attributes NSString *NSExcludedElementsDocumentAttribute; NSString *NSTextEncodingNameDocumentAttribute; NSString

string to html.

2008-05-16 Thread vinitha
hi, I've to convert text or image to its corresponding html code. i've done setContentType: @text/html; setContentTransferEncoding:None; setCharset: @us-ascii NSDictionary*attr = [NSDictionary dictionaryWithObject:NSHTMLTextDocumentType forKey:NSDocumentTypeDocumentAttribute

html

2008-05-15 Thread vinitha
Hi, I'm using xcode3.0 and objective c.Is there any way to generate html from the plain test or images?Actualy i've to send mail in both the way in normal way and its html view also.So cocoa provide any features to this?Anybody can help me? Thanks

Re: html

2008-05-15 Thread Douglas Davidson
On May 15, 2008, at 3:56 AM, [EMAIL PROTECTED] wrote: I'm using xcode3.0 and objective c.Is there any way to generate html from the plain test or images?Actualy i've to send mail in both the way in normal way and its html view also.So cocoa provide any features to this?Anybody can help me

Re: openURL is not applied to POST-argument of local html file in leopard.

2008-05-14 Thread Doo-Hyun Jang
thank you! Jens. sorry, I can't found example of don't create a temporary file. but, I can found Re: Open safari and send post variables : http://www.cocoabuilder.com/archive/message/cocoa/2006/6/9/165322 it's using temporary file. ( it's not work in leopard, because of POST'argument is not

Re: openURL is not applied to POST-argument of local html file in leopard.

2008-05-14 Thread Doo-Hyun Jang
I got the result of POST request and I stored in temporary file. and openURL( the temporary file ). 2008/5/14 Doo-Hyun Jang [EMAIL PROTECTED]: ... img src=/image/nateon_tui/0728_im_011_img.gif width=497 height=81 ... path is not full path. it's occur error like this, Can't not Found

Re: openURL is not applied to POST-argument of local html file in leopard.

2008-05-14 Thread Jens Alfke
On 13 May '08, at 11:52 PM, Doo-Hyun Jang wrote: sorry, I can't found example of don't create a temporary file. Send the POST from your application. Don't use Safari. Please use the NSURLConnection and NSURLRequest classes. Read the documentation for these classes.

Re: openURL is not applied to POST-argument of local html file in leopard.

2008-05-14 Thread Jens Alfke
. it's occur error like this, Can't not Found file:///image/nateon_tui/0728_im_011_img.gif It's a relative URL, so it won't work directly, since you changed the URL. You'd need to edit the HTML to insert a BASE tag whose value is the real URL of the page: http://www.w3schools.com/TAGS

openURL is not applied to POST-argument of local html file in leopard.

2008-05-13 Thread Doo-Hyun Jang
well done in tiger, but leopard is not. I found POST-args not applied in leopard. I don't know why POST-args's not applied. :( ( because of it's local html file??? security??? ) but tiger's local html file is well done. how can i solve it? also I want to open POST web site without temp file. it's

Re: openURL is not applied to POST-argument of local html file in leopard.

2008-05-13 Thread Jens Alfke
If you want to POST a form, don't create a temporary file to make Safari do it! Just use NSURLConnection to send the request yourself. —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list

Re: Localized Apple Help (HTML) doesn't load

2008-03-07 Thread Ryan Poling
I don't think you should be changing the help book name for each localization - keep it the same. -Ryan http://www.chimoosoft.com/ On Mar 6, 2008, at 9:03 PM, John Fox wrote: Hi Folks: I'm having a problem where localized versions of my local HTML help don't load, and I don't know how

(Solved) Localized Apple Help (HTML) doesn't load

2008-03-07 Thread John Fox
Hi Folks: I discovered the problem was that the meta tags in the index.html didn't match the title in the InfoPlist.strings. e.g.: CFBundleHelpBookName = MemoryMiner ヘルプ; meta name=AppleTitle content=MemoryMiner ヘルプ / I hope this is helpful to some one at some point. Take care,

Localized Apple Help (HTML) doesn't load

2008-03-06 Thread John Fox
Hi Folks: I'm having a problem where localized versions of my local HTML help don't load, and I don't know how to debug this. For example, if I change the system preferences to Japanese, and click on the Help Menu item, the Apple Help Viewer app launches, its main window appears

  1   2   >