Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Ian Casey (RIP)

Pages: [1] 2
1
Questions & Answers / ODBC demo errors
« on: July 27, 2023, 12:28:33 PM »
I've been looking at the DB example in the demos, after a few easy changes to update he code, I still have an error

Db.c(916): error #2140: Type error in argument 2 to 'SQLAllocConnect'; expected 'void * *' but found 'int'.

in the ODBC.inc line 171
retcode = SQLAllocConnect(hEnv, &hDbc)

which BC tranlates to:

 retcode=SQLAllocConnect(hEnv,0xDbc);

Ian

3
Bug Reports / Misformed string code
« on: May 02, 2022, 03:49:40 PM »
As Far as I see I have only changed the order of these items for this to fail

DIM i, sometext$
sometext$ = "Just some text"
i = 100.125
PRINT "Test the string " & STR$(LEN(sometext$)) & USING$("##.#", i)
PRINT "Test the string "  & USING$("##.#", i)  & STR$(LEN(sometext$))


C:\Programming\BCX\MyProgs\testorder.c(431): error #2168: Operands of '&' have incompatible types 'char *' and 'char *'.

 printf("%s%s\n","Test the string ",str((int)strlen(sometext))&Using("##.#",i));  <-- fails
  printf("%s%s%s\n","Test the string ",Using("##.#",i),str((int)strlen(sometext)));

4
Questions & Answers / SaveAs Dialog box with encoding
« on: April 03, 2022, 03:15:07 PM »
Hi all,
I have found that code can be added to the BCX GetFileName$ function. I needed an Encoding combobox UTF8, UTF16...

The attached code is what I have so far but you must forcibly resize or move the dialog to force the proper location of the combobox and label.
Apart from that everything seems to work just fine.
Any ideas comments will be welcomed at this point.



5
Tips & Tricks / Swap Endians
« on: March 24, 2022, 05:39:22 PM »
I needed to read a file that was UTF-16BE (Big Endian) but MS uses UTF-16LE (Little Endian) as default so after some searching I found some code but it was in C++ and I guess for UTF-32.  Here is my BCX modified code, it is bi-directional so it will encode/decode UTF-16 encodings.

'Original C code by Adith Bharadwaj on GeekforGeeks.org but 'highly modified

Code: [Select]
FUNCTION SwapEndians$(Buffer$)         'Flip Bytes
  DIM leftbyte                                        'This holds the left 8  bits of the output.
  DIM rightbyte                                     'This holds the right 8 bits of the output
     
  FOR INT a = 0 TO LEN(Buffer$)-1
    leftbyte = (Buffer[a]  & 0x00FF) << 8
    rightbyte = (Buffer[a]  & 0xFF00) >> 8
    Buffer[a]  =  (rightbyte | leftbyte)
  NEXT
  FUNCTION = Buffer$
END FUNCTION

6
Questions & Answers / Open/Save dialogs with multiple monitors
« on: November 19, 2021, 05:47:20 PM »
Hi all
Wondering if anybody knows how I can get Open/Save dialogs or msgboxes to center on the main program if I use multiple monitors? 

Thanks

7
Tips & Tricks / Reorder Tab control using Drag/Drop
« on: July 30, 2021, 12:05:51 AM »
I added some drag/drop code to reorder Tabs to my MoveAnchor demo.
I used some code from AddTabb/RemTab functions and found some help for this on Gary Beanes website. 

https://bcxbasiccoders.com/bcxusers/ian/programs/TabReOrderAnchor.zip

I hope this helps.

8
User Contributions / U-BED (Unicode BCX Editor) by Ian Casey
« on: June 13, 2021, 05:36:35 PM »
In July 2022, I moved all the postings from the BCX Editor topic that concerned Ian Casey's UNICODE version to its its own TOPIC.  Unfortunately, during the move, I accidentally deleted Ian's original announcement of UBED, so hopefully this brief explanation will help.  Ian's UNICODE BED editor differs from my version of BED in several ways.  Besides a focus on UNICODE support, UBED provides project management, intellisense, updated compiling capabilities, and other changes.  ~MrBcx~

From Ian Casey
June 13, 2021

Hi All,

I have updated my version.

Added a toolbar mostly from Doyles example.

Added "Goto Function/Declare" to context menu in scintilla control. Takes you to the start of your user function or declare line, a return option is then available.

