Displaying 4 results from an estimated 4 matches for "load_page_from_uri".
2006 Nov 17
5
0.0.38 release?
Hi
Should we look to do a 0.0.38 release soon? I think we should get an
updated set of gems out there to show we are making progress.
So if you have a moment over the next couple of days, please could you
post how stable a release gem from SVN HEAD is on your OS?
Linux seems OK on release, crashes in debug mode - which seem to relate
to the same failed assertion from wx/event.h.
2006 Dec 11
0
[780] trunk/wxruby2/samples/html/html.rb: Error handling eg if no network present or server down
..."> def on_link_clicked(link)
</span><del>- link_uri = URI.parse(link.get_href)
</del><ins>+ href = link.get_href
+ if href =~ /^#/
+ super(link)
+ end
+ link_uri = URI.parse(href)
</ins><span class="cx"> @loaded_uri = load_page_from_uri(link_uri)
</span><span class="cx"> end
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>
2006 Nov 06
3
HtmlWindow and friends
Hi
Attached is a patch to add HtmlWindow and some of its friends, including
HtmlEasyPrinting. Also a sample.
I haven''t tried exposing the parsing and rendering API yet to allow
custom tags etc - I just wanted to get basic HTML and the 0.6.0
compatibility classes first. There may well be some quite easy classes left.
There''s one ugly kludge to get OnOpeningURL to compile -
2006 Nov 12
0
[724] trunk/wxruby2: Initial commit of HtmlWindow functionality
...t; no_wx_err
+ begin
+ require ''rubygems''
+ require ''wx''
+ rescue LoadError
+ raise no_wx_err
+ end
+end
+
+require ''net/http''
+require ''uri''
+
+class MyHtmlWindow < Wx::HtmlWindow
+ attr_reader :html_src
+ def load_page_from_uri(uri)
+ case uri
+ when URI::HTTP
+ Wx::BusyCursor.busy do
+ res = Net::HTTP.start(uri.host, uri.port) do | http |
+ http.get(uri.path)
+ end
+ @loaded_uri = uri
+ set_page(res.body)
+ end
+ return @loaded_uri
+ when URI::Generic
+ if...