Undependeable Gadget Handle

Windows specific forum
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Undependeable Gadget Handle

Post by Fred »

It's a good idea, I modified the permissions, it should now work with the link.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Undependeable Gadget Handle

Post by luis »

Very nice, thank you Fred ! :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Undependeable Gadget Handle

Post by IdeasVacuum »

That is a geat idea 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Lord
Addict
Addict
Posts: 900
Joined: Tue May 26, 2009 2:11 pm

Re: Undependeable Gadget Handle

Post by Lord »

Fred wrote:It's a good idea, I modified the permissions, it should now work with the link.
Thank you.
Fred wrote:I tried on OS X and it works for 32k as well, so I raised to limit to that.
Is this new 32k-limit true only for ScrollAreaGadget?
Image
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Undependeable Gadget Handle

Post by Fred »

for all gadgets
User avatar
Lord
Addict
Addict
Posts: 900
Joined: Tue May 26, 2009 2:11 pm

Re: Undependeable Gadget Handle

Post by Lord »

Fred wrote:for all gadgets
So a CanvasGadget can have up to 32kx32k as long as the
mentioned 2GB limit is not hit and has always a trustable handle?
Image
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Undependeable Gadget Handle

Post by Fred »

Should be.
User avatar
Lord
Addict
Addict
Posts: 900
Joined: Tue May 26, 2009 2:11 pm

Re: Undependeable Gadget Handle

Post by Lord »

Fred wrote:Should be.
That sounds great! :D
May I ask what the reason was why it didn't work before?
Image
User avatar
Lord
Addict
Addict
Posts: 900
Joined: Tue May 26, 2009 2:11 pm

Re: Undependeable Gadget Handle

Post by Lord »

Hi Fred!
Lord wrote:...
Fred wrote:I tried on OS X and it works for 32k as well, so I raised to limit to that.
Is this new 32k-limit true only for ScrollAreaGadget?
Lord wrote:
Fred wrote:for all gadgets
So a CanvasGadget can have up to 32kx32k as long as the
mentioned 2GB limit is not hit and has always a trustable handle?
Fred wrote:Should be.
May I ask another question?
How do you define 32k?
In my opinion it should be 32768 or $8000.
It looks like you defined 32767 or $7FFF.
Why? Is it because a ScrollAresGadget is
limited to 32767 by Windows for what ever
the reason is for that? You know, a Canvas
can have 32768 width without problems.

A nice feature is now, if you disable Debugger, you can
really test wether a Canvas was succsessful created or
not. If a handle is delieverd, the Canvas is useable. Even
if you start with 65536 down to what ever your memory
allows.
Thanks for this "bugfix" in LTS 5.21b1.
Image
User avatar
Lord
Addict
Addict
Posts: 900
Joined: Tue May 26, 2009 2:11 pm

Re: Undependeable Gadget Handle

Post by Lord »

The question above is still not answered, even after PureBasic 5.21 LTS.
Image
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Undependeable Gadget Handle

Post by Fred »

Yes, it's $7FFF
User avatar
Lord
Addict
Addict
Posts: 900
Joined: Tue May 26, 2009 2:11 pm

Re: Undependeable Gadget Handle

Post by Lord »

Fred wrote:Yes, it's $7FFF
Windows limit or PureBasic limit?
Image
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Undependeable Gadget Handle

Post by Fred »

Usually, word limited range is from 0 to $7FFF (32768 values), that's why we set this maximum value, for consitency. It's a PB limit, and if you want to remove it, just disable the debugger.
User avatar
Lord
Addict
Addict
Posts: 900
Joined: Tue May 26, 2009 2:11 pm

Re: Undependeable Gadget Handle

Post by Lord »

Fred wrote:Usually, word limited range is from 0 to $7FFF (32768 values), that's why we set this maximum value, for consitency. It's a PB limit, and if you want to remove it, just disable the debugger.
I don't see an consistency here.

If it should be consistent, you should also set the limits
for color to 254, 254, 254. That would be a range of 255 ($FF).
And it is also inconsistent to a CanvasGadget with its $ 3E80
limits.
Another example: CatchImage works for 8192x8192 ($2000x$2000)
from 0 to 8191 ($1FFFF)
I think it should be the other way around:
Range = $8000 (32768), Limits: 0 and $7FFF (32767)
[also for Canvas ($4000, 0 to $3FFF), but this is another story]

So you can keep color settings from 0 to $FF (Range of $100)
for consistency.
Image
Post Reply