Jump to content

Attila Kovacs

Members
  • Content Count

    2084
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by Attila Kovacs

  1. Attila Kovacs

    freeing an object in different process

    @Fr0sT.Brutal eauhm, yes, thread of course.... thanks!
  2. Attila Kovacs

    pipeline and visual feedback

    Never underestimate this kind of answers, this tells me always that there is a user error. It was. Thx. I have here something what I'm not getting and very hard to debug. (got it, not even multi threading problem, it just revealed it \o/) btw, I still can't figure out what "Parallel.TaskConfig.OnMessage(Self)" does, as 2nd parameter to a stage. thx
  3. Attila Kovacs

    FireDac Query Issue

    It "closes" the dataset, then you can manipulate its properties including sql text etc.. then you set it active again with open() or with sql() in firedac, I'm not familiar with the "sql()" method, but it's for sure a shortcut for setting the Sql text, parameters and opening the query.
  4. Attila Kovacs

    FireDac Query Issue

    anyway, you could consider using temporary queries instead of one (or more) particular queries as a swiss knife on a datamodule: procedure DoSomething; var Q: TFDQuery; begin Q := TFDQuery.Create(nil); try Q.Connection := dm.FDConnection1; Q.Sql('....'); <DoSomething> Q.Close; finally Q.Free; end; end; or similar.. or "Q" as a class Field like "FQxy" if you have to work with db controls...
  5. Attila Kovacs

    FireDac Query Issue

    if this works without a ".close" between the two ".open()" then I'm speechless.
  6. Attila Kovacs

    Random Access Violation?

    AV's are cool, because you have the address. btw, did you look for pervasive/windows logs?
  7. Attila Kovacs

    pipeline and visual feedback

    As I put more code into the pipeline stages some questions are arising. For example, some of the exceptions are arriving as "string" into the final output collection instead as "exception". One case is "Abort" and the other one is if I'm re-raising an exception in the stage code. Why is that? Also, what is the proper way to re-run a task or add a new one after "CompleteAdding"? I would like to return the task with the exception and be able to re-fire the same task. (Network communication) Do I need a new pipeline?
  8. Attila Kovacs

    pipeline and visual feedback

    Ha-ha. ATM I entered the code here I just noticed that pipeline is a local variable, and also an interfaced obj. 🙈
  9. Attila Kovacs

    pipeline and visual feedback

    Sadly I'm stuck already, if I omit WaitFor(), nothing happens. Occasionally one task will be executed if I'm hitting the start button like a maniac, but I have 4 values assigned to the input. I'm playing with the example with retriever/inserter. pipeline := Parallel.pipeline // .Stage(Retriever) // .NumTasks(Environment.Process.Affinity.Count * 2) // .Stage(Inserter, Parallel.TaskConfig.OnMessage(Self)) // .Run // ; pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.CompleteAdding; // pipeline.WaitFor(INFINITE); I've tried to put ".run" after completeadding as a 'trial and fail'attempt, and in this case on the first run 2 tasks are executed, and from the second run all tasks are executed. I'm really missing the explanations from the doc, there is also an example "procedure TfrmOtlParallelExceptions.btnPipeline1Click(Sender: TObject);" where is no waitfor() but processing output right after "CompleteAdding", which is also confusing. // Provide input 37 with pipeline.Input do begin 38 // few normal elements 39 Add(1); 40 Add(2); 41 // then trigger the exception in the first stage; 42 // this exception should be 'corrected' in the second stage 43 Add('three'); 44 Add(4); 45 CompleteAdding; 46 end; 47 48 // Process output; there should be no exception in the output collection 49 for value in pipeline.Output do 50 Log(value.AsString);
  10. Attila Kovacs

    pipeline and visual feedback

    Thank you Primož. Awesome lib.
  11. Attila Kovacs

    pipeline and visual feedback

    Thanks, does this mean pipeline is the wrong approach here or can I run the pipeline without Waitfor? Could not find anything in docs. Edit: ok, I think I just have to omit WaitFor. I'll give it a try.
  12. you could just work 7/24, problem solved
  13. Attila Kovacs

    Feature: ParentFont? Yes, but...

    Or get rid of "parentfont" and do it like css? Inherit and overwrite if apply. Anyway, you have to implement it carefully to not to affect rendering speed too much and keep the dfm as tiny as possbile.
  14. Attila Kovacs

    Issue with TVirtualStringTree OnNodeDblClick

    defer your showmessage with a custom message
  15. Attila Kovacs

    Issue with TVirtualStringTree OnNodeDblClick

    because the mouseup event will be swallowed by the modal window (showmessage)
  16. Attila Kovacs

    Why is ShowMesssage blocking all visible forms?

    because showmessage pops up a form in modal mode?
  17. Ok. Try to restructure your units until TINIComparer and TCompareType are in the same unit, and don't be shy creating 2-3 more units if needed. Unseen, i would say, your structure is done when "uINIComparerStructure" becomes empty.
  18. First you said it's in a different unit, now you are telling me, you want to hide it. I'm not sure what your goal is, why would you have it in a different unit or why would you want to hide it? There is something else you are not telling or you are not sure about. Lay your cards on the table.
  19. constructor Create(const AIniFileName1, AIniFileName1: string; AOptions: TCompareOptions = []); Where else would you declare TCompareOptions as in the same unit as this class is?
  20. @Mike Torrettinni It's completely fine, I'm just against "Indian Naming". What if your class gets 2 more options, how would you name the constructors?
  21. as long as nobody else have to use this class and you have memories like an elephant, it should be fine..
  22. Attila Kovacs

    Generic class

    @Stefan Glienke yes, you are right, I wasn't paying too much attention, and I also wasn't following any compiler hint, I saw this and just added "new" without thinking.
  23. Attila Kovacs

    Generic class

    @Stefan Glienke Thx a lot! I just followed the compiler hints 😉
  24. Attila Kovacs

    Generic class

    @Stefan Glienke I've tried, without success. "public virtual void Test()" in TTest1 and "public new void Test() {" in TTest2. That's why I'm asking, but really don't want to convert this conversation into a c# for dummies (me).
  25. Attila Kovacs

    Generic class

    I have never seen c# before. And we were living in a small shoebox in the middle of the road. Now, hijacking the topic for a small moment, how do you make this c# snipplet to print "TTest2.Test"?
×