Alaska Software Inc. - need a Top-down base Gui Sample (Migrate)
Username: Password:
AuthorTopic: need a Top-down base Gui Sample (Migrate)
bapuneed a Top-down base Gui Sample (Migrate)
on Thu, 24 Mar 2005 09:15:53 +0000
Dear Sir
As a clipper programer I am getting little confuse with GUI mode.

 Can anybody please send me GUI TOP-DOWN sample for the following clipper
code, So I can get a quick jump in GUI application.

Thanks & Regards.

N.B. Just purchased Top-Down & reading the tutorail etc.... Pls. give me
sample for following will help me to quick jump in gui...

Bapu.

function main()
include "inkey.ch"
local getlist:={}
local cUSER :=space(10)
local cLIB:="TOP-DOWN"
local nAmt:=279
set key K_F1 to discrvr()
@ 5,5 say "User:"get cUSER valid chkuser(@cUSER)
@ 6,5 say "Xbase Library :"cLIb valid chklib(@cLib,@nAmt)
@ 7,5 say "Price :"get nAmt pict "999.99"
read
return nil

FUNCTION chkuser(cUSER)
if empty(cUser)
   return .f.
endif
if cUSER="BAPU"
   alert('You have recently purchase top-down... have to learn alot..')
   return .t.
endif
return nil

FUNCTION chklib(cLib,nAmt)
do case
     case cLIB="TOPDOWN"
             nAmt=279
     case cLIB="COCKPIT"
            nAmt= 0   It is free
     case cLIB="EXPRESS++"
            nAmt= 279  Don't know exact price check on
www.donnay-software.com
endcase
return .t.

function discrvr()
 alert("Your current read var is :"+readvar())
return .t.
Wolfgang CiriackRe: need a Top-down base Gui Sample (Migrate)
on Thu, 24 Mar 2005 15:36:35 +0100
Hi bapu,
perhaps take a look at eXPress++ too.
If you come from clipper, IMO it is the easiest way to come to gui.
Simply change GET with DCGET, read with dcreadgui, include dcdialog.ch,
compile with gui and see the result 
Regards Wolfgang



"bapu" <dagia_y_h@yahoo.com> schrieb im Newsbeitrag
news:%23DmCWrEMFHA.6152@S15147418...
> Dear Sir
> As a clipper programer I am getting little confuse with GUI mode.
>
>  Can anybody please send me GUI TOP-DOWN sample for the following clipper
> code, So I can get a quick jump in GUI application.
>
> Thanks & Regards.
>
> N.B. Just purchased Top-Down & reading the tutorail etc.... Pls. give me
> sample for following will help me to quick jump in gui...
>
> Bapu.
>
> function main()
> include "inkey.ch"
> local getlist:={}
> local cUSER :=space(10)
> local cLIB:="TOP-DOWN"
> local nAmt:=279
> set key K_F1 to discrvr()
> @ 5,5 say "User:"get cUSER valid chkuser(@cUSER)
> @ 6,5 say "Xbase Library :"cLIb valid chklib(@cLib,@nAmt)
> @ 7,5 say "Price :"get nAmt pict "999.99"
> read
> return nil
>
> FUNCTION chkuser(cUSER)
> if empty(cUser)
>    return .f.
> endif
> if cUSER="BAPU"
>    alert('You have recently purchase top-down... have to learn alot..')
>    return .t.
> endif
> return nil
>
> FUNCTION chklib(cLib,nAmt)
> do case
>      case cLIB="TOPDOWN"
>              nAmt=279
>      case cLIB="COCKPIT"
>             nAmt= 0   It is free
>      case cLIB="EXPRESS++"
>             nAmt= 279  Don't know exact price check on
> www.donnay-software.com
> endcase
> return .t.
>
> function discrvr()
>  alert("Your current read var is :"+readvar())
> return .t.
>
>
>
bapuRe: need a Top-down base Gui Sample (Migrate)
on Thu, 24 Mar 2005 16:07:18 +0000
Dear Wolfgang,

As you said With Express++ just we have to inlcude dcdialog.ch and get with 
dcget.. We can build a gui application.
But I want to learn that thing with Top-Down,

Hope some one from the 'gurus' will give me sample soon..

N.B. : How + Where are you Mr.Rk & Mr.Anand ?
I will come to India in May..

Regards,

Bapu.

> Hi bapu,
> perhaps take a look at eXPress++ too.
> If you come from clipper, IMO it is the easiest way to come to gui.
> Simply change GET with DCGET, read with dcreadgui, include dcdialog.ch,
> compile with gui and see the result 
> Regards Wolfgang
Clayton Jones Re: need a Top-down base Gui Sample (Migrate)
on Fri, 25 Mar 2005 09:32:57 -0500
Hello Bapu,

>But I want to learn that thing with Top-Down,
>Hope some one from the 'gurus' will give me sample soon..

There are several reasons why you are not getting a satisfactory
answer to your question.  One is that you already have a sample.  In
fact, you have dozens of them, so it's hard for someone to know what
else to offer.

The second is that in one sense there is no functional equivalent of
the example code you provided, at least not in the sense you are
asking.  What I mean is, in GUI apps you cannot just write a few lines
of code and put a Get on the screen, as your example does.  In GUI a
Get cannot exist on its own.  It has to have a window, and the window
has to be managed.  It must have an event handler, and so on.  So the
GUI equivalent of your example would be an entire body of code which
creates and manages a window with Gets.  And you already have many of
those, so there is nothing else anyone can give you.

The real problem is that the sample code doesn't make any sense yet,
so just looking at it can be very confusing and not very helpful. So
as I and others have already said, the best place to start is the
Tutorial.  Don't bother with the Demo code, there is too much there
and you have to know what you're looking for, so save that for later.
Once you grasp how things work the code in \demosrc will make more
sense.  Start with the Tutorial code in the \tutsrc folder.  The file
nameveda.prg contains a complete data entry window ("veda" means
View-Edit-Delete-Add) and is the closest thing to what you are asking
for.  

The first thing to understand about it is that you don't have to write
everything that is in nameveda every time you want a data entry
window.  Top-Down provides pre-written templates that already contain
all of the window creation and control logic.  All you do is make a
copy of a template and add your code for Gets and buttons and other
stuff to it.  The Tutorial shows how to do this.  Just follow the step
by step directions and you will create a functioning application with
a data entry window very similar to what your example does.  The
\tutsrc folder contains exactly what you will end up with when you
follow the directions, so you can compare your code to that in case
there are any problems.

You don't have to understand it perfectly before you can use it.  The
understanding will come gradually with experience.  GUI programming is
an entirely different concept than console work and it takes a while
for the mind to understand.  If it is any comfort, all of us here in
the forum have been through this early stage, so we understand.  I
remember very well my first attempts at GUI stuff (it was traumatic
and is etched deeply into my mind and is the reason I was determined
to create something to help others get started).  There is nothing to
do but follow the Tutorial, maybe more than once, and gradually the
understanding will come.

I hope this helps.

Regards,
Clayton

Clayton Jones   www.cjcom.net 
 Top-Down Library for Xbase++
 X-DBU Database Utility   
 X-MEMO Memo Field Replacement
bapuRe: need a Top-down base Gui Sample (Migrate)
on Fri, 25 Mar 2005 17:41:45 +0000
Dear Sir, Clayton

Thanks for the quide.

Going with the tutorial many thing are clear now.

The problem is now how can I change the editbuffer value of a perticular get 
at runtime.

(I think the answere should be availabe with the tutorial but I am missing 
it or not understanding)

Regards,

Bapu.

