-
Content Count
183 -
Joined
-
Last visited
Posts posted by softtouch
-
-
Delphi 12.2, I installed LockBox 3 via GetIt. So far so good.
I try to generate public and private keys, but I get all the time a range check error.
Here is the example code:
CryptoLib := TCryptographicLibrary.Create(nil); CodecRSA := TCodec.Create(nil); Signatory := TSignatory.Create(nil); CodecRSA.CryptoLibrary := CryptoLib; CodecRSA.StreamCipherId := 'native.RSA'; CodecRSA.AsymetricKeySizeInBits := 1024; Signatory.Codec := CodecRSA; Signatory.GenerateKeys; // <== Range Check Error Signatory.Free; CodecRSA.Free; CryptoLib.Free;
What am I doing wrong?
-
43 minutes ago, Uwe Raabe said:Add an event handler for OnEnableItem and set AEnabled := False;
I already tried that, but the text (label) in the item will be in a typical disabled color (some sort of gray), when I set AEnabled to false, thats also not great.
-
I am trying since hours to find a way to disable that a user can select an item from a TControlList, without success.
What I am trying to do is to show all the items, but in some sort of a "viewer" mode, so tuser can see/scroll all the items, but there is no focus drawn and items cannot be selected.
I also tried to change the colors in ItemSelectionOptions, but whatever I set there, it wont change anything. If I set the colors all to lets say clRed, they are still blue.
How can I do what I want to do?
-
I have a column where each node has an image, set via the onGetImageIndex event. The image and the celltext are displayed properly.
How can I detect that the user click the image and not the text in the cell?
Using tree.GetHintInfoAt(...) will always return [hionItem] in the hitpositions property, independent I click the image or the text.
What I read so far, it should return [hiOnNormalIcon] too when I click the image, but it doesn't.
Here is a simple text code for the onMouseDown event:
var hi:THitInfo; begin treeSteps.GetHitTestInfoAt(x,y,true,hi); if (hi.HitNode<>nil) and (hi.HitColumn=6) then begin if hiOnNormalIcon in hi.HitPositions then begin caption:='1'; // Never called end; end; end;
-
I still encounter the problem.
Python script python1.py:
VALUE = 'testing'
Python script python1.py:
MYVAL = 'something else'
Delphi:
var val:variant; GetPythonEngine.ExecFile('python1.py'); val := MainModule.VALUE; // val contains 'testing' varclear(val); // val shows "unassigned" GetPythonEngine.ExecFile('python2.py'); val := MainModule.VALUE; // val contains 'testing' again, even it does not exist in python2.py.
-
When you access a Python variable or constant through MainModule.varname, Python4Delphi retrieves the value and caches it I think.
Subsequent executions of Python scripts, even if they don't define the same variable, won't automatically clear this cached value and MainModule.varname retun the previous value.
is there any function that clears this cached values without reinitializing the python engine?
Example:
python1.py:
MYVALUE = 'test'
Delphi:
python.ExecFile(python1.py);
s:=MainModule.MYVALUE; // This return 'test'
python.ExecFile(python2.py); // This does not have this constant/variable in it
s:=MainModule.MYVALUE; // This return again 'test'
-
Not VCL, FireMonkey.
-
With Delphi 12.2, TGrid and TStringGrid seems not to have any mouse events like onMouseDown, onMouseMove etc., I cant see them in the events, but based on the Delphi help, it should have them. Is it just me or is the help wrong?
-
I need something like the vcl listview, where I have multiple columns, and can select also multiple rows.
I tried:
1. Listbox: No real rowselect, weird to handle multiple columns
2. Listview: No columns, no multi select
3. Grid: No multi select
Is there no control out there simlar the vcl listview? I checked on github, and googled, but had no success.
I cannot believe that such "normal" listview does not exist for firemonkey.
-
I have a treeview with checkboxes and icons (TRzCheckTree). I need to display beneth the node label/text another line of text, but fail to do so. Is there any way to show 2 lines of text for each node without screwing up the icons/checkboxes?
-
Does anybody know of an open source html parser which support xpath expressions and can parse the html content from a string or stream?
I tried the HtmlParserEx from https://github.com/radprogrammer/htmlparser but it only understand simple xpath expressions like //*[@class="description"] but does not work properly using //*[@class="description" and contains(text(),"whatever")] (returning wrong data)
-
I need to send data back from a python script. This, for example, could be a list of strings, separated by newline.
What is the preferred way to send such data back to delphi?
1. Using a module, and its Events property with the onExecute event and process the data or
2. Using the TPythonInputOutput and the onSendUnitData event and process the data?
-
I have some to bytecode compiled python scripts. Is there a way to run them via ExecFile or other functions?
-
Thank you, good to know. But I dont create the module in the main unit, where the python component is on the form. I create it instead when another form is created, in the formcreate event and thought I must free it also in the formclose event. So how shall hat work when I dont free the module? It would get always created again when the form is created.
-
I have a python engine on form 1, dropped to the form, which is working fine.
Now I create a module in code in another unit:
module:=TPythonModule.create(nil); module.Engine:=GetPythonEngine; module.ModuleName:='delphicallback'; module.OnInitialization:=InitPythonModule; module.Initialize;
The InitPythonModule event contains just:
TPythonModule(Sender).ClearMethods; TPythonModule(Sender).AddDelphiMethod('callback',delphi_callback,'callback(name, value)->value');
This works, I execute a python script which send data back to the module "delphicallback". All is fine so far, I get the data from the python script.
When I close the form, I free the module with module.free;
Still all is fine. But when I then try to open the form again, I get the error "No python engine was created" when it creates the module.
What did I miss?
-
I need to modify forms the moment they are created, before they are shown. And there are many forms, so i cant use the onCreate event.
I know I can check the Screen.Forms[], but I would like to use an event, so the code to check the forms array is only called when needed.
Is this somehow possible?
I currently use such test code:
var i:Integer; begin Result := nil; for i := 0 to Screen.FormCount - 1 do begin if Screen.Forms[i].Handle = AHandle then begin Result := Screen.Forms[i]; break; end; end; end; begin if (Msg.message = WM_DWMNCRENDERINGCHANGED) then begin f := GetFormByHandle(Msg.hwnd); if Assigned(f) then begin // Process form here end; end; end;
I know the WM_DWMNCRENDERINGCHANGED is not made for this, but it at least seems to work.
I was hoping there is a proper way to do that, but I had no luck to find anything related.
-
Lets say I have a modal form , which I display with
myform.ShowModal;
How can I close this form when the user click outside the form?
The form wont have a caption, and is just showing a listview and no buttons.
The user can click an entry in the listview, and the form close. But the form should also close when the user click outside the form.
-
47 minutes ago, Uwe Raabe said:You can test this by doing a fresh install in a vanilla VM.
Nevertheless that is an interesting question. Usually patches seemed to be free for existing installations, but as this is an inline release you might be right.
I would try that if I could install it. I tried installing my registered 12.2 and it popup the registration wizard and when I enter my EDN login and serial, I only get an error that I have to enter a valid serial number in order to install Delphi 12.2.
It looks like once the license is expired, I cant even install older Delphi versions. That sucks! I paid for a product which I cannot install, funny.
-
And it came out just short after my subscription expired...
I downloaded the patch from getit. When I start it, it tells me that it will uninstall 12.2 (I cancelled that). I assume that after it uninstalls 12.2, the installer will tell me that it cant install the patch because my subscription is expired, and I might end up with no more delphi installation. Am I right?
-
Thanks, I used a CardPanel and its fine for now.
-
Beside TJvWizard, which looks a little dated, does anybody know other free/open source components to create a wizard/multi-step form?
-
1 minute ago, JonRobertson said:From the "What's new" presentation, it was said that the primary benefit is to extremely large applications (LoC, etc) and that companies with applications that large already used Enterprise or Architect.
So they assume that user using the Pro version do not create large projects? I think its more a money thing again.
-
4
-
-
So the Delphi 64 bit compiler and 64 bit lsp are only in the expensive enterprise and architect versions? Why is that?
-
1 hour ago, corneliusdavid said:Right+Click in the Code Editor and select "Smart CodeInsight" and select "AI Chat".
I dont have that entry in the popup menu, thats the problem.
EDIT: After uninstalling madExcept, it suddenly appeared.
Lockbox 3 GenerateKeys = Range Check Error
in General Help
Posted
I just installed the latest version from github, it does exactly the same.