Search found 1246 matches

by collectordave
Sun Aug 01, 2021 6:11 am
Forum: Bugs - Mac OSX
Topic: Runprograme on big sur
Replies: 9
Views: 4461

Re: Runprograme on big sur

There are two way to use it. RunProgram("open", "/Applications/TextEdit.app","") or RunProgram("/Applications/TextEdit.app/Contents/MacOS/TextEdit","","") GetUserDirectory(#PB_Directory_Programs) returns /Users/yourName/Applications/ and t...
by collectordave
Wed Jul 28, 2021 8:44 am
Forum: Bugs - Linux
Topic: DatabaseColumnType() Reporting Wrong Type in SQLite
Replies: 12
Views: 4329

Re: DatabaseColumnType() Reporting Wrong Type in SQLite

Just thought maybe I should have made an attempt to explain dynamic typing. The column type in Sqlite is really just a label not a type it helps keep compatibility with SQL statements and does not describe the type of the column. You can use just about anything as a column type. The programmer can u...
by collectordave
Wed Jul 28, 2021 7:48 am
Forum: Bugs - Linux
Topic: DatabaseColumnType() Reporting Wrong Type in SQLite
Replies: 12
Views: 4329

Re: DatabaseColumnType() Reporting Wrong Type in SQLite

There is one more approach you can use. You can select the typeof column values as below:- SELECT typeof(ColumnName) FROM TableName; However this returns the type of the data stored in the column not the defined column type. Remember Sqlite is dynamically typed not like other databases which are rig...
by collectordave
Wed Jul 28, 2021 7:35 am
Forum: Bugs - Linux
Topic: DatabaseColumnType() Reporting Wrong Type in SQLite
Replies: 12
Views: 4329

Re: DatabaseColumnType() Reporting Wrong Type in SQLite

Hi I think the confusion is between what is data and what is a schema. Some database engines do have a procedure to return the column type which, I believe Sqlite does not. You can write your own though:- UseSQLiteDatabase() If CreateFile(0,"myTest1.db") CloseFile(0) EndIf Procedure.s GetD...
by collectordave
Mon Jul 26, 2021 4:12 pm
Forum: Bugs - Linux
Topic: DatabaseColumnType() Reporting Wrong Type in SQLite
Replies: 12
Views: 4329

Re: DatabaseColumnType() Reporting Wrong Type in SQLite

Hi, The clue is that when using Pragma a resultset is returned with the fields: cid name type not null dfltvalue pk For mytable this would give:- cid name type not null dfltvalue pk 0 field1 INTEGER 0 0 0 1 field2 REAL 0 0 0 2 test3 TEXT 0 0 0 So using DatabaseColumnName() on this resultset would gi...
by collectordave
Sun Jul 25, 2021 3:32 am
Forum: Bugs - Linux
Topic: DatabaseColumnType() Reporting Wrong Type in SQLite
Replies: 12
Views: 4329

Re: DatabaseColumnType() Reporting Wrong Type in SQLite

Hi If you check the first code I posted it does exactly as you ask. It returns one row for each column in mytable. The line If DatabaseQuery(0,"PRAGMA table_info(mytable);") Returns rows of data in the same way as a normal SELECT Query it could be seen as:- SELECT * FROM table_info WHERE N...
by collectordave
Sat Jul 24, 2021 5:43 am
Forum: Bugs - Linux
Topic: DatabaseColumnType() Reporting Wrong Type in SQLite
Replies: 12
Views: 4329

Re: DatabaseColumnType() Reporting Wrong Type in SQLite

The DatabaseColumnType(0,ln) and DatabaseColumnName(0,ln) return the column type on a successful query of the actual table. So DatabaseQuery(0,"PRAGMA table_info(mytable);") is returning the info on the pragma table. To show the field names and types from the pragma you can use:- UseSQLite...
by collectordave
Tue Jul 20, 2021 8:06 am
Forum: Feature Requests and Wishlists
Topic: Better handling of Custom Events/EventTypes
Replies: 4
Views: 2774

Re: Better handling of Custom Events/EventTypes

I use modules and named constants. I give each module a number, the common module starts at 0 then for me a step of 100 has been enough. When others are helping they are mostly writing a module to be included which means that they have a new module number. As here: DeclareModule APP Enumeration Cust...
by collectordave
Mon Jul 19, 2021 2:17 pm
Forum: Coding Questions
Topic: Which scrollbar has been moved?
Replies: 7
Views: 1412

Re: Which scrollbar has been moved?

Same as above with bind event. Global Window_0,Event Global Scrollbar_0,Scrollbar_1,Scrollbar_2,Scrollbar_3 Procedure HandleScroll() Select EventGadget() Case Scrollbar_0 Debug "Scrollbar 0 Moved to " + Str(GetGadgetState(Scrollbar_0)) Case Scrollbar_1 Debug "Scrollbar 1 Moved to &quo...
by collectordave
Mon Jul 19, 2021 6:12 am
Forum: Coding Questions
Topic: Which scrollbar has been moved?
Replies: 7
Views: 1412

Re: Which scrollbar has been moved?

Not quite sure what you are asking a little code may help. Each scrollbar has a unique number when created using #_PBAny this can be used to show which scrollbar has been moved and get its value as in the code below:- Global Window_0,Event Global Scrollbar_0,Scrollbar_1,Scrollbar_2,Scrollbar_3 Windo...
by collectordave
Sat Jul 17, 2021 10:08 am
Forum: Bugs - Mac OSX
Topic: InitSound() Fails on Big Sur
Replies: 1
Views: 2815

InitSound() Fails on Big Sur

InitSound() always returns 0 when run on Big Sur.

This has been reported in other posts.

Any word of a fix?
by collectordave
Fri Jul 16, 2021 3:41 pm
Forum: Mac OSX
Topic: Unzip/unrar on Big Sur
Replies: 4
Views: 3228

Re: Unzip/unrar on Big Sur

If you are trying to use: destfolder$ = GetCurrentDirectory()+ "test_unzip/" That can fail as the current directory can be inside the application always best to use absolute addressing. It is also not the same as the executable directory there are a few posts on the forum that explain that...
by collectordave
Fri Jul 16, 2021 10:07 am
Forum: Bugs - Mac OSX
Topic: UncompressPackFile on Big Sur
Replies: 1
Views: 2382

Re: UncompressPackFile on Big Sur

Just answered this on another thread. You need to add the packer to use when opening the pack and create the folders if any before unzipping any files in the zip which are in folders. Scrappy code below: zipfilelocation$ = OpenFileRequester("Choose a Zip", "", "", 0) If...
by collectordave
Fri Jul 16, 2021 10:04 am
Forum: Mac OSX
Topic: Unzip/unrar on Big Sur
Replies: 4
Views: 3228

Re: Unzip/unrar on Big Sur

Tried a little more and it seems you need the folder created ready for any file to be uncompressed. Sorry about the scrappy code but this works for me on BigSur: zipfilelocation$ = OpenFileRequester("Choose a Zip", "", "", 0) If zipfilelocation$ ="" Text$ + &q...
by collectordave
Fri Jul 16, 2021 9:45 am
Forum: Mac OSX
Topic: Unzip/unrar on Big Sur
Replies: 4
Views: 3228

Re: Unzip/unrar on Big Sur

Tried this on bigger as well and did not work.

Each pack entry name was repeaters W

Changed one line to

If OpenPack(0, zipfilelocation$,#PB_PackerPlugin_Zip )

and the pack entry names are reported correctly.