![]() ![]() Right, i'll explain how this works, in the callback in SCN_CHARADDED i check the current word by calling "GetWordInPos" which in turn calls "GetText" various times to get the full word at the current position (including functions "table. Ok, im getting all manor of strange things going on here, the control seems a little buggy for sure SA=GetText(sObject, nTab, nStartPos, nEndPos) Local nEndPos = Scintilla.SendMessage(sObject, nTab, "num", SCI_WORDENDPOSITION, "num", nPos, "bool", true) Local nStartPos = Scintilla.SendMessage(sObject, nTab, "num", SCI_WORDSTARTPOSITION, "num", nPos, "bool", true) This remaining 2GB needs to accommodate the system routines/services, libraries (DLLs), heap and stack. Local sText = Memory.GetString(_Buffer, -1, "Ascii") įunction GetWordInPos(sObject, nTab, nPos) Hi JoRo, My basic understanding of the Windows memory model (32-bit) is as follows: Maximum 32-bit address space 2 32 4GB But, MS Windows reserves the upper 2GB, reducing the available memory down to 2GB. Local Result = Scintilla.SendMessage(sObject, nTab, "num", SCI_GETTEXTRANGE, "num", 0, "num", _TEXTRANGE) Memory.SetStructureData(_TEXTRANGE, 3, 0, _Buffer, "") Memory.SetStructureData(_TEXTRANGE, 2, 0, nEndPos, "") Memory.SetStructureData(_TEXTRANGE, 1, 0, nStartPos, "") _TEXTRANGE = Memory.CreateStructure("long, long, long") Scintilla control sends events very fast when it is activeĬode: function GetText(sObject, nTab, nStartPos, nEndPos) Plugin fires an event with a lua table that is equivalent of Scintilla message structĪll table field names are same as original struct names that are documented in scintilla API On TabRBtnUp : fires when right mouse button up over a tab button (this only fires if mouse over a tab button, (if you release right mouse button outside of tab buttons this event will not fire) On TabRBtnDown : fires when right mouse button down over a tab button On TabLBtnDblClk : fires when left mouse button double clicked over a tab button On TabLBtnDown : fires when left mouse button down over a tab button On CloseBtnClick : fires when user clicks to close button This event also fires when an active tab deleted, because another tab becomes active tab On TabSelected : fires when user selects a tab On MenuBtnClick : fires when user clicks to menu button On Notify : fires when a scintilla instance sends a message On SetUp : fires when container object being created that is parent of tab control and all scintilla instances (object is ready to go) Thank you so events are not for scroll buttons I’ll try to get more testing in tomorrow after work.ĭid I mention? This plugin is the bomb! :lol ![]() I’m out of time tonight, sorry I couldn’t get it all tested tonight, I’ve been very busy lately. This is what I expect is happening, but thought I’d mention it. It could be that the On Notify event is firing so fast, that the RichText object can’t keep up. It flashes so fast, I can’t tell if both versions of the table are the same. Often it displays two copies of the 17 element table. I wanted to learn more about table e_Notify, so I parsed the pairs out and displayed them in a RichText object On Notify event. I’m still a little sketchy about how the messaging system works. I can confirm that they all work, as well as all the events sans the two listed above. I can’t, at least at the moment, think of any other reason I would want to monitor those events, other than to scroll the tabs back and forth, and it does that automatically for me. ![]() The buttons correctly scroll the tabs in and out of view. IMO, those are fine events, and if they work great, but I don’t think of them as mandatory. The buttons themselves work fine, but the events don’t seem to fire. I have found one small issue, the ribbon button events ON TabRBtnDown & ON TabRBtnUp don’t seem to be firing. ![]() I haven’t had a chance to check everything yet, but so far it is running great. This kind of thing has been shown before on these forums too.This is brilliant, it’s exactly what I want. This includes all allocations and freeing of resources. I hope you are not suggesting that PB should allocate 64k for all strings by default just in case you want to use one with a certain API command?Ī far more sensible approach is that because you the programmer know what you want to do, then you should do it. Why does PB have to allocate the maximum length of string (the maximum is currently around 64k)? How does it know you want to use a string for the buffer of an API command? Parameters for API commands are only tagged as being addresses, not strings or buffers so the compiler cannot decide what needs to have strings allocated before they are used. If yes, then PB has to put it with the max lenght. I don't remember if len of string in PB are limited ? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |