Recent

Author Topic: Best way to exchange data between a form and a unit  (Read 66903 times)

cdbc

  • Hero Member
  • *****
  • Posts: 2462
    • http://www.cdbc.dk
Re: Best way to exchange data between a form and a unit
« Reply #270 on: August 04, 2025, 12:06:40 am »
Hi Hans
Yup, it's amazing how such a small cog in the /machine/ can have such a big impact, on making the /machine/ work correctly  ;D 8)
I think it's great that you're picking the MVP apart and getting to know the inner workings, by simplifying it to its basic components \o/\ö/\o/
The thing with CORBA interfaces, when you're creating directly to the interface (as we do), is you have to have some means of freeing the object again ...or (as you've found out) you'll have mem-leaks  :D I'd say, that such a method is mandatory in dealing with CORBA / RAW interfaces.
I'm glad to hear, you're 'chugging' along nicely  :)
Fair winds to you my friend and happy coding  8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6 -> FPC 3.2.2 -> Lazarus 4.0 up until Jan 2025 from then on it's both above &: KDE6/QT6 -> FPC 3.3.1 -> Lazarus 4.99

Hansvb

  • Hero Member
  • *****
  • Posts: 860
Re: Best way to exchange data between a form and a unit
« Reply #271 on: August 27, 2025, 08:25:56 pm »
'chugging' along. i like that.
Maybe the beginning of a light mvp version for quick small tools. I don't know yet. For me it is a study object that grows very, very slowly when I occasionally feel like doing something in Lazarus, but don't feel like continuing with something existing.



cdbc

  • Hero Member
  • *****
  • Posts: 2462
    • http://www.cdbc.dk
Re: Best way to exchange data between a form and a unit
« Reply #272 on: August 27, 2025, 08:36:11 pm »
Hi Hans
COOL  8-) Gimme Gimme Gimme, Dang I'm curious \o/
Thanks Mate =^
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6 -> FPC 3.2.2 -> Lazarus 4.0 up until Jan 2025 from then on it's both above &: KDE6/QT6 -> FPC 3.3.1 -> Lazarus 4.99

Hansvb

  • Hero Member
  • *****
  • Posts: 860
Re: Best way to exchange data between a form and a unit
« Reply #273 on: August 27, 2025, 09:22:29 pm »
Don't expect too much from it. You can probably make this in 10 minutes. It's only a beginning but I'm slowly getting an idea of how it can grow.

cdbc

  • Hero Member
  • *****
  • Posts: 2462
    • http://www.cdbc.dk
Re: Best way to exchange data between a form and a unit
« Reply #274 on: August 28, 2025, 12:07:08 am »
Hi Hans
I like it! Nicely done mate =^
True to the principle of "Separation of concerns".
If I may; One pitfall I can see, that you should be careful with is, when you use the result from 'SendToModelObj':
Code: Pascal  [Select][+][-]
  1.   Edit2.Text:= FPresenter.SendToModelObj(@lRec, Edit2.Text, 'AnotherRec');
and the data comes through your /Observer-Callback/ and then gets assigned to the same view-object e.g.: 'Edit2.Text' -- One of the result assignments will _hide_ the other.  ...No danger, but you might miss some data and be hard pressed to find "Ze Bug".
Other than that, good work & understanding with keeping things working where they belong.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6 -> FPC 3.2.2 -> Lazarus 4.0 up until Jan 2025 from then on it's both above &: KDE6/QT6 -> FPC 3.3.1 -> Lazarus 4.99

 

TinyPortal © 2005-2018