Alaska Software Inc. - Hint please?
Username: Password:
AuthorTopic: Hint please?
Dominik PerkovicHint please?
on Sat, 19 May 2012 21:16:21 +0200
Hello everyone,

I am 18 year old that is trying to learn Xbase. I have no prior 
knowledge about databases but my father is a Clipper programmer and he 
talked me into this. Unfortunately he isn't too willing to help (kinda 
gave up after a week or so) and I'm losing interest myself too.

We spent about a week going through Xbase sample programs, my father 
figured out some things but it took us way too much time. I still don't 
know why one window can be maximized while other just jumps top left. We 
had hard times figuring out how status bar works (adding value to first 
field, changing font) but we still don't know why we got it jumping out 
of window or why it opens in one window and the rest (menu) in 
another... etc etc etc...

So my question is: is there any kind of manual or book or something 
(like a bunch of those for VB) that would lead me step by step 
explaining how  what  why... ? Or is there any place where one can ask 
trivial / sample questions about Xbase?

Thank you 

Dominik
Osvaldo Ramirez Re: Hint please?
on Sat, 19 May 2012 14:21:53 -0600
On 5/19/2012 1:16 PM, Dominik Perkovic wrote:
> Hello everyone,
>
> I am 18 year old that is trying to learn Xbase. I have no prior
> knowledge about databases but my father is a Clipper programmer and he
> talked me into this. Unfortunately he isn't too willing to help (kinda
> gave up after a week or so) and I'm losing interest myself too.
>
> We spent about a week going through Xbase sample programs, my father
> figured out some things but it took us way too much time. I still don't
> know why one window can be maximized while other just jumps top left. We
> had hard times figuring out how status bar works (adding value to first
> field, changing font) but we still don't know why we got it jumping out
> of window or why it opens in one window and the rest (menu) in
> another... etc etc etc...
>
> So my question is: is there any kind of manual or book or something
> (like a bunch of those for VB) that would lead me step by step
> explaining how  what  why... ? Or is there any place where one can ask
> trivial / sample questions about Xbase?
>
> Thank you 
>
> Dominik

Hello Dominik

I would like to explain all kind of stuff, that I want it, but, there 
are a lot, a lot things

As you father wish, I Wish that my son want it to learn to be a 
developer , but It is to hard to teach him, anyway.

My opinion could be ...

To understand Xbase++, You must to understand xbase dialect,
procedures, functions, commands ( forget a little moment about GUI )

Lets talk about some code :

procedure main
  ? "hola mundo"
return

when you understand about procedures, functions, command, ... my seconds 
round could be database or tables

xbase dialect's used  dbf files, ( it look in the explorer somethings 
pedro.dbf, or control.dbf )

So you must to understand what is a dbf table

xbase dialect has a lot of function that performs what ever things on 
whatever dbf file, for exaple:

Insert a row :  dbappend()  <= it is a xbase function
Delete a row :  dbdelete()
change a value on the columns ( called field ) : replace x with nvalue

etc,etc


So, if you understood the first and second round

The third round will be : How to make a windows forms ( I said, Windows 
Form, I mean Microsoft OS Windows form, not said Web Forms, or other 
kind of windows )
but if you jump to GUI, so then, you must to learn

what is an object ?
What is a form or window ?
What kind of controls ( object like text, grapics, combos ) Xbase++ has ?

What is an event ? ( Ojo, Event isnt the TV serie )

What is a thread ..

etc,etc.

But, after all, I would like to know about your Xbase++ knowlegment

HTH
Osvaldo Ramirez
James Loughner Re: Hint please?
on Sat, 19 May 2012 21:26:37 -0400
Looks like you are jumping into the deep end of the pool. First learn 
about the simple stuff the complicated Windows stuff will follow.

There is the online documentation which is pretty good all and all and 
most things have example code.

Learn about databases and indexes first before you jump into Windows.

You need to understand database and structures before you can make 
pretty Windows.

Jim



On 05/19/2012 03:16 PM, Dominik Perkovic wrote:
> Hello everyone,
>
> I am 18 year old that is trying to learn Xbase. I have no prior
> knowledge about databases but my father is a Clipper programmer and he
> talked me into this. Unfortunately he isn't too willing to help (kinda
> gave up after a week or so) and I'm losing interest myself too.
>
> We spent about a week going through Xbase sample programs, my father
> figured out some things but it took us way too much time. I still don't
> know why one window can be maximized while other just jumps top left. We
> had hard times figuring out how status bar works (adding value to first
> field, changing font) but we still don't know why we got it jumping out
> of window or why it opens in one window and the rest (menu) in
> another... etc etc etc...
>
> So my question is: is there any kind of manual or book or something
> (like a bunch of those for VB) that would lead me step by step
> explaining how  what  why... ? Or is there any place where one can ask
> trivial / sample questions about Xbase?
>
> Thank you 
>
> Dominik
Dominik PerkovicRe: Hint please?
on Sun, 20 May 2012 10:54:34 +0200
Thank you both for your replies 

Well, my father was Clipper programmer for about 20 years so he is quite 
helpful at coding part. But GUI... not his cup of coffee. Thats the 
reason why he talked me into learning Xbase instead of VB, at least he 
can help me with code.

Anyway, here is one of our 'successful test products'. Could anyone tell 
me why that window can't be maximized? How to make it spread over the 
screen instead of jumping to upper left corner? My father thinks / hopes 
we are missing 'just one tiny detail' but we can't figure out which one 
it could be.

#include "Gra.ch"
#include "Appevent.ch"
#include "Xbp.ch"
#include "Font.ch"


PROCEDURE Main
    LOCAL nEvent, mp1, mp2, oXbp, aSize, oDlg, oSBar

    SetAppWindow():useShortCuts := .T.
    SetColor( "N/W" )
    SetCancel( .F. )
    CLS
    SetMouse(.T.)
    SetAppWindow():mouseMode := XBPCRT_MOUSEMODE_PM

    oDlg := XbpDialog():new( AppDesktop(), , {600,400}, , , .F.)
    oDlg:taskList := .T.
    oDlg:gridMove := .T.
    oDlg:create()
    drawingArea := oDlg:drawingArea
    drawingArea:setFontCompoundName( "8.Arial" )

    nEvent := xbe_None
    SetAppWindow():settitle("Testni naslov prozora")

    oSBar := XbpStatusBar():new()
    aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
    oSBar:create( ,, {0,0}, {SetAppWindow():currentSize()[1],20},aPP)
    cmsg := "test1 test2 test3 test4 test5 test6 test7               "
    oSBar:getitem(1):caption := cmsg
    oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_DATE )
    oPanel := oSBar:getItem(2)
    oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
    oPanel:alignment := XBPALIGN_RIGHT
    oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_TIME )
    oPanel := oSBar:getItem(1)
    oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS


    DO WHILE nEvent <> xbeP_Close
       nEvent := AppEvent( @mp1, @mp2, @oXbp )
       oXbp:handleEvent( nEvent, mp1, mp2 )
    ENDDO

RETURN
AUGE_ OHRRe: Hint please?
on Sun, 20 May 2012 22:07:20 +0200
hi,

> Anyway, here is one of our 'successful test products'. Could anyone tell 
> me why that window can't be maximized? How to make it spread over the 
> screen instead of jumping to upper left corner? My father thinks / hopes 
> we are missing 'just one tiny detail' but we can't figure out which one it 
> could be.
>
>    oDlg := XbpDialog():new( AppDesktop(), , {600,400}, , , .F.)

you are using wrong Parameter ... and wrong Windows !

try this :

     oDlg := XbpDialog():new( AppDesktop(), ,aPos ,aSize)

i recommend to use a 3-PP Lib like Express++ to make migration to GUI.

greetings by OHR
Jimmy
James Loughner Re: Hint please?
on Sun, 20 May 2012 20:32:40 -0400
Looks like you are doing a hybrid mode compile rather then a full GUI

these are not used in a full GUI app

 > SetAppWindow():useShortCuts := .T.
 > SetColor( "N/W" )
 > SetCancel( .F. )
 > CLS
 > SetMouse(.T.)
 > SetAppWindow():mouseMode := XBPCRT_MOUSEMODE_PM
 >

So you are running in a Windows DOS box

Jim



On 05/20/2012 04:54 AM, Dominik Perkovic wrote:
> Thank you both for your replies 
>
> Well, my father was Clipper programmer for about 20 years so he is quite
> helpful at coding part. But GUI... not his cup of coffee. Thats the
> reason why he talked me into learning Xbase instead of VB, at least he
> can help me with code.
>
> Anyway, here is one of our 'successful test products'. Could anyone tell
> me why that window can't be maximized? How to make it spread over the
> screen instead of jumping to upper left corner? My father thinks / hopes
> we are missing 'just one tiny detail' but we can't figure out which one
> it could be.
>
> #include "Gra.ch"
> #include "Appevent.ch"
> #include "Xbp.ch"
> #include "Font.ch"
>
>
> PROCEDURE Main
> LOCAL nEvent, mp1, mp2, oXbp, aSize, oDlg, oSBar
>
> SetAppWindow():useShortCuts := .T.
> SetColor( "N/W" )
> SetCancel( .F. )
> CLS
> SetMouse(.T.)
> SetAppWindow():mouseMode := XBPCRT_MOUSEMODE_PM
>
> oDlg := XbpDialog():new( AppDesktop(), , {600,400}, , , .F.)
> oDlg:taskList := .T.
> oDlg:gridMove := .T.
> oDlg:create()
> drawingArea := oDlg:drawingArea
> drawingArea:setFontCompoundName( "8.Arial" )
>
> nEvent := xbe_None
> SetAppWindow():settitle("Testni naslov prozora")
>
> oSBar := XbpStatusBar():new()
> aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
> oSBar:create( ,, {0,0}, {SetAppWindow():currentSize()[1],20},aPP)
> cmsg := "test1 test2 test3 test4 test5 test6 test7 "
> oSBar:getitem(1):caption := cmsg
> oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_DATE )
> oPanel := oSBar:getItem(2)
> oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
> oPanel:alignment := XBPALIGN_RIGHT
> oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_TIME )
> oPanel := oSBar:getItem(1)
> oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
>
>
> DO WHILE nEvent <> xbeP_Close
> nEvent := AppEvent( @mp1, @mp2, @oXbp )
> oXbp:handleEvent( nEvent, mp1, mp2 )
> ENDDO
>
> RETURN
Allen Lee Re: Hint please?
on Sun, 20 May 2012 18:54:11 -0700
Can the Windows DOS box be made larger?
Thomas Braun
Re: Hint please?
on Tue, 22 May 2012 08:46:39 +0200
Allen Lee wrote:

> Can the Windows DOS box be made larger?

PMFJI, but this is no "Windows DOS box", but a console window which is 100%
Windows (no DOS of any sort involved 

What is actually used here is a XbpCRT window which was designed to act as
a compatibility layer for old Clipper programs - which is why the window
has a fixed size of 80 x 25 characters after it is created.

To see what exactly happens take a look at appsys.prg in ALASKA\SOURCE\SYS

You can link your own version of appsys.prg and override it e.g. to create
a xbpCRT with 80 x 50 characters.

Thomas
Chris AndriesRe: Hint please?
on Mon, 21 May 2012 08:43:06 +0200
Hi,

If your father was a Clipper programmer for 20 years, you have to look to
eXPress++. (http://donnay-software.com/) It is the easiest way to migrate
from Clipper to the Windows world of Xbase++.

Best regards,

Chris Andries.


<Dominik Perkovic> wrote in message
news:2dfc118c$1fb592bc$1d679@news.alaska-software.com...
> Thank you both for your replies 
>
> Well, my father was Clipper programmer for about 20 years so he is quite
> helpful at coding part. But GUI... not his cup of coffee. Thats the
> reason why he talked me into learning Xbase instead of VB, at least he
> can help me with code.
>
> Anyway, here is one of our 'successful test products'. Could anyone tell
> me why that window can't be maximized? How to make it spread over the
> screen instead of jumping to upper left corner? My father thinks / hopes
> we are missing 'just one tiny detail' but we can't figure out which one
> it could be.
>
> #include "Gra.ch"
> #include "Appevent.ch"
> #include "Xbp.ch"
> #include "Font.ch"
>
>
> PROCEDURE Main
>     LOCAL nEvent, mp1, mp2, oXbp, aSize, oDlg, oSBar
>
>     SetAppWindow():useShortCuts := .T.
>     SetColor( "N/W" )
>     SetCancel( .F. )
>     CLS
>     SetMouse(.T.)
>     SetAppWindow():mouseMode := XBPCRT_MOUSEMODE_PM
>
>     oDlg := XbpDialog():new( AppDesktop(), , {600,400}, , , .F.)
>     oDlg:taskList := .T.
>     oDlg:gridMove := .T.
>     oDlg:create()
>     drawingArea := oDlg:drawingArea
>     drawingArea:setFontCompoundName( "8.Arial" )
>
>     nEvent := xbe_None
>     SetAppWindow():settitle("Testni naslov prozora")
>
>     oSBar := XbpStatusBar():new()
>     aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
>     oSBar:create( ,, {0,0}, {SetAppWindow():currentSize()[1],20},aPP)
>     cmsg := "test1 test2 test3 test4 test5 test6 test7               "
>     oSBar:getitem(1):caption := cmsg
>     oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_DATE )
>     oPanel := oSBar:getItem(2)
>     oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
>     oPanel:alignment := XBPALIGN_RIGHT
>     oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_TIME )
>     oPanel := oSBar:getItem(1)
>     oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
>
>
>     DO WHILE nEvent <> xbeP_Close
>        nEvent := AppEvent( @mp1, @mp2, @oXbp )
>        oXbp:handleEvent( nEvent, mp1, mp2 )
>     ENDDO
>
> RETURN
Dominik PerkovicRe: Hint please?
on Mon, 21 May 2012 21:14:32 +0200
Yayyyyy

I made it!!!!!  Again, thanks for help to all 

I 'figured out', according to your replies, that I'm using wrong 'set of 
commands', i.e. that I was trying to make sort of DOS window, which 
can't be maximized. So I deleted program and went to Xbase samples 
again. It took me a while to figure out which source I should use, then 
it took me quite a while (hey I'm still a newbie  ) to figure out how 
to add status bar. I even played with menu a bit 

I'm aware all of you can write it with eyes closed but I'm kinda proud 
of myself  Anyway, now I have tough(?) question: how can I add image 
as a background to this window? Hopefully image that will change size 
when window changes it's size. Couldn't find any sample program so I'd 
appreciate any hint or simple example.

Code now looks like this:

#include "Appevent.ch"
#include "Common.ch"
#include "Font.ch"
#include "Gra.ch"
#include "Xbp.ch"

PROCEDURE AppSys
    LOCAL oDlg, aPos[2], aSize[2]

    aSize[1]      := 640
    aSize[2]      := 400
    aPos[1]       := 0.1 * aSize[1]
    aPos[2]       := 0.1 * aSize[2]

    oDlg          := XbpDialog():new( ,, aPos, aSize )
    oDlg:title    := "Test Window"
    oDlg:taskList := .T.
    oDlg:close    := {|| PostAppEvent( xbeP_Quit ) }
    oDlg:create()
    oDlg:drawingArea:setFontCompoundName( FONT_HELV_SMALL )
AppMenu( oDlg:menuBar() )


    SetAppWindow( oDlg )
    SetAppFocus( oDlg )
RETURN

PROCEDURE Main
    LOCAL nEvent := NIL, mp1 := NIL, mp2 := NIL, oXbp
    LOCAL oParent := SetAppWindow():drawingArea

    oSBar := XbpStatusBar():new(Oparent)
    aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
    oSBar:create(Oparent ,, {0,0}, {SetAppWindow():currentSize()[1],20},aPP)
    cmsg := "test1 test2 test3 test4 test5 test6 test7 "
    oSBar:getitem(1):caption := cmsg
    oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_DATE )
    oPanel := oSBar:getItem(2)
    oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
    oPanel:alignment := XBPALIGN_RIGHT
    oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_TIME )
    oPanel:alignment := XBPALIGN_RIGHT
    oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
    oPanel := oSBar:getItem(1)
    oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS

    DO WHILE nEvent <> xbeP_Quit
       nEvent := AppEvent( @mp1, @mp2, @oXbp )
       oXbp:handleEvent( nEvent, mp1, mp2 )
    ENDDO

