lostgallifreyan wrote:
> Thankyou, that looks comprehensible to me, though I got errors. 
> (First had to remove the semicolon, then saw 'stream' reported as nil
>  on line 3).

Strange, in the message i sent, there was no semicolon.

> I don't know how much context this needs, but it does look like it 
> needs something else to make it work.

It does not need anything else. Just save it to a file and execute it
with wxlua on the command line. At least on Linux (wxLua 2.8.10.0) it
will print the source of the webpage.

Here is an example using a GUI for output:

local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "wxURL Demo",
                         wx.wxDefaultPosition, wx.wxSize(450, 450),
                         wx.wxDEFAULT_FRAME_STYLE)

local textCtrl = wx.wxTextCtrl(frame, wx.wxID_ANY, "",
                               wx.wxDefaultPosition,
                               wx.wxDefaultSize,
                               wx.wxTE_MULTILINE)

local url = wx.wxURL("http://www.google.com";)
local stream = url:GetInputStream()
while stream:CanRead() do
  textCtrl:AppendText(stream:Read(78))
end

frame:Show(true)

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to