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.

form font problem - IDEEditor:OpenFile

Xailer professional forum in English
Responder
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

form font problem - IDEEditor:OpenFile

Mensaje por Hurricane »

Hi,
If I open a PRG (Form) file with my plugin, when displaying the form in the designer, it will use the font "MS Sans Serif, 8", different from what is defined in the application project properties.

Do I need to do something?

Note:
  1. I didn't set a font on any Form, I just set the default font in the project properties.
  2. The Xailer wrote in "function Main", the code... Application:oFont := TFont():Create....
  3. There is no TFont():Create in any PRG or XFM, only in the MAIN function.
  4. If I open a form through "Project Manager", then see in Designer, Form font is correct, the same as defined in FUNCTION MAIN
    So there must be a way to open the PRG via plugin without misconfiguring the font.
[x]Harbour + GUI (all) | Delphi | SQL | FastReport
Professional contacts (e-mail, chat): Developments, Training, Support
DevClub for Developers
Avatar de Usuario
ignacio
Site Admin
Mensajes: 8905
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por ignacio »

Hello,

Check the font on project.xpj

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por Hurricane »

Good Morning,

The same in FUNCTION MAIN (I forgot to put it on the list above.)

Código: Seleccionar todo

<?xml version="1.0"?>
<Project>
   <Type Value="exe"/>
   <Description Value="IR2022"/>
   <Output Value="IR2022.exe"/>
   <XailerVersion Value="7.1"/>
   <Compiler Value="Harbour"/>
   <CCompiler Value="MinGW"/>
   <Font Value="Verdana, 12"/>
Avatar de Usuario
ignacio
Site Admin
Mensajes: 8905
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por ignacio »

Hurricane escribió: Lun Oct 11, 2021 5:02 pm Hi,
If I open a PRG (Form) file with my plugin, when displaying the form in the designer, it will use the font "MS Sans Serif, 8", different from what is defined in the application project properties.

Do I need to do something?

Note:
  1. I didn't set a font on any Form, I just set the default font in the project properties.
  2. The Xailer wrote in "function Main", the code... Application:oFont := TFont():Create....
  3. There is no TFont():Create in any PRG or XFM, only in the MAIN function.
  4. If I open a form through "Project Manager", then see in Designer, Form font is correct, the same as defined in FUNCTION MAIN
    So there must be a way to open the PRG via plugin without misconfiguring the font.
Check the font is not defined on the XFM your are opening. if is defined, it takes precedence.
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por Hurricane »

There is not. I reported this on the list (item 3).
ignacio escribió: Mié Oct 13, 2021 6:42 pm Check the font is not defined on the XFM your are opening. if is defined, it takes precedence.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 8905
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por ignacio »

Send a sample
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por Hurricane »

only:
a) set a default font in the project properties
b) open a PRG (form) file with PLUGIN
c) display the form in the Designer(see oFont property, wrong)
ignacio escribió: Jue Oct 14, 2021 5:34 pmSend a sample
attachment: application project (default font already defined) and plugin.

to use the plugin with an open project...
  • go to the project menu, option test Hurricane
  • select a PRG with double click
Adjuntos
apps_dll.zip
(15.41 KiB) Descargado 13 veces
Avatar de Usuario
ignacio
Site Admin
Mensajes: 8905
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por ignacio »

Hello,

DLL not valid. Please send a very simple plugin source code showing the error.

Regards
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por Hurricane »

Good Morning,

check your email.

Note: This problem also happens with Editor/IDE (topic)

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

Re: form font problem - IDEEditor:OpenFile

Mensaje por ignacio »

Hello,

When you open a file via ::oPlgn:IEditor:OpenFile( cFile ) it opens the file without assigning to a project. It does not either control if is already assigned to a project. It just opens the file in the editor. That's all! On that case if the font is not assigned on the XFM file, the default Font on Xailer is Ms San Serif.

You should check if the file you want top open is assigned to any project and then open it from the project itself.

Try this:

::oPlgn:IEditor:Load( cFile ) // Full File Name


Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por Hurricane »

Hi,

I imagined that. OpenFile is the only method available in the documentation.

if I try with ...LOAD(cFile)...
Error BASE/1004 Message not found: IDEEditor:LOAD

...must be the same mechanism when we click on the file, in Project Manager.
ignacio escribió: Vie Oct 15, 2021 6:35 pm When you open a file via ::oPlgn:IEditor:OpenFile( cFile ) it opens the file without assigning to a project. It does not either control if is already assigned to a project. It just opens the file in the editor. That's all! On that case if the font is not assigned on the XFM file, the default Font on Xailer is Ms San Serif.

You should check if the file you want top open is assigned to any project and then open it from the project itself.

Try this:

::oPlgn:IEditor:Load( cFile ) // Full File Name
Avatar de Usuario
ignacio
Site Admin
Mensajes: 8905
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por ignacio »

Código: Seleccionar todo

METHOD BrwDblClick( oSender, nKeys, nCol, nRow ) CLASS TFrmVPF2

   ::oPlgn:IEditor:Load( ::oBrw:GetValue(1) )  // Full File Name
   ::Close()
RETURN Nil
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por Hurricane »

???
I've done this. this class does not have this method, see message in red.
ignacio escribió: Vie Oct 15, 2021 7:48 pm

Código: Seleccionar todo

METHOD BrwDblClick( oSender, nKeys, nCol, nRow ) CLASS TFrmVPF2

   ::oPlgn:IEditor:Load( ::oBrw:GetValue(1) )  // Full File Name
   ::Close()
RETURN Nil
Avatar de Usuario
Hurricane
Mensajes: 163
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: form font problem - IDEEditor:OpenFile - SOLVED

Mensaje por Hurricane »

I solved it with IDEProjectMan:getModule
I needed to export information from some plugin classes and a lot of intuition.

It is very important to distribute all plugin statements (only CLASS IDE... to ENDCLASS). We are in the dark to use the plugin.
This will be an important addition to the documentation. Because the plugin code also changes, becoming incompatible with the documentation.

Another feature I created, I needed a lot of trial and error (extremely tiring), but I managed to finish.

Thanks
[x]Harbour + GUI (all) | Delphi | SQL | FastReport
Professional contacts (e-mail, chat): Developments, Training, Support
DevClub for Developers
Avatar de Usuario
ignacio
Site Admin
Mensajes: 8905
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: form font problem - IDEEditor:OpenFile

Mensaje por ignacio »

Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder