Search found 15 matches

by manu
Tue Dec 02, 2025 8:18 pm
Forum: Windows
Topic: IPAddressGadget Bug
Replies: 6
Views: 760

Re: IPAddressGadget Bug

My old program was using a width of 100 pixels and was compiled with 5.62 x86 on XP, and it works perfectly, even on Win10.
Compiled with 6.21 x86 on Win10, it doesn't work.
Also it is strange, that the gadget is not really too narrow, when I use for example 255.255.255.255 as default, all ...
by manu
Mon Nov 24, 2025 1:20 pm
Forum: Windows
Topic: IPAddressGadget Bug
Replies: 6
Views: 760

IPAddressGadget Bug

Hi!

I compiled an old program of mine with PB 6.21 x64.
The IPAddressGadget does not work as expected any more. You can only enter 2-digit IPs, not 3-digit,
when you try to enter a third digit like in 127, you just get a "bing".
I then found out that it depends on the width of the gadget. If it is ...
by manu
Wed Apr 10, 2024 8:26 pm
Forum: Coding Questions
Topic: PB 6.10 x64 OpenLibrary
Replies: 6
Views: 1522

PB 6.10 x64 OpenLibrary

Hi!
Global my_lib.l

my_lib=OpenLibrary(#PB_Any, "version.dll")

Debug Str(my_lib)+" = $"+Hex(my_lib)

If my_lib = 0:End:EndIf

GetFunction(my_lib,"GetFileVersionInfoA")

(I wasn't actually using version.dll, this is just an example.)

Works with PB6.00 x64, crashes with PB6.10 x64.
The reason ...
by manu
Thu May 19, 2022 11:57 am
Forum: Coding Questions
Topic: Defining Macros in one line
Replies: 7
Views: 1377

Re: Defining Macros in one line

If nobody can explain why this happens, I call it a bug and will repost it in the bugs forum, or can someone move this topic?
by manu
Wed May 11, 2022 2:23 pm
Forum: Coding Questions
Topic: Defining Macros in one line
Replies: 7
Views: 1377

Re: Defining Macros in one line



BTW: The DoubleQuote feels like a hack. It would be better to have a special character as prefix or postfix to the parameter name and the macro processor would automatically stringify it, like in this example Debug x$ or $x or #x or ##x or whatever. But I don't think this exists, right?

There ...
by manu
Wed May 11, 2022 1:17 pm
Forum: Coding Questions
Topic: Defining Macros in one line
Replies: 7
Views: 1377

Defining Macros in one line

Hi!

I came across a strange behavior. What exactly is the difference between defining a macro one line (with ":") and in mutilple lines?
Is it even allowed to define a macro in one line?

Example:

Macro DoubleQuote
"
EndMacro

Macro Test1(x):Debug DoubleQuote#x#DoubleQuote:EndMacro

Macro Test2 ...
by manu
Thu Mar 20, 2014 2:06 pm
Forum: Linux
Topic: [PB5.22LTS] MessageRequester and Threads
Replies: 16
Views: 8482

Re: [PB5.22LTS] MessageRequester and Threads

I tried my example with your gdk_threads_enter_()/_leave() additions.
It does not crash but it is far away from working properly. On my linux machine, it takes a few seconds (!) for the Requester to appear properly and then yes, the clock starts running but the program is very unreactive.
And the ...
by manu
Thu Mar 20, 2014 1:11 pm
Forum: Linux
Topic: [PB5.22LTS] MessageRequester and Threads
Replies: 16
Views: 8482

Re: [PB5.22LTS] MessageRequester and Threads

Thanks for all your quick replies. Too bad that it's not fixable.

I have to change my program accordingly.

The gdk_threads_enter_()/_leave() stuff wouldn't have helped I guess because it would have stopped the mainloop from running also.

Maybe a small hint could be added to the help text of ...
by manu
Wed Mar 19, 2014 6:16 pm
Forum: Linux
Topic: [PB5.22LTS] MessageRequester and Threads
Replies: 16
Views: 8482

[PB5.22LTS] MessageRequester and Threads

Hello!
I'm trying to port an application from Windows to Linux. I'm having trouble with threads, though I enabled ThreadSafe compiling.
Here is a small example code:

Procedure About(*dummy)
MessageRequester("Requester","Click ok")
EndProcedure

OpenWindow(0, 0, 0, 220, 70, "Example", #PB_Window ...
by manu
Thu May 31, 2007 12:09 am
Forum: Coding Questions
Topic: Null Over Network?
Replies: 4
Views: 1517

SendNetworkString is for sending strings...

RTmich, SendNetworkString is for sending strings. Strings are some characters terminated by a null character . This cannot be changed.
You really need to use SendNetworkData.
There are several ways to get the data in place in memory like you need it.
One way would be to Poke it to memory like in the ...
by manu
Wed May 30, 2007 11:57 pm
Forum: Coding Questions
Topic: Include binary problem
Replies: 11
Views: 3075

Should be simple

Try this:


file_1_begin:
IncludeBinary "data.hex"
file_1_end:
[...]

size=?file_1_end-?file_1_begin
ComWrite(Hcom, ?file_1_begin, size)

or in smaller blocks to get the progressbar running:

written=0
size=?file_1_end-?file_1_begin
*ptr=?file_1_begin
While written<size
bs=256
If bs>(size ...
by manu
Wed May 30, 2007 11:30 pm
Forum: Coding Questions
Topic: PB4 Mac B1: ListviewGadget not supportet?
Replies: 2
Views: 881

Try adding an item

The events
#PB_EventType_LeftClick
#PB_EventType_LeftDoubleClick
of a ListViewGadget are only fired if you click on an item of the gadget.
Since your ListViewGadget is empty, no events are created.
Try to add the line AddGadgetItem(#Listview_0, -1, "My first ListView Item") after the ListViewGadget ...
by manu
Thu May 24, 2007 11:42 pm
Forum: Announcement
Topic: PureBasic 4.01 for Linux
Replies: 20
Views: 11814

Had to edit the url manually

Thanks for the new 4.01 linux version!
BTW:
In the download area - after logging in - the link now states
Download PureBasic 4.01 full version for Linux but the link goes to the old 4.00 version. Had to edit the URL manually to grab the 4.01...
To check if it is really 4.01, I untared and opened ...
by manu
Sun Apr 22, 2007 12:10 am
Forum: Coding Questions
Topic: Arithmetric expressions
Replies: 7
Views: 1570

Arithmetric expressions

Hello!
I tend to use arithmetric expressions without the = sign. At first I thought when I write a * some_expression it would be the same as a=a*(some_expression) But "some_expression" is not necessarily evaluated first and then multiplied with "a" and the result stored in "a".
It is more like a=a ...
by manu
Thu Nov 30, 2006 3:23 am
Forum: Coding Questions
Topic: Very strange bug hard to understand (.b types related ? )
Replies: 8
Views: 1885

It's not a bug in PB

I had a look at your code.
The problem is that in your inline assembly line
!fistp dword[v_MustDelay];<- MustDelay=DispPeriod-(checkpoint2-checkpoint1)/SysFreq.

you store 32bits at the address of your variable MustDelay which is only 8bits wide, which is why your variable PCODE (also 8bits) gets ...