Thanks. Your corrected demo works (if only one frame is used).
Here is my feedback for run time created rule using multiple frames:
If I am using multiple frames I must use
real frame name (as you suggested)
for every frame I create It can't be just '
Frame' as I saw in your original cgDevTools demo code:
- Code: Select all
CGFindUniqueComponentName(Self,'Frame')
That was the reason why run time created rule for new edit I added to your original edit features frame demo didn't work (see video in my first post).
In demo I sent you (and you corrected it) I added another frame and run time created rule works correctly on
ALL frames
ONLY if I use:
- Code: Select all
function TIWComponentForm.CreateNewFrame(AFrameClass: TIWCGFrameClass): TFrame;
var
NewName: string;
begin
NewName:= CGFindUniqueComponentName(Self,Copy(AFrameClass.ClassName,2,length(AFrameClass.ClassName)-1)); //not just 'Frame' !!!
...
...
If I add same code to your original cgDevTools demo (edit features frame with my new edit added) it works too. So obvioulsy run time created rule works correctly ONLY if frame is created with not only correct FrameClass BUT ALSO frame's real name.
Is it OK to create frames that way?
- Code: Select all
NewName:= CGFindUniqueComponentName(Self,Copy(AFrameClass.ClassName,2,length(AFrameClass.ClassName)-1));
At least rune time created rules works in that case
I am newbie, learning new cgDevTools stuff every day. Thanks for your help. I really appreciate it.
P.S. (not related to topic)
As a total newbie I am missing some cgDevTools programming tutorial how to do some things. There are so many properties so now I am learning by studying your demo and reading all forums topics, but as there are so many cgDevTools properties it is hard to find out what to change to get some result.
Your support is TOP. No question about that. But I understand we are taking away your time for basic questions which could be described in some tutorial with basic topics (working with frames, validating input...). So here is my
+1 vote for such tutorial.