Página 1 de 1

form font problem - IDEEditor:OpenFile

Publicado: Lun Oct 11, 2021 5:02 pm
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.

Re: form font problem - IDEEditor:OpenFile

Publicado: Mié Oct 13, 2021 10:22 am
por ignacio
Hello,

Check the font on project.xpj

Regards,

Re: form font problem - IDEEditor:OpenFile

Publicado: Mié Oct 13, 2021 12:56 pm
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"/>

Re: form font problem - IDEEditor:OpenFile

Publicado: Mié Oct 13, 2021 6:42 pm
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.

Re: form font problem - IDEEditor:OpenFile

Publicado: Mié Oct 13, 2021 7:10 pm
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.

Re: form font problem - IDEEditor:OpenFile

Publicado: Jue Oct 14, 2021 5:34 pm
por ignacio
Send a sample

Re: form font problem - IDEEditor:OpenFile

Publicado: Jue Oct 14, 2021 8:17 pm
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

Re: form font problem - IDEEditor:OpenFile

Publicado: Vie Oct 15, 2021 11:59 am
por ignacio
Hello,

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

Regards

Re: form font problem - IDEEditor:OpenFile

Publicado: Vie Oct 15, 2021 2:07 pm
por Hurricane
Good Morning,

check your email.

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

regards,

Re: form font problem - IDEEditor:OpenFile

Publicado: Vie Oct 15, 2021 6:35 pm
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,

Re: form font problem - IDEEditor:OpenFile

Publicado: Vie Oct 15, 2021 7:29 pm
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

Re: form font problem - IDEEditor:OpenFile

Publicado: Vie Oct 15, 2021 7:48 pm
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

Re: form font problem - IDEEditor:OpenFile

Publicado: Vie Oct 15, 2021 8:09 pm
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

Re: form font problem - IDEEditor:OpenFile - SOLVED

Publicado: Vie Oct 15, 2021 8:12 pm
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

Re: form font problem - IDEEditor:OpenFile

Publicado: Lun Oct 18, 2021 7:00 pm
por ignacio