FiveWeb Questions

User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post by Jeff Barnes »

Hi Antonio,

Folders now working :)

A couple of things I noticed:
1. When using folders the "Picture" clause on gets no longer seem to work.
2. "Mulitline" does not work on gets
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,

1. Fixed

2. I just implemented it

Please download the new version from here:
https://bitbucket.org/fivetech/fiveweb/downloads

There is a new samples\testmemo.prg

Code: Select all

#include "FiveWeb.ch"

function Main()

   local oDlg, cText := PadR( "This is a text", 50 )

   DEFINE DIALOG oDlg

   @ 10, 10 GET cText MULTILINE OF oDlg SIZE 300, 200

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

You can test samples\testmemo.prg from here:

http://www.fivetechsoft.net/cgi-bin/testmemo

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post by Jeff Barnes »

Hi Antonio,

Got the new version installed.

Looks like ComboBox and Checkbox might be ok in a typical dialog but not with folders.
It will not place them at the specified row/col when in a folder.

Also, would it be possible to add the "WHEN" clause to Buttons?

Please try this sample:

Code: Select all

#include "FiveWeb.ch"

function Main()
   local oDlg, oCbx, cValue := "two"
   local oFld
   DEFINE DIALOG oDlg TITLE "Using a combobox"
    @ 0, 0 FOLDER oFld PROMPTS "One","Two" SIZE 500, 560 OF oDlg
    @ 130, 60 COMBOBOX oCbx VAR cValue ITEMS "one", "two", "three" OF oFld:aDialogs[1]
    @ 200, 120 BUTTON "Ok" OF oFld:aDialogs[1] ACTION alert( oCbx.value ) 
   ACTIVATE DIALOG oDlg NOWAIT
return nil
 
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,

Here it looks ok:
Image

What WHEN expression do you plan to use ? I mean, is it an expression to evaluate in the server
or in the browser ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post by Jeff Barnes »

Hi Antonio,

Try it again and look at where it "should" be placing the control:
@ 130, 60 COMBOBOX oCbx VAR cValue ITEMS "one", "two", "three" OF oFld:aDialogs[1]

As for the button, I would like to be able to disable the button (but still show it on the screen).

Basically I want to be able to do something like:

lSave := .f.

Then in the button line:
@ x,y Button "Save" of oDlg Action SomeAction() WHEN lSave
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,

* Fixed COMBOBOX location

* Added support for ... BUTTON ... WHEN ...

Please download FiveWeb again from:
https://bitbucket.org/fivetech/fiveweb/downloads
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post by Jeff Barnes »

Hi Antonio,

When I try to send the data from the combobox it doesn't seem to work.

Gets work with:
'document.getElementById( "oGet26" ).value.trim() + ":" + '+ ;

But combobox does not:
'document.getElementById( "oCbx" ).value.trim() + ":" + '+ ;
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post by Jeff Barnes »

Also,

How would I properly set up a "Browse" so when I click an item will send the "Record Number" for the item clicked ?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,
Jeff Barnes wrote:Hi Antonio,

When I try to send the data from the combobox it doesn't seem to work.

Gets work with:
'document.getElementById( "oGet26" ).value.trim() + ":" + '+ ;

But combobox does not:
'document.getElementById( "oCbx" ).value.trim() + ":" + '+ ;
Please try this:
'document.getElementById( "combobox" ).value.trim() + ":" + '+ ;

if it works, then we may need to make a little change in Class TComboBox, so each combobox control
uses a different Id
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,
Jeff Barnes wrote:Also,

How would I properly set up a "Browse" so when I click an item will send the "Record Number" for the item clicked ?
Please review this lines from samples\otto.prg:

Code: Select all

   @ 10, 10 BROWSE oBrw SIZE 500, 400 OF oDlg ARRAY aDatos

    oBrw:cAction:= "Edita"

    oBrw:cClassTable:= "" //"browse"
    oBrw:cClassLine:="linea"
    obrw:cClassHead:= "boxtitulo"
    oBrw:lZebra:= .t.

    oBrw:CreateFromCode()
In class TBrowse we have this:

Code: Select all

                 if(Empty(::cAction),'', ' onDblClick="'+"document.location = '"+(appname())+"?"+::cAction+":"+alltrim(str(x))+":"+alltrim(str(n )) +"'" +'"' )+;
so onDblClick the record number will be automatically provided as a parameter
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post by Jeff Barnes »

Hi Antonio,

For the combobox, this seems to work:
'document.getElementById( "combobox" ).value.trim() + ":" + '+ ;


For the Browse, I have tried Otto's example however it returns the item number in the order of the list (array).
If I build the array using a filtered list from my DBF the number returned does not line up with the record number in the DBF.

A very basic example:

If my DBF has 3 items
Item1
Item2
Item3

And I do something like:

Code: Select all

IF LEN( aData ) = 0
   USE \mydata\TestDB SHARED NEW
   aadd( aData, {"A"} ) 
   go top
   do while ! eof()
      aadd(aData,{TestDB->A } )
      skip 2
   enddo
   CLOSE TestDB
ENDIF
 
My list in the browse will have:
Item1 (Record #1)
Item3 (Record #3)

If I double click on ITEM3 it will send ".....edittest:3:1".
I understand that the first number returned will be the line in the list and the second number is the cell location.
So, subtracting 1 from the first number (done to compensate for the header added to the array) will give me "2" which will display the info from the wrong record.
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,

you could modify browse.prg source code so it provides you the info that you need
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post by Jeff Barnes »

Perfect. Modified the Browse.prg and can get what I need now. Thanks.
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

very good! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply