• 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to Modify Tooltype with dos_SetToolString{}
Hi Daedalus,

this was not a Bug it a feature ;-)

The hole problem is that creating a new tooltype is a special case where the icon data was updated an saved to disk. By only a change of the Value (or string) it is only updated in Memory and not saved to disk.

That your example work right it is only needed do added the function call "dos_CloseToolTypes{}" add the end of all tooltype changes!
optimize 4

    XINCLUDE "dos.include.bb2"

    NPrint dos_SetToolString{"TEST","TestString",""}
    NPrint dos_CloseToolTypes{}

The tooltype changes functions are programed in the mind of doing many Tooltypes changes an the same time and icon like PEd did if you save the prefs. So the functions changes/updates the tooltypes in mem and a the end the Icon is saved back to disk, this saves a lot of time.

But i find a way to get it easy and fast, so with the new version of dos.include.ab3 at Revision 552 the Tooltypes are saved directly after a change if the filename is a parameter of all funtions call of dos_SetTool...{} as in your example a extra call of dos_CloseToolType is not needed. If the filename is not given the functions act as before and a call of dos_FlushToolTypes or dos_CloseToolTypes is need to save it to disk. Also i fixed dos_SetToolState{} so it works now correct befor it used the wrong Pointer to update the Tooltype Wink

Nachrichten in diesem Thema

Gehe zu:

Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste