Re: using AppleScript to print an HTML document

2017-09-25 Thread Jens Alfke
> On Sep 24, 2017, at 1:22 PM, Alan Snyder 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 development question … try the AppleScript list at h

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) documentAttri

Re: HTML emails from Objective C

2013-12-22 Thread Uli Kusterer
On 26 Nov 2013, at 21:16, Bryan Schmiedeler 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 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 in the code? Do

Re: HTML emails from Objective C

2013-12-22 Thread Mike Abdullah
On 26 Nov 2013, at 20:16, Bryan Schmiedeler 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 Diederik Meijer | Ten Horses
Can you post your code please? Op Nov 26, 2013, om 9:16 PM heeft Bryan Schmiedeler 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 / to escape w

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 that

UILabel HTML to attributed string conversion: odd font choice for 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

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

2013-12-17 Thread Steve Christensen
g each of the attribute runs and "correcting" the font? > > You could try creating 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 ea

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

2013-12-17 Thread Jens Alfke
t? You could try creating some CSS 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

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 an

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

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 th

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.

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 b

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 be

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

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 wrote: > > Hi,is

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:@"" isHTML:TRUE];When running such code, I get a blue question ma

Re: Adding HTML data to the general pasteboard

2011-05-27 Thread Kyle Sluder
a better 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 (...url... > > I guess there won't be a need for that now. Bringin

Re: Adding HTML data to the general pasteboard

2011-05-27 Thread Kyle Sluder
On Thu, May 26, 2011 at 11:43 PM, Patrick Robertson 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 various text > editors. Mos

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 strin

Adding HTML data to the general pasteboard

2011-05-27 Thread Patrick Robertson
messages in the console saying 'bad data for ...' where ... 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

Re: UIWebView HTML to match UITextView

2011-03-21 Thread BareFeetWare
wrote some CoreText code 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 (incl

Re: UIWebView HTML to match UITextView

2011-03-21 Thread Matt Neuburg
On Mon, 21 Mar 2011 20:58:40 +1100, BareFeetWare 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 different engines for dra

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 li

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

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

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

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 contai

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 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 list (Coc

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

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

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: > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > http://www.w3.org/1999/xhtml";> > > > Untitled Document > > style="width:960px;h

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: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Untitled Document when parsing Im doing the following: NSXMLDocument * xmlDoc = [[[NSXMLDocument alloc] i

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, Rai

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

Re: determining HTML text encoding

2010-01-29 Thread Rainer Standke
s? What am I missing here? 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

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

Re: determining HTML text encoding

2010-01-29 Thread Paul Sanders
. - Original Message - From: "Rainer Standke" To: "Cocoa List" 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 like

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

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,NSExcludedEleme

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 rig

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

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.

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 wa

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

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 c

Re: NSString and decoding HTML Entities

2009-04-05 Thread I. Savant
inction between 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

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

Re: NSString and decoding HTML Entities

2009-04-05 Thread Stephen J. Butler
On Sun, Apr 5, 2009 at 2:56 PM, Stuart Malin wrote: > I need to convert strings that contain HTML entities (e.g., ’ 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 > NSS

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., ’ or &#gt;). To what? If you want it to be an attributed string, there's always the - [NSAttributedString ini

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

Re: NSString and decoding HTML Entities

2009-04-05 Thread Jack Carbaugh
Malin wrote: I need to convert strings that contain HTML entities (e.g., ’ 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 adv

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., ’ or &#gt;). To what? If you want it to be an attributed string, there's always the - [NSAttributedString initWithHTML:...] methods (in the NSAttributedString AppKit

NSString and decoding HTML Entities

2009-04-05 Thread Stuart Malin
I need to convert strings that contain HTML entities (e.g., ’ 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-

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

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

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. H

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

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

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 need

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

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

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 ___ Co

Re: Converting from HTML

2008-10-19 Thread Drarok Ithaqua
a specific site, I 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 migh

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

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: href="/search/unique&stuff&here" /> I know the URL that this data is fetched from, so I can prefix th

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: href="/search/u

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: I know the URL that this data is fetched from, so I can prefix that to achieve a full URL again, but I need to convert the & into plain ampersands, but there could be

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 affecti

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 *

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

Converting NSString to valid HTML string

2008-08-21 Thread JanakiRam
Hi All, 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 to convert the special characters su

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/O

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 app.

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. ___ Coc

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 iPh

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. R

Re: converting HTML causes crash

2008-06-13 Thread Rod Schmidt
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. Rod On Jun 13, 2008, at 9:18 PM, Jens Alfke wrote: On

Re: converting HTML causes crash

2008-06-13 Thread Jens Alfke
ontents/Resources/Documents/qa/qa2004/qa1367.html —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moder

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

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. ___

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

2008-05-19 Thread Jonathan del Strother
On Mon, May 19, 2008 at 11:27 AM, <[EMAIL PROTECTED]> wrote: > 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 attr

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

Re: string to html.

2008-05-16 Thread Jens Alfke
ou gave it was a plain NSString. So I would expect that the HTML returned would look mostly like the original text (unless it includes "<" or "&".) Were you intending to use styled text? —Jens smime.p7s Description: S/MIME cryptographic signature _

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

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 c

Re: html

2008-05-15 Thread Mike Abdullah
As ever, you really need to state what you are trying to achieve much more clearly. HTML is just a kind of plain text file; you can easily write out NSStrings or convert them to data to create "HTML" On 15 May 2008, at 11:56, [EMAIL PROTECTED] wrote: Hi, I'm using xcode3.

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 m

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

2008-05-14 Thread Jens Alfke
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 tag whose value is the real URL of the page: http://www.

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. http://developer.apple

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]>: > ... > > ... > path is not full path. > > it's occur error like this, > Can't not Found "file:///image/nateon_tui/0728_im_011_img.gif" This is show

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

2008-05-13 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

  1   2   >