Results 1 to 3 of 3

Thread: Annoyance: Events Not In The Events List

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2014
    Location
    Geneseo, IL
    Posts
    99

    Default Annoyance: Events Not In The Events List

    Is there a reason that a (large) number of events aren't in the Events list in the Properties panel? This is something that as a fairly new user of DataFlex has been a large source of irritation and frustration to me since I started working in the language.

    For example, I wanted to use a non-DB CJGrid to show data that could come from a couple different tables. Filling it is fairly straightforward. But now we want to allow users to delete data from the underlying table. "No problem," I think, "I'll just hook into the right event from the Events list." Unfortunately, there's nothing in the list.

    After talking to a couple other developers, it turns out the event I need is Request_Delete. It's in the Help file (under Methods, which also doesn't make sense to me...), but it's NOT in the Events list.

    So, why did it require so much digging to find the hook to what I would consider a fairly important event?

    This is not the only time I've encountered missing Events, either. Some are undocumented, but some (like this) are in the Help file. It's just when it happened today, I stopped and thought "Hey, maybe DataAccess isn't aware or doesn't realize how much of a problem this is for its users..."

    If it's simply because it's a Method and not an Event, then why isn't there a Methods tab in the Properties panel?
    Mark

    "If it ain't broke, you're not trying." - Red Green

  2. #2
    Join Date
    Feb 2009
    Location
    Hengelo (NL)
    Posts
    1,891

    Default Re: Annoyance: Events Not In The Events List

    Hello Mark,

    I see your point and you are right: Request_delete is not really an event. It is a method to delete the current record of the main Datadictionary, taking validation in consideration, deleting child records if needed, etcetera.

    What you do in this case, is to override this method and do something else. You could 'forward send' it where it will do it's normal thing, but that is up to you.

    Maybe for practical reasons it should be listed as an event although it might not classify as one.

  3. #3
    Join Date
    Feb 2014
    Location
    Geneseo, IL
    Posts
    99

    Default Re: Annoyance: Events Not In The Events List

    I would be OK with Request_Delete and other similar procs/functions not being in the list if they were included in another list that would help to automatically generate the stub code, the same way as clicking on an Event in the Properties dialog does. Maybe a "Methods" tab, right after "Events'?

    For reference, the Microsoft .Net Code Editor has a combo form at the top of the IDE that gives you a list of all available methods, properties and events for an object. It differentiates them by icons. I'm not saying that's how DataFlex should do it, but it does make it convenient to be easily able to select what handler you want inserted from a list...
    Mark

    "If it ain't broke, you're not trying." - Red Green

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •