Search found 13 matches

by PartTimeCoder
Thu Aug 26, 2021 10:50 pm
Forum: Coding Questions
Topic: PB Libs, Plugins and DLL's
Replies: 3
Views: 1107

PB Libs, Plugins and DLL's

Hi all

I am writing a UI plugin for AppGameKit using API commands and so far its going pretty well I got windows with menus, a bunch of objects/gadgets and a events system but I would really like to harness the power and convenience of PB's inbuilt UI library but I read in the EULA/HelpFile about ...
by PartTimeCoder
Thu Jul 29, 2021 7:23 pm
Forum: Coding Questions
Topic: [ Scintilla ] How do I save the current state of a file without affecting the current state of another saved file?
Replies: 11
Views: 3423

Re: [ Scintilla ] How do I save the current state of a file without affecting the current state of another saved file?

Its a bit messy, but an example of what I'm saying

Add to GOSCI include
Procedure GOSCI_AddDocRef(id, *ptr)
If IsGadget(id) And GadgetType(id) = #PB_GadgetType_Scintilla And *ptr
ScintillaSendMessage(id, #SCI_ADDREFDOCUMENT, 0, *ptr)
EndIf
EndProcedure

Procedure GOSCI_GetDocPointer(id)
If ...
by PartTimeCoder
Thu Jul 29, 2021 5:34 pm
Forum: Coding Questions
Topic: [ Scintilla ] How do I save the current state of a file without affecting the current state of another saved file?
Replies: 11
Views: 3423

Re: [ Scintilla ] How do I save the current state of a file without affecting the current state of another saved file?

is there any way to manually add UndoRedo ?

Use Doc pointers, you only need a single Scintilla gadget for multiple documents, UnDo and Redo actions are preserved from doc to doc

To create, set and get new document pointers look at:
#SCI_GETDOCPOINTER
#SCI_SETDOCPOINTER
#SCI_CREATEDOCUMENT

when ...
by PartTimeCoder
Thu Apr 22, 2021 7:41 am
Forum: Coding Questions
Topic: [Done] DatabaseUpdate: Sqlite Vs MySQL
Replies: 2
Views: 3783

Re: [Done] DatabaseUpdate: Sqlite Vs MySQL

Please see the below thread for possible related bug

https://www.purebasic.fr/english/search ... 3&sr=posts
by PartTimeCoder
Thu Apr 22, 2021 7:39 am
Forum: Coding Questions
Topic: MySQL problem | SOLVED
Replies: 51
Views: 30725

Re: MySQL problem

The problem is in PB's error checking, I posted a bug a while back and although it seemed to fix the lack of error feedback it just reports garbage if there is an error, run the same code in SQLite and it all works fine.

https://www.purebasic.fr/english/viewtopic.php?f=4&t=75825&p=558481#p558481
by PartTimeCoder
Fri Mar 12, 2021 2:04 am
Forum: Coding Questions
Topic: Trouble getting data from SQLite
Replies: 4
Views: 1155

Re: Trouble getting data from SQLite

You are not retrieving the row

try this

Code: Select all

  If DatabaseQuery(1, Sql$,#PB_Database_DynamicCursor) 
    If FirstDatabaseRow(1)
      result=GetDatabaseLong(1, 1)  ;tried both column as 0 and as 1, same result each time
      Debug result 
    EndIf
  EndIf
by PartTimeCoder
Tue Aug 11, 2020 10:04 pm
Forum: Coding Questions
Topic: [Done] DatabaseUpdate: Sqlite Vs MySQL
Replies: 2
Views: 3783

[Done] DatabaseUpdate: Sqlite Vs MySQL

I have noticed an issue with DatabaseUpdate in which when used with MySQL it does not fill DatabaseError when it encounters a sql error, compared to Sqlite which behaves as documented.

some example code
Procedure SQL_Update(db_id.i, db_query.s)
If IsDatabase(db_id)
If DatabaseUpdate(db_id,db ...
by PartTimeCoder
Sun Jul 26, 2020 10:53 am
Forum: Coding Questions
Topic: OpenFileRequester and memory usage?
Replies: 1
Views: 965

OpenFileRequester and memory usage?

Hello

So I am tracking down some memory leaks in a rather complex program as I appear to be losing 5/6mb's from the baseline when first loaded and I have tracked it back to a call to OpenFileRequester().

When I first load my program it idles at around 6.5mb's (Task manager) and when I load in a ...
by PartTimeCoder
Fri Jun 26, 2020 10:45 am
Forum: Coding Questions
Topic: A Bit of a Byte 4 >> 32
Replies: 8
Views: 1737

Re: A Bit of a Byte 4 >> 32

That's math for beginners :wink:


#LUAI_MAXSTACK = 1000000
Debug -(#LUAI_MAXSTACK-1000)
Debug -#LUAI_MAXSTACK-1000


That's why :!:

Obviously, my issue was not the "math for beginners" it was the syntax of the equation, but your follow up posts answered my question "( - #LUAI_MAXSTACK-1000 ...
by PartTimeCoder
Thu Jun 25, 2020 11:39 pm
Forum: Coding Questions
Topic: A Bit of a Byte 4 >> 32
Replies: 8
Views: 1737

Re: A Bit of a Byte 4 >> 32

NM, with the above deceleration I got an IMA, with the below dec all it's good, function called and Lua stack intact after call of lua_ref/ lua_rawgeti

#LUAI_BITSINT = 32
#LUAI_MAXSTACK = 1000000
#LUA_REGISTRYINDEX = -#LUAI_MAXSTACK-1000

Hint: just removed the brackets "()" and everything ...
by PartTimeCoder
Thu Jun 25, 2020 10:09 pm
Forum: Coding Questions
Topic: A Bit of a Byte 4 >> 32
Replies: 8
Views: 1737

A Bit of a Byte 4 >> 32

Hi there

as part of my 11 year old daughters "stay at home" education for IT I was delighted when they were given a project in Lua, I quickly jumped on board and started coaching her in what Lua can do besides printing "Hello World" in a console, I grabbed the Lua 5.3 include that was posted here ...
by PartTimeCoder
Sat Sep 02, 2017 1:13 am
Forum: Coding Questions
Topic: Is Talibite still a viable tool?
Replies: 1
Views: 1414

Is Talibite still a viable tool?

Hi, I want to tidy up some of my projects and reduce the amount of include files, I have not used Talibite before and I noticed it was last updated in 2013, is it still a viable tool to use with PB5.60, and if so what if any are the limitations?
by PartTimeCoder
Sat Jun 03, 2017 10:33 am
Forum: Coding Questions
Topic: RealSource Lua Include+StaticLib?
Replies: 2
Views: 1816

RealSource Lua Include+StaticLib?

Hi, I want to revive an old project and find myself in desperate need of the Lua lib and include file published on RealSource with the below link but the site seems to be having some problems with missing pages, does anyone have these files on HDD they could attach for me?

http://www.realsource.de ...