[Module] StringEx (all OS)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

I hope I can make all Macs peaceful and cooperative with this version.

Changes: Cursor Handling and Thread
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: [Module] StringEx (all OS)

Post by Lord »

Hi Thorsten!
Thorsten1867 wrote:I hope I can make all Macs peaceful and cooperative with this version.

Changes: Cursor Handling and Thread
It looks like you solved the issue with debugger on.
The window inclusive gadgets do appear and are working as expected.

But...

When closing the window in debug mode, the window disappeares but
PB is still in debug mode and the process PureBasic_Compilation0.exe
is still there. The process can only be closed by Task Manager.
This is also true running your code without debug mode.
Image
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

Try the Free() Command

Gesendet von meinem Aquaris X2 mit Tapatalk
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by mk-soft »

One Delay too many for fast leave thread. Internal Dead-Lock under windows...

Code: Select all

Procedure _CursorThread(*StrgEx.StrgEx_Structure)
    
    Repeat
      
      If Not IsGadget(*StrgEx\CanvasNum) : Break : EndIf
      
      If *StrgEx\Cursor\Elapsed < ElapsedMilliseconds()
        
        *StrgEx\Cursor\Elapsed = ElapsedMilliseconds() + *StrgEx\Cursor\Frequency
        *StrgEx\Cursor\State ! 1
        
        If *StrgEx\Cursor\Pause
          WaitSemaphore(*StrgEx\Signal)
        Else
          PostEvent(#PB_Event_Gadget, *StrgEx\Window\Num, *StrgEx\CanvasNum, #PB_EventType_Change)
          Delay(100)
        EndIf

      EndIf 
      
      ;Delay(100) ; <----
      
    Until *StrgEx\Cursor\Thread = #False
    
  EndProcedure
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: [Module] StringEx (all OS)

Post by Lord »

ozzie wrote:...
Works fine now. Many thanks - ...
Now I can agree with that. :D
Image
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: [Module] StringEx (all OS)

Post by StarBootics »

Work fine under Ubuntu 18.10 x64

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

Update:
  • global cursor thread for all StringEx gadgets in common
  • Support of 'ModuleEx' (master modules for all my gadgets)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: [Module] StringEx (all OS)

Post by Lord »

Hi!
[19:46:08] Warte auf den Start des Executable...
[19:46:08] Executable-Typ: Windows - x64 (64bit, Unicode, Thread, Purifier)
[19:46:08] Executable gestartet.
[19:46:11] [ERROR] StringExModule.pbi (Zeile: 1224)
[19:46:11] [ERROR] Die Map hat kein aktuelles Element.
This is what I get when I make a RMB click in auto complete gadget, PW gadget and gadget with the delete button.

Makes no difference when comment is removed from XIncludeFile.
I also tried that include with an absolute path.
Image
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

Bug fixed
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: [Module] StringEx (all OS)

Post by Lord »

Thorsten1867 wrote:Bug fixed
Thanks for that and all your modules!
Image
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

Update:
  • Flags: #Left / #Center / #Right
  • Added: Attribute '#Padding'
  • automatic gadget size adjustment (#AutoResize)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

Bugfixes: Cursor
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

Update: dynamic text size (needs ModuleEx.pbi)

Code: Select all

StringEx::SetDynamicFont(#String, "Arial", 8)
StringEx::FitText(#String, 3, 3)

StringEx::SetAutoResizeFlags(#String, StringEx::#Width|StringEx::#FitText)
Last edited by Thorsten1867 on Sun Nov 17, 2019 2:28 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: [Module] StringEx (all OS)

Post by Cyllceaux »

How can I handle events like "Text Change"?
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] StringEx (all OS)

Post by Thorsten1867 »

Update: Added #EventType_Change / #EventType_Focus / #EventType_LostFocus
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Post Reply