"Clayton Jones" <topdown@cjcom.net> wrote in message 
news:d65841leoilj8unqnnho2q09mftppdn04b@4ax.com...
> Hello Bapu,
>
>>But I want to learn that thing with Top-Down,
>>Hope some one from the 'gurus' will give me sample soon..
>
> There are several reasons why you are not getting a satisfactory
> answer to your question.  One is that you already have a sample.  In
> fact, you have dozens of them, so it's hard for someone to know what
> else to offer.
>
> The second is that in one sense there is no functional equivalent of
> the example code you provided, at least not in the sense you are
> asking.  What I mean is, in GUI apps you cannot just write a few lines
> of code and put a Get on the screen, as your example does.  In GUI a
> Get cannot exist on its own.  It has to have a window, and the window
> has to be managed.  It must have an event handler, and so on.  So the
> GUI equivalent of your example would be an entire body of code which
> creates and manages a window with Gets.  And you already have many of
> those, so there is nothing else anyone can give you.
>
> The real problem is that the sample code doesn't make any sense yet,
> so just looking at it can be very confusing and not very helpful. So
> as I and others have already said, the best place to start is the
> Tutorial.  Don't bother with the Demo code, there is too much there
> and you have to know what you're looking for, so save that for later.
> Once you grasp how things work the code in \demosrc will make more
> sense.  Start with the Tutorial code in the \tutsrc folder.  The file
> nameveda.prg contains a complete data entry window ("veda" means
> View-Edit-Delete-Add) and is the closest thing to what you are asking
> for.
>
> The first thing to understand about it is that you don't have to write
> everything that is in nameveda every time you want a data entry
> window.  Top-Down provides pre-written templates that already contain
> all of the window creation and control logic.  All you do is make a
> copy of a template and add your code for Gets and buttons and other
> stuff to it.  The Tutorial shows how to do this.  Just follow the step
> by step directions and you will create a functioning application with
> a data entry window very similar to what your example does.  The
> \tutsrc folder contains exactly what you will end up with when you
> follow the directions, so you can compare your code to that in case
> there are any problems.
>
> You don't have to understand it perfectly before you can use it.  The
> understanding will come gradually with experience.  GUI programming is
> an entirely different concept than console work and it takes a while
> for the mind to understand.  If it is any comfort, all of us here in
> the forum have been through this early stage, so we understand.  I
> remember very well my first attempts at GUI stuff (it was traumatic
> and is etched deeply into my mind and is the reason I was determined
> to create something to help others get started).  There is nothing to
> do but follow the Tutorial, maybe more than once, and gradually the
> understanding will come.
>
> I hope this helps.
>
> Regards,
> Clayton
>
> Clayton Jones   www.cjcom.net
> Top-Down Library for Xbase++
> X-DBU Database Utility
> X-MEMO Memo Field Replacement
>
>
James Loughner Re: need a Top-down base Gui Sample (Migrate)
on Fri, 25 Mar 2005 11:47:57 -0500
With a reference to the get (actually a XbpSLE in disguise) in hand you 
would do this

oGet:SetData("Some string")

Jim


