more 0.0.12 fixes

pull/315/head v0.0.12
Alexander Medvednikov 2019-06-20 01:22:49 +02:00
parent 580cb74047
commit 339d7edc3c
3 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,7 @@ fn main() {
html := http.get('https://news.ycombinator.com')
mut pos := 0
for {
pos := html.index_after('https://', pos + 1)
pos = html.index_after('https://', pos + 1)
if pos == -1 {
break
}

View File

@ -9,12 +9,14 @@ const (
)
struct User {
mut:
first_name string
last_name string
age int
}
struct Context {
mut:
first_name ui.TextBox
last_name ui.TextBox
age ui.TextBox
@ -26,6 +28,7 @@ struct Context {
fn main() {
mut ctx := &Context {
txt_pos: 10
window: 0// TODO
}
ctx.window = ui.new_window(ui.WinCfg {
width: 500