Search found 24 matches

by ljgww
Mon Jun 22, 2020 1:15 pm
Forum: Coding Questions
Topic: Androd: File Requester
Replies: 5
Views: 2614

Re: Androd: File Requester

plouf wrote:dont know about filytype requestest but about platform

Debug "Platform: " + DeviceInfo(#PB_Device_Platform)

can tell you if its android or not
Thank you. Shall try it.
by ljgww
Mon Jun 22, 2020 1:10 pm
Forum: Coding Questions
Topic: Androd: File Requester
Replies: 5
Views: 2614

Re: Androd: File Requester

@RobertRioja

thank you for the effort. One can force different compilation when building this or that version.
My point is that it would be nice to have constant that tells us which platform we are on so it is easy to opt different code accordingly.
by ljgww
Mon May 25, 2020 2:26 pm
Forum: Tricks 'n' Tips
Topic: Map keys behave differently between PB and SB
Replies: 0
Views: 2506

Map keys behave differently between PB and SB

It is not safe to assume that keys in the map are behaving in the same way when porting code forth and back between SpiderBasic and PureBasic. Apparently SpiderBasic preserves map keys in order of populating while PureBasic does something else (likely some hashing for speed optimization) the code: ...
by ljgww
Tue Apr 28, 2020 2:46 pm
Forum: Feature Requests and Wishlists
Topic: Editor capitalization but not in JS code
Replies: 0
Views: 3378

Editor capitalization but not in JS code

If you turn on keyword capitalization ON in settings, editor will auto-correct keywords like: procedure -> Procedure or endif -> EndIf Its all fine and dandy if one is writing just SpiderBasic code but once you EnableJS and write some Javascript code capitalization still works. I have had a numerous...
by ljgww
Mon Apr 27, 2020 12:36 pm
Forum: Coding Questions
Topic: JavaScript Optimizer error at compile time
Replies: 3
Views: 1988

Re: JavaScript Optimizer error at compile time

Noted. Thank you! Some sort of JSLint, however, would be welcome step at compile time (optional and non-intrusive) instead of 'optimizing'. Simple reasoning for that option is that in SpiderBasic we may use custom JavaScript, hence, some sort of JavaScript checker can be helpful to, perhaps, detect ...
by ljgww
Fri Apr 24, 2020 3:33 pm
Forum: Coding Questions
Topic: JavaScript Optimizer error at compile time
Replies: 3
Views: 1988

JavaScript Optimizer error at compile time

I normally work with the resulting JavaScript code that is not optimized, but I have noticed that some spiderbasic code may perfectly work with un-optimized JavaScript code but could generate an error with 'Optimize javascript output' enabled. Spiderbasic IDE application menu, Compiler, Compiler Opt...
by ljgww
Fri Apr 24, 2020 3:13 pm
Forum: Coding Questions
Topic: Androd: File Requester
Replies: 5
Views: 2614

Re: Androd: File Requester

Related to above... Documentation quote: #PB_Compiler_OS : Determines on which OS the compiler is currently running. It can be one of the following values: #PB_OS_Windows : The compiler is creating Windows executable (PureBasic) #PB_OS_Linux : The compiler is creating Linux executable (PureBasic) #P...
by ljgww
Wed Apr 22, 2020 1:16 pm
Forum: Coding Questions
Topic: Androd: File Requester
Replies: 5
Views: 2614

Androd: File Requester

I have a piece of code which triggers opening a local file via file requester. OpenFileRequester("", @CallbackOpenLocalFileRequester()) When I am in the browser i can put something like ".txt" as first parameter and browser pop with file selector and will show only .txt files. Wh...
by ljgww
Sat Apr 18, 2020 3:49 pm
Forum: Coding Questions
Topic: why this code does not work?
Replies: 2
Views: 1588

Re: why this code does not work?

Unoptimized version that works. This is debug version - some code can be removed. There are several ways of elaboration on top of this subject (some of ideas where to go): - version that do not use JS function - version that introduce offsets - version that works with different argument types (e.g. ...
by ljgww
Sat Apr 18, 2020 3:13 pm
Forum: Feature Requests and Wishlists
Topic: 'Global' EnableJS
Replies: 4
Views: 2697

Re: 'Global' EnableJS

Peter wrote:it looks like SpiderBasic cannot resolve the DisableJS within a Macro. Could be a bug.
Roger. Over.
Forking the callback with promise :)