bapu wrote:
> Dear Sir, Clayton
> 
> Thanks for the quide.
> 
> Going with the tutorial many thing are clear now.
> 
> The problem is now how can I change the editbuffer value of a perticular get 
> at runtime.
> 
> (I think the answere should be availabe with the tutorial but I am missing 
> it or not understanding)
> 
> Regards,
> 
> Bapu.
> 
> "Clayton Jones" <topdown@cjcom.net> wrote in message 
> news:d65841leoilj8unqnnho2q09mftppdn04b@4ax.com...
> 
>>Hello Bapu,
>>
>>
>>>But I want to learn that thing with Top-Down,
>>>Hope some one from the 'gurus' will give me sample soon..
>>
>>There are several reasons why you are not getting a satisfactory
>>answer to your question.  One is that you already have a sample.  In
>>fact, you have dozens of them, so it's hard for someone to know what
>>else to offer.
>>
>>The second is that in one sense there is no functional equivalent of
>>the example code you provided, at least not in the sense you are
>>asking.  What I mean is, in GUI apps you cannot just write a few lines
>>of code and put a Get on the screen, as your example does.  In GUI a
>>Get cannot exist on its own.  It has to have a window, and the window
>>has to be managed.  It must have an event handler, and so on.  So the
>>GUI equivalent of your example would be an entire body of code which
>>creates and manages a window with Gets.  And you already have many of
>>those, so there is nothing else anyone can give you.
>>
>>The real problem is that the sample code doesn't make any sense yet,
>>so just looking at it can be very confusing and not very helpful. So
>>as I and others have already said, the best place to start is the
>>Tutorial.  Don't bother with the Demo code, there is too much there
>>and you have to know what you're looking for, so save that for later.
>>Once you grasp how things work the code in \demosrc will make more
>>sense.  Start with the Tutorial code in the \tutsrc folder.  The file
>>nameveda.prg contains a complete data entry window ("veda" means
>>View-Edit-Delete-Add) and is the closest thing to what you are asking
>>for.
>>
>>The first thing to understand about it is that you don't have to write
>>everything that is in nameveda every time you want a data entry
>>window.  Top-Down provides pre-written templates that already contain
>>all of the window creation and control logic.  All you do is make a
>>copy of a template and add your code for Gets and buttons and other
>>stuff to it.  The Tutorial shows how to do this.  Just follow the step
>>by step directions and you will create a functioning application with
>>a data entry window very similar to what your example does.  The
>>\tutsrc folder contains exactly what you will end up with when you
>>follow the directions, so you can compare your code to that in case
>>there are any problems.
>>
>>You don't have to understand it perfectly before you can use it.  The
>>understanding will come gradually with experience.  GUI programming is
>>an entirely different concept than console work and it takes a while
>>for the mind to understand.  If it is any comfort, all of us here in
>>the forum have been through this early stage, so we understand.  I
>>remember very well my first attempts at GUI stuff (it was traumatic
>>and is etched deeply into my mind and is the reason I was determined
>>to create something to help others get started).  There is nothing to
>>do but follow the Tutorial, maybe more than once, and gradually the
>>understanding will come.
>>
>>I hope this helps.
>>
>>Regards,
>>Clayton
>>
>>Clayton Jones   www.cjcom.net
>>Top-Down Library for Xbase++
>>X-DBU Database Utility
>>X-MEMO Memo Field Replacement
>>
>>
> 
> 
>
Anand GuptaRe: need a Top-down base Gui Sample (Migrate)
on Sat, 26 Mar 2005 14:14:07 +0530
Hi Bapu

Sorry been away amidst the HOLIday season.
The best and ideal way (as conveyed by all) would be to start off with the
DE System sample programs.
You can just cut-paste the sample, remark off all the SAY/GETs, and unRemark
them one by one to get the hang of it.

I do have a clp2xpp.ch, which creates an @ wrapper around TD functions, but
I would personally suggest you to straight-away start getting the feel of
GUI Objects/parts. I wrote my own wrappers in the initial days of my
porting, but realised its better to use TD function directly, and later
started subClassing them to enhance them.

HTH

Anand

NB: Happy Holi, the festival of Colors. Do let us know more about your
program of coming to India.

"bapu" <dagia_y_h@yahoo.com> wrote in message
news:A6LZDJIMFHA.3104@S15147418...
> Dear Wolfgang,
>
> As you said With Express++ just we have to inlcude dcdialog.ch and get
with
> dcget.. We can build a gui application.
> But I want to learn that thing with Top-Down,
>
> Hope some one from the 'gurus' will give me sample soon..
>
> N.B. : How + Where are you Mr.Rk & Mr.Anand ?
> I will come to India in May..
>
> Regards,
>
> Bapu.
>
> > Hi bapu,
> > perhaps take a look at eXPress++ too.
> > If you come from clipper, IMO it is the easiest way to come to gui.
> > Simply change GET with DCGET, read with dcreadgui, include dcdialog.ch,
> > compile with gui and see the result 
> > Regards Wolfgang
>
>
Donald R. KeatingRe: need a Top-down base Gui Sample (Migrate)
on Thu, 24 Mar 2005 11:38:22 -0500
On Thu, 24 Mar 2005 09:15:53 -0000, bapu wrote:

