Jump to content

microtronx

Members
  • Content Count

    107
  • Joined

  • Last visited

Posts posted by microtronx


  1. On 3/12/2021 at 1:31 PM, Juan C.Cilleruelo said:

    Delphi 10.4.2 Right Click over a word -> Find Declaration, Not working.

     

    Does anyone note this problem? Or is it only my problem?

     

    Never works. I've tried with existing files in the uses clause, with units in the path and more.
     
    The only occasion in that works is when the Declaration is in the same file. 

    Same here. Do you have DevExpress Units in your uses? I see this problem only when those units are in use. In small projects its working but not in bigger ones.


  2. Installation went good from 10.4.1 to 10.4.2. Only problem I had, was with third party components / packages. I.e. I had to reinstall i.e. Reportbuilder 20.04 for Sydney but now it starts without any problems.

     

    Anyone using 10.4 (or 10.4.2) in production environment? We're stuck at 10.3 ...


  3. 5 hours ago, aehimself said:

    I have a method that hides, rearranges and resizes components based on some conditions runtime. All is working fine, but the question eventually arrived: is is possible to "reset" everything to it's original (design time) state?

    What about only creating your form without applying the saved changes? = That should be your design time state, or I'm wrong?


  4. 10 hours ago, A.M. Hoornweg said:

    Please don't misuse "tag" for pointers.

     

    I'd rather use a tDictionary<tcomponent, tSomethingelse> to store associations between components and objects. It's much more universal and transparent.

     

    I have created a global "tDictionary<tComponent, tmxEvents>" and a small helper function to return an entry or add an entry if it does not exists ... working perfect. Thanks for your tips guys.


  5. After searching the internet a lot i've decided to create a new unit to be able to assign multiple afterscroll or afteropen events to one component ... very simple in runtime. 

    Informations on https://www.delphipraxis.net/143341-event-multicast-problem-howto-sender-methodname.html helped me to create a basic unit.

     

    Pls check it at https://github.com/MicrotronX/Multicast-Events

     

    I know, there must be something better out there ... but for me this works very good ... 

    PS: I cannot guarantee that the source code is free of bugs!

     

    Example-Usage in a tDataset descant:

    unit myMulticastEventDatasetUnit;
    interface
    uses System.Classes, Data.DB, mxEventsUnit;
    
    type
    	tmyMulticastEventDataset=class(tDataset)
    	private
    		function fmxevents_get:tmxevents;
    	public
    		fmxEvents:TmxEvents;
    		constructor Create(AOwner:TComponent); override;
    		destructor Destroy; override;
    	published
    		property mxEvents:TmxEvents read fmxevents_get;
    	end;
    
    implementation
    
    constructor tmyMulticastEventDataset.Create(AOwner: TComponent);
    begin
    	inherited;
    	fmxEvents:=nil;
    end;
    
    destructor tmyMulticastEventDataset.Destroy;
    begin
    	if assigned(fmxEvents) then fmxEvents.free;
    	fmxEvents:=nil;
    	inherited;
    end;
    
    function tmyMulticastEventDataset.fmxevents_get: tmxevents;
    begin
    	// we Create the tmxEvents only if there is a need
    	if not assigned(fmxevents) then begin
    		fmxEvents:=tmxEvents.create(self);
    	end;
    	result:=fmxevents;
    end;
    end.

     

    If someone knows a way to inject this into tDataset itself, you're free to change the code!

     

    Declarations for Examples:
      myDS:tmyMulticastEventDataset;
      procedure FirstAfterScrollEvent(vDataset:tDataset); 
      procedure SecondAfterScrollEvent(vDataset:tDataset); 
      
    Example-Usage for registering a AfterScroll Event:
      myDS.mxEvents.Event('AfterScroll').AddDatasetNotifyEvent('uniquenameforevent1',  FirstAfterScrollEvent) ;
      myDS.mxEvents.Event('AfterScroll').AddDatasetNotifyEvent('uniquenameforevent2',  SecondAfterScrollEvent) ;
    
    Example-usage for disabling a already registered AfterScroll Event:
      myMCDS1.mxEvents.Event('AfterScroll').Disable('uniquenameforevent1') ;
      myMCDS1.mxEvents.Event('AfterScroll').Disable('uniquenameforevent2') ;

     


  6. 59 minutes ago, ŁukaszDe said:

    You are not alone... report in topic: https://quality.embarcadero.com/browse/RSP-30910

     

    Why we do not go another way ... and why does Embarcadero do not give Andreas free lifetime licenses or a lifetime subscription? 
    We / Subscription owners pay a lot and sometimes we don't get anything within that subscription period + Andreas is doing / has done a lot for Delphi in the last years ... so this would be a very good roi for embarcadero IMO.

     

    I don't know if Andreas would accept this ... but if he can, it would be a big plus for delphi ...

    • Like 3

  7. I would use "Exit;". 

     

    Having nearly same needs and have a created a tObject for managing a tDictionary<string, __myrecord> to manage everything ... very fast IMO.

    Be sure to use "MonitorEnter" and MonitorExit if this can be used in multithreaded applications like

     

    function tmyComponent.getvaluerecord(vName: string; const vDefaultValue: variant): __MyRecord;
    var
        vValue:__MyRecord;
    begin
        if MonitorEnter(fDATA, fMonitorTimeout) then begin
            try
                vname:=trim(lowercase(vname));
    
                if fData.TryGetValue(vname, result)=false then begin // we don't have that key in dictionary ... return default value ... or create a new entry etc..
                    result.vwert:=vDefaultValue;
                    result.isObject:=false;
                    result.isFile:=false;
                    result.doFreeObject:=false;
                    result.vcomponent:=nil;
                    result.vname:='';
                    result.vdtstamp:=0;
    
                    result.vtype:='';
                    result.vgroup:='';
                end;
            finally
                MonitorExit(fDATA);
            end;
        end;
    end;

     

    • Like 1

  8. 14 minutes ago, Rollo62 said:

    Thanks for pointing my head to the Patch tool.

    Is this an official patch, or not, why this crazy name ?

     

    What I don't really understand is what this has to do with TeeChart.

    I have currently similar issues, linking to TChart is broken.

     

    Is this Patch Tool of any use, or is this just an internal test of Embarcarero before launching the real Patch-2 ?

    Is there any available Readme BEFORE installation ?

     I think the Patch has uninstalled all components (Teechart Standard is one of them) which i had selected in time of installation ... right after the patch installed i saw all optional software & languages not installed any more in platform manager.

    After reinstalling them with platform manager (tools menu), everything fine again ...


  9. 1 minute ago, Dave Nottage said:

    Same here, however...

     

    ..this may be the case for you, however it is extremely usable for me. Making generalisations like this may discourage others from using it where it may well be quite usable for them.

    You are right, it may be usable for others but on our side with big projects it crashes too often. I think new users and new projects could work fine ... 😉


  10. Hi Guys, anyone having also these

     

    image.png.1ac5ec00db85d102afde56d9667fc5c2.png

     

    all over the time. Mostly if i click to a function or procedures name with pressed CTRL, it should jump to the declaration or to the function but it does not, it crashes .... 

    i hoped 10.4 is better but not too much ... 

     


  11. 18 minutes ago, Lars Fosdal said:

    Losing 40 minutes of work should be impossible in Rio.

    image.png.63cc3d15dd202f46587d3cce30ff64cd.png

    In last case i had no saved files ... don't know why but IDE has not asked my on restart for autorecovering files found ... Normally I click a lot to "Save All" button but in this case it was a complicated project and i forgot this.

    I will try to setup the interval to 1 minute, lets see if it helps next time ... or hope 10.4 will not have these problems with such memory consumption ...

×