Search found 21 matches

by KianV
Thu Jul 01, 2021 5:15 pm
Forum: Coding Questions
Topic: is there an effective way to clear the cache?
Replies: 13
Views: 4031

Re: is there an effective way to clear the cache?

Without seeing exactly what your code does, it is difficult to say, but the following should work under all circumstances. OpenWindow(0, 100, 100, 320, 200, "Window 0") TextGadget(0, 10, 70, 300, 20, "This is just to put something on the screen", #PB_Text_Center ) ismenuupdated.s...
by KianV
Mon Jun 28, 2021 4:00 am
Forum: Coding Questions
Topic: is there an effective way to clear the cache?
Replies: 13
Views: 4031

Re: is there an effective way to clear the cache?

how can i use this ? when I try to use it, the page keeps reloading infinitely, is there a way to stop this command from running? It needs to be triggered by an Event in the program. This could be clicking on something or when any graphics are finished loading &c.. When this should happen depen...
by KianV
Sun Jun 27, 2021 3:52 pm
Forum: Coding Questions
Topic: is there an effective way to clear the cache?
Replies: 13
Views: 4031

Re: is there an effective way to clear the cache?

I don't know if it would be suitable for your application, but inserting:

Code: Select all

!window.location.reload(true);
should force a reload, ignoring the cache.
by KianV
Thu May 06, 2021 4:47 pm
Forum: Coding Questions
Topic: flipcoordinates
Replies: 3
Views: 1521

Re: flipcoordinates

Glad to be of help.
I don't know why I didn't do this before, but the two lines:

Code: Select all

MovePathCursor(0, 0)
TranslateCoordinates(xflip*2,0)
could just be replaced with:

Code: Select all

MovePathCursor(xflip, 0)
since the current PathCursor position is used as the origin of the scaling.

Kian
by KianV
Thu Apr 29, 2021 4:57 pm
Forum: Coding Questions
Topic: flipcoordinates
Replies: 3
Views: 1521

Re: flipcoordinates

Hi William. It's hard to be precise without seeing exactly what you are trying to do, but a combination of TranslateCoordinates and ScaleCoordinates should do the trick. If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) CanvasGadget(0, 0, ...
by KianV
Sun Mar 21, 2021 1:24 pm
Forum: Coding Questions
Topic: Change button gadget during callback procedure
Replies: 8
Views: 2553

Re: Change button gadget during callback procedure

@Peter
Thanks for that Peter.
The program is not deliberately trying to slow things down. The loop was only there as a stand-in for the generating process to make it obvious what was happening.
I am only too aware of the horrors that can ensue when trying to artificially hold things up.
by KianV
Sun Mar 21, 2021 1:20 pm
Forum: Coding Questions
Topic: Change button gadget during callback procedure
Replies: 8
Views: 2553

Re: Change button gadget during callback procedure

Thanks munfraid. I never thought of trying that. Nice lateral thinking. :D It still seems possible to trigger the generating function twice if you double click, even if I change the length of the window timer,but that's not too much of a problem. The effect is seen here: http://www.fractalevitreuse....
by KianV
Sun Mar 21, 2021 9:18 am
Forum: Coding Questions
Topic: Change button gadget during callback procedure
Replies: 8
Views: 2553

Re: Change button gadget during callback procedure

I'm not sure how I would do that, since clicking on the button just calls the callback procedure. The SetGadgetText() function was the first instruction in the callback, but nothing happens until the procedure ends. I also tried calling a different procedure to change the gadget text, which in turn ...
by KianV
Sun Mar 21, 2021 9:11 am
Forum: Coding Questions
Topic: Change button gadget during callback procedure
Replies: 8
Views: 2553

Re: Change button gadget during callback procedure

Hi T4r4ntul4, The problem is that using SetGadgetText() doesn't do anything when the procedure is called. Once the callback procedure is finished, then the button text will change, but this slightly defeats the object. I do also intend to disable the gadget, but this also won't occur until the callb...
by KianV
Sun Mar 21, 2021 8:04 am
Forum: Coding Questions
Topic: Change button gadget during callback procedure
Replies: 8
Views: 2553

Change button gadget during callback procedure

I have a button gadget whose callback generates a fairly large image, so the process is quite lengthy. I would like to change the text of the button while the process is underway, for example, to say 'Processing', but can find no way of doing so. Any changes I make during the callback procedure are ...