> Dear Sir
> As a clipper programer I am getting little confuse with GUI mode.
> 
>  Can anybody please send me GUI TOP-DOWN sample for the following clipper
> code, So I can get a quick jump in GUI application.
> 
> Thanks & Regards.
> 
> N.B. Just purchased Top-Down & reading the tutorail etc.... Pls. give me
> sample for following will help me to quick jump in gui...
> 
> Bapu.
> 
> function main()
> include "inkey.ch"
> local getlist:={}
> local cUSER :=space(10)
> local cLIB:="TOP-DOWN"
> local nAmt:=279
> set key K_F1 to discrvr()
> @ 5,5 say "User:"get cUSER valid chkuser(@cUSER)
> @ 6,5 say "Xbase Library :"cLIb valid chklib(@cLib,@nAmt)
> @ 7,5 say "Price :"get nAmt pict "999.99"
> read
> return nil
> 
> FUNCTION chkuser(cUSER)
> if empty(cUser)
>    return .f.
> endif
> if cUSER="BAPU"
>    alert('You have recently purchase top-down... have to learn alot..')
>    return .t.
> endif
> return nil
> 
> FUNCTION chklib(cLib,nAmt)
> do case
>      case cLIB="TOPDOWN"
>              nAmt=279
>      case cLIB="COCKPIT"
>             nAmt= 0   It is free
>      case cLIB="EXPRESS++"
>             nAmt= 279  Don't know exact price check on
> www.donnay-software.com
> endcase
> return .t.
> 
> function discrvr()
>  alert("Your current read var is :"+readvar())
> return .t.

Bapu,

Not exactly sure what you're asking for.

If you have Topdown the source code is provided for the Demo, its well
documented and is a good way to get started.

At the beginniing, and still some today, I cut and paste from that code
inot my application. 

Also, you can use the Form Designer to create a complete application.

HTH,

    >don<
Richard L. Hankins, Jr.
Re: need a Top-down base Gui Sample (Migrate)
on Thu, 24 Mar 2005 11:18:02 -0600
I think that most all of your questions are answered in the Top Down Demo
Source.

Take a look in the demo at the menu:
	"The DE System" > "The DE Window and DE Get"

Then the source for it
	<topdown directory>\demosrc\demDataWin.prg

- richard hankins

"If you are in a hurry, you will hit all the red lights. If you want to go
slower, all the lights will be green."
bapuRe: need a Top-down base Gui Sample (Migrate)
on Fri, 25 Mar 2005 09:23:45 +0000
Dear Donal & Richard L. Hankins

Thanks for the advice I would go through Top-Down Demo Source..

I will go slower As Mr.Richard   wrote
 "If you are in a hurry, you will hit all the red lights. If you want to go
 slower, all the lights will be green."

Thanks & Regards
Bapu.

"Richard L. Hankins, Jr." <RHankins@ContactASI.com> wrote in message 
news:12ksftothympx$.vub70zivh9cz.dlg@40tude.net...
>
>
> I think that most all of your questions are answered in the Top Down Demo
> Source.
>
> Take a look in the demo at the menu:
> "The DE System" > "The DE Window and DE Get"
>
> Then the source for it
> <topdown directory>\demosrc\demDataWin.prg
>
> -- 
> - richard hankins
>
> "If you are in a hurry, you will hit all the red lights. If you want to go
> slower, all the lights will be green."
Bruce Carroll Re: need a Top-down base Gui Sample (Migrate)
on Fri, 25 Mar 2005 09:39:50 +0000
Bupa,

Work through the tutorial and you can be producing GUI code in a matter 
of days - TopDown will provide all the tools to do this - it is a 
training system in its own right.

Regards

Bruce