Page 1 of 1
Text datatype
Posted: Tue Jun 27, 2023 6:21 pm
by gdridi
Hello !
I want to use the datatype library to display a text file.
I found code in the wiki for sound data :
https://wiki.amigaos.net/wiki/Datatypes ... lications.
I tried to complete the code with AddDTobject() to a window and Refresh it as shown earlier in the wiki page but nothing displayed !
Is there an example for GID_TEXT as for GID_SOUND ?
Thank you,
DGILLES
Re: Text datatype
Posted: Fri Jun 30, 2023 10:22 pm
by gdridi
Hello !
I progressing slowly in the DataType world : I missed to LAYOUT before refreshing !
Now,
Would like to know how to use the DTA_TextFont to set a different font in my window, where text.datatype render.
Because it didn’t set/change the font as hoped with DTA_TextFont, my_font !
It seems possible, nevertheless, because with Multiview program (which use .datatype class ?) we can specify FONTNAME=myfont in the command line.
I believe that I have to set the attribute Font of the _super class_ of my newly (datatype instance) object GID_TEXT and not the subclass ; isn’t it ?
Thank you,
DGILLES
Re: Text datatype
Posted: Sat Jul 01, 2023 12:55 pm
by javierdlr
Example attached using DTA_TextAttr (in case is it usefull).
To compile: gcc testdt.c -o testdt -gstabs -Wall -D__USE_INLINE__ -lauto
Example from CLI/Shell: testdt testdt.c
Re: Text datatype
Posted: Sat Jul 01, 2023 8:00 pm
by gdridi
Hello !
I try DTA_TextAttr instead of DTA_TextFont , same issue.
Shortly, I certainly have to create a text.datatype for my needs… examples of compilation for this ?
The wiki, lacks some hint about to compile examples for the "Writing Datatype" section.
Thank you Javier,
DGILLES
Re: Text datatype
Posted: Tue Aug 01, 2023 12:51 pm
by blmara
@gdridi
I use text.datatype with configurable font setting in Bibvision bible text viewer. Font is opened with OpenDiskFont() before NewDTObject as text.datatype seems not to search for disk fonts if they are not in memory. When changing font, the datatype is removed from the window and reopened to show the contents with the new font.
Marko
Re: Text datatype
Posted: Wed Aug 02, 2023 5:07 pm
by gdridi
Hello!
Thank a lot, it will be useful.
I will test it - remove the datatype, chg the font of the window and Reload the datatype.
Regards
Re: Text datatype
Posted: Mon Oct 16, 2023 1:30 am
by gdridi
Hello !
Multicore at AmiWest23 (DevCon1)
Why running only with a primitive shell window before the launch of Workbench and run only commands in a multicore environment?
Perhaps the core dump (a crash) after 20 seconds is due to the launch of screen saver..
Bye, courage