Page 2 of 5

Re: [Module] StringEx (all OS)

Posted: Fri Mar 29, 2019 2:15 pm
by Thorsten1867
I hope I can make all Macs peaceful and cooperative with this version.

Changes: Cursor Handling and Thread

Re: [Module] StringEx (all OS)

Posted: Sat Mar 30, 2019 11:25 am
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.

Re: [Module] StringEx (all OS)

Posted: Sat Mar 30, 2019 12:47 pm
by Thorsten1867
Try the Free() Command

Gesendet von meinem Aquaris X2 mit Tapatalk

Re: [Module] StringEx (all OS)

Posted: Sat Mar 30, 2019 1:39 pm
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

Re: [Module] StringEx (all OS)

Posted: Sun Mar 31, 2019 10:38 am
by Lord
ozzie wrote:...
Works fine now. Many thanks - ...
Now I can agree with that. :D

Re: [Module] StringEx (all OS)

Posted: Sun Mar 31, 2019 12:35 pm
by StarBootics
Work fine under Ubuntu 18.10 x64

Best regards
StarBootics

Re: [Module] StringEx (all OS)

Posted: Tue Apr 02, 2019 9:01 am
by Thorsten1867
Update:
  • global cursor thread for all StringEx gadgets in common
  • Support of 'ModuleEx' (master modules for all my gadgets)

Re: [Module] StringEx (all OS)

Posted: Tue Apr 02, 2019 6:52 pm
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.

Re: [Module] StringEx (all OS)

Posted: Wed Apr 03, 2019 6:59 am
by Thorsten1867
Bug fixed

Re: [Module] StringEx (all OS)

Posted: Wed Apr 03, 2019 7:18 am
by Lord
Thorsten1867 wrote:Bug fixed
Thanks for that and all your modules!

Re: [Module] StringEx (all OS)

Posted: Wed Jun 12, 2019 12:05 pm
by Thorsten1867
Update:
  • Flags: #Left / #Center / #Right
  • Added: Attribute '#Padding'
  • automatic gadget size adjustment (#AutoResize)

Re: [Module] StringEx (all OS)

Posted: Sun Aug 18, 2019 8:18 pm
by Thorsten1867
Bugfixes: Cursor

Re: [Module] StringEx (all OS)

Posted: Tue Sep 03, 2019 5:23 pm
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)

Re: [Module] StringEx (all OS)

Posted: Sun Nov 17, 2019 1:23 pm
by Cyllceaux
How can I handle events like "Text Change"?

Re: [Module] StringEx (all OS)

Posted: Sun Nov 17, 2019 2:25 pm
by Thorsten1867
Update: Added #EventType_Change / #EventType_Focus / #EventType_LostFocus