RETURN

PROCEDURE AppMenu( oMenuBar )
    LOCAL oMenu := XbpMenu():new( oMenuBar )
    oMenu:title := "Application"
    oMenu:create()
    oMenu:addItem({"nothing"})
    oMenu:addItem( { "Quit", {|| PostAppEvent( xbeP_Quit ) } } )

    oMenuBar:addItem( { oMenu, } )
RETURN
James Loughner Re: Hint please?
on Mon, 21 May 2012 17:17:43 -0400
You want to set a background image. Well a dialog is made  up of 
several parts. The one we want is the drawingarea. The drawingarea. The 
drawingarea is a special kind of window object XbpIWindow class.

Look up XbpIWindow for details in the docs
Also may want to look at the XbpBitmap class to load an image

You can reference the drawingarea in you code with

odlg:drawingarea

In the appsys procedure

Jim



On 05/21/2012 03:14 PM, Dominik Perkovic wrote:
> Yayyyyy
>
> I made it!!!!!  Again, thanks for help to all 
>
> I 'figured out', according to your replies, that I'm using wrong 'set of
> commands', i.e. that I was trying to make sort of DOS window, which
> can't be maximized. So I deleted program and went to Xbase samples
> again. It took me a while to figure out which source I should use, then
> it took me quite a while (hey I'm still a newbie  ) to figure out how
> to add status bar. I even played with menu a bit 
>
> I'm aware all of you can write it with eyes closed but I'm kinda proud
> of myself  Anyway, now I have tough(?) question: how can I add image
> as a background to this window? Hopefully image that will change size
> when window changes it's size. Couldn't find any sample program so I'd
> appreciate any hint or simple example.
>
> Code now looks like this:
>
> #include "Appevent.ch"
> #include "Common.ch"
> #include "Font.ch"
> #include "Gra.ch"
> #include "Xbp.ch"
>
> PROCEDURE AppSys
> LOCAL oDlg, aPos[2], aSize[2]
>
> aSize[1] := 640
> aSize[2] := 400
> aPos[1] := 0.1 * aSize[1]
> aPos[2] := 0.1 * aSize[2]
>
> oDlg := XbpDialog():new( ,, aPos, aSize )
> oDlg:title := "Test Window"
> oDlg:taskList := .T.
> oDlg:close := {|| PostAppEvent( xbeP_Quit ) }
> oDlg:create()
> oDlg:drawingArea:setFontCompoundName( FONT_HELV_SMALL )
> AppMenu( oDlg:menuBar() )
>
>
> SetAppWindow( oDlg )
> SetAppFocus( oDlg )
> RETURN
>
> PROCEDURE Main
> LOCAL nEvent := NIL, mp1 := NIL, mp2 := NIL, oXbp
> LOCAL oParent := SetAppWindow():drawingArea
>
> oSBar := XbpStatusBar():new(Oparent)
> aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
> oSBar:create(Oparent ,, {0,0}, {SetAppWindow():currentSize()[1],20},aPP)
> cmsg := "test1 test2 test3 test4 test5 test6 test7 "
> oSBar:getitem(1):caption := cmsg
> oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_DATE )
> oPanel := oSBar:getItem(2)
> oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
> oPanel:alignment := XBPALIGN_RIGHT
> oSBar:addItem( ,,, XBPSTATUSBAR_PANEL_TIME )
> oPanel:alignment := XBPALIGN_RIGHT
> oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
> oPanel := oSBar:getItem(1)
> oPanel:autoSize := XBPSTATUSBAR_AUTOSIZE_CONTENTS
>
> DO WHILE nEvent <> xbeP_Quit
> nEvent := AppEvent( @mp1, @mp2, @oXbp )
> oXbp:handleEvent( nEvent, mp1, mp2 )
> ENDDO
>
> RETURN
>
> PROCEDURE AppMenu( oMenuBar )
> LOCAL oMenu := XbpMenu():new( oMenuBar )
> oMenu:title := "Application"
> oMenu:create()
> oMenu:addItem({"nothing"})
> oMenu:addItem( { "Quit", {|| PostAppEvent( xbeP_Quit ) } } )
>
> oMenuBar:addItem( { oMenu, } )
> RETURN
>
Dominik PerkovicRe: Hint please?
on Tue, 22 May 2012 17:48:13 +0200
Thanks for hints James 

Seems I learn easier from examples than from help files. Didn't find any 
example of XbpIWindow class, will see if I can get something from 
XbpBitmap class. If not, will read help again & again. Will let you know 
in few days if help doesn't help 

Regards.
AUGE_ OHRRe: Hint please?
on Tue, 22 May 2012 21:15:11 +0200
hi,

> Seems I learn easier from examples than from help files.

   YES, this is the best Way

> Didn't find any  example of XbpIWindow class,

   Xbase++ does not follow Windows "handle" Syntax
   it use OOP ( like Classy ) with Parent/Owner and Child

   XbpIWindow is a abstract Class derived from SuperClass
   XbpWindow() where allmost all XbPart are from.

   a XbpIWindow() is more like a hDC ( Device Content )
   which is called Presentationspace ( oPS ) in Xbase++


> will see if I can get something from  XbpBitmap class.

    oBMP:= XbpBitmap():new():create()

     load from Resource DLL
     oBMP:load( "MYOWN.DLL", BMP_CAL_STARTBMP )

     load from Disk
    oBMP:loadfile("MyPic.JPG")

   oDialog := XBPDIALOG() :new( APPDESKTOP(), , ;
                                                                aPos, ;
                                                                aSize)
   oDialog:drawingArea:bitmap := oBMP
   oDialog:resize := { | aOldSize, aNewSize, oSelf | ;
                   MyResize(aOldSize, aNewSize, oBMP)  }
   oDialog:create() :

this Way you can add a Image to :drawingArea:bitmap.
as you can see i also include o:resize Callback Slot ... i guess you next
Question 

greetings by OHR
Jimmy
Thomas Braun
Re: Hint please?
on Tue, 22 May 2012 08:53:58 +0200
Dominik Perkovic wrote:

> So my question is: is there any kind of manual or book or something 
> (like a bunch of those for VB) that would lead me step by step 
> explaining how  what  why... ? Or is there any place where one can ask 
> trivial / sample questions about Xbase?

To be honest - if you are thinking about working in the software business
sometimes in the future most likely you'll be better of learning some
mainstream language such as C++ / C# / Java first instead of any xBase
dialect. It also can't hurt to learn a some of the languages that are used
in web development such as PHP or Python.

- There are tons of (good) books about any of those languages
- There are literally terabytes of online tutorials and sample code
- There are hundreds of online forums
- Most of the languages come with an IDE (integrated development
environment) for free.
- The chance of getting a job later is much better

regards
Thomas
Peter AlderliestenRe: Hint please?
on Tue, 22 May 2012 17:35:54 +0200
Thomas,

> To be honest - if you are thinking about working in the software business
> sometimes in the future most likely you'll be better of learning some
> mainstream language such as C++ / C# / Java first instead of any xBase
> dialect. It also can't hurt to learn a some of the languages that are used
> in web development such as PHP or Python.
> 
> - There are tons of (good) books about any of those languages
> - There are literally terabytes of online tutorials and sample code
> - There are hundreds of online forums
> - Most of the languages come with an IDE (integrated development
> environment) for free.
> - The chance of getting a job later is much better

I don't think this advice does him any good if he's taking over the
application in the family and want to upgrade his Clipper application
(which I assume that's what he's trying to do).
In my opinion only the last reason is a reasonable one to start looking to
other language users. But I have heard the same argument convincing people
to switch to Java, which I don't hear much about anymore, or Delphi, which
is in the same league, and I am sure there are many others (if I read the
developer comments on MS sites right).

Peter
Thomas Braun
Re: Hint please?
on Wed, 23 May 2012 09:11:19 +0200
Peter Alderliesten wrote:

> I don't think this advice does him any good if he's taking over the
> application in the family and want to upgrade his Clipper application
> (which I assume that's what he's trying to do).

From what he wrote:

> I am 18 year old that is trying to learn Xbase. I have no prior 
> knowledge about databases but my father is a Clipper programmer and he 
> talked me into this.

