CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

New features in 1.7-2.1, some questions.

General discussion

by George » 14 Nov 2013 12:42

delphi code
procedure TwForm1.wRegion1JQDragOptionsStop(Sender: TObject; AParams: TStringList);
var
wRegionJsonObj: ISuperObject;
cssVal : string;
begin
CGCallBackDisableAjaxResponse();
try
wRegionJsonObj := SO(AParams.Values['wRegion1']);
cssVal := wRegionJsonObj.S['Left'];
wRegion1.Left := copy(cssVal, 1, cssVal.Length - 2 {delete "px"}).ToInteger;
cssVal := wRegionJsonObj.S['Top'];
wRegion1.Top := copy(cssVal, 1, cssVal.Length - 2 {delete "px"}).ToInteger;
cssVal := wRegionJsonObj.S['Width'];
wRegion1.Width := copy(cssVal, 1, cssVal.Length - 2 {delete "px"}).ToInteger + 2 {borders};
cssVal := wRegionJsonObj.S['Height'];
wRegion1.Height := copy(cssVal, 1, cssVal.Length - 2 {delete "px"}).ToInteger + 2 {borders};
finally
CGCallBackEnableAjaxResponse();
end;
end;


With CGCallBackDisableAjaxResponse, wRegion1 will not be updated without RenderRegionAsync of wRegion1 (or any parent region).
Even if i call RenderRegionAsync for other (non parent) region.
Am i correct? Or in this sample i can remove CGCallBackDisableAjaxResponse...
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by Jorge Sousa » 14 Nov 2013 12:54

If you're not going to use Render Async

You must remove CGCallBackDisableAjaxResponse and CGCallBackEnableAjaxResponse

Best Regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by George » 25 Nov 2013 14:43

Hi!
When you planning to release stable version?
Or at least, without memory leaks?
I'm going to publish update to my project.
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by Jorge Sousa » 25 Nov 2013 15:40

Hi

When you planning to release stable version?


The stable version now, is the last 1.8.xxxx

Is about to be published, we plan to do it this week.

Or at least, without memory leaks?


What do you mean at least???? are you unhappy for some reason?

If you are just say...

Best Regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by George » 25 Nov 2013 17:06

What do you mean at least???? are you unhappy for some reason?

:D
"At least" - i'm not mean something negative. Never mind.
Yes, there is some problems, but i'm sure, everything will be fine :)
Most actual problems for me are:
When parent frame is freed - dialog still opened in browser
Dialog with HTMLEditor and resizing
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by Jorge Sousa » 25 Nov 2013 18:09

Hi

Code: Select all
When parent frame is freed - dialog still opened in browser


I'm sure but we don't understand what you mean, can you , at least, detail a little bit more, or send a test case?

Thanks in advance
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by George » 25 Nov 2013 18:46

Sure, i will make a demo tomorrow.
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by George » 26 Nov 2013 07:42

Hi!
I found my mistake..
There is no problems with frames and dialogs. Sorry for inconvenience.

delphi code
procedure TIWForm8.CreateFrame(AFrameClass: TIWCGFrameClass);
begin
CGCallBackDisableAjaxResponse; // if i comment this line
if Assigned(FrameComp) then
FreeAndNil(FrameComp);
// CGCallBackDisableAjaxResponse; // and uncomment this one, IWCGJQDialogEx from FrameComp will be closed as expected (my mistake)
try
FrameComp := AFrameClass.Create(Self);
FrameComp.Parent := IWCGJQRegion1;
FrameComp.Align := alClient;
finally
CGCallBackEnableAjaxResponse;
end;
RenderRegionAsync(IWCGJQRegion1);
end;
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by Jorge Sousa » 26 Nov 2013 10:36

ok
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by George » 26 Nov 2013 14:22

How to clear AjaxBrowserHistory?
I'm using AjaxBrowserHistory.AddHash('sometag') when each frame loaded.
When user logged off, i want clear hash history.

Second question. Let's look what happens:
1. User1 opened my site "http://127.0.0.1:10700".
2. New session created and custom authorization frame opened.
3. User enters login, password and goes to some frame.
(4. instead of calling default CreateFrame procedure (similar as TIWForm8.CreateFrame - posted above),
i must call "AjaxBrowserHistory.AddHash('request-S01')", because this will trigger code from event AjaxBrowserHistoryHashChange.
Maybe AjaxBrowserHistory.AddHash should not trigger event in this case? (for example: AjaxBrowserHistory.AddHash(AHash:string, DontTriggerEvent:boolean=false)) and we will be able to call both methods in sequence: CreateFrame; AjaxBrowserHistory.AddHash()).
5. Ok, anyway, frame opened. And user copied url (http://127.0.0.1:10700/$/#request-S01) and send it via email to User2.
6. User2 (not authorized) click the link http://127.0.0.1:10700/$/#request-S01 from mail.
7. New session created and custom authorization frame opened.
8. User enters login, password. But, AjaxBrowserHistory.Hash is empty, i can't determine which frame should be opened.

PS: 127.0.0.1:10700 - i am User1 and User2 :) testing this new feature.
Any ideas how to handle this? ;)
Last edited by George on 26 Nov 2013 19:15, edited 1 time in total.
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

PreviousNext

Return to General - Archive

Who is online

Users browsing this forum: No registered users and 0 guests

Contact Us.