Search found 1246 matches

by collectordave
Fri Apr 02, 2021 2:08 pm
Forum: Coding Questions
Topic: Scroll text horizontally
Replies: 45
Views: 4538

Re: Scroll text horizontally

Hi

The delay() is not in the event loop but in the procedure.

It controls the speed of the scroll.

When I move the scrolling to a thread it will be replaced by a non blocking timer.

The code so far is just a proof of concept.

Regards

CD
by collectordave
Fri Apr 02, 2021 1:41 pm
Forum: Coding Questions
Topic: Scroll text horizontally
Replies: 45
Views: 4538

Scroll text horizontally

I have been looking for a way to scroll text horizontally in something like a textgadget for some time. I tried taking first character and putting at the end then setting the text but this seemed very jerky. Remembered how scrolling a canvas in a container seemed ok so tried using a canvas in a cont...
by collectordave
Wed Mar 31, 2021 5:41 am
Forum: Coding Questions
Topic: menu & combo block update
Replies: 10
Views: 1072

Re: menu & combo block update

Thanks mk.soft

That is exactly what I was looking for. Even down to the notes after the article.

I did not know about the resize blocking the loop as well.

Thanks again.
by collectordave
Tue Mar 30, 2021 7:22 am
Forum: Coding Questions
Topic: menu & combo block update
Replies: 10
Views: 1072

Re: menu & combo block update

ThreadSave stores and restores additional registers. In general: It is a bad idea to access GUI elements inside of a thread. Post an Event to the main loop and let the main loop do the GUI stuff. Hi I have tried posting an event to the main loop but it seems the main loop is hung up and never sees ...
by collectordave
Tue Mar 30, 2021 6:11 am
Forum: Coding Questions
Topic: menu & combo block update
Replies: 10
Views: 1072

Re: menu & combo block update

This appears to work: Enumeration #PB_Event_FirstCustomValue #EventUpDate EndEnumeration Global Quit.i Procedure Update() Static iLoop iLoop = iLoop + 1 SetGadgetText(2,Str(iLooP) + " Seconds") EndProcedure Procedure MyTimer(*Val) Static lt.i While Quit = #False If lt.i < ElapsedMillisecon...
by collectordave
Tue Mar 30, 2021 5:57 am
Forum: Coding Questions
Topic: menu & combo block update
Replies: 10
Views: 1072

Re: menu & combo block update

PB 5.73 LTS

MAC OS 10.14.6


Just a problem for the MAC?
by collectordave
Tue Mar 30, 2021 5:30 am
Forum: Coding Questions
Topic: menu & combo block update
Replies: 10
Views: 1072

Re: menu & combo block update

Thanks Rashad but the update is still blocked it seems the combobox when the list is down blocks the main event loop.

Regards

CD
by collectordave
Tue Mar 30, 2021 5:08 am
Forum: Coding Questions
Topic: menu & combo block update
Replies: 10
Views: 1072

menu & combo block update

I need to update a progress text while my media player app is running. Used addwindowtimer() set for 1 second. worked ok. Now adding more code for the user to make other choices while a song is playing. Whenever a menu is opened (no choice made) or a combobox is opened (No choice made) the update st...
by collectordave
Thu Mar 25, 2021 7:11 am
Forum: Coding Questions
Topic: Filesize, OpenFile not case sensitive is Not a bug.
Replies: 5
Views: 556

Re: Filesize, OpenFile Bug?

After a little bit more trial and error.

The file system is case insensitive by default so not a PB bug.

The file system can be made case sensitive but is definatly not recommended as some applications will not work properly with a case sensitive file system.
by collectordave
Thu Mar 25, 2021 6:09 am
Forum: Coding Questions
Topic: Filesize, OpenFile not case sensitive is Not a bug.
Replies: 5
Views: 556

Filesize, OpenFile not case sensitive is Not a bug.

MAC OS 10.14.6 PB 5.73 LTS I do not know if this is a bug or not. FileSize() and OpenFile are not case sensitive. Using the following code:- Macro FileExists1(filename) Bool(FileSize(fileName) > -1) EndMacro Procedure.I FileExists2(Filename.S) CompilerSelect #PB_Compiler_OS CompilerCase #PB_OS_Windo...
by collectordave
Sun Mar 21, 2021 8:47 am
Forum: Mac OSX
Topic: Problem porting from PC to Mac
Replies: 18
Views: 5624

Re: Problem porting from PC to Mac

I have also read it and it helped enormously. The problem is in understanding the differences between a Windows executable and a MAC executable. To explain the differences here is a practical example. 1. Create a folder 'Display Image' wherever you like to keep you PB programmes. 2. Create a sub fol...
by collectordave
Sat Mar 20, 2021 7:19 am
Forum: Mac OSX
Topic: Problem porting from PC to Mac
Replies: 18
Views: 5624

Re: Problem porting from PC to Mac

I had similar problems when starting on the MAC! The problem here is this line:- path$ = GetPathPart(ProgramFilename()) When you compile/run your application path$ points to a location inside your application! Such as:- /Users/myname/Desktop/PrehistoricLife.pb/Purebasci.app/Contents/MacOS/images/hea...
by collectordave
Wed Mar 17, 2021 8:03 am
Forum: General Discussion
Topic: FileSearch
Replies: 1
Views: 1146

Re: FileSearch

Hi Not sure if I understand exactly what you are doing but when searching for image files or other files in my apps I use a regex as below:- This return a simple list of path/filenames from the start folder including all sub folders. Global NewList FilesFolders.s() Global SearchFolder.s Global Searc...
by collectordave
Mon Mar 15, 2021 6:46 am
Forum: Bugs - Mac OSX
Topic: Playsound() Memory Leak?
Replies: 0
Views: 2400

Playsound() Memory Leak?

MAC OS Mojave 10.14.6 PB 5.73 LTS 64bit My app that uses PlaySound() started to slow down my computer after playing a good few tracks so investigated little. Started Activity monitor and checked memory. Using the following code (Replace track with one of your own) InitSound() ; Initialize Sound syst...
by collectordave
Wed Mar 03, 2021 7:00 am
Forum: Tricks 'n' Tips
Topic: Randomise List
Replies: 6
Views: 816

Re: Randomise List

Checked the help List Index and that one isn't listed!

Would be nice if it could be added in the docs.

Thanks for letting me know about it.

CD