[Gambas-user] We should offer online Gambas courses!

Dimitris Anogiatis dosida at ...626...
Tue Mar 31 06:45:46 CEST 2009


I got richard's code and turned it into a function that can be reused for
any ONE Column listview control
Here it is guys hope this helps

PUBLIC FUNCTION ListViewSelected(lv AS ListView) AS String
  'define temporary variables
  DIM incrementor AS Integer
  DIM tmpString AS String

  'initialize temporary variables
  tmpString = ""
  incrementor = 0

  'check to see if the listview is empty or not
  IF lv.count > 0

  'move listview to first position
  lv.MoveFirst

  'start loop
  DO

  'if the item we're checking is selected then add that value to tmpString
and a separating character
  IF lv.Item.selected = TRUE THEN
    tmpString &= lv.Item.text & "|"
  ENDIF

  'increment loop terminating variable
  INC incrementor

  'move one item down the listview
  lv.MoveNext

  'run our loop until we have no more lines to check
  LOOP UNTIL incrementor = lv.Count

  'end of the listview item count check
  ENDIF

  'return our tmpString as the result of the function
  'if listview has no items or no items are checked
  'the function will still result in a string; an empty string
  RETURN Left(tmpString, Len(tmpString) - 1)
END

Try using it like this

PRINT ListViewSelected(ListView1)

the output of the function will be like this

two|four

you can then take it and break it down with split or whatever else you want
to do with it


I've been monitoring this thread and I think if this code repository idea is
to work then the
code we provide to each other must be reusable.

that's my 2 cents work :)

Regards
Dimitris

On Mon, Mar 30, 2009 at 7:26 PM, jbskaggs <jbskaggs at ...1871...> wrote:

