![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 8 of 8 total |
![]() |
Mon, Dec 19 2016 8:17 AM | Permanent Link |
kamran | Hi
Just searched the forum and found: http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&msg=4575&page=5 http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=5&msg=4603 Jim Gallagher / Mark Brooks There is a "skeleton" project I downloaded from the above links into EWB2 but for some reason I cannot get it to work. I run compile and then run. " I just get a blank screen " Has something changed? I vaguely remember having this working in EWB1 Does this work for anyone else? Thanks Kamran |
Mon, Dec 19 2016 8:51 AM | Permanent Link |
Mark Brooks Slikware | Hi Kamran
Things certainly got easier in EWB2 (XX.XX) when Tim introduced the Anchor entity. The basic mechanism to follow is like this: 1) Get a handle to the OnAnchorChange event in your startup code e.g: Address.OnAnchorChange := TrapOnAnchorChange; 2) Create an OnAnchorChange event handler e.g: procedure TfrmMain.TrapOnAnchorChange(Sender: TObject); 3) Parse Address.Anchor within this event handler. There is no predefined format for the anchor so you'll need make one yourself, but typically this will include some information that tells your app what "View" to show and maybe what "Item" to render therein e.g: View=Contacts&Id=128 4) To programatically set to a specific "View" just set the anchor in code e.g: Address.Anchor := 'View=Home'; Hope this helps Mark |
Mon, Dec 19 2016 9:23 AM | Permanent Link |
kamran | Hi Mark
Thanks for that. I am not sure what code I have but I downloaded from the link as skeleton.zip (Jim Gallagher). Is that your code or his .. not sure.!! But it was this that I was trying to compile and run.. but was getting a "blank screen". Is your code and his code the same? they appear to be similar / do the same thing / which is better to use? Just need to know what to use, and get it to work for me; as I think that the mechanism is quite clever.. regards Kamran Mark Brooks wrote: Hi Kamran Things certainly got easier in EWB2 (XX.XX) when Tim introduced the Anchor entity. The basic mechanism to follow is like this: 1) Get a handle to the OnAnchorChange event in your startup code e.g: Address.OnAnchorChange := TrapOnAnchorChange; 2) Create an OnAnchorChange event handler e.g: procedure TfrmMain.TrapOnAnchorChange(Sender: TObject); 3) Parse Address.Anchor within this event handler. There is no predefined format for the anchor so you'll need make one yourself, but typically this will include some information that tells your app what "View" to show and maybe what "Item" to render therein e.g: View=Contacts&Id=128 4) To programatically set to a specific "View" just set the anchor in code e.g: Address.Anchor := 'View=Home'; Hope this helps Mark |
Mon, Dec 19 2016 10:23 AM | Permanent Link |
Ivan Mihailov | Hi,
I think, it would be great if Tim (or someone else) create a small example application, how to use anchors in EWB application to handle browser back-button navigation. Ivan |
Mon, Dec 19 2016 11:17 AM | Permanent Link |
Uli Becker | Kamran,
forget the old code samples. They were created for older versions of EWB. Mark told you very well what to do. Please try to use his code snippets. When I have time tomorrow, I'll create a sample project. Uli |
Mon, Dec 19 2016 3:49 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Ivan,
<< I think, it would be great if Tim (or someone else) create a small example application, how to use anchors in EWB application to handle browser back-button navigation. >> I'll see about putting something together. I'm finally on the other side of the auto-sizing improvements, so I'm wrapping up 2.06 right now. Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 20 2016 7:06 AM | Permanent Link |
Uli Becker | Ivan,
> I think, it would be great if Tim (or someone else) create a small example application, > how to use anchors in EWB application to handle browser back-button navigation. OK, here we go... Uli Attachments: Demo Hash.zip |
Tue, Dec 20 2016 7:35 AM | Permanent Link |
kamran | Thanks Uli and Mark
Your demo: It's simply illustrated and Mark was spot on with his initial explanation I was looking to deep at Marks and Jim's old code and assumed it to be more complex. But anchors are great and simple to use. Thanks again for the example. Regards Kamran Uli Becker wrote: Ivan, > I think, it would be great if Tim (or someone else) create a small example application, > how to use anchors in EWB application to handle browser back-button navigation. OK, here we go... Uli |
This web page was last updated on Saturday, June 3, 2023 at 10:17 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |