Search found 6808 matches

by Trond
Mon Mar 16, 2020 2:06 pm
Forum: Linux
Topic: Trouble with threads
Replies: 10
Views: 3275

Re: Trouble with threads

Your ThreadProcedure() checks myProgram, which is a variable local to StartExternalProgram(). Most likely your problem is in the SendMainProgramSignal() procedure. Also, why not use #PB_Program_Wait? Structure Rundata Path.s Output.s EndStructure Procedure RunProgramNotifyOnEnd(*Rundata.Rundata) Run...
by Trond
Thu Jan 16, 2020 12:24 am
Forum: The PureBasic Editor
Topic: autocomplete Trie
Replies: 17
Views: 8159

Re: autocomplete Trie

idle wrote:Nice to see you back!
Thank you.

Remember to benchmark size and time. Sometimes performance isn't intuitive.

I did try to make a trie a long time ago, but couldn't make it work.
by Trond
Wed Jan 15, 2020 11:29 pm
Forum: The PureBasic Editor
Topic: autocomplete Trie
Replies: 17
Views: 8159

Re: autocomplete Trie

Is this for the IDE?

Can I ask some questions?

What is the current data structured used in the IDE, and does it have any practical problems that justify the need for a more complicated data structure (assuming this is)?

What about removing keys?
by Trond
Mon Jan 13, 2020 9:10 pm
Forum: Feature Requests and Wishlists
Topic: Copy List Element
Replies: 12
Views: 3539

Re: Copy List Element

That is exactly what my code does. NewList MyList01.BigishStructure() NewList MyList02.BigishStructure() ;Add Data Elements to List01. List02 is empty, then later: ForEach MyList01() If (MyList01()\dMagicNumber = 3.333333) ;New Element automatically added to List02 CopyStructure(MyList01(), AddEleme...
by Trond
Sun Jan 12, 2020 10:42 pm
Forum: Feature Requests and Wishlists
Topic: Copy List Element
Replies: 12
Views: 3539

Re: Copy List Element

You mean like this?

Code: Select all

CopyStructure(a(), AddElement(b()), structure)
a() returns the address of the current structured element, AddElement(b()) also returns the address (of the new element).
by Trond
Wed Aug 01, 2018 12:58 pm
Forum: General Discussion
Topic: Users complain boring user interface of my apps
Replies: 186
Views: 54109

Re: Users complain boring user interface of my apps

Is the only solution to write my own GUI engine? I started to go down that road back when the canvas gadget first was first introduced, but quickly ran head first into the lack of 32-bit support for the canvas gadget. Sprites should be ideal for this, especially with the need for modern animations....
by Trond
Tue Jul 31, 2018 12:37 pm
Forum: General Discussion
Topic: Users complain boring user interface of my apps
Replies: 186
Views: 54109

Re: Users complain boring user interface of my apps

Any other solution ideas?
Native (non-PB) GTK with a custom skin.

https://github.com/nana-4/materia-theme

On Linux, it should be possible to set this skin even on PB controls.
by Trond
Sun Jul 29, 2018 1:41 pm
Forum: Applications - Feedback and Discussion
Topic: UB2D - 2D Physically Based Rendering Engine
Replies: 60
Views: 19114

Re: UB2D - 2D PBR Engine

Wow.

What are the models "made of" (2d images or models, heightmap, etc)?
Edit: Ok, it's at the end of the video. How do you create these images (normal map, rme map)?
by Trond
Fri Jul 27, 2018 5:23 pm
Forum: Game Programming
Topic: [2D Programming] Bouncing Block Script not Work, Help Need!
Replies: 6
Views: 3146

Re: [2D Programming] Bouncing Block Script not Work, Help Ne

There is no need to make it global, simply move it to right before repeat:

Code: Select all

Procedure Draw2D()
Direction = 1
  Repeat
by Trond
Thu Jul 26, 2018 1:38 pm
Forum: Coding Questions
Topic: DataSection and Reading Data items issue
Replies: 15
Views: 3070

Re: DataSection and Reading Data items issue

Define Lives.i Restore NumberLives For I = 0 To 7 Read Lives Debug Lives Next Define Age.d ; <- d Restore AgeTo For I = 0 To 7 Read.d Age Debug StrD(Age, 2) Next DataSection NumberLives: Data.i 1, 2, 3, 4 Data.i 5, 6, 7, 8 EndDataSection DataSection AgeTo: Data.d 76.15, 75.63, 74.67, 73.69, 72.71 D...
by Trond
Mon Jul 23, 2018 4:44 pm
Forum: Coding Questions
Topic: Clipboard persistence
Replies: 12
Views: 1884

Re: Clipboard persistence

It is reasonable to expect clipboard data to remain on the clipboard after the program has ended Yes, but at least on Linux, this simply isn't how the clipboard works. You, as an app developer, can't get around it. Edit: Anyway, would converting your data to JSON and using the normal text clipboard...
by Trond
Tue Jul 17, 2018 9:51 am
Forum: General Discussion
Topic: To Fred and Timo: Can we have a discussion about the future?
Replies: 81
Views: 19144

Re: To Fred and Timo: Can we have a discussion about the fut

Compiler wise, I don't think we will add a tons a new stuffs, as PureBasic has been created to be a beginner friendly language, and that's our main target. I'm also using other languages (mainly C#) on daily basis, and while I like a lot of features of it (LINQ, Generics, Garbage Collector, Lamba, ...
by Trond
Tue Jul 17, 2018 9:21 am
Forum: The PureBasic Editor
Topic: [My Menaron CDLL] Where is the Build DLL Tool?
Replies: 2
Views: 2548

Re: [My Menaron CDLL] Where is the Build DLL Tool?

Compiler options -> executable format -> dll.
by Trond
Mon Jul 16, 2018 5:51 pm
Forum: Coding Questions
Topic: Read a string from Structure with OfsetOf
Replies: 4
Views: 994

Re: Read a string from Structure with OfsetOf

PeekS() expects the address of the actual text, not the string variable. Structure xx t1.a t2.s t3.i t4.i t5.s EndStructure xx.xx xx\t1 = 5 xx\t2 = "text" xx\t3 = 50 xx\t4 = 123456 xx\t5 = "other" Debug PeekA(xx + OffsetOf(xx\t1)) Debug PeekS(PeekI(xx + OffsetOf(xx\t2))) Debug Pe...
by Trond
Mon Jul 16, 2018 9:14 am
Forum: Feature Requests and Wishlists
Topic: Pass and return by-value for structures
Replies: 6
Views: 1573

Re: Pass and return by-value for structures

You do not need to use CopyStructure. PB can copy by assignment, and this can be done on pointers with a little trick: Structure Point x.d y.d EndStructure Structure PointByVal P.Point EndStructure Procedure ModifyLocalPoint(*P.PointByVal) Protected LocalPoint.Point = *P\P Debug LocalPoint\x Debug L...