I would not come to this conclusion. 

> In my opinion only the last reason is a reasonable one to start looking to
> other language users. But I have heard the same argument convincing people
> to switch to Java, which I don't hear much about anymore, or Delphi, which
> is in the same league, and I am sure there are many others (if I read the
> developer comments on MS sites right).

When I look at the TIOBE index at

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

Note that there is not a single xBase dialect in the top 20 list, but
Pascal/Delphi is! 

The only xBase language is Visual FoxPro on position 37.

If we are very honest, every single of the xBase languages family is a
niche product and will most likely never be mainstream.

I'm almost only developing web applications with WAA, but if I had to build
a desktop business application from scratch I don't think I would choose
any xBase language.

Thomas
Peter AlderliestenRe: Hint please?
on Wed, 23 May 2012 15:14:11 +0200
Thomas,

> I would not come to this conclusion. 

Reading his other posts, you're right.

> When I look at the TIOBE index at
> 
> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
> 
> Note that there is not a single xBase dialect in the top 20 list, but
> Pascal/Delphi is! 
> 
> The only xBase language is Visual FoxPro on position 37.
> 
> If we are very honest, every single of the xBase languages family is a
> niche product and will most likely never be mainstream.
> 
> I'm almost only developing web applications with WAA, but if I had to build
> a desktop business application from scratch I don't think I would choose
> any xBase language.

I appreciate your opinion.

I have looked at this index several times during the years.
What surprises me every time is that all programming languages that I have
been advised, I have taken courses on and my competition uses are all on
the way down. And the ones that are really moving up I would only advise to
my competition.

No programming language seems to survive as a main stream language used by
more than 10% of the programmers. So I don't think that's a viable
argument. What I am looking for is a language that has active support of
it's supplier, is still being developed and is productive for the type of
solutions I am working on.
I don't know if I would choose Xbase++ if I had to learn programming from
scratch, you have to know it to love it. But it's clean, stable and
productive. 

I had my times when I have been tinking about moving on, that I thought
Alaska too small to keep up the pace, but I am still a happy user
especially after seeing at the DevCon what the current Xbase++ developments
are.

Peter
Dominik PerkovicRe: Hint please?
on Tue, 22 May 2012 17:42:20 +0200
Fair enough Thomas 

Unfortunately(?) my father thinks I 'should get familiar with coding of 
some kind because drag & drop programming isn't enough'. I have very 
basic programming classes at high school (no databases), and college I'm 
interested in teaches C++, Xbase 'fun' is supposed to fill some blanks 

Thank you.
Jan Groenestein Re: Hint please?
on Tue, 22 May 2012 19:07:11 +0200
Hi Dominik,

By way of encouragement : I think your father is right. I see a lot of 
programmers who have no idea of what they are doing because they only 
know the "drag and drop" method of programming. In the end, that does 
not get you very far.
If you want to learn some real programming skills, then Xbase++ is in my 
view a good choice, even if you will later on also use other languages. 
We have used Xbase++ for many years now, and we outperfom any C++, C#, 
Java programmer team easily in speed of development and stability of the 
resulting systems.
So, if you are thinking of starting your own business : Xbase++ is 
excellent. If you want to be a programmer for run-of-the-mill outfits : 
Xbase++ is a good way to learn good programming practices.

Kind regards,
Jan Groenestein

Op 22-5-2012 17:42, Dominik Perkovic schreef:
> Fair enough Thomas 
>
> Unfortunately(?) my father thinks I 'should get familiar with coding of
> some kind because drag & drop programming isn't enough'. I have very
> basic programming classes at high school (no databases), and college I'm
> interested in teaches C++, Xbase 'fun' is supposed to fill some blanks 
>
> Thank you.
>
AUGE_ OHRRe: Hint please?
on Tue, 22 May 2012 21:13:42 +0200
hi,

> Unfortunately(?) my father thinks I 'should get familiar with coding of
> some kind because drag & drop programming isn't enough'.

i agree, but where do you want to start ?
if you realy want to know how dragdrop works you have to read
C. Petzold Book as i  did last Year after 30 Year of Xbase (all Version)

> I have very  basic programming classes at high school (no databases),
> and college I'm  interested in teaches C++, Xbase 'fun' is supposed to
> fill some blanks 

as long you get not confused how Xbase++ Concept implement some
Windows Controls it will be a fast Way to migrate Cl*pper Code***
into 32bit Windows Code.
***remember that old 16bit 3-PP LIB ( for Cl*pper) can not be used !!!

but while you want to migrate to "full GUI" do not expect to use
your Fathers old Cl*pper Code ... it will not make much Sense,
except Classy OOP Code.
just take his Business Logic and make new "Forms" for In-/Out-put
with XPPFD.EXE ( Formdesigner ) and let generate "Class Code"

greetings by OHR
Jimmy
Thomas Braun
Re: Hint please?
on Wed, 23 May 2012 09:26:09 +0200
Dominik Perkovic wrote:

> Fair enough Thomas 
> 
> Unfortunately(?) my father thinks I 'should get familiar with coding of 
> some kind because drag & drop programming isn't enough'.

Xbase++ is not the best toolset to learn a programming language and
definitely not to learn database programming.

It has tons of legacy features that are only in place because of backwards
compatibility with Clipper. 

Without knowing Clipper it is almost impossible for you to decide what to
use and what to leave alone.

I don't know you and I don't know exactly what you are after, so it is not
easy to give you any proper advice.

Thomas
Dominik PerkovicRe: Hint please?
on Wed, 23 May 2012 19:55:21 +0200
Let me try to reply to all replies in one post 

I still have no real clue what I got myself into, but one thing I see 
quite clear: there is huge difference between Logo and character mode 
Pascal and this. So even quite clueless I think I've already learned 'a 
lot'. Any time I see a menu or button or check box in windows, I don't 
look at them as something trivial. I'm aware there was a lot of 
someone's work put into making it appear on screen and doing what it is 
supposed to do.

I'm not close to databases yet but I'm curious how hard it will be to do 
something useful with data that is more serious than memory variables I 
worked with in mentioned so called programming. You know, programs like 
'input 10 numbers and I'll tell you highest and lowest one'.

But lets leave databases for a while and get back to appearance  few 
questions again if I may...

1. If this code defines size and position of my window:

    aSize[1]      := 640
    aSize[2]      := 400
    aPos[1]       := 0.1 * aSize[1]
    aPos[2]       := 0.1 * aSize[2]

    oDlg          := XbpDialog():new( ,,aPos , aSize )

which values I need to make it start / show at upper left corner of my 
screen? I tried 0,0 (apos1 and 2) but its lower left corner which seems 
weird to me.

2. Lets say this is code for status bar:

    oSBar := XbpStatusBar():new(Oparent)
    aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
    oSBar:create(Oparent ,, {0,0}, {SetAppWindow():currentSize()[1],20},aPP)
    cmsg := "test1 test2 test3 test4 test5 test6 test7 "
    oSBar:getitem(1):caption := cmsg

When I click maximize button (or resize window manually) it keeps same 
size which also seems weird to me  Have I missed some 'command' or 
value or parameter that can be used to make it stretch together with 
window it belongs to?

3. Jimmy (AUGE_OHR), so far I managed to successfully use part of your 
code for background image. Part of my AppSys procedure was like this:

    oDlg:close    := {|| PostAppEvent( xbeP_Quit ) }

    oDlg:create()

and I added following between those two lines:

    oBMP:= XbpBitmap():new():create()
    oBMP:loadfile("Me.jpg")
    oDlg:drawingArea:bitmap := oBMP

and I got background picture  Yayyy. Or not  I got part of picture 
that fits 600x400 window, or tiled picture if I have maximized window. 
Part / line that I don't understand (nor it works  ) is this:

oDialog:resize := { | aOldSize, aNewSize, oSelf | ;
                    MyResize(aOldSize, aNewSize, oBMP)  }

I guess I should use oDlg instead of oDialog (as I did with mentioned 3 
lines)but how do I get values for aOldsize, aNewSize, oSelf? Also, is 
MyResize some procedure I have to write?

4. And a question from my father. We played a bit with .ARC file for 
images, we made it work, but, since we used 5 Mb .bmp file, we got quite 
big .exe file. That reminded my father to ask if its better to keep all 
procedures in one file or split them into several smaller ones? He 
mentioned old linker, memory usage.. things he said old guard will 
understand...

Thank you all 

Dominik
AUGE_ OHRRe: Hint please?
on Wed, 23 May 2012 23:11:06 +0200
hi,

>1. If this code defines size and position of my window:
>
>    aSize[1]      := 640
>    aSize[2]      := 400
>    aPos[1]       := 0.1 * aSize[1]
>    aPos[2]       := 0.1 * aSize[2]
>    oDlg          := XbpDialog():new( ,,aPos , aSize )
>
>which values I need to make it start / show at upper left corner of my
>screen? I tried 0,0 (apos1 and 2) but its lower left corner which seems
>weird to me.

Windows 0,0 start with lower left so Xbase++ use XBP_ORIGIN_BOTTOMLEFT
Size of DeskTop is

aDesk := AppDeskTop():currentSize()
aPos[1] = 0
aPos[2] = aDesk[2] - aSize[2]


>2. Lets say this is code for status bar:
>    oSBar := XbpStatusBar():new(Oparent)
>    aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
>    oSBar:create(Oparent ,, {0,0},
> {SetAppWindow():currentSize()[1],20},aPP)
>    cmsg := "test1 test2 test3 test4 test5 test6 test7 "
>    oSBar:getitem(1):caption := cmsg
>
>When I click maximize button (or resize window manually) it keeps same size
>which also seems weird to me  Have I missed some 'command' or value or
>parameter that can be used to make it stretch together with window it
>belongs to?

you are using XP as OS() ?
XbpStatusbar() need MsComCtl.OCX which is not default on Win7 OS() any more.

about "stretch" ...

>3. Jimmy (AUGE_OHR), so far I managed to successfully use part of your code
>for background image. Part of my AppSys procedure was like this:
>...
>and I got background picture  Yayyy. Or not  I got part of picture that
>fits 600x400 window, or tiled picture if I have maximized window. Part /
>line that I don't understand (nor it works  ) is this:
>
>oDialog:resize := { | aOldSize, aNewSize, oSelf | ;
>                    MyResize(aOldSize, aNewSize, oBMP)  }
>
>I guess I should use oDlg instead of oDialog

you can use any Name you want


>but how do I get values for aOldsize, aNewSize, oSelf? Also, is MyResize
>some procedure I have to write?

i knew that this is your next Question when use a Image.

   oDlg:drawingArea:bitmap := BMP2BMP(oBMP, aSize)

   FUNCTION BMP2BMP(oBMP,aXbpSize)
   LOCAL oHuge
   LOCAL oTiny
   LOCAL oPS
   LOCAL oRet

      IF aXbpSize[2] > 0
         oHuge := oBMP
      //Create a small bitmap to fit in our XbpStatic
         oTiny := XbpBitmap():New():Create()
         oTiny:Make(aXbpSize[1],aXbpSize[2])
         oPS := XbpPresSpace():new()
         oTiny:presSpace(oPS)
      //Copie and resize the huge bitmap to the small bitmap
         oHuge:Draw(oPS,{0,0,aXbpSize[1],aXbpSize[2]},,,GRA_BLT_BBO_IGNORE)
         oRet := oTiny
         oBMP:Destroy()
      ELSE
         oRet := oBMP
      ENDIF

RETURN oRet

this Function will create a new Bitmap with Size you want
so it will "fit" when you start your Application.

when maximize  normalize  minimize Xbase++ will "fire"
some Event which work with o:resize Callback Slot

>oDialog:resize := { | aOldSize, aNewSize, oSelf | ;
>                MyResize(aOldSize, aNewSize,oSelf, oBMP)  }

now you have to write your Code to handle aOldSize, aNewSize

   PROCEDURE MyResize(aOldSize,aNewSize,oSelf,oBMP)
   LOCAL aBMPsize

   IF aOldSize[1] == 0 .AND. aOldSize[2] == 0        //was minimized
      aOldSize := aNewSize                                      //normalize
   ELSEIF aNewSize[1] == 0 .OR. aNewSize[2] == 0 //will now minimized
      RETURN
   ELSEIF aNewSize[1] == aOldSize[1] .AND.;         "same Size"
              aNewSize[2] == aOldSize[2]
      RETURN
   ENDIF

   SetSize(oSelf)

    here normal you have to step via o:DrawingArea:ChildList()
    and calculate new Pos and Size e.g. for Statusbar ...
   
    i just show how to use Image

   aBMPsize := oSelf:DrawingArea:currentsize()
   oSelf:DrawingArea:Bitmap := BMP2BMP(oBMP, aBMPsize )
   oSelf:configure()

RETURN

>4. And a question from my father. We played a bit with .ARC file for
>images, we made it work, but, since we used 5 Mb .bmp file, we got quite
>big .exe file. That reminded my father to ask if its better to keep all
>procedures in one file or split them into several smaller ones? He
>mentioned old linker, memory usage.. things he said old guard will
>understand...

how many RAM do you have ... it is not any more 640Kb 
yes you can split Code into DLL and load them "dynamic"

btw: what is your Source Code Editor ? did you try VX IDE ?

greetings by OHR
Jimmy
Thomas Braun
Re: Hint please?
on Thu, 24 May 2012 08:20:47 +0200
AUGE_ OHR wrote:

>>oDialog:resize := { | aOldSize, aNewSize, oSelf | ;
>>                    MyResize(aOldSize, aNewSize, oBMP)  }
>>
>>I guess I should use oDlg instead of oDialog
> 
> you can use any Name you want

Of course he can't -  he has to use the variable name he assigned the
dialog object to, otherwise he would run into some error message.

Thomas
Thomas Braun
Re: Hint please?
on Thu, 24 May 2012 08:31:14 +0200
Dominik Perkovic wrote:

> oDialog:resize := { | aOldSize, aNewSize, oSelf | ;
>                     MyResize(aOldSize, aNewSize, oBMP)  }
> 
> I guess I should use oDlg instead of oDialog (as I did with mentioned 3 
> lines)but how do I get values for aOldsize, aNewSize, oSelf?

Those values are passed to the "code block" ( -> look this up in the
documentation, C calls this "function pointer") by the system when the
resize event occurs.

The above is a construct named "callback slots" - those are iVars (object
properties, member variables) that contain a pointer to executable code.

You should also read the first three basic chapters of the documentation -
read them several times, look into sample code, read them again... until
you get the feeling that you actually understand something 

Thomas
Raymond FischbachRe: Hint please?
on Thu, 24 May 2012 21:48:50 +0200
Dominik Perkovic a écrit :
> Let me try to reply to all replies in one post 
>
> I still have no real clue what I got myself into, but one thing I see quite 
> clear: there is huge difference between Logo and character mode Pascal and 
> this. So even quite clueless I think I've already learned 'a lot'. Any time I 
> see a menu or button or check box in windows, I don't look at them as 
> something trivial. I'm aware there was a lot of someone's work put into 
> making it appear on screen and doing what it is supposed to do.
>
> I'm not close to databases yet but I'm curious how hard it will be to do 
> something useful with data that is more serious than memory variables I 
> worked with in mentioned so called programming. You know, programs like 
> 'input 10 numbers and I'll tell you highest and lowest one'.
>
> But lets leave databases for a while and get back to appearance  few 
> questions again if I may...
>
> 1. If this code defines size and position of my window:
>
>     aSize[1]      := 640
>     aSize[2]      := 400
>     aPos[1]       := 0.1 * aSize[1]
>     aPos[2]       := 0.1 * aSize[2]
>
>     oDlg          := XbpDialog():new( ,,aPos , aSize )
>
> which values I need to make it start / show at upper left corner of my 
> screen? I tried 0,0 (apos1 and 2) but its lower left corner which seems weird 
> to me.
>
> 2. Lets say this is code for status bar:
>
>     oSBar := XbpStatusBar():new(Oparent)
>     aPP := {{XBP_PP_COMPOUNDNAME, "8.Arial"}}
>     oSBar:create(Oparent ,, {0,0}, {SetAppWindow():currentSize()[1],20},aPP)
>     cmsg := "test1 test2 test3 test4 test5 test6 test7 "
>     oSBar:getitem(1):caption := cmsg
>
> When I click maximize button (or resize window manually) it keeps same size 
> which also seems weird to me  Have I missed some 'command' or value or 
> parameter that can be used to make it stretch together with window it belongs 
> to?
>
> 3. Jimmy (AUGE_OHR), so far I managed to successfully use part of your code 
> for background image. Part of my AppSys procedure was like this:
>
>     oDlg:close    := {|| PostAppEvent( xbeP_Quit ) }
>
>     oDlg:create()
>
> and I added following between those two lines:
>
>     oBMP:= XbpBitmap():new():create()
>     oBMP:loadfile("Me.jpg")
>     oDlg:drawingArea:bitmap := oBMP
>
> and I got background picture  Yayyy. Or not  I got part of picture that 
> fits 600x400 window, or tiled picture if I have maximized window. Part / line 
> that I don't understand (nor it works  ) is this:
>
> oDialog:resize := { | aOldSize, aNewSize, oSelf | ;
>                     MyResize(aOldSize, aNewSize, oBMP)  }
>
> I guess I should use oDlg instead of oDialog (as I did with mentioned 3 
> lines)but how do I get values for aOldsize, aNewSize, oSelf? Also, is 
> MyResize some procedure I have to write?
>
> 4. And a question from my father. We played a bit with .ARC file for images, 
> we made it work, but, since we used 5 Mb .bmp file, we got quite big .exe 
> file. That reminded my father to ask if its better to keep all procedures in 
> one file or split them into several smaller ones? He mentioned old linker, 
> memory usage.. things he said old guard will understand...
>
> Thank you all 
>
> Dominik

