| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#11
| |||
| |||
| You can do this stuff in APL2 too. This example demonstrates how to use HTML directly from the workspace: )LOAD 2 GUITOOLS SAVED 2008-04-23 21.46.49 (GMT-4) MSHTML$B"+(B'MSHTML:<body><h1>Title</h1>This is text.</body>' DIALOG$B"+(BUNICREATEDLG 'SHELL SIZEBORDER MIN MAX VISIBLE' ACTIVEX$B"+(BCREATECTL DIALOG 'ACTIVEX' '' 32776 MSHTML You can access IE's methods, properties and events. David Liebtag IBM APL Products and Services |
|
#12
| |||
| |||
| On Jun 2, 2:31 pm, "David Liebtag" <DavidLieb...@vermontel.net> wrote: > You can do this stuff in APL2 too. This example demonstrates how to use HTML directly from the workspace: > > )LOAD 2 GUITOOLS > SAVED 2008-04-23 21.46.49 (GMT-4) > MSHTML$B"+(B'MSHTML:<body><h1>Title</h1>This is text.</body>' > DIALOG$B"+(BUNICREATEDLG 'SHELL SIZEBORDER MIN MAX VISIBLE' > ACTIVEX$B"+(BCREATECTL DIALOG 'ACTIVEX' '' 32776 MSHTML > > You can access IE's methods, properties and events. > > David Liebtag > IBM APL Products and Services David, are there similar ways to do this with APL in Linux or Mac? |
|
#13
| |||
| |||
| > David, are there similar ways to do this with APL in Linux or Mac? Unfortunately no. The sample I showed uses AP 145, our Windows-only processor for access to GUI components. However, we do provide strong interfaces to both Java and Tcl/Tk on both Windows and UNIX platforms. I am sure you could call components in those languages to get a similar effect. (We do not support Mac.) David Liebtag IBM APL Products and Services |
|
#14
| |||
| |||
| On Jun 2, 12:45 pm, Gosi <gos...@gmail.com> wrote: > On Jun 1, 12:11 pm, Morten Kromberg <mk...@dyalog.com> wrote: > > > On 1 Jun., 10:00, Morten Kromberg <mk...@dyalog.com> wrote: > > > > F.B.Navigate2$B">(B'c:\..mywebpage.htm' > > > That should of course have been > > > F.WB.Navigate2$B">(B'c:\..mywebpage.htm' > > I got a good tip from Morten to tell the browser that the data is > UTF-8 > > <HEAD> > > <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> > > </HEAD> > > Firefox did this automatically but ie did not. This is might reflect your browser language settings rather than inherent differences between IE and FF. HTML authors do well to declare explicitly their encodings -- and UTF-8 is the smart choice these days. If not declared, your browser will try to guess it from what it sees in the file. It is likely to factor in your list of 'default languages' in making these guesses. It might also use any language declaration you make on the body element. You don$B!G(Bt want these determined by the user$B!G(Bs personal browser settings, so declare them in the HTML document. In similar vein: using CSS style rules is smart, simplifying the code with which you write the HTML. (In my current application I can fiddle with layout and presentation simply by editing the CSS style sheet in a text editor.) But it took me a long time to learn that browser resilience is my enemy. Browsers go to extraordinary lengths to render broken HTML, bending and adapting the CSS specification to cover so called $B!F(Btag soup$B!G(B. Each browser makes up its own rules for doing this. It looks more rule-governed than it is, because different browsers make similar choices. But I wasted hundreds of hours trying to resolve cross- browser presentation issues before I realised it was a mug$B!G(Bs game without valid HTML. Since then I've $B!=(B declared the DOCTYPE of every HTML document $B!=(B declared and used UTF-8 encoding for everything $B!=(B validated it to the corresponding standard (see validators at w3.org) $B!=(B rarely had to worry about cross-browser issues So I'd *strongly* endorse Morten's advice and add to it: declare DOCTYPE, encoding and language and validate the markup. Although it _seems_ enough to open an HTML document with <html><body> always use at least (something like) the following: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd"> <html lang="en-gb"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> Stephen |
|
#15
| |||
| |||
| On 2 Jun, 21:32, mpsm...@windstream.net wrote: > David, are there similar ways to do this with APL in Linux or Mac? For people using APLX, there is a built-in Browser object, which is available on all platforms. Under Windows, it's a cover for the IE OCX control, so it is effectively the same as using the OCX control directly under any APL as already described by others on this thread. On the Mac, it is implemented using an interface provided by Apple which allows Safari to be embedded in an application. These both provide the full page-display facilities of a modern browser, using the same APL syntax on both platforms. (You can also access the underlying OCX or Safari control directly if necessary). Under APLX for Linux, the Browser control is implemented with the same syntax, so the code to load pages etc is portable across the three platforms. However, our Linux version of the control is currently rather limited in functionality; it handles simple HTML but nothing fancy. Of course, on any of these platforms, you can fire up an external browser (Firefox, IE, Safari or whatever) very easily. BTW Firefox under Windows also comes with an OCX control which is pretty compatible with the IE OCX control. We don't use it because we reckon that almost every Windows system will have IE installed, but we have tested it and it worked fine. Richard Nabavi MicroAPL Ltd |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.