Added a start to intellisence - Hints , autocomplete is not working but I left the code in there if anyone wants to try to fix it.
Hints will show the needed syntax when a BCX keyword is typed. It needs non alpha character at the end to show the Hint. i.e. lof( - displays lof || size = lof(file)
Show Keywords Hints is toggled on/off in the View menu.

Added "Show current decription" to the context menu, click on the keyword, a selection will not work.
I stole the descriptions and syntax from the help file, thanks Robert.

Added color themes to config. The colors are not great but its a start, also a user theme is available, use to save your favorite colors. This can be different from current colors. If you have a set of colors I could add a theme to future versions.

Known bug: Search combo box does not accept ctrl-v to paste but the context menu Paste does work.

Executable:  https://bcxbasiccoders.com/bcxusers/ian/programs/Bed-idc.zip
Source: https://bcxbasiccoders.com/bcxusers/ian/programs/Bed-source-idc.zip

9
User Contributions / MoveAnchorControl Update
« on: January 02, 2021, 11:47:40 PM »
Hi all,
I updated the 3 MoveAnchorControl demos, now they work with Win 10 and x64.
I also added a possible DPI start but I have no way to test it.

Ian

https://bcxbasiccoders.com/bcxusers/ian/programs/MoveAnchorControl.zip
I also added the PutWindowToIni & GetWindowFromIni Window placement functions in the program above.

https://bcxbasiccoders.com/bcxusers/ian/programs/TabAnchor4.zip
I only updated the MoveAnchorControl  and checked all was still good

https://bcxbasiccoders.com/bcxusers/ian/programs/Splitterwithanchors.zip
I only updated the MoveAnchorControl  and checked all was still good

10
User Contributions / Sqlite3 wrappers for unicode 32 and 64bit
« on: December 27, 2020, 06:27:31 PM »
Hi all
I added some wrappers I used for sqlite3 32 bit unicode here.
     https://bcxbasiccoders.com/bcxusers/ian/programs/sql16Wlite.bas

I also made an updated demo using the sqlite3 64 bit code,here.
     https://bcxbasiccoders.com/bcxusers/ian/programs/sqlite16-64W.zip

This includes text post on how Kolbold on PellesC converted sqlite3.def to a lib file.
I also included the lib file, some updated test code and sqlite3.h

The main difference on using sqlite3.dll with unicode or UTF16 was using the sqlite3 functions ending in "16" or "16_v2"
so for non-unicode try the functions without "16" in the name.

Enjoy

Ian



11
User Contributions / my BCX - csv to Google Earth/KML functions
« on: December 25, 2020, 01:45:24 PM »
Hi all
these are the functions I use when converting a Lat/Lon csv file to a .kml file for Google Earth.
Drawing tracks and adding icons

https://bcxbasiccoders.com/bcxusers/ian/programs/Ians_KML_Functs.zip

Ian

12
Announcements / Updates to BCXOLR
« on: December 20, 2020, 11:53:42 AM »
I have uploaded a new BCXOLR mdb file with all the posts sent to this forum and also updated the snippets file  all_snips file.

The new/updated files are:

https://bcxbasiccoders.com/bcxusers/ian/BCXOLR/Downloads/Forum1.zip
and
https://bcxbasiccoders.com/bcxusers/ian/BCXOLR/Downloads/all_Snips.zip

The BCXOLR downloads page I use is:

https://bcxbasiccoders.com/bcxusers/ian/BCXOLR/bcxolr_downloads.html

Ian


13
Bug Reports / REPLACE WITH IN ERROR
« on: December 17, 2020, 03:25:38 PM »
I noticed this with Replace

Code: [Select]
 
   linetext$ = REMOVE$(linetext$, CHR$(187))       ' indent?
   REPLACE CHR$(9) WITH CHR$(32) & CHR$(32) IN linetext$   '//<--this produces the error
   REPLACE CHR$(9) WITH CHR$(32) IN linetext$
   REPLACE$(linetext$, CHR$(9), CHR$(32) & CHR$(32))
   REPLACE "<br />" WITH CRLF$ IN linetext$

produces this c code:
  strcpy(linetext,RemoveStr(linetext,chr(187)));
  =replace(,chr(9),join(2,chr(32),chr(32)INlinetext));  //<--this produces the error
  strcpy(linetext,replace(linetext,chr(9),chr(32)));
  replace(linetext,chr(9),join(2,chr(32),chr(32)));
  strcpy(linetext,replace(linetext,"&quot;",chr(34)));
  strcpy(linetext,replace(linetext,"<br />",CRLF));



14
Questions & Answers / 64 bit RaGrid
« on: December 29, 2019, 03:09:05 AM »
Hi all,
Has anyone figured out using the raGrid control in 64bit? I got alot of the changes but I'm not even 1/2 way.  I think I did try a while back and I didn't get it working and gave up.  It is a pretty powerful grid and I can only thank those who contributed to it.

Ian

15
Questions & Answers / MoveAnchorcontrol
« on: December 01, 2019, 11:26:02 PM »
Hi,
I found a while back that the MoveAnchorcontrol function didn't work as expected under Win 10 and the controls would slide off the page as the resizing took place.
This is getting wierder, I just tested the TabAnchorControl https://bcxbasiccoders.com/bcxusers/ian/programs/TabAnchor4.zip
on my web page and the exe runs without being in compatibility mode.I re-compiled it and now the error shows up again.

I think it is windows not reporting the border somewhere as it as the x,y only increase 3 or 4 pixels at a time.
In testing I ran it from the editor and it works great,  maybe the editor is running it in compatibility mode. I'm thinking that Win 10 has set all my programs to use compatibily mode.
As a temporary measure using the compatibilty with Win 8 works but I would like to run the programs without resorting to this mode. 

Could someone please test this for me to make sure it is not something introduced into my compiler options or something like that.

Ian
The pic shows the control 1/2 way across the page.

Pages: [1] 2