Hello Dominik,

I have read the thread and come to some conclusion/advice for you.
First off all, Xbase++ is a very very good and stable product. Its 
future seems very interesting too.
But it is very hard to learn as there is no book about it and it is 
difficult to know where to start and where to find good examples.

If you keep doing it the way you have started, you are following a 
terribly long learning curve.

That is why I advice you to spend some $$$ on external libraries. There 
are 3 that I am aware of:

- Xpress++
I have never used it but from what I have heard, it is a very complete 
system allowing you to write your GUI applications in a Clipper manner. 
Of course it has many other features. I would advice to buy it if you 
intend to continue to write "Clipper like" code.
Other people will be better than me to give more explanations.

TopDown Library
This is my favorite tool. I use it all the time for all my 
applications.
The name of the library comes from the way dialogs are handled from top 
to bottom (0,0 = upper left corner). This is a PURE Xbase++ library and 
it works only in GUI mode. It comes with all the source code, a set of 
template programs (allowing you, with some changes, to create easily a 
simple application), a tutorial and a very good help system.
It also has a good printing mechanism with print preview.

Xclass++
This is a library that I don't know at all but I have followed a 
session on it at the last DevCon and it looks very impressive. Here 
too, other people will explain it better.

In my opinion, you can (MUST) select one of these 3 libraries BUT only 
one (at least at the beginning). You will save yourself hundreds of 
hours learning Xbase++ and creating your first application.

Best regards,
Raymond
Zupan Miran Re: Hint please?
on Fri, 25 May 2012 08:41:21 +0200
I totally agree with Raymond.
I also using TopDown GUI lib, but maybe yout father wil be more familiar with Express lib.
You realy will save yourself hundreds of hours learning Xbase++ and creating your first application 
with one of this GUI library.

On my web site you can download a demo version of accounting aplication writen entirely
in xBase++ and TD lib

Puno pozdrava
Miran Zupan

--------------------------------
SPC Zupan Miran s.p.
Tomanova pot 9, 1251 Moravce, Slovenia
TEL: (xx386)  59 / 045 - 909
GSM: 041/ 620 - 753

E-mail: spczupan@spc-zupan.si
Web site:    www.spc-zupan.si
--------------------------------
Thomas Braun
Re: Hint please?
on Fri, 25 May 2012 14:19:01 +0200
Raymond Fischbach wrote:

> If you keep doing it the way you have started, you are following a 
> terribly long learning curve.
> 
> That is why I advice you to spend some $$$ on external libraries. There 
> are 3 that I am aware of:
> 
> - Xpress++
...
> 
> TopDown Library
...
> 
> Xclass++
...

Do you really think adding complex third party libraries will help in
learning Xbase++?

At least Xpress++ was built with the average command-oriented Clipper
developer in mind and uses a lot of Clipper concepts and logic.

Thomas
Zupan Miran Re: Hint please?
on Fri, 25 May 2012 15:21:35 +0200
Dne 25.5.2012 14:19, piše Thomas Braun:
> Do you really think adding complex third party libraries will help in
> learning Xbase++?

