I have observed(also under OS3.xx
the behaviour described below of a string gadget created with
gf->gad = CreateGadget (STRING_KIND, gf->gad, &ng,
GTST_MaxChars, bt->arg[7].num,
GTST_String, bt->arg[8].str,
GA_Immediate, TRUE,
GFLG_EXTENDED, extflag,
GT_Underscore, '_',
GA_Disabled, onoff,
GTST_EditHook, tid->hk, //OS4 was &tid->hk
TAG_END);
when i set MaxChars to a low value (eg 30) and i enter a string manually, i am able to type 31 characters, but on using the return button, the value really entered is however truncated to 30 characters;
Is this a known behavior, a bug ?
GadTools STRING_KIND
Re: GadTools STRING_KIND
The gadgets created by gadtool.library are to be considered for legacy applications that may require them. For any new applications, the AmigaOS4 BOOPSI classes are the default gadget toolkit.
Because of this, it's unlikely that any work will be done on gadtools.library, as all bugs have most likely been found or worked around by now.
Simon
Because of this, it's unlikely that any work will be done on gadtools.library, as all bugs have most likely been found or worked around by now.
Simon
Re: GadTools STRING_KIND
Is there anywhere an example (preferrbly string gadget) using Boopsi gadget directly? (no Reaction lyout gadget)
Re: GadTools STRING_KIND
Probably not, but the same rules apply for string.gadget as any other BOOPSI classes, even the legacy ones.
Create the gadget object, and call AddGadget(). You'll probably have to set up the position and size data in order to get it to be placed where you'd want it. Then you'd probably have to manually calculate the new positions and size when the window is resized etc.
It just sounds all too much like hard work, better to use a layout and do it the easy way
Simon
Create the gadget object, and call AddGadget(). You'll probably have to set up the position and size data in order to get it to be placed where you'd want it. Then you'd probably have to manually calculate the new positions and size when the window is resized etc.
It just sounds all too much like hard work, better to use a layout and do it the easy way
Simon
Re: GadTools STRING_KIND
Thanks
The resizing code exists allready for all gadtool gadgets in the Gui4Cli source.
The type of gadget resizing can even be defined quite simply.
I think it will be easier to add the 2 gadgets i find lacking some features (string & listbrowser), than going all the way using Reaction & layout gadget.
The spirit of Gui4Cl would probably be lost (eg changing the gui, while running; drag&drop of gadgets)or very difficult to realise.
I am not a good C programmer and did not program in C for over 2 years. So any help with a real BOOPSI gadget is gladly taken. What is probably a small exercice for an experienced programmer will take me much much longer.
The resizing code exists allready for all gadtool gadgets in the Gui4Cli source.
The type of gadget resizing can even be defined quite simply.
I think it will be easier to add the 2 gadgets i find lacking some features (string & listbrowser), than going all the way using Reaction & layout gadget.
The spirit of Gui4Cl would probably be lost (eg changing the gui, while running; drag&drop of gadgets)or very difficult to realise.
I am not a good C programmer and did not program in C for over 2 years. So any help with a real BOOPSI gadget is gladly taken. What is probably a small exercice for an experienced programmer will take me much much longer.
Re: GadTools STRING_KIND
There are BOOPSI examples in the RKRM if you have those. Check the Intuition.library section.
Simon
Simon
Re: GadTools STRING_KIND
I have spot one, have rewritten it a bit for OS4, but are running in circles with the OS4 hook.
Notably here
SOLVED that one, had a better look at the MakeClass doc
giving me the errors
/tmp/ccrQamOA.o: In function `initRKMButGadClass':
C_Boop_RKMButClass.c:(.text+0xb96): undefined reference to `HookEntry'
C_Boop_RKMButClass.c:(.text+0xb9a): undefined reference to `HookEntry'
Notably here
SOLVED that one, had a better look at the MakeClass doc
Code: Select all
/***********************************************************/
/** Make the class and set up the dispatcher's hook **/
/***********************************************************/
Class *initRKMButGadClass(void)
{
Class *cl = NULL;
extern ULONG HookEntry(); /* defined in amiga.lib */
if ( cl = MakeClass( NULL,
"gadgetclass", NULL,
sizeof ( struct ButINST ),
0 ))
{
/* initialize the cl_Dispatcher Hook */
cl->cl_Dispatcher.h_Entry = HookEntry;
cl->cl_Dispatcher.h_SubEntry = dispatchRKMButGad;
}
return ( cl );
}
/tmp/ccrQamOA.o: In function `initRKMButGadClass':
C_Boop_RKMButClass.c:(.text+0xb96): undefined reference to `HookEntry'
C_Boop_RKMButClass.c:(.text+0xb9a): undefined reference to `HookEntry'
Re: GadTools STRING_KIND
IIRC HookEntry was in amiga.lib under pre AOS 4, its job was to setup correctly the stack and prepare the function call. Now you don't need it anymore under AOS4 and you can directly set h_Entry to point to dispatchRKMButGad.
AmigaOne X1000 running AOS 4 beta
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
Re: GadTools STRING_KIND
In the 68k AmigaOS, HookEntry() was used to put the three hook function parameters on the stack and invoke the function in h_SubEntry. This is no longer the case under OS4, you don't need a hook entry point any more - the hook function alone will do. If older docs told you toJosDuchIt wrote: C_Boop_RKMButClass.c:(.text+0xb96): undefined reference to `HookEntry'
C_Boop_RKMButClass.c:(.text+0xb9a): undefined reference to `HookEntry'
cl->cl_Dispatcher.h_Entry = HookEntry;
cl->cl_Dispatcher.h_SubEntry = dispatchRKMButGad;
you now should do
cl->cl_Dispatcher.h_Entry = dispatchRKMButGad;
cl->cl_Dispatcher.h_SubEntry = NULL;
or even better, use AllocSysObjectTags() to initialize the hook.
The Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Re: GadTools STRING_KIND
@abalaban @trixie
thanks, i am nearly 74 years old and tending to overlook what is evident in the doc.
thanks, i am nearly 74 years old and tending to overlook what is evident in the doc.