something better than HTMLText, anyone?

Slava Paperno slava at lexiconbridge.com
Sat May 21 20:55:32 EDT 2011


Yes! Of course--that was a typo. It works now.

Wonderful! Thank you, Mike. I owe you one :)

I still don't know how to instantiate a revBrowser w/o giving it some valid
URL. What I do now is call revBrowserOpen() with the filename of a small
blank htm file on the disk, and then refresh the htmlText property of the
browser with my HTML text that had been retrieved from the database.

Thanks--I'll heed your warning about closing the browser instances.

Slava

> -----Original Message-----
> From: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] On Behalf Of Mike Bonner
> Sent: Saturday, May 21, 2011 8:37 PM
> To: How to use LiveCode
> Subject: Re: something better than HTMLText, anyone?
> 
> Well from your example you're putting the browserid into tBrowserId but
> when
> you're trying the revbrowserset you're using sbrowserid
> 
> The error means that the browserid you're designating with sbrowserId
> doesn't exist.
> 
> Also be careful not to open a whole slew of browsers, you can make sure
> you
> haven't accidently left any open with revbrowserinstaces() *in the
> dictionary also*
> 
> On Sat, May 21, 2011 at 6:23 PM, Slava Paperno
> <slava at lexiconbridge.com>wrote:
> 
> > Thanks again, Mike. I must be doing something wrong:
> >
> > This works, and I see the google page in the browser rect:
> >
> >   local tBrowserId
> >   put revBrowserOpen(tWindowId, "http://google.com") into tBrowserId
> >
> > But when I add this line below those two:
> >
> >   revBrowserSet sBrowserId, "htmltext", locHTMLText
> >
> > where locHTMLText holds my HTML-formatted text, I see this error
> message:
> >
> > execution error at line n/a () near "unknown browser id"
> >
> > What did I do wrong?
> >
> > Also, if I try:
> >
> > put revBrowserOpen(tWindowId, "") into tBrowserId
> >
> > without a valid URL, i.e. with an empty string instead of
> > "http://google.com", I see the usual IE message "cannot display this
> Web
> > page. In other words, I don't know how to instantiate a revBrowser
> without
> > giving it a valid URL.
> >
> > Can you help?
> >
> > Slava
> >
> > > -----Original Message-----
> > > From: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> > > bounces at lists.runrev.com] On Behalf Of Mike Bonner
> > > Sent: Saturday, May 21, 2011 7:06 PM
> > > To: How to use LiveCode
> > > Subject: Re: something better than HTMLText, anyone?
> > >
> > > revbrowserset instanceId, propertyname, value should do it
> > >
> > > IE
> > > revbrowserset instanceId,"htmltext",tHtmlVar
> > >
> > > On Sat, May 21, 2011 at 5:00 PM, Slava Paperno
> > > <slava at lexiconbridge.com>wrote:
> > >
> > > > Right, thanks--I can do that if I save the HTML text first as an
> htm
> > > file,
> > > > then open it with revBrowserOpen() from the file. But I can't
> figure
> > > out
> > > > how
> > > > to avoid that step. Is there a way to pass the HTML text to
> > > revBrowser
> > > > without saving it on the user's drive as a file?
> > > >
> > > > Slava
> > > >
> > > > > -----Original Message-----
> > > > > From: use-livecode-bounces at lists.runrev.com [mailto:use-
> livecode-
> > > > > bounces at lists.runrev.com] On Behalf Of stephen barncard
> > > > > Sent: Saturday, May 21, 2011 4:30 PM
> > > > > To: How to use LiveCode
> > > > > Subject: Re: something better than HTMLText, anyone?
> > > > >
> > > > > Revbrowser. Display the html in a real, imbedded browser.
> > > > >
> > > > >  there should be an example stack included with your LiveCode
> > > package
> > > > > or
> > > > > folder.
> > > > >
> > > > > On 21 May 2011 12:18, Slava Paperno <slava.paperno at cornell.edu>
> > > wrote:
> > > > >
> > > > > > I have a large database of relatively small texts in basic
> HTML
> > > > > format
> > > > > > (including very basic tables), and I need to display these
> texts
> > > in a
> > > > > card.
> > > > > > Cellpadding, cellspacing, and borders in tables must be
> > > supported.
> > > > > >
> > > > > > The HTMLText property of fields in LC supports a rich
> collection
> > > of
> > > > > text
> > > > > > styles, but not HTML tables.
> > > > > >
> > > > > > How would you display such HTML text in a card? The user
> needs to
> > > be
> > > > > able
> > > > > > to
> > > > > > adjust the font size of this text.
> > > > > >
> > > > > > When the user clicks a word in the text, my scripts need to
> be
> > > able
> > > > > to
> > > > > > extract the word that she clicked.
> > > > > >
> > > > > > Any tips would be appreciated.
> > > > > >
> > > > > > Slava
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > use-livecode mailing list
> > > > > > use-livecode at lists.runrev.com
> > > > > > Please visit this url to subscribe, unsubscribe and manage
> your
> > > > > > subscription preferences:
> > > > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > >
> > > > >
> > > > > Stephen Barncard
> > > > > San Francisco Ca. USA
> > > > >
> > > > > more about sqb  <http://www.google.com/profiles/sbarncar>
> > > > > _______________________________________________
> > > > > use-livecode mailing list
> > > > > use-livecode at lists.runrev.com
> > > > > Please visit this url to subscribe, unsubscribe and manage your
> > > > > subscription preferences:
> > > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > use-livecode mailing list
> > > > use-livecode at lists.runrev.com
> > > > Please visit this url to subscribe, unsubscribe and manage your
> > > > subscription preferences:
> > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > > >
> > > _______________________________________________
> > > use-livecode mailing list
> > > use-livecode at lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list