>
> Thanks for the code!
>
> JB
>
>
>
> richard terry-5 wrote:
> >
> > On Tue, 31 Mar 2009 08:49:37 am jbskaggs wrote:
> >> Like I said I'd admin the site so I guess that's what you mean by
> >> co-ordinate the samples.
> >>
> >> Ill setup a site tonite, so when you get a chance you can email me the
> >> samples to just remove the spaces:
> >
> > Personally I think the samples should be part of a gambas program - an
> > overview of gambas like I said wxPython demo does - and not part of a web
> > site.  I think there needs to be two parts of this
> >
> > 1) More detailed examples in the documentation wiki even for really
> simple
> > things
> >
> > 2) Complete code examples as part of a larger demo included with the
> > distribution of Gambas, and maintained as part of the source code in svn
> >
> > That way, if you or I get run over by a truck it is still there.
> >
> > Ive never experienced much joy looking for code on websites - it tends to
> > be
> > fragmented, difficult to maintain and I don't really want to contribute
> to
> > it
> > if that is the format.
> >
> > I enclose a screen dump of a very simple one for beginners (my code may
> be
> > bad - so if so you can fix it), which shows the concept I think would
> > work,
> > and could be included as part of a whole demo. I've others I've done.
> >
> >
> >>
> >> jbskaggs   @   skaggs   world  .   com
> >>
> >> Im in the states but Im in the office from noon central time till about
> 4
> >> or 5 am. I work and live  children's home (used to be called orphanages)
> >> so
> >> at night  have time to program and write etc.  I'm the one who makes
> sure
> >> kids don't run away, are comforted when scared or lonely, provide
> >> counseling, that kind of thing.
> >>
> >> jb skaggs
> >>
> >> richard terry-5 wrote:
> >> > On Tue, 31 Mar 2009 07:43:22 am Ron wrote:
> >> >> richard terry wrote:
> >> >> > On Tue, 31 Mar 2009 07:22:48 am jbskaggs wrote:
> >> >> >> I would like to set up a online gambas school where the more
> >> >>
> >> >> experienced
> >> >>
> >> >> >> users and coders here could offer an online workshop on Gambas for
> >> >> >> users.
> >> >> >>
> >> >> >> Make it an affordable cost (Like a $0 to $25 a course, depending
> on
> >> >> >> complexity, length, and time required. A course on making Forms
> >> >> >> should be free, but a all inclusive course on writing a mmorpg in
> >> >> >> gambas
> >> >>
> >> >> should
> >> >>
> >> >> >> have a fee attached)  and offer a workshop for different
> >> >> >> fundamentals:
> >> >> >>
> >> >> >> I know for me a lot of Gambas is intuitive but much of it isn't.
> >> >> >>
> >> >> >> Im thinking it could be setup on a moodle or someother workshop /
> >> >>
> >> >> class
> >> >>
> >> >> >> software.  With online lessons and quizzes for free but to get the
> >> >> >> actual coding graded it would require a live teacher to grade and
> >> >> >> comment thereby why a nominal fee would be justified.  I could
> even
> >> >>
> >> >> host
> >> >>
> >> >> >> the moodle site and help admin it but my programming knowledge is
> >> so
> >> >>
> >> >> low
> >> >>
> >> >> >> I wouldn't make a good teacher.  But I could help someone setup a
> >> >>
> >> >> course
> >> >>
> >> >> >> and host it and that person could charge a reasonable fee to teach
> >> >> >> the course. (Though in the spirit of linux the less money the
> >> >> >> better.)
> >> >> >>
> >> >> >> For example I would be willing to pay right now to be tutored in
> >> how
> >> >>
> >> >> to
> >> >>
> >> >> >> reference, manipulate, and check objects and controls via code
> >> >> >> (dynamically via nested loops and such).  I read the documents- I
> >> >> >> look at the examples and still I get the wrong impressions and
> >> waste
> >> >> >> hours and hours on many different controls or functions.
> >> >> >>
> >> >> >> I helped setup an online bible college and the way it ran was
> every
> >> >> >> course had a different instructor (or most did) and those
> >> instructors
> >> >> >> set their own prerequisites and graded assignments on their own
> >> >>
> >> >> schedule
> >> >>
> >> >> >> (within reason).
> >> >> >>
> >> >> >> But the very basic courses were almost entirely automated - no
> need
> >> >> >> to have heavy instructor interaction.  But as the courses became
> >> more
> >> >> >> in depth then instructors became paramount.  Because students
> >> needed
> >> >> >> to
> >> >>
> >> >> ask
> >> >>
> >> >> >> questions and yes other students could answer and even grade
> >> (though
> >> >> >> their gradings were subject to instructor override.)
> >> >> >>
> >> >> >> I look at the number of basic questions on Nabbles and just think
> >> >> >> that
> >> >>
> >> >> a
> >> >>
> >> >> >> systematic instruction courses would make gambas bloom even more.
> >> >> >>
> >> >> >> Maybe something like:
> >> >> >>
> >> >> >> 1- Setting up your Gambas
> >> >> >>      a. download and installation
> >> >> >>      b. Defining preferences and intro to Gambas
> >> >> >>
> >> >> >> 2- Mastering the IDE interface:
> >> >> >>      a. creating projects, forms, simple control, saving,
> >> compiling,
> >> >>
> >> >> and
> >> >>
> >> >> >> packaging
> >> >> >>
> >> >> >> 3- Gambas Programming fundamentals: A big unit broken into smaller
> >> >> >> courses a. Forms
> >> >> >>      b. Controls
> >> >> >>      c. Assignments, Operators, Strings, Numbers, and Booleans
> >> >> >>      d. Comparisons, Loops, and nestings
> >> >> >>      e. Good programming, coding practices, and the Gambas
> >> >> >> Programming language
> >> >> >>
> >> >> >> 4. Components: Another big unit
> >> >> >>      a. gb
> >> >> >>      b. gb.compress
> >> >> >>      c. gb.chart etc...
> >> >> >>
> >> >> >> 5. FX
> >> >> >>     a. BMP, JPG, PNG, GIF, etc what they are.  Editing and making
> >> >>
> >> >> them.
> >> >>
> >> >> >>     b. Animations and movies
> >> >> >>     c. creating, editing, and sounds and music
> >> >> >>
> >> >> >> 6. Application specific courses:
> >> >> >>    a. How to write a text editor
> >> >> >>    b. How to write a scrolling shooter game etc and so on
> >> >> >>
> >> >> >> and so forth.
> >> >> >>
> >> >> >> And of course offer a Certificates for completing the courses.
> >> >> >>
> >> >> >> I know moodle and setting up the site would be easy- and if
> someone
> >> >> >> wanted to teach a course I could setup the course, forums, and
> >> >> >> quizzes etc.  I could make some beginner courses on my own- but I
> >> >> >> would need help with more advanced subjects.
> >> >> >>
> >> >> >> Any thoughts? Objections? Volunteers?
> >> >> >>
> >> >> >> JB Skaggs
> >> >> >
> >> >> > Personally I think we should do what I've pushed for before -
> >> include
> >> >> > extensively commented sample code along with gambas. We could all
> >> >> > contribute on our own level - have a look at the wxPython demo as
> >> such
> >> >>
> >> >> an
> >> >>
> >> >> > sample code-base of how to use the language.
> >> >> >
> >> >> > Richard
> >> >>
> >> >> I agree, an example code/snippets site or part on the official wiki
> >> for
> >> >> it would be much better.
> >> >>
> >> >> Ron_2nd.
> >> >
> >> > I for one will put up my hand to contribute with simple sample
> programs
> >> > if someone will do the co-ordination. My working day (I'm in general
> >> > practice in
> >> > Australia) starts at 7:30am and I finish around 6-630PM - it is so
> long
> >> > that
> >> > I have only a few hours at night for my life, so I can't volunteer the
> >> > co-ordination role.
> >> >
> >> > If someone could take responsibility for that, I'd be happy to be
> >> > organised
> >> > and asked to contribute.
> >> >
> >> > Regards
> >> >
> >> > Richard
> >> >
> >> >>
> >> ------------------------------------------------------------------------
> >> >>--- --- _______________________________________________
> >> >> Gambas-user mailing list
> >> >> Gambas-user at lists.sourceforge.net
> >> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >> >
> >> >
> >>
> -------------------------------------------------------------------------
> >> >----- _______________________________________________
> >> > Gambas-user mailing list
> >> > Gambas-user at lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> >
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/We-should-offer-online-Gambas-courses%21-tp22792079p22796604.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list