Disagree! If the code only uses PB's cross-platform functions, that should be good enough for the title - whether any code works as intended needs to be tested in context with the rest of the app anyway, and that is in the hands of the poster being helped.You should never claim cross-platform capability without testing on all 3 platforms
Want to use TextGadget with multiline. How to get height?
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Want to use TextGadget with multiline. How to get height
Hi Shardik you are absolutely right of course, that line shouldn't be there for cross-platform code
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Want to use TextGadget with multiline. How to get height
Unfortunately I found out that a lot of examples - whose posters claim them to be cross-platform - are in reality not working correctly cross-platform, even if only using official PB functions. This is a problem inherent to PureBasic: it's simply not possible to obtain an identical behavior because the wrapped API functions of the different platforms solve similar problems often very differently...IdeasVacuum wrote:Disagree! If the code only uses PB's cross-platform functions, that should be good enough for the title - whether any code works as intended needs to be tested in context with the rest of the app anyway, and that is in the hands of the poster being helped.You should never claim cross-platform capability without testing on all 3 platforms
Therefore I would advise to never claim an example as cross-platform without having tested it on all 3 platforms (even if the example doesn't use any API function). I would prefer a remark that your example SHOULD be cross-platform because of using only native PB functions! Then this would be a hint to the original poster to carefully test the example on all his targeted platforms...
Re: Want to use TextGadget with multiline. How to get height
Hi Shardik. You're absolutely correct, although I've been guilty of the same. But, I do indicate the platforms on which the code has been tested, and I do try to make it a point of indicating the should clause in the post.Shardik wrote:...I would advise to never claim an example as cross-platform without having tested it on all 3 platforms (even if the example doesn't use any API function). I would prefer a remark that your example SHOULD be cross-platform because of using only native PB functions! Then this would be a hint to the original poster to carefully test the example on all his targeted platforms...
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel 
Re: Want to use TextGadget with multiline. How to get height
Hi Kukulkan. I just posted a function to auto-size text gadgets over in the Tricks 'n' Tips forum. It utilises only native PureBasic functions, and has been tested on Windows and OSX. Perhaps it might work for you.Kukulkan wrote:The TextGadget does word-wrap - what is fine for me. But it looks like I have to know the height before setting the text...
Is there a way to find out, how big the gadget height has to be to cover all the text? I need it cross-platform!
AutoSize() for text gadgets
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel 