I think, the end point is migration old (father's) clipper aplication to windows environment ...

When I look into the past, I first try with pure xBase, after a few loong months (almost year...), I 
give up and try with TopDown lib.
I must be honest, this was not an easy job also, but then I start learning (again!) source code from 
that lib and now I am very pleased with the results and products that I made.
OK, I know, it's not perfect, but ....
And, again, without that lib (or Express++) I never learn xBase and migration time from clipper to
xBase windows will end years ago.

Best regards
Miran Zupan
Raymond FischbachRe: Hint please?
on Fri, 25 May 2012 19:00:16 +0200
Thomas Braun avait prétendu :
> Raymond Fischbach wrote:
>
>> If you keep doing it the way you have started, you are following a 
>> terribly long learning curve.
>> 
>> That is why I advice you to spend some $$$ on external libraries. There 
>> are 3 that I am aware of:
>> 
>> - Xpress++
> ...
>> 
>> TopDown Library
> ...
>> 
>> Xclass++
> ...
>
> Do you really think adding complex third party libraries will help in
> learning Xbase++?
>
> At least Xpress++ was built with the average command-oriented Clipper
> developer in mind and uses a lot of Clipper concepts and logic.
>
> Thomas

As I said, I am not using Xpress++ and pointed out that other people 
would give better advices on it.
I know that many people like it as it has the Clipper flavour.

I can also say that TD is definitely much more easier to use that pure 
Xbase++.

Personnaly, I wanted to get rid of this kind of programming and wanted 
to go to full GUI directly.
With TD lib, I could produce my first application in a couple of 
months. It was not a huge one but it was quite complex.
After 6 months I was able to produce very nice peaces of code that I 
showed at the DevCon in Holland. And many people told me that they were 
impressive.
My opinion is simply that using TD, I understand the things much better 
and faster than with any Xbase++ sample and/or manual.

To finish, I am sure that using any of the - what you say "complex" 
library is far away easier than the method you followed with WAA.

Regards,
Raymond
Allen Lee Re: Hint please?
on Fri, 25 May 2012 10:47:09 -0700
Hi Raymond:
Have you tried WAA?
There is nothing easier than WAA.
Allen Lee Re: Hint please?
on Fri, 25 May 2012 10:52:34 -0700
Hi Raymond:
Have you tried WAA?
There is nothing easier than WAA.
You will be amazed at how fast an application can be developed in WAA.
Raymond FischbachRe: Hint please?
on Fri, 25 May 2012 20:13:52 +0200
Allen Lee a couché sur son écran :
> Hi Raymond:
> Have you tried WAA?
> There is nothing easier than WAA.
> You will be amazed at how fast an application can be developed in WAA.

Hi Allen,

You are thinking right, I never tried WAA.
I thought anyway that you have to write the application using Xbase++ 
though.
If I am right, where is WAA easier than Xbase++?

Anyway, I was not trying to be the troll here.
I was simply indicated that in my opinion, the external libraries could 
really help newbies with windows programming under Xbase++ because this 
is my experience.

Best regards,
Raymond
Allen Lee Re: Hint please?
on Fri, 25 May 2012 12:01:38 -0700
What does it tell you about the complexity of Xbase++ when you need the 
help of external libraries to understand windows programming?

WAA does not require the long steep learning curve of the Xbase++ GUI 
code set.
WAA only requires Xbase Clipper code superset.

Most people already know HTML, CSS and a little javascript.
When WAA is combined with HTML, javascript and CSS then the learning is 
very gentle.

The development is much faster because far less coding is required due 
to the high-level nature of HTML.
Thomas Braun
Re: Hint please?
on Tue, 29 May 2012 08:38:29 +0200
Allen Lee wrote:

> Most people already know HTML, CSS and a little javascript.

Quite obciously, Dominik does not nok much about programming as such... so
adding any kind of additional layer to the complexity does not help.

> The development is much faster because far less coding is required due 
> to the high-level nature of HTML.

You are joking?

Creating business-grade applications for the web is very complex  because
with plain HTML you don't get anywhere at all.
Allen Lee Re: Hint please?
on Tue, 29 May 2012 00:22:05 -0700
On 5/28/2012 11:38 PM, Thomas Braun wrote:
> Allen Lee wrote:
>
>> Most people already know HTML, CSS and a little javascript.
>
> Quite obviously, Dominik does not know much about programming as such... so
> adding any kind of additional layer to the complexity does not help.
I found the GUI layer to be many times more complex than the HTML layer.

>> The development is much faster because far less coding is required due
>> to the high-level nature of HTML.
>
> You are joking?
I found comparative functionality to require far more lines of code for 
GUI than for HTML.
>
> Creating business-grade applications for the web is very complex  because
> with plain HTML you don't get anywhere at all.
I found GUI to be much more pedantic and less intuitive than HTML, CSS 
and javascript.

I get the impression that you do not agree.
Am I wrong in thinking that you left GUI for WAA for all the reasons 
that I have previously stated?
Thomas Braun
Re: Hint please?
on Tue, 29 May 2012 16:17:28 +0200
Allen Lee wrote:

> I get the impression that you do not agree.
> Am I wrong in thinking that you left GUI for WAA for all the reasons 
> that I have previously stated?

I left desktop-based GUI because I needed to build a web based
application. 

I did not leave beacause I wanted to - but I don't regret. 

Despite the fact that ther where a lot of things to learn, it was great fun


Creating a decent web-based application that performs and behaves like a
traditional desktop apps isn't trivial by no means. 

Instead of writing everything yourself, you normally end up using one of
the many javascript frameworks that are out there - and still most of those
applications do not behave like I would expect from a desktop based GUI
application.

The more effort you put into it to overcome the logical shortcomings of the
browser <-> server transaction paradigma, the more complexity is added.

I'm wondering how everybody here is assuming that Dominik is going to take
over old Clipper applications from his father... I can't see where he has
written this.

I still don't think that Xbase++ is the right tool to learn programming in
general... both the toolset and the language contain so many features that
are either Clipper-legacy and therefore obsolete or very product-specific.

To learn the craft of programming, a more general-use language like C / C++
/ C# or Pascal seems to be more appropriate to me. 

Thomas
Rudolf ReinthalerRe: Hint please?
on Tue, 29 May 2012 08:47:08 +0200
Hello,
I was one of the first XBase++ and eXPress++ users. For me it never was 
necessary to dig deeper into pure XBase++ code for writing all my 
software, especially for writing complex dialogs. For createing most of 
my dialogs I am even faster with coding than with the form designer. The 
code is very compact and so also finding errors is much easier for me. 
eXPress++ does all what I need (and much more) and saves very much time 
and so also money. Also TD lib helps a lot. I see no need for me 
actually to know the complete background, it only would take time that I 
better use for more important things. So I think if someone is really 
interrested for the background and have enough free time, it makes 
sense, but for writing professional and robust applications I see no 
need for this.
Of course this is only my opinion based on my experiences.
regards
Rudolf
Allen Lee Re: Hint please?
on Wed, 23 May 2012 21:40:58 -0700
Hi Dominik:
What you are learning here now is not fun.
In your father's time, Clipper was fun.

Forget about the coding set that creates desktop GUI EXE files.

Follow Thomas Braun's path and create GUI web applications.
Use WAA with the Xbase coding set that derived from Clipper.

The benefits to you are:
1. You will be far more productive because the coding is simpler and 
smaller.
2. Your father will understand the code and be able to help you.
3. You can run a web app on a desktop machine as if it were an EXE.
4. You can load your web app on a server and run it from any machine in 
the world that has an internet connection.
5. In the process, you will learn html and maybe javascript.
6. Your web app functionality can be the same as a desktop EXE.
James Loughner Re: Hint please?
on Thu, 24 May 2012 02:24:40 -0400
I disagree.

You may end up doing this but you really need to understand GUI Class 
event driven programming to get by in any windowed environment.

How it works

the Windowed environment keeps track of where all the windows are and if 
they are being clicked or if the mouse is over then etc. When the 
environment senses say a mouse click it sends a message to the object 
that the mouse is over at that moment. The program that owns that object 
receives that message and thought the event loop passes it to the 
correct object's handleEvent method along with any info  about the event 
where it then may call other methods that deal with a click.

If you look at the docs for any of the XBP classes you will find all 
sorts of methods that for the a large part deal with events.

Classes are truly neat. An object is just an instance of a class 
definition. A class is basically a data structure and a set of methods. 
Methods are just functions that are attached to a class.

Real simple example Note these will only work in console mode not full 
GUI I am using text based commands here just doing it in a class structure.

CLASS mysimpleclass
     EXPORTED:
        METHOD INIT, PRINTIT
        VAR ctext
ENDCLASS

METHOD mysimpleclass:Init()
    ::cText := "Some text"
RETURN Self

METHOD mysimpleclass:PRINTIT()
    ? ::cText
RETURN Self


Using Exported indicate the following variables and methods is visible 
to the world. There are ways to limit that, read the docs.

The neat part of classes is that you can use inheritance to make a 
modified version   or sub-class

CLASS NewClass FROM mysimpleclass
     EXPORTED:
        METHOD INIT
ENDCLASS

METHOD mysimpleclass:Init()
    ::cText := "New text"
RETURN Self

This class has all the stuff from mysimpleclass but I overloaded the 
init method in this case which now uses a new text string. So by 
overloading we can replace selected sections of the original class but 
don’t have to reprogram the whole thing.

How to use it?

PROCEDURE MAIN() //compile as a console app
LOCAL oClass
    oClass := mysimpleclass:New()
    oClass:PrintIT()
 now the sub class
    oClass := Newclass:New()
    oClass:PrintIT()

 lets change the string value
    oClass:cText := "Hello world"
    oClass:PrintIT()

    INKEY(0)
RETURN


Note that class do not have to be GUI parts but GUI parts are classes.

This is an extremely powerful way to write programs.

I seldom write a function or procedure any more almost all my code is 
now in class format.

Checkout my vector class and others here
http://gogalthorp.com/splash

Jim



On 05/24/2012 12:40 AM, Allen Lee wrote:
> Hi Dominik:
> What you are learning here now is not fun.
> In your father's time, Clipper was fun.
>
> Forget about the coding set that creates desktop GUI EXE files.
>
> Follow Thomas Braun's path and create GUI web applications.
> Use WAA with the Xbase coding set that derived from Clipper.
>
> The benefits to you are:
> 1. You will be far more productive because the coding is simpler and
> smaller.
> 2. Your father will understand the code and be able to help you.
> 3. You can run a web app on a desktop machine as if it were an EXE.
> 4. You can load your web app on a server and run it from any machine in
> the world that has an internet connection.
> 5. In the process, you will learn html and maybe javascript.
> 6. Your web app functionality can be the same as a desktop EXE.
>
>
>
Allen Lee Re: Hint please?
on Thu, 24 May 2012 01:15:13 -0700
You have described a very steep learning curve for a beginner.

Wouldn't the event driven programming be more easily managed with WAA 
and javascript?
James Loughner Re: Hint please?
on Thu, 24 May 2012 22:12:24 -0400
Well Input via HTML even Javascripted is very primate compared to Pure 
Xbase. It is fine for a cloud like situation where all processing 
happens on the servers and you have minimum input requirements. So I 
believe you need to write local programs first then learn the HTML and 
Javeascript, if wanted, which is also a steep learning curve. Learn 
about event driven GUI OPP and it applies to other real languages like 
Java c++ and python etc. The methodology is the same just different syntax.

Jim



On 05/24/2012 04:15 AM, Allen Lee wrote:
> You have described a very steep learning curve for a beginner.
>
> Wouldn't the event driven programming be more easily managed with WAA
> and javascript?
>
Thomas Braun
Re: Hint please?
on Thu, 24 May 2012 15:00:57 +0200
Allen Lee wrote:

> Forget about the coding set that creates desktop GUI EXE files.
> 
> Follow Thomas Braun's path and create GUI web applications.
> Use WAA with the Xbase coding set that derived from Clipper.

The downside of this is that creating a decent web-based (aka
browser-based) application is not a trivial task.

Creating a browser GUI that acts like a desktop app involves a lot of
different skills, such as HTML, CSS, javascript, knowledge of the DOM and
the variations and oddities you will get by using at least 4 or 5 different
browsers on different platforms.

> The benefits to you are:
> 1. You will be far more productive because the coding is simpler and 
> smaller.

See above 

> 2. Your father will understand the code and be able to help you.

This is what I don't believe - see above.

> 6. Your web app functionality can be the same as a desktop EXE.

...but only with a lot of exceptions. A browser app will never be
integrated as tight into the operating system environment it runs on as a
desktop application.

Thomas
AUGE_ OHRRe: Hint please?
on Wed, 30 May 2012 00:43:51 +0200
hi,

>What you are learning here now is not fun.
>In your father's time, Clipper was fun.

if you do not have fun with your work something is going wrong 

we have to learn from 0 ... no books ... no "Newsgroup" only
CompuServe-Forum with 300 Baud Modem ...



>Forget about the coding set that creates desktop GUI EXE files.

i did try CXP ... i´m not sure if i "need" it for Intranet.
most Workstation of my Customer are used for "input" data so User
work with Keyboard ... not Mouse or touch Pad or a Smartphone

Customer also have "other" Software running "local" together with
my Xbase++ Application which "communicate" with those Software

if i use CXP, instead of WAA, in Futures than it will be use it to
enhance "output" of Data to a "new Device"

Xbase (all Version) is still a Database System ... GUI is just Windows API

Xbase++ OOP Syntax is a good Way to "learn" GUI and how to use its
"Controls" which we have as XbParts.

greetings by OHR
Jimmy
Dominik PerkovicRe: Hint please?
on Thu, 24 May 2012 19:55:55 +0200
Okkkkk.. I admit I was a bit confused with discussion after my previous 
post, I wondered if I have said something wrong. So I called my father, 
he has read and smiled saying something like 'get used to it, thats the 
way we are, we like to discuss things'.

Jimmy

I'm a bit busy with school so I'll have to try your code this weekend.
I'm using XP SP3 and have no clue what MsComCtl.ocx is but will google it.
Source Code Editor.. I've googled 'VX IDE' but no luck. Any link please?

Thomas

'You should also read the first three basic chapters of the 
documentation'.. could you tell me which (where is) documentation you 
were referring to?

Again, thank you all 

Dominik
AUGE_ OHRRe: Hint please?
on Thu, 24 May 2012 21:35:00 +0200
hi,

> I'm using XP SP3 and have no clue what MsComCtl.ocx is but will google it.

OCX are activeX Components.
for Visual Basic Users MS was introuduce the MSCOMCTL.OCX which is
need for some XbParts like XbpStatusbar() or XbpToolBar()

new Visual Basic Versions moved to the .NET Platform so Win7 dont have
MSCOMCTL.OCX

if OCX is not "default" on Win7 like on XP Machine you need to "install" it
( need Admin rights ). also some OCX seem to need Admin rights
when run ( on 64bit ? )



> Source Code Editor.. I've googled 'VX IDE' but no luck. Any link please?

you should find "VX IDE" at Alaska Website.
it include Editor  Help  Debugger

btw. which Xbase++ Version are you using ?

greetings by OHR
Jimmy
Dominik PerkovicRe: Hint please?
on Fri, 25 May 2012 19:29:48 +0200
Maybe this is naive question but still: if TopDown or Express++ do the 
job better, why do I need Xbase++ then?

And, regarding my father.. he won't let me use his programs. He says 
that each time he migrated to new software he pulled a bunch of crap 
together with old programs. He says scratch is where I start.
Pascal BoivinRe: Hint please?
on Fri, 25 May 2012 19:54:00 +0200
Dominik Perkovic wrote:

> Maybe this is naive question but still: if TopDown or Express++ do
> the job better, why do I need Xbase++ then?

Xbase give us low level objects.  You need to do many things to work
with them.  For example, the object XbpQuickBrowse do look good, but
it's read only.  After you add a few pages of code to do a derived
class from XbpQuickBrowse, you can finally have a sortable and editable
browse.

That is what Topdown and Express do.  They add the missing source code
over xbase so you can concentrate on the workflow, instead of trying to
reinvent existing objects.

> And, regarding my father.. he won't let me use his programs. He says
> that each time he migrated to new software he pulled a bunch of crap
> together with old programs. He says scratch is where I start.

Your father is funny but realist!
Dominik PerkovicRe: Hint please?
on Fri, 25 May 2012 20:15:24 +0200
My newbie thinking is: Alaska should buy those 'libs' and put that all 
together in one product.

And make one good step-by-step manual. For newbies of course 
AUGE_ OHRRe: Hint please?
on Fri, 25 May 2012 21:18:39 +0200
hi,

> Alaska should buy those 'libs' and put that all together in one product.

your Father had the same "Problem" with Cl*pper 3-PP LIB
3-PP LIB are to enhance a "basic" Product to make live easy.

if your Father do not use Cl*pper 3-PP LIB ( except CT Tools )
you can migrate the "old" Cl*pper Code into 32bit Hybrid Mode
"quick" just in some Days.

the big Step is "full GUI" meen using Windows Controls.

Xbase++ Controls, called XbParts, are "Wrapper" for those
Windows Controls and give you a Object to work with OOP

there are several Xbase (all Version ) "Wrapper" doing
allmost the same as you can see it for harbour Constribution.

if you know how, you can build you own "Wrapper" for
"native" Control using OS() "given" DLL ...
so you can say Windows itself is the bigges "free" Toolbox.





> And make one good step-by-step manual. For newbies of course 

most Xbase++ User come from Cl*pper so they do not
have to "learn" it while 99,999% compatible.

XbParts use OOP Syntax where "old" Cl*pper Developer
have to "learn" it ( except he has used Classy before )

there have been many Books about OOP when this
technique start but they are not spezial for Cl*pper

with Cl*pper v5.x your Father got some Object :
ErrorSys.PRG and TBrowse()

so if you "got" how to work with OOP than you begin to
understand Power of Xbase++ .
Try Xbase++ "Formdesigner" XPPFD.EXE to "fill" your Form
and let it create "Class Code" ... the next Step for your "empty"
Dialog Window

greetings by OHR
Jimmy
Raymond FischbachRe: Hint please?
on Fri, 25 May 2012 20:25:49 +0200
Il se trouve que Dominik Perkovic a formulé :
> Maybe this is naive question but still: if TopDown or Express++ do the job 
> better, why do I need Xbase++ then?
>
> And, regarding my father.. he won't let me use his programs. He says that 
> each time he migrated to new software he pulled a bunch of crap together with 
> old programs. He says scratch is where I start.

These are LIBRARIES.
This means that they are upper level code for Xbase++ but they still 
use Xbase++. These libraries can do nothing without Xbase++.

If you start from scratch, then do what I did: forget Clipper and go 
straight GUI and OOP. For this I used TD but as I already said, other 
libraries can fit your needs better.

Just spend a few hours/days on looking at them (you can find the links 
on Alaska web site), you will have a better understanding.

But as an example, your program to create a dialog can be replaced in 
TD by:
    oDlg := tdDlg(nRows,nCols,cTitle)
where nRows, nCols and cTitle are preset parameters.
Simple, isn't it?

Best regards,
Raymond
Pablo Botella NavarroRe: Hint please?
on Sat, 26 May 2012 14:17:15 +0200
Hi,

Just will told a experience, in case can help.

When my nephew Andreu was start to learn programming about 5 years ago I was recommend him to start learning basic things with Xbase++ but in clasic clipper style just using the console and a few input/?/wait commands to retrive or put information.

He was using some of my old Clipper books and play with it for about 1 year
Later he was found easy to start using Javascript because basic programming concepts was the same, and later was start using php.
Currently he has 18 and is writting very nice php code, and I have delegated to him some small projects for customers with nice results.

This year that has started in the school he says that found easy to start programing in C because he was aquire a solid programming.

Regards,

Pablo Botella