Subject Re: beginappend() Problem Fixed
From Lee Grant <camilee@nospam.comcast.net>
Date Sat, 1 Jul 2023 00:59:20 -0400
Newsgroups dbase.getting-started

Ken and Mervyn,

I'm glad I asked and read your comments. It made me realize the mistake
was on me. I had forgotten, that I'm using a container around the
buttons and there is no set rowset for the form. I call it navbar and
it's a collection of buttons with that container from my .cc file.

It's a direct call to the rowset, to provide the actions.  I fixed it by
making the hardline connect to the rowset itself to call the rowset
functions/methods. I had been using form.rowset...but that was an
improper object reference, which is what the error box was giving me. :(

Lee

On 6/30/2023 11:25 AM, Mervyn Bick wrote:
> On 2023/06/30 09:31, Lee Grant wrote:
>> Ken,
>>
>> Along these lines, and somewhat related to this, if I have custom
>> buttons, that I include in the set procedure and use in the form, is
>> there something that prevents the button from knowing the form's
>> rowset relation and being able to beginAppend() the rowset?
>>
>> I've created buttons on the app that does it, but my question goes to
>> the reason a custom button brought in from another file doesn't know
>> the forms rowset for the form that it was placed on?
>
> It doesn't know ANYTHING until you tell it.  A pushbutton actually does
> absolutely nothing except sit on a form and look pretty. :-)
>
> The pushbutton does have some events that the user can trigger.  The
> event probably used most often is the onClick event.  The problem is
> that even triggering an event does absolutely nothing unless the
> programmer has assigned an event handler (function or codeblock) to the
> event.  This is true whether one is using a standard pushbutton or a
> custom pushbutton.
>
> With a custom pushbutton there is a possibility that in the .cc file
> event handlers have been assigned to events.  If no event handler has
> been assigned in the .cc file to an event you want to use then simply
> assign you own event handler exactly as you would with a standard
> pushbutton.
>
> If an event handler has been assigned to an event in the .cc file you
> have two choices.  You can completely bypass the event handler in the
> .cc file by assigning your own event handler as with a standard
> pushbutton.  Alternatively you can set up your own event handler with
> additional code and execute the event handler in the .cc file. Depending
> on the actual code you may need to execute the event handler in the .cc
> file before or after you execute your own code.
>
>
>     function cust_but1_onClick
>        cust_but_classname::onclick()
>         //additional code
>        return
>
> or
>
>     function cust_but1_onClick
>         //additional code
>        return cust_but_classname::onclick()
>
> Mervyn.
>
>
>
>
>
>
>
>
>
>
>