In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Multiple forms - Tabbed Interface or separate forms from a button?

Xailer professional forum in English
Responder
DC
Mensajes: 122
Registrado: Lun May 16, 2011 6:06 pm

Multiple forms - Tabbed Interface or separate forms from a button?

Mensaje por DC »

Hi,

I need to expand a form that automates some Oracle code. I built it so we didn't have to modify sql each day.

We're gonna need to add 2-3 other forms, but with the same connection.

In terms of maintenance and adding buttons & code to the new form, would it be easier to put these other forms in separate tabs in the main form? Or build separate forms, triggered by buttons in the main form?

I don't care how much time the initial design takes. Only the ease of maintenance and adding buttons is relevant.

Also, we would want to keep the connection open when we switch to the other forms, and close the connection only on the main form.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Multiple forms - Tabbed Interface or separate forms from a button?

Mensaje por ignacio »

Hi,
We're gonna need to add 2-3 other forms, but with the same connection.
Where is the problem? a Datasource does not to be attached to any form. You can create it by your own on startup and set the property to any form on the initialize event of every form or use a TSharedModule.

In case yo you only want to haver a form with multiple tabs. Xailer permits to have a DESIGNED form that will go INTO de TabsFolder control as as single page. check the sample \xailer\datacontrols\dbfdata6

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 122
Registrado: Lun May 16, 2011 6:06 pm

Re: Multiple forms - Tabbed Interface or separate forms from a button?

Mensaje por DC »

I'm looking at the sample you mentioned.

There's an 'Ayuda' menu item. After I run the other 2 (Ficheros and Procesos) and run Ayuda, there's an error:

Message not found: TApplication:OFORM.

I'm trying to attach an error log file here, but Add Files says that it's an invalid extension. This happens whether the log file is named Error.log or Error.txt.

Here's a copy and paste of the error log:

******************************* Error log file ********************************

Exe: C:\Xailer8\Samples\DataControls\DBFData6\DBFData6.exe
Version: 6.0.0.0
User name: ThisUser
Computer name: WMXL11320G4
Date: 15-08-2022
Time: 12:43:43
Available Memory: 2097151
Current Area: 9

---------------------------- Compiler Information -----------------------------

Xailer Version: Xailer 8.0.1
Compiler: Harbour 3.2.0dev (r1912031042)
C/C++ Compiler: MinGW GNU C 7.3 (32-bit)
Windows Platform: Windows 10 10.0

--------------------- Internal Error Handling Information ---------------------

Subsystem Call: BASE
System Code: 1004
Default Status: .F.
Description: Message not found
Operation: TApplication:OFORM
Arguments: [ 1] = Type: O Val:
Involved File:
Dos Error Code: 0

Trace Through:
__ERRRT_SBASE (0)
TAPPLICATION:ERROR (0)
(b)HBOBJECT (0)
TAPPLICATION:MSGNOTFOUND (0)
TAPPLICATION:OFORM (0)
TSTDCONTROL:WMKILLFOCUS (64)
TCOMBOBOX:WMKILLFOCUS (281)
SHELLABOUT (0)
TFORM1:ACERCADE (246)
TMENUITEM:ONCLICK (0)
TMENU:DOACTION (253)
TMENU:DOACTION (258)
TFORM1:WMCOMMAND (958)
RUNFORM (0)
TAPPLICATION:RUN (289)
MAIN (16)

-------------------------- Detailed Work Area Items ---------------------------

Work Area No.: 1
Alias Alias : CLIENTES
Current Recno : 1
Current Filter:
Relation Exp.:
Index Order: 1
Active Key: 1

Work Area No.: 2
Alias Alias : DELEGAC
Current Recno : 1
Current Filter:
Relation Exp.:
Index Order: 1
Active Key: 1

Work Area No.: 3
Alias Alias : FACCAB
Current Recno : 1
Current Filter:
Relation Exp.: FACCAB->CLIENTE
Index Order: 1
Active Key: 1

Work Area No.: 4
Alias Alias : FACLIN
Current Recno : 4
Current Filter:
Relation Exp.:
Index Order: 1
Active Key: 1

Work Area No.: 5
Alias Alias : CLIENTES0
Current Recno : 1
Current Filter:
Relation Exp.:
Index Order: 1
Active Key: 1

Work Area No.: 6
Alias Alias : TIPIVA
Current Recno : 1
Current Filter:
Relation Exp.:
Index Order: 1
Active Key: 1

Work Area No.: 7
Alias Alias : FPAGO
Current Recno : 1
Current Filter:
Relation Exp.:
Index Order: 1
Active Key: 1

Work Area No.: 8
Alias Alias : ARTICULO
Current Recno : 3
Current Filter:
Relation Exp.:
Index Order: 1
Active Key: 1

Work Area No.: 9
Alias Alias : CONFIG
Current Recno : 1
Current Filter:
Relation Exp.:
Index Order: 0
Active Key: 0


ignacio escribió: Vie Ago 12, 2022 4:37 pm Hi,
We're gonna need to add 2-3 other forms, but with the same connection.
Where is the problem? a Datasource does not to be attached to any form. You can create it by your own on startup and set the property to any form on the initialize event of every form or use a TSharedModule.

In case yo you only want to haver a form with multiple tabs. Xailer permits to have a DESIGNED form that will go INTO de TabsFolder control as as single page. check the sample \xailer\datacontrols\dbfdata6

Regards,
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Multiple forms - Tabbed Interface or separate forms from a button?

Mensaje por ignacio »

Hi,

Just include this code in frmfolder.prg:

method WMKillFocus() VIRTUAL

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 122
Registrado: Lun May 16, 2011 6:06 pm

Re: Multiple forms - Tabbed Interface or separate forms from a button?

Mensaje por DC »

Will give it a try, thanks.

ignacio escribió: Mar Ago 16, 2022 4:49 pm Hi,

Just include this code in frmfolder.prg:

method WMKillFocus() VIRTUAL

Regards,
Responder