PDA

View Full Version : Help...about object problem?



pierre
06-26-2004, 11:20 PM
Hi all:
I have try to jump page from one to two, and direct to execute page two of object activity(program code). How can I do that it can reach my request? Who can give me some suggestions or simply examples? Thank you for advance.

SRJ
06-27-2004, 12:29 AM
Can you drop some of your code in as I'm having difficulty in working out what exactly you're trying to do. Are you wishing to programmatically jump from one page to another and then execute the pre-load code on the page you're jumping to?

SRJ.

pierre
06-27-2004, 06:49 AM
Hi SRJ:
Thank you for replying fastly. I wish that it jump from page to another page , then to execute one of all objects . It is not pre-load. So can you help me solving this problem? Thanks.

SRJ
06-30-2004, 03:37 AM
Hi Pierre,

I'm guessing this is what you might be after (most of this code is from the Help File):


-- This assumes you are jumping from your current page to one called "Page 2" and then enumerating all objects on Page 2
Page.Jump("Page2"); -- Change "Page2" to whatever you've called the page you want to jump to
tblObjects = Page.EnumerateObjects(); -- Enumerate all objects on the current page and store them in the table variable 'tblObjects'
strOutput = ""; -- Make sure 'strOutput' is empty
for index, object in tblObjects do -- for each record in the table variable 'tblObjects' do the following...
type = Page.GetObjectType(object); -- Get the type of the object
if (type == OBJECT_LABEL) then -- Of the object is a LABEL type then do the following...
strOutput = strOutput..object.."\r\n"; -- Add the object to our 'strOutput'
end
end
Dialog.Message("Information", "Below are the names of all of the label objects
on this page.\r\n\r\n"..strOutput, MB_OK, MB_ICONINFORMATION)

Now, I'm not sure what you mean by
execute page two of object activity(program code) .. are you executing code or dealing with objects? Are you manipulating objects via code? Can you give an example?

SRJ.