Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event object
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Event object
Miscellaneous
Thread ID:
00268645
Message ID:
00268645
Views:
47
(this is a bit long, hopefully someone can make some sense of it)

I'm working on a form based on cBizObjMaintenanceForm. On the main form (not inside the pageframe) I've got a bizobj called ROObj. I also have a bizobj on the 6th page that doesn't make itself a primary bizobj until it's needed (ROLinesObj). I also need to have an Event object on this form.

I initially created the Event object when I needed it using:

oChange = CreateObject("ChangeRateEvent")

Then I set it's properties and fired it's ExecuteEvent() method. Everything runs, then the Activate() method of the page fires again automatically. Here's where I started having problems. It seems since I defined the two objects in the DefineParticipatingEntities (one of which is ROLinesObj) that what was happening is that when the Event cleaned up after it's self it closed the views for ROLinesObj. Then the whole thing would fail in the Activate() method because one of my views was closed by the event.

I reread the section in the manual about events and realized I should drop an instance of it on my form, then override the DefineParticipatingEntities() method so it uses the existing objects.

This is where I'm at now. I've changed the Define..() method so that it now reads:

THIS.Add('ROLines','THISFORM.pgfBizObj.Page6.ROLinesObj1')
THIS.Add('LineCode','LineCodeObj')

and made sure that the ROLinesObj is the first thing in the Z-order (the event it way at the bottom).

When I try running the form it dies with a, "Class definition THISFORM.pgfBizObj.Page6.ROLinesObj1" is not found.

I'm kind of at a loss. I'm not sure where I should put the Event object now so that it doesn't attempt to Add() the object before the ROLinesObj1 object has even instanciated. Any thoughts?

-Paul
-Paul

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform