[Gambas-user] Gambas ?which words are reserved

richard terry rterry at ...1946...
Tue Apr 19 14:55:14 CEST 2011


On Tuesday 19 April 2011 22:18:10 Benoît Minisini wrote:
> > Tracked down one of my problems (not the breakpoint issue!!! damnn..)
> >
> > However:
> >
> > I've  buttons on my main toolbar. My workspace (class) has various tabs
> > loaded onto it as needed during program use, eg progress notes editor,
> > prescription writer, html pages to display results etc, and I did have on
> > each of these a subroutine called this:
> >
> > Public sub Print()
> > 	'do whatever printing is needed.
> > end
> >
> >
> >
> > When the button is clicked on the toolbar, it looks at whatever is the
> > activepage in the workspace and does this
> >
> > Public Sub MainToolbar_Click()
> >       Dim i as object
> >       ..... etc
> >
> > Select case Last.tag         'the tags on the toolbutton
> >
> > .... (code finds the active form which is then set to i
> >
> >         case "print"
> >         'find the form on the active window  with some code
> >        ' when found do this:
> >         i = the_active_form
> >       Try Object.Call(i, Last.tag)
> > End select
> >
> >
> > So this then would read when the Last.tag is translated.
> >
> > Try Object.Call(i, "Print")
> >
> >
> > Now, this used to work ok, but now it doesnt, however if I change all the
> > print routines on my forms to something else eg "Print_Content" then
> >
> > it does work
> >
> > ie  Object.Call(i, "Print_Content")  calls the appropriate routine and
> > prints out whatever needs printing on the  particular form eg a script,
> > some html results, a letter etc.
> >
> > IE seems like  Public Sub Print()
> >                          end
> > is not allowable in Gambas when calling it via the above method, whearas
> > if you use that syntax and call it from within a form like this
> >
> > Public Sub btnPrint
> > 'click the print button on an actual form
> > 	Print()
> > end
> >
> > Then it does work.
> >
> > Confused? well I am.
> >
> > Anway, at least I'll be able to print at work tomorrow, but would be
> > interested in Benoit;s comments, plus any help on the breakpoint issue.
> >
> > Regards
> >
> > Richard
> 
> It should work. Can you make a small project that reproduces that strange
> behaviour?
> 
Will try tomorrow, off to bed now.

Richard




More information about the User mailing list