[Gambas-user] problem sig 11 with 2.7
Steven Lobbezoo
steven at ...1652...
Sat Jul 5 10:40:24 CEST 2008
Yes, here it is attached.
Steven
Le vendredi 04 juillet 2008 à 22:50 +0200, Benoit Minisini a écrit :
> On jeudi 03 juillet 2008, Steven Lobbezoo wrote:
> > Hi,
> >
> > I just installed gambas 2.7 (as per instructions on the site from the
> > repository on suse for suse 11 (freshly installed also).
> >
> > I got a signal 11 exeption closing a modal form. It's called as this :
> >
> > PUBLIC SUB photo_DblClick()
> > ' Add/replace the image photo
> > DIM Mpath AS String
> > DIM sData AS String
> >
> > IF rsD THEN
> > fileselector.Tag = FALSE
> > fileselector.ShowModal
> > FOR EACH MPath IN MGlobal.F_Ch
> > photo.Picture = CreatePic(MPath, 320, 0)
> > ' and we write it in the database (if there's one)
> > IF rsD.Available THEN
> > sData = File.Load(MPath)
> > rsD!photo = sData
> > rsD.Update
> > END IF
> > NEXT
> > END IF
> > END
> >
> >
> > Then, in the form i do this :
> > PUBLIC SUB cancel_Click()
> > ME.close
> > END
> >
> >
> > The signal occors, just at/after the ME.close.
> > I donnot get back into the original routine.
> > This worked just fine before (2.0).
> >
> >
> > Steven
> >
>
> Can you isolate this bug in a small project?
>
-------------- next part --------------
' Gambas class file
PUBLIC SUB Form_Resize()
FileChooser1.Move(2, 2, ME.ClientW - 4, ME.ClientH - 60)
Panel1.Move(2, ME.ClientH - 58, ME.ClientW - 4, ME.ClientH - 4)
ok.Move(Panel1.width - 100, ok.Y)
cancel.Move(Panel1.width - 210, ok.Y)
END
PUBLIC SUB cancel_Click()
MGlobal.F_Ch.Clear
ME.close
END
PUBLIC SUB ok_Click()
DIM msg AS String
' we write the array of selected filenames to the main module
Mglobal.F_Ch = NEW String[]
FOR EACH msg IN FileChooser1.SelectedPaths
Mglobal.F_Ch.Add(msg)
NEXT
MGlobal.FPath = FileChooser1.Dir
ME.close
END
PUBLIC SUB Form_Open()
DIM tmp AS String
' we add some marks if we can
IF Exist("/home/partage") THEN
tmp = "/home/partage"
ELSE IF Exist(User.Home & "/partage") THEN
tmp = User.Home & "/partage"
END IF
FileChooser1.Dir = MGlobal.FPath
IF tmp THEN
FileChooser1.Bookmarks = [[tmp, "Partage", "icon:/16/language"], ["/home", "Répertoire base", "icon:/16/directory"]]
ELSE
FileChooser1.Bookmarks = [["/tmp", "Temporary directory"], ["/home", "Répertoire base", "icon:/16/directory"]]
END IF
END
-------------- next part --------------
# Gambas Form File 2.0
{ Form Form
MoveScaled(0,0,84,53)
Font = Font["Italic"]
Background = Color.Background
Foreground = Color.Foreground
Text = ("Revimmo - selection de fichiers")
Icon = Picture["icon:/16/watch"]
{ FileChooser1 FileChooser
MoveScaled(1,1,82,43)
Font = Font["Tahoma,Italic,10"]
Background = Color.Background
Foreground = Color.Foreground
Multi = True
Filter = [("*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.xpm"), ("Images, photo's"), ("*.pdf"), ("Adobe "), ("*.*"), ("Tous les fichiers")]
ShowDetailed = True
}
{ Panel1 Panel
MoveScaled(1,45,82,8)
{ ok ToolButton
MoveScaled(68,3,13,3)
Font = Font["Tahoma,Italic,10"]
Text = (" Allez-y")
Picture = Picture["icon:/16/color"]
Border = True
}
{ cancel ToolButton
MoveScaled(53,3,13,3)
Font = Font["Tahoma,Italic,10"]
Text = (" Annuler")
Picture = Picture["icon:/16/cancel"]
Border = True
}
{ TextLabel1 TextLabel
MoveScaled(0,0,50,7)
Font = Font["Tahoma,Italic,8"]
Foreground = &H800000&
Text = ("Vous pouvez choisir plusieurs\nfichiers en m\xC3\xAAme temps, en\nappuient sur le taste \"Ctrl\" et\nselectionner les fichiers avec \nle souris, ou en m\xC3\xAAme fa\xC3\xA7on\nselectionner une liste avec le\ntaste \"Maj\" et le souris.")
}
}
}
-------------- next part --------------
' Gambas class file
PUBLIC SUB _new()
END
PUBLIC SUB Form_Open()
END
PUBLIC SUB Button1_Click()
DIM Mpath AS String
fileselector.ShowModal
FOR EACH MPath IN MGlobal.F_Ch
Message.Info(Mpath)
NEXT
END
-------------- next part --------------
# Gambas Form File 2.0
{ Form Form
MoveScaled(0,0,50,50)
Text = ("")
{ Button1 Button
MoveScaled(12,12,17,5)
Text = ("Button1")
}
}
-------------- next part --------------
' Gambas module file
PUBLIC F_Ch AS NEW String[]
PUBLIC FPath AS String = USER.Home ' the last path of the fileselector, remember this
More information about the User
mailing list